Clear Filters
Clear Filters

How to use the state port of an integrator block in Simulink?

22 views (last 30 days)
Hi,
I want to use the state port for initial value of the integrator when it resets. However, I get an error message when I treat it like the output port by adding it with a sumblock to equal-sized state vector, by using a delay block on the signal. The following message occurs regularly:
State ports can only be used to break algebraic loops or to "hand-off" states between systems.
Use the output port rather than the state port of 'untitled/Integrator' as the source of the signal routed (either by direct or virtual connection) to 'untitled/Sample and Hold'
Can someone elaborate on what the state port exactly is? I don't really understand from what I can find about on the internet.

Accepted Answer

Jonas
Jonas on 20 Jan 2021
Edited: Jonas on 20 Jan 2021
I don't really understand completely how your set-up looks like (can you post a screenshot maybe?) but I feel like instead of using the state port, you can use the output port to feed it back to the initial value port. The state port should only be used if you encounter algebraic loops when feeding the output port back to the reset or initial value input port. Standard procedure is to feed back the output port. The reason why you don't have the issue of an algebraic loop - and why you can use the output port and don't need to use the state port - is because you are using a delay block. This breaks the algebraic loop already.
The reason why the state port is used instead of the output port for algebraic loops is that these two outputs are set in a different time in the control.
  8 Comments
Jonas
Jonas on 21 Jan 2021
Looks good. Does it simulate without errors?
Also, why is there *u mentioned in the Gain blocks? I would say it just applies a gain of 'A' or 'B', etc.
DB
DB on 21 Jan 2021
Yes, no errors! :)
u is mentioned because A,B,C and are matrices and d(tk) and x(t) are vectors.

Sign in to comment.

More Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!