Questions about Simulink continous Integrator
1 次查看(过去 30 天)
显示 更早的评论
I have a couple of questions about the continuous integrator in Simulink on which I've been stuck for a while and would appreciate some help.
1) Can we have a continuous integrator inside an atomic subsystem?
2) Consider the model shown below (Subsystem1 is atomic). The model shown below seems to run without any issues.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/162611/image.jpeg)
In the second case, we have an additional gain block as shown. This model fails to compile and shows an algebraic loop error. I am unable to explain why this is the case.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/162612/image.jpeg)
0 个评论
回答(2 个)
Gillian Rosen
2017-4-10
编辑:Gillian Rosen
2017-4-10
Hi Yogesh,
I understand that you would like to know 1) if continuous Integrator blocks may be used in atomic subsystems, and 2) why your two example models behave differently with regards to algebraic loops.
1) Yes, continuous Integrator blocks may be used in atomic subsystems. Please note that models that use continuous blocks should also use continuous solvers.
2) As you may have already suspected, the issue has to do with the block execution order.
In your first model (no Gain inside the atomic subsystem), the Integrator provides initial conditions, then the Gain uses them, so execution order can be successfully established for all blocks in the model.
In your second model, the Integrator will still need to execute first, since it provides initial conditions for the model. Since the Integrator is in an atomic subsystem, the whole subsystem will have to execute before anything outside of it. However, the Gain inside the atomic subsystem (before the Integrator) needs the output of the other Gain block (outside the atomic subsystem) in order to compute its own output. This is where the algebraic loop arises- the inner Gain needs the outer Gain to execute first, and the outer Gain needs the inner Gain to execute first.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Schedule Model Components 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!