How to play with the Simulink Solver Parameters to reduce the Sampling Frequency?
2 次查看(过去 30 天)
显示 更早的评论
I'm a newby in Simulink. I have a Simulink model running at a high sampling frequency. When I reduce it (doing all the necessary changes in the model), the simulation stops after few ms. The error is due to a algebraic loop that Simulinks can't resolve. But it was able to resolve it at higher Fs!! How can I play with the solver parameters?? I've already played with set_param('Model','AlgebraicLoopSolver','LineSearch') and TrustRegion and I've tried to reduce RelTol but without any succes...
0 个评论
回答(2 个)
Aniruddha Katre
2017-3-23
If you have algebraic loops in the model that are causing these issues, playing with the solver step size is not the best way to resolve it.
Algebraic loops are caused by non-deterministic loops in your model. For example, if you have a variable "y" on both sides of an equation: y = u - y, where you are solving for y. This can result in an algebraic loop.
The best way to resolve them is to take a look at your equations and rearrange them such that the algebraic loops don't occur. The previous equation could be re-written as y = u/2 instead.
Here's a useful documentation link on algebraic loops and how to resolve them: https://www.mathworks.com/help/simulink/ug/algebraic-loops.html
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!