One zero is missing in the result of c2d function uses 'matche'
4 ビュー (過去 30 日間)
古いコメントを表示
Commands and results are as follows
sysd=c2d(tf(11,[1,1,0]),.1,'matched')
sysd =
0.05237 z + 0.05237
----------------------
z^2 - 1.905 z + 0.9048
Sample time: 0.1 seconds
Discrete-time transfer function.
However, according to the textbook, there seems to be two zeros. What's the problem? Thanks.
0 件のコメント
採用された回答
Paul
2025 年 3 月 17 日
sysc = tf(11,[1,1,0])
sysd=c2d(sysc,.1,'matched');
zpk(sysd)
Is the addtional zero in the textbook also at z = -1?
3 件のコメント
Paul
2025 年 4 月 2 日
The continuous time transfer function is
sysc = tf(11,[1,1,0])
The relative order between the denominator and numerator is 2, which means that sysc as two zeros at infinity, which govern the asymptotic behavior of the frequency response as frequency gets large. Because the relative order is two, the gain should roll off at -40 dB per decade and the phase should approach -180 degrees.
In discrete-time, the frequency "axis", at least the part we care about for this problem, is the upper half of the unit circle. In that sense, the point z = -1 represents the highest frequency. If we want the discrete-time approximation to have similar high frequency characteristics as the continuous-time system, the discrete-time system should have as many zeros at z = -1 as the continuous-time system has at omega = inf. So, after the poles and zeros of sysc are mapped through z = exp(s*T) we manually add 2 additional zeros at z = -1, which I guess is what is shown in the textbook example. This approach will always yield a discrete-time approximation with relative order of zero, i.e., same number of finite poles and zeros. For such systems, the current output y[k] depends on the current input u[k], which might not be implementable in a phyical processor where a delay is incurred. In this case, we remove one of the zeros at z=-1 to make the discrete-time system implementable, which appears to be the convention used by c2d.
I'm quite certain this issue is discussed in that textbook.
Result from c2d
T = 0.1;
sysd=c2d(sysc,T,'matched');
Add a zero at z = -1, and divide by 2 to maintain the same gain at z = 1.
sysd1 = sysd*(tf('z',T)+1)/2;
Compare
w = logspace(-2,pi,1000)/T;
w(end) = [];
[mc,pc] = bode(sysc,w);
[md,pd] = bode(sysd,w);
[md1,pd1] = bode(sysd1,w);
subplot(211);
semilogx(w,db([mc(:),md(:),md1(:)]));,grid
ylim([-100,50])
subplot(212);
semilogx(w,[pc(:),pd(:),pd1(:)]);grid
Adding the zero at z = -1 caused a bit of distortion on the gain, but recovered the phase quite nicely.
その他の回答 (1 件)
Mohamed Elshami
2025 年 3 月 17 日
Review the textbook and make sure that (two) is the number of ploes or zeros.
参考
カテゴリ
Help Center および File Exchange で Spectral Estimation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!