Effect of sampling time on the time-domain response of discrete systems
조회 수: 13 (최근 30일)
이전 댓글 표시
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
채택된 답변
Yu Jiang
2015년 5월 21일
편집: Yu Jiang
2015년 5월 21일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!