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

20 visualizaciones (últimos 30 días)
Peter Slovák
Peter Slovák el 23 de Mayo de 2021
Respondida: Paul el 23 de Mayo de 2021
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!

Respuestas (1)

Paul
Paul el 23 de Mayo de 2021
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.

Categorías

Más información sobre General Applications en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by