How can I make the output graph of Simulink smoother?

~ 0 min
2017-11-21 15:42

You can change the default settings of the simulator.
Within Simulink go to menu:

 Simulation => Model Configuration Parameters

It can take a while before the window appears.

You now have two options.

 

Option 1

Select "Solver" category on the left and then under "Additional options" change "Max step size" .
Default it is on "auto". Change it to a timestep which is low enough to show the smoothness you need.

 

Option 2

Select "Data Import/Export" category on the left and then under "Additional parameters" change "Output Options"  to "Refine Output" and the "Refine Factor" from 1 to for example 4. It defines the extra points to calculate.
The benefit of this solution is that it works independent of the dynamics of the various models and does not create many unnecessary simulation points for a relative slow model as when you would use the max step size option.
NB: Using Refine Output has no influence on the smoothness of the curve you will see in the Simulation Data Inspector. It has influence on the smoothness of the data exported to the Workspace and the Scopes in the Simulink model

Gemiddelde beoordeling: 0 (0 Stemmen)

U kunt commentaar op deze vraag geven