matlabinversetransfer-function

Is there an inverse for `tf()`?


I have the numerator and the denominator of a continuous time transfer function. I want to obtain the numerator and denominator of an equivalent discrete time transfer function separately.

My code is as below:

SAMPLING_PERIOD = 0.01;
% Hc(s) = Bc(s)/Ac(s) = 25 / (s^2 + 3s + 25);
Bc = [25];
Ac = [1, 3, 25];
Hc = tf(Bc, Ac);
Hd = c2d(Hc, SAMPLING_PERIOD);
[Bd, Ad] = inverse_tf(Hd);  % I need a function like this
% My aim is to obtain Ad and Bd; where,
%    Bd: Numerator of the corresponding discrete time system
%    Ad: Denominator of the corresponding discrete time system

How do I do this?


Solution

  • You can use tfdata to obtain the numerator and the denominator coefficients, like this:

    [Bd, Ad] = tfdata(Hd);
    

    Notice the order of the return values Bd and Ad.