Not matching between difference equation and transfer function outputs
Show older comments
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
Answers (0)
Categories
Find more on Dynamic System Models 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!