Using the Simulink to Simcenter Amesim Interface > Tutorials
Force control in semi-active car damper
Figure 85: Symbolic representation of a semi-active suspension
Model presentation
The Simulink model force_control_law.slx represents the control law used to compute the valve opening section which gives the desired force in the semi-active damper.
This model requires 2 input ports (green) and 1 output port (blue). The Simulink blocks using global parameters are represented in red. The model also uses one lookup table.
The MATLAB script force_control_law_initialization.m can be run in order to load the global parameters in the workspace automatically.
Code export from Simulink to Simcenter Amesim
The following steps allow you to export the Simulink block diagram to Simcenter Amesim.
Procedure
Get the demo force_control_flowvalve.ame from the Platform > MiLSiLHiLRealTime > SimulinkAmesim folder. This model is available in the ForceControl.pck pack file:
This gives access to the force_control_law.slx model and the force_control_law_initialization.m script.
Within MATLAB, run the force_control_law_initialization.m script in order to load the global parameters in the MATLAB workspace.
Open the force_control_law.slx model, click on the Simulation menu and choose Configuration parameters.
Select Optimization, tick the Inline parameters box and click on the Configure button.
Figure 86: Configure button
Add the workspace variables you want to access in Simcenter Amesim to the global parameters table.
Figure 87: Global parameters table
Save the Simulink model.
In the MATLAB command window, type:Copy
sl2amecosim('force_control_law','C:\AMETest\libsl2ame','auto');Where C:\AMETest\libsl2ame is the directory where you intend to save the SL2AME category.The model export is now completed and a new submodel FLOW_CONTROL_LAW should be available in the libsl2ame category.
Now you can use and test the exported model (force_control_law.ame).
The parameters of the exported submodel are presented in the following chart:
Results
Validation of the exported model can be done through direct comparison with the standard demo example ClosedLoopControl.ame which can be loaded from the Simcenter Amesim Help menu: Help > Get Demo > Solutions > Automotive > Chassis.
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Simulink/Force_control_in_semiactive_car_damper · retrieved 2026-07-17