How to play with the Simulink Solver Parameters to reduce the Sampling Frequency?

2 Ansichten (letzte 30 Tage)
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...

Antworten (2)

Aniruddha Katre
Aniruddha Katre am 23 Mär. 2017
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

Julie SERIS
Julie SERIS am 23 Mär. 2017
Thank you Aniruddha. Unfortunately my model is really more complicated than a simple equation: y = u - y I've already tried to get rid of the algebraic loops but it doesn't seem feasible. What I don't understand is why it is working at a really high Fs and not at a smaller one... This is not an issue of frequency content or aliasing stuff, since the 2 Fs I'm using are far enought to avoid this kind of problems. It seems the solver is not well set for the lowest sampling frequency, or something like that.

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by