c2d with 'impulse' method

9 次查看(过去 30 天)
Buddy
Buddy 2021-3-13
评论: Buddy 2021-3-13
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:
T=0.1.
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.

采纳的回答

Paul
Paul 2021-3-13
编辑:Paul 2021-3-13
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:
bode(g_s,g_z)
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.

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by