How to use the state port of an integrator block in Simulink?
29 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
Jonas
2021-1-20
编辑:Jonas
2021-1-20
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 个评论
Jonas
2021-1-21
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!