Fixed step solver explanation needed
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I've developed a dedicated MATLAB function to simulate a dynamic response of a system using difference equations. I have created a discrete model and used "User defined function" in the Simulink to call this function. The discrete model needs sample time to calculate its output correctly. This is for example 0.1s. So when I start simulation with fixed step equal to 0.1s everything works fine, but if I leave default setting in the Simulation configuration parameters with fixed step size set to auto, I get a constant value.
Can you please explain, how this "auto" parameter works in Simulink and what "fundamental sample time" is in this case? Does it start with some predefined value somewhere and then reduce its value as simulation progress or something else?
I did not expect to get a a constant value with "auto" setting, but I do understand why fixed step should match the sample time Ts.
Thank you very much!
0 commentaires
Réponse acceptée
Fangjun Jiang
le 14 Fév 2024
A little explaination here.
You can select "auto" in config, if you specify the sample time of your MATLAB Function block as 0.1.
That is a better way to do modeling. Specify the sample time whereever it is needed (sometimes it's better to use the default), let the system determine the simulation step size.
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!