c2d with 'impulse' method

14 views (last 30 days)
Buddy on 13 Mar 2021
Commented: Buddy on 13 Mar 2021
According to the z-transform theory, the z-transform of the step unit u(t) is z/(z-1), regardless the sampling time. Aldo the s-transform of u(t) is 1/s. I want to obtain in Matlab z/(z-1) using the fucntion c2d for a sampling time T=0.1. This is my code:
g_s = tf([1],[1 0]);
g_z = c2d (g_s, T, 'impulse');
However, the result for g_z is: 0.1*z/(z-1). May anyone explain why the factor 0.1 (the sampling time) appears in g_z? Which command should I use to obtain z/(z-1)? I would appreciate any help.
PS: I also observed that when I plotted the impulse response of g_z using the command impulse(g_z), the plot was right.

Accepted Answer

Paul on 13 Mar 2021
Edited: Paul on 13 Mar 2021
I don't think you can use c2d() and get z/(z-1) with a sample time T = 0.1.
In, short, the factor of 0.1 is needed to have the gain of g_s and the gain of g_z match in the frequency domain. You can see this with:
impulse(g_z) gives the "right" plot because the Control System Toolbox command impulse(g_z) does not return the inverse z-transform of g_z, or the unit pulse response. Rather, it returns the ouput in response to a unit pulse scaled by 1/T. So the output of impulse(g_z) is really the inverse z-transform of 1/T*g_z = 1/T * T * z / (z-1) = z/(z-1) which are the samples of the continuous time unit step.
  1 Comment
Buddy on 13 Mar 2021
Ok. Thanks Paul. Your explanation is clear.

Sign in to comment.

More Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!