How do I pass a transfer function as a variable in Simulink?

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!

回答 (1 件)

Paul
Paul 2021 年 5 月 23 日

3 投票

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.

カテゴリ

ヘルプ センター および File ExchangeControl System Toolbox についてさらに検索

質問済み:

2021 年 5 月 23 日

回答済み:

2021 年 5 月 23 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by