Nonlinear equations within Simulink Coder
Mostra commenti meno recenti
Hi,
If a Simulink model have nonlinear equations, is it mandatory to linearize it before using Simulink coder (RTW)?
If the answer is no, the code generated will call a Newton's solver and thus iterative computation will be made. In this case, this is opposite to the principle of determinism for real-time applications.
Best Rgeards, Hassen
Risposte (2)
Guy Rouleau
il 14 Mar 2012
1 voto
You can generate code for models with non-linearities.
For example generate code for a model with a saturated integrator... this is non-linear and is no problem.
If your model contains ODEs (continuous states) then Simulink will use an ODE solver, which does not require iterative computations.
The only time you will need an iterative solver is when your model contains a Simscape network... because Simscape can handle DAEs.
If you are interested in this topic, I recommend the following article:
In that case, you have a "fixed-cost" option to limit the numbe rof iterations and respect real-time contrains.
Kaustubha Govind
il 13 Mar 2012
0 voti
I'm not sure, but I'm guessing that the blocks that introduce nonlinear dynamics may not even be supported for code-generation.
Categorie
Scopri di più su Simulink Coder in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!