Effect of sampling time on the time-domain response of discrete systems
4 views (last 30 days)
Show older comments
Hello, I am trying to solve this problem: Obtain the impulse response of G_p = 100/(s^2+100) preceeded by a zero-order hold with sampling time T=0.05. Verify the solution with MATLAB.
My solution: The system transfer function, assuming T=0.05, is G(z) = 0.1224(z+1)/(z^2-1.7552z+1). Using long division method, the unit impulse response of the system is y(0)=0, y(1*T)=0.1224, y(2T)=0.3372, y(3T)=0.4695. Here is MATLAB code:
>> G = tf([0.1224 0.1224], [1 -1.7552 1], 0.05);
>> y = impulse(G, 3*0.05)
y =
0
2.4480
6.7447
9.3903
Which does not match with the theory. On the other hand, if I do not specify the sampling time or just use Ts = 1, the results will match:
>> G = tf([0.1224 0.1224], [1 -1.7552 1], [])
G =
0.1224 z + 0.1224
-----------------
z^2 - 1.755 z + 1
Sample time: unspecified
Discrete-time transfer function.
>> y = impulse(G, 3)
y =
0
0.1224
0.3372
0.4695
I am not sure what I am missing here. I appreciate your input.
0 Comments
Accepted Answer
Yu Jiang
on 21 May 2015
Edited: Yu Jiang
on 21 May 2015
There is a difference between the results from R2011a and R2014b. It is however expected.
In the release notes of Controls Systems Toolbox R2012a, you can find the following:
Rescaled Impulse Response and Impulse-Invariant Time Domain Conversion
For discrete-time dynamic system models, the input signal applied by impulse is now a unit area pulse of length Ts and height 1/Ts. Ts is the sampling time of the discrete time system. Previously, impulse applied a pulse of length Ts and unit height.
That is to say, before R2012a, the magnitude of the impulse response is always 1, but after R2012a, the magnitude is changed to Ts. Therefore, by specifying different sampling times, you end up with different results. What you can do in your use case is to multiply the results with 1/Ts. Then, you will have consistency in the results with different sample times.
For example, instead of
>> y = impulse(G, 3*0.05)
Please do
y = impulse(G, 3*0.05)*(1/0.05)
Hope this helps!
-Yu
2 Comments
More Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!