Multiple Simulations Panel: Simulate for Different Values of Stiffness for a Vehicle Dynamics System
This example shows how to use the Multiple Simulations panel in the Simulink® Editor to run multiple simulations with varying values of stiffness of the suspension for a road profile that has a sinusoidal shape.
Open the Model
The model simulates the vehicle dynamics based on the road-suspension interaction for different road profiles. The road profile data for the left and right tires is imported into the Signal Editor block as a sinusoidal shape. The Road-Suspension Interaction subsystem calculates the suspension forces on the vehicle at the four tire locations based on the road data and the current vehicle state. In the Body Dynamics subsystem, these forces and the resulting pitch and roll movements are used to determine the vehicle motion in three degrees of freedom: vertical displacement, roll, and pitch. The model is simulated using different values of stiffness of the suspension to determine if the design meets desired performance goals.
Set Up Simulations
To configure and set up simulations, use the Multiple Simulations panel. To open the Multiple Simulations panel, go to the Prepare section on the Simulink toolstrip. In the Inputs & Parameter Tuning section, click Multiple Simulations. In the panel, click to create a new design study.
A new design study object is added to the panel. The name of this design study is automatically populated. Double-click the design study to change the name. Use this design study to specify the parameters for the simulations. In this design study, we set up the values for the variable
K which represents stiffness. By running multiple simulations, we want to see how the amplitude at which the car oscillates is affected by different values of stiffness.
To add variable to this design study, click on the Specification tab of the Details:Design Study section. Once you add the variable, double-click to label the variable as
Suspension stiffness. Specify the variable name as
K, which is the stiffness of the suspension. Run simulations for multiple values of the stiffness,
K. Simulate for values ranging from 2e4 to 8e4, with one hundred separate points. Add
linspace(2e4,8e4,100) as the values of the variable
Run Multiple Simulations
Now that you have set up the values for our simulations, select the design study. The Run button in the Simulation section of the Simulink toolstrip changes to Run All, to indicate that you have setup multiple simulations. Click the Run All button to start the simulations. You can open Simulation Manager by clicking Open Simulation Manager on the Simulink status bar at the bottom of the canvas.
View the Results in Simulation Manager
Inspect how the amplitude at which the car oscillates is affected by different values of stiffness. To see the plot, in Plot Properties, select
yout from the list for Data for the Y-Axis.
yout represents the resulting amplitude of oscillations. The road pattern for this simulation is a sine wave with fixed frequency. By varying the stiffness values, you vary the natural frequency of the system. Based on the stiffness values, you start below the natural frequency. As you increase the values of the stiffness, you cross the natural frequency, thus entering resonance. As you increase the stiffness values above the natural frequency, the amplitude starts to decrease again.
By configuring and specifying values through the Multiple Simulations panel, you can easily run many simulations with different values for parameter sweep and Monte-Carlo simulations directly through the Simulink Editor.
Save the Design Study and the Plot
Click in the Multiple Simulations panel to save the design study that you have set up. The design study is saved in
mldatx format. To reuse the design study, open the Multiple Simulations panel, click , and select the design study file from the file browser.
You can also save the Simulation Manager session information, which includes simulation data all the plot configurations. The Simulation Manager allows you to reuse the plot configuration when you want to run similar simulations with different sets of values. To reuse the plot configuration, click on the Simulation Manager toolstrip. To reopen the saved session, navigate to the location where the file is saved and double-click the