Not matching between difference equation and transfer function outputs
显示 更早的评论
Hi all,
I have a problem with a conversion from difference equations to transfer function. I have been reviewing theory during one week. I think that there have to be some stupid problem on my z transform understading but I am not able to find it.
I have the following difference equation: y(n) = 0.3538*u(n) - 0.3123*u(n-1) + 0.9574*y(n-1)
I want to put it into transfer function following the convention of H(z^-1) so I use the command: tf([0.3538 -0.3123], [1 0.9574], Ts)
When I try to get the output of the system using the difference equation method and the output of the transfer function with the help of the lsim command the results does not match.
I have attached a script in order to let you check the problem. I think that the difference equation to 'tf' conversion is done correctly, maybe I am a bit lost.
Thanks in advanced
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Dynamic System Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!