Thursday, 17 November 2016

How can I get the continuous-time transfer function coefficients (or poles and zeros) from the corresponding discrete-time TF and vice versa?


Let's say I have a continuous time transfer function which I know its numerator coefficients $(B^c = [b^c_m, ..., b^c_1, b^c_0])$ and denominator coefficients $(A^c = [a^c_m, ..., a^c_1, a^c_0])$. Also I know its zeros $(Z^c = [z^c_m, ..., z^c_1])$, and poles $(P^c = [p^c_m, ..., p^c_1])$ and gain $K^c$.


How can I get the numerator $(B^d = [b^d_m, ..., b^d_1, b^d_0])$, denominator $(A^d = [a^d_m, ..., a^d_1, a^d_0])$, zeros $(Z^d = [z^d_m, ..., z^d_1])$, poles $(P^d = [p^d_m, ..., p^d_1])$, and gain $K^d$ of an equivalent discrete-time transfer function (considering sampling time of $T_s$)


I know about the transformation methods (like Tustin or bilinear approximation), but those transformation methods convert the transfer function from continuous to discrete and it is not obvious from that how the numerator and denominator coefficients change. In other words I need the implementation of two functions like below:


$$[A^d, B^d] = \text{function_1} \,(A^c, B^c)$$ $$[Z^d, P^d, K^d] = \text{function_2} \,(Z^c, P^c, K^c)$$


I know for function_1 there is a Matlab function called c2d() which does that, but that is not compatible with Matlab coder, and I need to write my own function. So that is why I am interested to know the explicit mathematical formulas that does the conversion between coefficients (or zeros and poles) and not the transfer function.


For the function_2 maybe I have the answer but I am not sure it can handle all cases (including single/multiple poles or zeros):


$Z^d = e^{Z^c \times T_s}$


$P^d = e^{P^c \times T_s}$



$K^d = 1-e^{-K^c \times T_s}$ ---> (is the minus sign right?)




No comments:

Post a Comment

readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...