Wheel Loader (General Cosim With Amesim by Fmi)
Wheel Loader (General Cosim With Amesim by Fmi)
Edition Note
This document describes the release information of RecurDyn V9R4.
Table of Contents
Getting Started ....................................................................... 4
Objective ............................................................................................... 4
Prerequisites ........................................................................................... 5
Procedures ............................................................................................. 5
Estimated Time to Complete ..................................................................... 5
Modeling of General Plant Input and Output in RecurDyn .............. 6
Task Objective ........................................................................................ 6
Estimated Time to Complete ..................................................................... 6
Opening the Model .................................................................................. 7
Creating General Plant Input..................................................................... 9
Creating General Plant Output ................................................................ 11
Performing Simulation ........................................................................... 13
Setting General CoSim FMI in Master Mode of RecurDyn .............. 14
Task Objectives..................................................................................... 14
Estimated Time to Complete ................................................................... 14
Importing the AMESim Model .................................................................. 15
Modeling of AMESim Interface Block ........................................................ 16
Setting AMESim FMI .............................................................................. 18
Exporting AMESim FMU .......................................................................... 19
Setting General CoSim FMI in RecurDyn ................................................... 22
RecurDyn Master Mode Co-simulation ...................................................... 25
Setting General CoSim FMI in Slave Mode of RecurDyn ............... 26
Task Objectives..................................................................................... 26
Estimated Time to Complete ................................................................... 26
Setting General CoSim FMI in RecurDyn ................................................... 27
Setting AMESim FMI .............................................................................. 28
Modeling of AMESim Interface Block ........................................................ 29
RecurDyn Slave Mode Co-simulation ........................................................ 34
Verifying and Analyzing Results ................................................ 37
Task Objectives..................................................................................... 37
Estimated Time to Complete ................................................................... 37
Verifying and Analyzing Results ............................................................... 38
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
1
Chapter
Getting Started
This tutorial describes how co-simulation between RecurDyn and AMESim can be performed
using the Functional Mockup Interface (FMI) method. RecurDyn handles kinematic analysis,
and AMESim handles hydraulic system analysis, and these two analyses are co-simulated.
The model to be covered in this tutorial is a wheel loader vehicle model, which models the
hydraulic actuator using AMESim and performs co-simulation with RecurDyn for steering
control of the wheel loader.
Objective
This tutorial covers the following topics:
▪ How to create General Plant Input and Output in RecurDyn
▪ How to set up the environment of RecurDyn General CoSim FMI
▪ How to model AMESim Interface Block
▪ How to set up the environment of AMESim FMI
▪ How to perform co-simulation of the General CoSim FMI between RecurDyn and AMESim
▪ How to review the results with post-processing in RecurDyn
4
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
Prerequisites
▪ This tutorial is intended for users who have completed the basic tutorials provided with
RecurDyn. If you have not completed these tutorials, then you should complete them
before proceeding with this tutorial.
▪ The software for AMESim and Compiler must be installed to proceed with this tutorial.
This tutorial is based on AMESim 2017 and Microsoft Visual Studio 2012 is used as a
compiler. Specifically, for AMESim 2017, only up to Microsoft Visual Studio 2012 is
supported, and the higher versions are not supported.
Procedures
This tutorial consists of the following tasks. The following table outlines the time required to
complete each task.
(* The time required may vary depending on the specifications of the computer and the
proficiency of the user.)
Task Duration
(minutes)
Result Analysis 10
Total 80
5
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
2
Chapter
6
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
▪ Copy the FMI (AMESim) tutorial example folder provided by RecurDyn to an analyzable
location.
Folder path: <Install Dir>\Help\Tutorial\Control\AMESim\WheelLoader
1. On the Desktop, double-click the RecurDyn icon to run RecurDyn. The Start
RecurDyn dialog window will appear.
2. When the Start RecurDyn dialog window appears, close it.
3. In the File menu, click Open.
4. In the example folder copied above, select WheelLoader_Start.rdyn.
5. Click Open. The model appears as shown in the following figure.
6. In the File menu, click Save As and save the file as WheelLoader_FMI.rdyn.
Tip: You need to specify the folder name so that there is no space in the path to save
the model, so there is no problem in Co-Simulation process.
7
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
8
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
9
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
10
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
11
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
12
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
Performing Simulation
Run the simulation to check the initial model status.
To run the simulation:
1. On the Analysis Tab, in the Simulation Type group, select Dyn/Kin. The
Dynamic/Kinematic Analysis dialog window appears.
2. After entering parameters as follows, click the Simulation button.
▪ End Time: 7
▪ Step: 700
1. Under the Analysis Tab, in the Animation Control group, press the Play button to
check if the wheel loader moves as shown in the figure below.
If the analysis is completed normally and there is no problem with the model, the wheel
loader will go straight from the initial state to before the last 7 seconds. This is because the
hydraulic pressure was not applied to the actuator for wheel loader steering.
13
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
3
Chapter
14
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
1. Double-click the AMESim icon on the Windows Desktop, etc. to run AMESim.
2. In the File menu, click Open.
3. In the example folder copied above, select HydraulicComponents_Start.ame.
4. Click Open. The AMESim model with an actuator is displayed as shown in the figure
below.
5. Select File > Save as to change the name of the model file to
HydraulicComponents_fmu_export.ame.
15
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
16
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
1. Connect the Interface block and the actuator elements as shown in the figure below. If
the connection is different from the figure, you may get incorrect results. Therefore, it
must be correctly connected to the port of the actuator component and the Input &
Output port of the Interface block as shown in the figure below.
17
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
18
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
1. Click the
SIMULATION Tab
to change mode.
Tip: You can check the Build status of the model by checking the Completed message on
the Message Tab and the System build completed message on the Details Tab.
19
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
3. In the Export settings page, set FMU type and version to Co-simulation 2.0.
4. Set the Output directory to the folder where the RecurDyn file of this manual is
located.
5. Click the Next button.
6. On the Platform selection tab, verify that the compiler is set to Microsoft Visual
C++.
7. Click the Generate button to begin creating the *.fmu file and exporting the file.
20
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
8. Export the *.fmu file generated by AMESim to the location you set.
21
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
22
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
23
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
12. In the FMI (GCoSim1) dialog window, on the CoSim Environment page, select the
Import option.
13. Set Interface Version to 2.0.
14. In Model File, click the button, and select HydraulicComponents
_fmu_export.fmu file created in the Open dialog window.
15. Click the OK button in the FMI ( GCoSim1 ) dialog window to complete the settings.
16. In the General CoSim window, on the CoSim Environment page, click the OK button
to complete the settings.
24
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
Co-simulate the wheel loader model of RecurDyn and the actuator model of AMESim
using FMI.
To run the simulation:
1. On the Analysis Tab, in the Simulation Type group, select Dyn/Kin. The
Dynamic/Kinematic Analysis dialog window appears.
2. After entering parameters as follows, click the Simulation button.
▪ End Time: 7
▪ Step: 700
1. On the Analysis Tab, in the Animation Control group, click the Play button to check
if the wheel loader moves as shown in the figure below.
25
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
4
Chapter
26
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
27
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
1. Double-click the AMESim icon on the Desktop of Windows, and then run AMESim
again.
(※ If AMESim is already running, close it and run it again.)
28
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
2. On the Functional
Mock-up page, in the FMU setting, connect the WheelLoader_RDSlave.fmu file
created by RecurDyn.
3. Set the Submodel storage directory to the folder where the files *.rdyn and *.ame
are located.
4. Set the name of Submodel to RECURDYN.
5. Click the Next button.
29
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
6. On the Import settings page, under Compilation settings, set the Compiler option
to Microsoft Visual C++(64-bit).
7. Set the Preferred simulation type to co-simulation.
8. Click the Generate button.
9. Check the messages to see whether Submodel generation is completed, and click
the Finish button.
30
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
10. In Library tree, click FMI imported blocks to see the fmu block model. Create this
fmu block in the AMESim model by dragging & dropping the block and connect it with
other elements as shown in the figure below.
31
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
Tip: You can check the Build status of the model by checking the Completed message on
the Message Tab and the System build completed message on the Details Tab.
32
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
13. Set Final time to 7 s and Print interval to 0.001 s, which are the same values as
those set for Interface Time Step in RecurDyn.
33
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
34
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
1. After the analysis is complete, double-click the Plots button on the ribbon menu in
AMESim to create a Plot window.
2. In AMESim, click FMI Import blocks.
3. In Variables of fmuin002out004 [RECURDYN-1], drag & drop GPlantInput1 and
GPlantInput2 to the Plot window.
4. Then, in AMESim, you can see the results of GPlantInput1 and GPlantInpput2
displayed as a plot.
35
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
36
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
5
Chapter
37
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
If you perform co-simulation in the master mode of RecurDyn, you can execute Animation
Play directly from RecurDyn. If you perform co-simulation in the master mode of AMESim,
import the animation result file (*.rad).
1. Go to the Analysis tab.
2. In the Animation Control group, click the Play button to check the result of animation.
You can see that the wheel loader moves to the left.
38
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
1. Run RecurDyn/Plot.
2. Import the *.rplt file, which is the result of dynamic analysis by RecurDyn.
3. Import the AMESim_GPlantInput1.txt file, which is the result of AMESim
GPlantInput1 created in the previous chapter.
4. Draw the values of GPlantInput1 in the Plot database window.
5. Plot the Column2 of the result of AMESim. (At this time, the value on the X axis must
be Column1.)
6. You can see that the two results match. From these results, you can see that all the
numerical data have been exchanged properly between the two software.
39
W H E E L L O A D E R ( G E N E R A L C O S I M W I T H A M E S I M B Y F M I )
40