PDA

View Full Version : Adams mechatronics



Saad
08-26-2011, 09:09 PM
Hi,
I haven’t found any tutorial - Setup and run Co-Simulation analysis of ADC(active damper control). I have followed the tutorial “Standard Interface Tutorial - Setup and run Co-Simulation analysis” and modelled the ESP first.
http://www.kxcad.net/MSC_Softw...hatronics.13.11.html (http://www.kxcad.net/MSC_Software/Adams_MD_R2/adams_car/wwhelp/wwhimpl/common/html/wwhelp.htm?context=adams_car&file=mechatronics.13.11.html)

Then I have followed the same tutorial for ADC and encountered the problem. I have tried to describe the problem as I go through. Please let me know, if I have to explain more.

Start:
Overview

This tutorial guides you through the process in the Standard Interface how to setup a control system for a co-simulation analysis. Steps on how to perform the co-simulation from the control package software are also included.
It is assumed that you have already started Adams/Car and loaded the Adams/Car Mechatronics plugin.
The main steps in the tutorial are listed below:

• Open assembly which includes ADC, ABS and ESP control systems
• Modify ADC control system type
• Run full vehicle analysis setup
• Export plant
• Run co-simulation from control package software


Open assembly which includes ADC, ABS and ESP control systems
Opened MDI_Demo_Vehicle_lt_ABS_ESP_ADC_01.asy from MSC.Software\Adams\MDR2\amech\shared_amech_databas e.cdb\assemblies.tbl


Modify ADC control system type

Both control systems in the assembly are of type 'Function Expression'. However, in this tutorial we want to use the co-simulation functionality and we will therefore modify the ADC control system. To modify control systems use Mechatronics -> Control System -> Modifyand fill in the dialog box


Dampers are showing OFF, so turned on all of them




Run full vehicle analysis setup

Submit a single lane change manoeuvre to use it for a co-simulation:

The mode of simulation choice 'files_only' is used create the Adams/Car solver files needed for co-simulation. All files will be created in the working directory.

The following message will inform the user that 4 control system is of type 'CoSim' and Adams/Car Mechatronics specific export plant dialog box will be displayed:

Press OK and select the previously generated file ESP_cosim_test_sin.adm in export plant dialog box. Keep default values of other the dialog box settings (also the Host Name):

Now everything is done in the Adams/Car environment. All files that the control package needs for the co-simulation are created.

Run co-simulation from control package software
Start MATLAB and change working directory to the directory where the Adams/Car files were created. At the MATLAB prompt type the name of the m-file, ESP_test_cosim_sin. All the signals are created.
Copyed the following MATLAB and Simulink example files from install_dir C:\MSC.Software\Adams\MDR2\amech\examples\simulink _models\damper to the working directory:
• damper_variables.m
• damper.mdl
The ADC model requires some variables to be set so remember to read them in from the damper_variables.m by typing esp_variables at the prompt.
Create the Adams block by typing adams_sys at the prompt. This builds a new model in Simulink named adams_sys.mdl. This model contains the block representing the mechanical system:



Opened the damper.mdl model but there is no adams_sub block

Still added the adams_sub block




Set Communication Interval to 0.01 sec in the Adams Plant block (adams_sub block -> ADAMS Plant). This time increment value corresponds to the output time step set in Adams/Car analysis dialog box. Verify your block settings below:






Start the MATLAB simulation. After the simulation the scope plots for the following:




Damper displacement and velocity looks alright but Acceleration is not right. If you click on autoscale then it shows the following figure




So there is a problem…
I have tried to make it a passive system as below




It gives the same result as active suspension. Shown below


So active suspension is not working or it is not communicating with Adams.
Please look into this matter and let me know, what to do.
Regards
Saad
skashem@swin.edu.au

Saad
08-26-2011, 09:09 PM
Hi,
I haven’t found any tutorial - Setup and run Co-Simulation analysis of ADC(active damper control). I have followed the tutorial “Standard Interface Tutorial - Setup and run Co-Simulation analysis” and modelled the ESP first.
http://www.kxcad.net/MSC_Softw...hatronics.13.11.html (http://www.kxcad.net/MSC_Software/Adams_MD_R2/adams_car/wwhelp/wwhimpl/common/html/wwhelp.htm?context=adams_car&file=mechatronics.13.11.html)

Then I have followed the same tutorial for ADC and encountered the problem. I have tried to describe the problem as I go through. Please let me know, if I have to explain more.

Start:
Overview

This tutorial guides you through the process in the Standard Interface how to setup a control system for a co-simulation analysis. Steps on how to perform the co-simulation from the control package software are also included.
It is assumed that you have already started Adams/Car and loaded the Adams/Car Mechatronics plugin.
The main steps in the tutorial are listed below:

• Open assembly which includes ADC, ABS and ESP control systems
• Modify ADC control system type
• Run full vehicle analysis setup
• Export plant
• Run co-simulation from control package software


Open assembly which includes ADC, ABS and ESP control systems
Opened MDI_Demo_Vehicle_lt_ABS_ESP_ADC_01.asy from MSC.Software\Adams\MDR2\amech\shared_amech_databas e.cdb\assemblies.tbl


Modify ADC control system type

Both control systems in the assembly are of type 'Function Expression'. However, in this tutorial we want to use the co-simulation functionality and we will therefore modify the ADC control system. To modify control systems use Mechatronics -> Control System -> Modifyand fill in the dialog box


Dampers are showing OFF, so turned on all of them




Run full vehicle analysis setup

Submit a single lane change manoeuvre to use it for a co-simulation:

The mode of simulation choice 'files_only' is used create the Adams/Car solver files needed for co-simulation. All files will be created in the working directory.

The following message will inform the user that 4 control system is of type 'CoSim' and Adams/Car Mechatronics specific export plant dialog box will be displayed:

Press OK and select the previously generated file ESP_cosim_test_sin.adm in export plant dialog box. Keep default values of other the dialog box settings (also the Host Name):

Now everything is done in the Adams/Car environment. All files that the control package needs for the co-simulation are created.

Run co-simulation from control package software
Start MATLAB and change working directory to the directory where the Adams/Car files were created. At the MATLAB prompt type the name of the m-file, ESP_test_cosim_sin. All the signals are created.
Copyed the following MATLAB and Simulink example files from install_dir C:\MSC.Software\Adams\MDR2\amech\examples\simulink _models\damper to the working directory:
• damper_variables.m
• damper.mdl
The ADC model requires some variables to be set so remember to read them in from the damper_variables.m by typing esp_variables at the prompt.
Create the Adams block by typing adams_sys at the prompt. This builds a new model in Simulink named adams_sys.mdl. This model contains the block representing the mechanical system:



Opened the damper.mdl model but there is no adams_sub block

Still added the adams_sub block




Set Communication Interval to 0.01 sec in the Adams Plant block (adams_sub block -> ADAMS Plant). This time increment value corresponds to the output time step set in Adams/Car analysis dialog box. Verify your block settings below:






Start the MATLAB simulation. After the simulation the scope plots for the following:




Damper displacement and velocity looks alright but Acceleration is not right. If you click on autoscale then it shows the following figure




So there is a problem…
I have tried to make it a passive system as below




It gives the same result as active suspension. Shown below


So active suspension is not working or it is not communicating with Adams.
Please look into this matter and let me know, what to do.
Regards
Saad
skashem@swin.edu.au

John_Burford
08-31-2011, 10:13 PM
This question is better directed to the MSC Adams user forums under the topic University or Car. You'll find the help you're looking for there.

You'll need to setup a user account to get access.