How do I pass a transfer function as a variable in Simulink?
조회 수: 20 (최근 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!