Getting started > Simulating a Car suspension
Using global parameters
If you have a parameter that is used several times in a model, each time with the same value, you might want to vary that value for different scenarios. Rather than locating and modifying that parameter in each component that uses it, you can assign a global parameter to all components where it is used, and then modify the value of that global parameter. To illustrate this, we will create a global parameter for the ActiveSuspension system. You can get this system through the Help > Get demo menu item. The system is stored in the Tutorials folder.
Figure 52: The Active Suspension demo
This system contains four masses. The upper two masses represent a car body, the lower two represent the wheels. We could open each mass to assign parameter values individually, but by using global parameters we can update values for both body masses and then both wheel masses in one go.
Procedure
Press Ctrl + G to open the Global Parameter Setup dialog box.
Right-click in the dialog box and select New > Real parameter:
A new global parameter is added to the dialog box.
- Double-click in the Name, Title and Value fields to edit their values. Enter the following values:
Name: bodyMass
Title: Body Mass
Value: 400
Right-click in the dialog box again and add another Real Parameter.
Edit the new real parameter to have the name wheelMass the title Wheel Mass, and the value 50.
Click OK to close the dialog box.
The two new global parameters have been created and are now available for use in the system. You can close the Global Parameter Setup dialog box.
- Select the upper mass in the Passive Suspension and edit the mass parameter value. In the Value field you can type the name of a global parameter directly. In this case, enter bodyMass:
Note As you start typing, the global parameter is proposed by the auto-completion feature.
Enter the same value for the Active Suspension body mass, and then enter wheelMass for the two wheel components.
Finally, set the velocity at port 1 parameter to 0.5 m/s for the Passive suspension body mass and to 1 m/s for the Active suspension body mass.
Now that our system is configured with global parameters for the body and wheel masses, we can run a simulation. Set a Final time of 5 seconds and a Print interval of 0.001, and run a simulation. Once the simulation is finished, plot the displacement at port 1 variables for the two body masses:
Figure 53: Body mass displacements
Note
Keep this plot open, and click on the Automatic update button so that it turns blue.
Now we will modify the global parameters for the body and wheel masses.
Procedure
Press Ctrl + G to open the Global Parameter Setup dialog box.
Change the bodyMass value to 600 and the wheelMass to 40.
Click Apply and relaunch the simulation.
Results
Note that the plot curves are updated.
Figure 54: Curves updated
In this simple example, we used global parameters to control the values of just two sets of components. You can easily see how convenient this feature proves to be in a large system containing hundreds of repeated components whose values you need to update regularly.
Full details on the use of the Global Parameters facility are given in the Global parameters.
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Tutorial/xid1370629 · retrieved 2026-07-17