Can matlab give me difference equation from transfer fucntion
显示 更早的评论
Hi My transfer function is H(z)= (1-z(-1)) / (1-3z(-1)+2z(-2))
How can i calculate its difference equation. I have calculated by hand but i want to know the methods of Matlab as well
采纳的回答
更多回答(3 个)
Gert Kruger
2015-7-29
编辑:Gert Kruger
2015-7-29
2 个投票
syms z;
H = (1-z^-1) / (1-3*z^-1+2*z^-2);
[N, D] = numden(H);
Nc = eval(coeffs(N)); %Get coeffs and evaluatle symbolic variable, i.e. make real matrix
Dc = eval(coeffs(D));
Nc = Nc./(Dc(1)); %Turn into proper polynomial, first coeffs of a is 1
Dc = Dc./(Dc(1));
M = idpoly(Dc, Nc, 'NoiseVariance',0)
Wayne King
2011-11-12
You have the difference equation:
H(z)= (1-z(-1)) / (1-3z(-1)+2z(-2))
y(n)-3*y(n-1)+2*y(n-2) = x(n)-x(n-1);
zplane([1 -1],[1 -3 2]);
This is not stable, you have a pole outside the unit circle.
类别
在 帮助中心 和 File Exchange 中查找有关 Stability Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!