Simulink Limit Integral Saturation Limit Dynamic Input

조회 수: 10 (최근 30일)
Nima Forghani
Nima Forghani 2012년 6월 14일
댓글: Ankur 2024년 8월 10일
Hello.
I would like to find out if there is a way to use a variable input computed within a given Simulink session as a limit integral saturation limit in the Simulink integrator block. The limit integral block parameters allows entering a variable name or a constant. The block entry can import a vector present on the workstpace, though it's not capable of reading a variable that is dynamically being computed at the same simulation execution frame as the limit integrator.
I have tried to incorporate a unit delay or memory block in the integrator input to delay the integrator and allow the computed limit integral saturation variable to be computed prior being read by the integrator block. Unfortunately the integrator fails to execute unless the saturation variable has been already computed and available in the workspace.
I'd appreciate it if someone can assist me with this issue.
Thanks! Nima

채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 6월 14일
As you have found out, the Limited Integrator block from the Simulink Library only takes the saturation limits as a parameter, and not as an input signal. I would recommend that you read this blog post to understand why you cannot change the saturation limit parameter based on the output of another block.
However, it should be reasonable straightforward to create your own custom block using S-functions to do what you need. There is an existing S-function block demo that you can modify to achieve what you need. Please type "msfcndemo_limintm" at the MATLAB prompt to open up the demo. Now, double click on the blue box in the model to see the MATLAB code corresponding to the S-function. You simply need to increase the number of inputs to 3, and use the inputs instead of the parameters for limits in the Derivative method.
  댓글 수: 2
Nima Forghani
Nima Forghani 2012년 6월 14일
Thank you so so much Kuastubha!
The customized S-function works for passing through in-session variables to the integrator as limit inputs.
cheers
Nima
Ankur
Ankur 2024년 8월 10일
Hello Nima,
Can you please let me know how using Level 2 M Function you moditied integrator saturation limits during simulation?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Discontinuities에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by