How do I pass a transfer function as a variable in Simulink?
22 次查看(过去 30 天)
显示 更早的评论
Hello there, I have a question to ask - I have a model that I did an identification on. Now I have 4 transfer functions and I want to compare the model with my transfer functions. Using the stepplot function does a lot of work for me, but working with the plot itself is incredibly painful and next to impossible (why can't I edit the plot normally?), therefore I want to run a quick Simulink simulation annd get data for comparison from there.
I can manually create 4 blocks and write in all obtained parameters, but is there a way I can just slam my variable that contains the transfer function into a block and use that? It would save me a lot of time, especially considering that I might have to redo something in the future and I really don't feel like going through the ordeal again.
Thanks for your help!
0 个评论
回答(1 个)
Paul
2021-5-23
Yes, you can use either a Transfer Fcn block or an LTI System block. Suppose h is a tf object in the base workspace. For the Transfer Fcn block, enter h.Num{:} and h.Den{:} as the Numerator coefficients and Denominator coefficients parameters respectively. For the LTI System block, enter h as the LTI system variable parameter.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!