DOC13014 - Adams - 2021 - Training - 745 - Workbook

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 126

Adams Car Electric Vehicle Modeling

ADM745 Workshops
Legal Information

MSC Software Corporation reserves the right to make changes in specifications and other information contained in this document without prior notice. The
concepts, methods, and examples presented in this text are for illustrative and educational purposes only, and are not intended to be exhaustive or to apply to any
particular engineering problem or design. MSC Software Corporation assumes no liability or responsibility to any person or company for direct or indirect damages
resulting from the use of any information contained herein.
Copyright © 2020 MSC Software Corporation. All Rights Reserved. This notice shall be marked on any reproduction of this documentation, in whole or in part. Any
reproduction or distribution of this document, in whole or in part, without the prior written consent of MSC Software Corporation is prohibited.
The MSC Software corporate logo, Actran, Adams, Cradle, Digimat, Dytran, Easy5, Fatigue, Marc, Mentat, MaterialCenter, MSC, MSC Apex, MSC CoSim, MSC
Nastran, Mvision, Patran, PICLS, SC/Tetra, scSTREAM, scSTREAM/HeatDesigner, SC/Tetra/scFLOW, scSTREAM/HeatDesigner, SC/Tetra/scFLOW,
SimDesigner, SimManager, SimXpert, Sofy, and VTD are trademarks or registered trademarks of the MSC Software Corporation and/or its affiliates in the United
States and/or other countries.
Hexagon and the Hexagon logo are trademarks or registered trademarks of Hexagon AB and/or its subsidiaries.
NASTRAN is a registered trademark of NASA. All other trademarks belong to their respective owners.

ADAM*V2021*Z*EV*Z*SM-ADM745-WBK
Contents
Workshop

1 Workshop 1, “Introduction to Electric Vehicle Model”


Workshop 1a, “Modifying powertrain configurations”
Workshop 1b, “Braking simulation”
Workshop 1c, “Regenerative braking using actuators”
2 Workshop 2, “Integrating Electric Motor Control System using Adams Mechatronics”
Workshop 2a, “Control System Integration Overview”
Workshop 2b, “Creating Control Systems using Mechatronics”
3 Workshop 3, “Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems”
4 Workshop 4, “Hybrid Vehicle Torque Vectoring Control”
5 Appendix 1: EASY5 Control System Files and Simulation for the Regenerative Braking Scenario
6 Appendix 2: EASY5 Control System Files and Simulation for the Induction Motor Scenario
7 Appendix 2: Simulating an Induction Motor EV using an EASY5 FMU

3 | TOC – ADM745 © MSC Software Corporation


Workshop 1
Introduction to Electric Vehicle Model
Mini Workshop 1a
Modifying Powertrain Configurations
Step 1. Add Database to Your Session

• Version supported – Adams Car 2021 or later.

• Add the new database to your session:


1. Start Adams Car in Standard Interface
2. From the Tools menu, point to Database Management, and then select Add to Session
3. In the Database Alias text box, enter acar_EVIA
4. In the Database Path field, click on the Folder icon and point to acar_EVIA.cdb
(The database is included in training material download package.)
5. Click OK

4 | Introduction to Electric Vehicle Model © MSC Software Corporation


Step 2. Opening the Assembly
Choose Appropriate Powertrain Configuration
1
• Select File – Open – Assembly
• Choose MDI_Demo_Vehicle_EV from <acar_EVIA> database
• Click Apply

• Next step is to choose appropriate powertrain configuration


2
• FWD, RWD, AWD
• Choose the powertrain subsystem from tree view
• Click on Adjust > Powertrain Configure…
• In the dialogue box you can choose difference configuration
• Front wheel driven (FWD)
• Rear wheel driven (RWD)
• All wheel driven (AWD)
• This process set the assembly to right configuration by activating
and deactivating front and rear powertrain. It also ensures that
correct information is transferred to Adams Driver.
4
3

5 | Introduction to Electric Vehicle Model © MSC Software Corporation


Step 3. Run Acceleration Analysis
Acceleration Analysis for FWD, RWD, AWD

• Simulate AWD
• 1 Choose Powertrain Subsystem: Adjust > Powertrain Configuration > AWD
1
• 2 Choose Front suspension Subsystem: Adjust > Driveline Activity > ON
• 2 Choose Rear suspension Subsystem: Adjust > Driveline Activity > ON
• 3 Select Simulate > Full Vehicle Analysis > Straight Line Events >
Acceleration
2 3
• Output prefix = AWD (use the dialogue box on right as a reference)
• End Time 2.5, Steps =50, Velocity=25km/h,
• Start time = 0, Final Throttle =100, Duration of step =0.5 > Apply
• Repeat the process for FWD
• 1 Choose Powertrain Subsystem: Adjust > Powertrain Configuration > FWD
• 2 Choose Front suspension Subsystem: Adjust > Driveline Activity > ON
• 2 Choose Rear suspension Subsystem: Adjust > Driveline Activity > OFF
• 3 Modify Output prefix to FWD > Apply
• Repeat the process for RWD
• 1 Choose Powertrain Subsystem: Adjust > Powertrain Configuration > RWD
• 2 Choose Front suspension Subsystem: Adjust > Driveline Activity > OFF
• 2 Choose Rear suspension Subsystem: Adjust > Driveline Activity > ON
• 3 Modify Output prefix to RWD > OK
6 | Introduction to Electric Vehicle Model © MSC Software Corporation
Step 4. Postprocessing

• Launch Postprocessor Review > PostProcessor Window and create a new plot 1 1
• Under Simulation select the two existing simulations (FWD and RWD), under Request select
vas_throttle_demand_data, under Component select value and click on Add Curves
• Add another plot, under Request select til/r_wheel_tire_forces under Component select normal_front/rear, Add
Curves
• Add another plot, under Request select chassis_accelerations under Component select longitudinal, Add Curves
• Add another plot, under Request select chassis_velocities under Component select longitudinal, Add Curves

7 | Introduction to Electric Vehicle Model © MSC Software Corporation


Step 4. Postprocessing the Results
Comparing FWD vs RWD

• Observation
• Applied same throttle demand in both case
• But RWD car reaches a higher speed compared to FWD
• Reason
• As a result of body pitch during acceleration, weight
is transferred from front to rear wheels.
• Normal force for drive wheel is higher for RWD
• Since friction force is proportional to normal force, a RWD car
will take advantage as more weight is transferred to its
drive wheels.
• Results in higher speed and acceleration.

8 | Introduction to Electric Vehicle Model © MSC Software Corporation


Step 4b. Postprocessing the Results
Comparing AWD vs FWD and RWD

• Observation
• AWD is fastest overall
• Reason
• The AWD is the fastest because not only there are 4 wheels
traction, the fact that the front axle is continuously sending weight
to the rear and still applying traction, allows the rear to apply more
torque than RWD. Regardless to the fact that the front axle in the
AWD is showing lower torque than the FWD version
• The second peak in the AWD simulation (around 13s) is due to the
vehicle wobble to one side and then applying steering correction,
which can be tuned in the Event_Builder steering tab

9 | Introduction to Electric Vehicle Model © MSC Software Corporation


Mini Workshop 1b
Braking Simulation
Braking Simulation
Prepare the Baseline Model

• Continue using the MDI_Demo_Vehicle_EV from the acar_EVIA database, make sure that it the AWD is selected
• Select Simulate > Full-Vehicle Analysis > Straight-Line Events > Braking…
• In the Full-Vehicle-Analysis: Braking gui select:
• Output prefix: Regen_on
• End Time: 10s
• Analysis mode: Interactive
• Velocity 100km/h
• Start time 1.0
• Change Open-Loop Brake to Closed-Loop Brake
• Longitudinal Decel 0.5G
• Duration of step 5.0
• Apply to run simulation

11 | Introduction to Electric Vehicle Model © MSC Software Corporation


Braking Simulation
Configuring the Modified Model

• Select Adjust > Parameter Variable > Table


2
• 1 In the Parameter Variable Modification Table:
• click Subsystem and select MDI_Demo_Vehicle_EV.powertrain_ev from the list
• In the Value Type select Real and set pvs_regen_braking_ratio = 0 (regenerative
braking off) + OK
• 2 In the Full-Vehicle-Analysis: Braking gui select:
• Output prefix: Regen_off
• Check that all the values are the same as in the previous simulation
• OK to run simulation

12 | Introduction to Electric Vehicle Model © MSC Software Corporation


Braking Simulation
Model Review

• Launch Postprocessor Review > PostProcessor Window or press F8


• create a new plot, under Simulation select Regen_on_brake and Regen_off_brake, under Request select
chassis_accelerations & chassis_velocities, under Component select longitudinal, click on Add Curves
• Create a new plot, under Request select vas_brake_demand_data & vas_throttle_demand_data, under Component
select value, click on Add Curves
• Create new plot under Request select front_motor_states & rear_motor_states, under Component select
regen_torque click on Add Curves
• Create new plot under Request select til/r_wheel_tire_forces under Component select normal_front and plot

13 | Introduction to Electric Vehicle Model © MSC Software Corporation


Braking Simulation
Model Review

• Observation
• Regen_on simulation brakes shows larger deceleration
from 1 to 2.5s which results in achieving shorter braking
times
• Reason
• The regen_torque in the Regen_off simulation is zero,
in the meantime the Regen_on simulation shows front
to rear axle differences, these are due to the rear to
front weight transfer.
• Also, the brake_demand in the Regen_off simulation
is clearly larger than the Regen_on simulation due to
the the Point-Torque Actuators
pts_f/r_motor_regen_torque activity

14 | Introduction to Electric Vehicle Model © MSC Software Corporation


Mini Workshop 1c
Regenerative Braking using Actuators
Regenerative Braking using Actuators 1 imola_smart_driver_workshop_1.xml

Prepare the Baseline Model

• Select Simulate > Full-Vehicle Analysis > Event Builder…


• 1 Select File > Open > choose
imola_smart_driver_workshop_1.xml from the acar_EVIA
database + Open
• 2 Save and Use in the File Driven Events gui
• 3 In the File Driven Events gui select:
• Output prefix: Regen_off
• Analysis mode: Interactive
• Road Data File: select 3d_road_smooth_imola.xml from
the acar_shared database 3 2
• Apply to run simulation

If the simulation fails, please make sure that the Corrector is set to “Modified”; Settings >
Solver; Category – Dynamics

16 | Introduction to Electric Vehicle Model © MSC Software Corporation


Regenerative Braking using Actuators
Configuring the Modified Model

• 1 Make pvs_regen_braking_ratio = 1 (regenerative braking on)


in the Parameter Variable table + OK
• 2 In the File Driven Events gui select:
2
• Output prefix: Regen_on
• Analysis mode: Interactive
• Road Data File: 3d_road_smooth_imola.xml
• OK to run simulation

17 | Introduction to Electric Vehicle Model © MSC Software Corporation


Regenerative Braking using Actuators
Configuring the Modified Model
1
• Go back to the Event Builder…
• 1 Make sure that
imola_smart_driver_workshop_1.xml.xml is still selected
• 2 In the lower section select the Actuators tab
• 3 In the Name placeholder type r_regen_torque + Add
• 4 click under Actuator placeholder and select the
vas_regen_braking_ratio variable
• 5 In the Expression placeholder type
step5(#TIME#,7,1,10,0.5) 2
• 6 click Save As, name it as imola_smart_driver_mod.xml,
in the acar_EVIA database + Save
• 7 Click Save and Use 4 5

3
7 6

18 | Introduction to Electric Vehicle Model © MSC Software Corporation


Regenerative Braking using Actuators
Configuring the Modified Model

• 1 Populate the File Driven Events gui as follows:


1
• Output prefix: Regen_mod
• Analysis mode: Interactive
• Road Data File: 3d_road_smooth_imola.xml
• 2 make sure that the only remaining Driver Control
Files in the placeholder is
imola_smart_driver_mod.xml
• OK to run simulation

19 | Introduction to Electric Vehicle Model © MSC Software Corporation


Regenerative Braking using Actuators
Model Review

• Press F8 to launch the Postprocessor


• Create a new plot, under Simulation select the Regen_on_imola_smart_driver and Regen_off_imola_smart_driver,
under Request select front_motor_states & rear_motor_states under Component select motor_torque and plot
• Create New Plot under Component select regen_torque (check that the other parameter are as in the previous plot), Add
Curves
• In the same plot under Simulation select Regen_mod_imola_smart_driver only (check that front_motor_states and
rear_motor_states, regen_torque are still selected) and plot
• Create New Plot, this time select the three simulations Regen_off/Regen_on/Regen_mod_imola_smart_driver, under
Request select brake_line_pressure under Component select brake_demand and plot

20 | Introduction to Electric Vehicle Model © MSC Software Corporation


Regenerative Braking using Actuators
Model Review

• Observation
• The Regen_on simulation provides more torque on several
occasions
• Reason
• This is due to having two Point-Torque Actuator
pts_f/r_motor_regen_torque added to
pts_f/r_motor_torque
• The Regen_on simulation brake demand is lower, since the
regenerative torque is helping the vehicle to decelerate
• The Regen_mod regen_torque and brake_demand dropped
from 10s onwards. This is due to the Actuator modification, in
fact this really started from 7s but it is only noticeable while
braking

21 | Introduction to Electric Vehicle Model © MSC Software Corporation


Thank You!
End of Chapter 1
Workshop 2
Integrating Electric Motor Control System using Adams Mechatronics
Mini Workshop 2a
Control System Integration Overview
Step 1. Opening the Assembly

1
• The starting point for this workshop is the same assembly from
workshop 1

• Select File – Open – Assembly


• Choose MDI_Demo_Vehicle_EV from <acar_EVIA> database
• Click OK 2

• Next step is to choose FWD powertrain configuration


• Chose the powertrain subsystem from tree view
5
• Click on Adjust –Powertrain Configure… - FWD

• Disable the driveshaft in the rear suspension


• Choose the TR Rear Suspension from tree view 4
• Click on Adjust – Toggle Driveline Activity – Inactive

• File – Save As – Assembly 3


• Name: MDI_Demo_vehicle_EV_W2a
4 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Step 2. Create a Base Line Event with Spline-based Model
Maintain Analysis @ 80Km/h
1
• 1 Create a maintain analysis with spline-based powertrain model
• Output Prefix = FWD_spline
• End time =10s
• Velocity =80 km/h
• QSS = On
• Click Apply to run the simulation
• 2 We will now import the electric motor control system in the assembly
• File – Manage – Assemblies – Add Subsystem ..
• Select emotor_control_front_aview.sub from <acar_EVIA>
database
• Press OK 2

Note
• The subsystem contains an FMU (created in Adams View)
• The torque modelling in FMU follow exactly same logic as the spline-
based model.
• Our intention is to compare the results from FMU to original spline-
based model.
5 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Electric Motor Signal Flowchart

Front motor Front motor


Front motor Front motor
max driving max braking
driving torque regen torque
torque torque

Subsystem: Powertrain EV Front motor VAR max


VAR motor Subsystem: eMotor controls
deg/s braking
RPM torque

Rear motor VAR max


deg/s driving torque
VAR brake
demand
Motor Controls
Brake VAR motor
Demand regen torque

VAR throttle
Throttle demand VAR drive
Demand torque

Rear motor Rear motor


Rear motor Rear motor
max driving max braking
driving torque regen torque
torque torque
Control Control
Transducer Actuator
system input system output

6 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
1

Step 3. Check the Signal Manager

• In this step we check the connections within the assembly


is as shown in slide 6
• We will also visualize the concept of ‘intelligent’ modelling. 2
• Adding the control system makes the state variables to
automatically fetch value from it instead of the spline
• 1 Click on Mechatronics – Signal Manager – OK
• 2 Double click on ues_emotor
• Next step is to explore input and output connections
• 3 Check input tab
• 4 Check output tab
• Click Cancel to end the review

3
4

Note:
In case there are any missing minor/major roles, follow steps in page 17-18 to solve those
7 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Step 4. Maintain Analysis & Postprocessing

• Repeat maintain analysis as in slide 5 except:


• Output Prefix: fwd_cosim_fmu
• Click OK to run the simulation
• Postprocessing the results
• Plot spline based & FMU based model results
• Plot 1: Request – chassis_velocities – longitudinal
• Plot 2: Request – vas_throttle_demand_data – value
• Plot 3: Request – front_motor_states – motor_torque
• Plot 4: Request – front_motor_states – motor_RPM

8 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Step 5. Making Sense of the Results

• Observation
• the FMU motor rpm at sim start is correct although too
high for the first 8s
• Chassis velocity shows transient behavior at start of
simulation
• Reason
• The FMU motor torque starts from zero due to fact that
a co-simulation FMU is not part of the static analysis.
For the Quasi-static equilibrium operation to be
successful, the template is being designed in such a
way that it refer to the spline (not the FMU) during
statics. Although even after that, the simulation initial
dynamic output is still ‘zero’ and needs to quickly get
up to desired velocity hence the transient
• Solution
• Use a model exchange FMU instead. However, this
might not be very practical! since an eMotor might
require solving at finer step size. Solving the entire
model at this step size will slow down the simulation

9 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Mini Workshop 2b
Creating Control Systems using
Mechatronics
An Extract from Workday of an Adams User…

“You got an email from the Controls Engineer. He shared the control system model in Easy 5 for the new permanent
magnet motor as a co-simulation FMU. You would like to integrate this to Adams model.

FMU details
• Motor: Permanent Magnet Synchronous Motor
• Inputs: Throttle demand EM (0-100), Transmission output Omega (rad/s)
• Outputs: Torque (Nm), max torque EM (Nm), Electric power demand

You are very excited to try this out. But since the number of inputs and outputs are different from previous eMotor model
(mini workshop 2a), you cannot directly swap it. So, you decided to make a new control system. You also noted that all the
outputs required for the Adams driver are not included. But here the concept of ‘intelligent’ modelling comes to your help.
You can simply leave the other channels disconnected (max braking torque, regen torque). The state variable will fetch
value from the spline instead. You just need to make sure that these splines output values are identical to the electric
motor model in FMU”

11 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
1
Step 1. Create a New Template

• Open Adams car in Template Builder Mode


• Load Mechatronics Plugin 2
• Tools – Plugin Manager – Load Mechatronics
• 1 Create new template
• Name it emotor_control_PMSM
• Major role: control system
• 2 Create new control system
• Mechatronics – Control system – New
• 3 Click on the folder button (generate ESL property file) 3
• 4 Create the ESL property file that refer the desired FMU
• Control package – select FMU 4
• ESL -
<acar_EVIA>/external_libraries.tbl/synchronousPM_FMU.fmu
• Property file name – ez5 (This will be prefixed to the FMU
name to form the ESL file name)
• Communication interval = 0.001 (active only for FMU co-
simulation)
• Press OK
12 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Step 2. Continue with Creating Control System

• When pressing OK (previous page) Adams mechatronics


copy the following files to the default database
• FMU to external system libraries
• ‘.dll file’ to win64 folder under external system libraries
• ESL file is created in the external system libraries 1
2
• 1 Create control system
• Name: emotor
• Type: Single
• System Type: ESL
• Library Property File: Select the ESL file created in
previous step 3
• 2 Click on the magnifier glass. This automatically fills
the number of inputs and output tab. it also names the
input and output channel
• Active = on
• 3 Click on the table icon. This opens the control signal
editor

13 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Step 3. Make Necessary Modification in Control Signal Editor

• Control Signal Editor (applicable to Inputs/Outputs)


• 1 Modify the unit type and unit string to desired value
1
• 2 The unit type is important. Because mechatronics
allow to connect signal of same unit type only. e.g., a
torque control system output can be connected to an
actuator signal of unit type torque only.
• The unit string is used for automatic unit conversion.
• Click OK
• Click OK on create control system
• 3 The new electric motor control system is created
• Control system inputs and outputs are also
automatically created in this process.
• File – Save as – OK 3 2

14 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Step 4. Create a New Subsystem and Add to the Assembly

1
• Open Adams car in standard interface
• 1 Create a new subsystem
• Minor role – front
• Save the subsystem
• 2 Replace the eMotor subsystem from the assembly in
workshop 2a with the newly created subsystem
• File – Manage – Assemblies – Replace subsystem
2

• File – Save As – Assembly


• Name: MDI_Demo_vehicle_EV_W2b

15 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Step 5. Check Signal Connection

• Mechatronics – Info – Connectivity – OK


• You found out there any many connection missing.

16 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Step 6. Connecting Inputs and Outputs using Signal Manager

• Mechatronics – Signal Manager – OK


• 1 Double click ues_motor 1
• 2 The inputs signal looks OK (connected)
• 3 Click on outputs
• Found out that connection are missing
• Double Click on connectivity DOES NOT SET OR MATCH

3
4
2

17 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Step 6b. Connect the Necessary Signal
1

• 1 Port 1: TEM (drive torque output eMotor FMU)


• Double click on csa_front_motor_driving_torque
• 2 Port 2: Max Torque FW (max driving torque at front motor)
• Double click on csa_front_motor_max_driving_torque
• 3 Port 3: Power demand – unconnected
• Since its not used in the control system
• Click OK

18 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Step 7. Maintain Analysis and Postprocessing

• Simulate – Full vehicle Analysis – Straight line events – Maintain


• Use similar settings to those in page 5 except Output Prefix pmsm_fmu
• Open Postprocessor
• Plot PMSM FMU results
• Plot 1: Request– chassis_velocities – longitudinal
• Plot 2: Request – vas_throttle_demand_data – value
• Plot 3: Request – front_motor_states – motor_torque

19 | Integrating Electric Motor Control System using Adams Mechatronics © MSC Software Corporation
Thank You!
End of Chapter 2
Workshop 3
Simulating an EV Regenerative Braking Scenario using 3 EASY5
Control Systems
Workshop S3
Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems

• Getting started
• Control systems parameters setup
• Simulate a simple accel_brake_regeneration full vehicle scenario
• Evaluate the regeneration performance on the Imola 5km track

3 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Getting Started

• Add the new acar_EVIA database to your session:


• Start Adams Car Standard Interface.
• From the Tools menu, point to Database Management, and then select Add to Session.
• In the Database Alias text box, enter acar_EVIA.
• In the Database Path field, click on the Folder icon and point to acar_EVIA.cdb that the instructor provided.
• Click OK.

acar_EVIA
acar_EVIA.cdb

4 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Getting Started (Cont.)

• From the File menu: Open Assembly


• Browse for “simpleEV.asy” in the
acar_EVIA database
(Ignore the warning messages caused by the
special powertrain configuration)

5 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Controls System Setup

• From the treeview, display the Epowertrain_2motors_sEV


subsystem
• From the Adjust menu: GSE Parameters modify
• In the GSE field, browse for the electric_motor_front GSE
control system
• Click Apply

The front motor is configured as a 100N.m torque motor, power


limited to 50 KW.The torque should cutoff at 10000 RPM, and the
overall efficiency is set to 80% (as motor and generator)
Note: Refer to EASY5 appendix for more details about the
simplified electric motor model

• Click Cancel
• Check the rear motor (should be the same)

6 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Controls System Setup (Cont.)

• From the treeview, display the ECU_Battery_sEV subsystem


• From the Adjust menu: GSE Parameters modify
• In the GSE field , browse for the ECU GSE control system
• Click Apply

The battery pack capacity is set to 50 KWH


The regen flag is activated and set to 1. The electric vehicle will
use the electric motors for braking , according to the regenerative
braking strategy described before
Note: Refer to EASY5 appendix for more details about the ECU
model

• Click Cancel

7 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Accel_Brake_regeneration Full Vehicle Scenario: Execute

• From the Simulate menu:


• Full Vehicle Analysis
• File Driver Event

1. Enter “test” as name prefix 1


2. In the Driver Control Files field, browse for
“accel_braking_regeneration.xml” event file in the
acar_EVIA database
3. Click OK

This event will apply a max throttle acceleration to ramp up to the


maximum velocity and then brake with a progressive ramp (10 sec to 2
the max) until 0 velocity. We will then see the regenerative braking
acting and the vehicle will brake with the electric motor

8 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Accel_Brake_regeneration Full Vehicle Scenario: Review

• F8 to open ADAMS Postprocessor


• Review the different measures: chassis_velocity.longitudinal,….

9 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Accel_Brake_regeneration Full Vehicle Scenario: Review the Electric Braking
The throttle demand to the electric motor is positive during the acceleration and negative during the deceleration
(regenerative phase)
When braking, the rear demand (blue curve) reaches the maximum possible from the electric system (-100%). At this
moment, the mechanical brake is activated at the rear wheel to supplement the required braking force.

10 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Evaluate the Regeneration Performance on the Imola Track: Regen ON

• From the Simulate menu:


• Full Vehicle Analysis
• File Driver Event 1

1. Enter “regen_ON” as name prefix


2. In the Road Data field, browse for the “3d_road_smooth_imola.xml” file
in the shared database
3. In the Driver Control Files field, browse for “imola_smart_driver.xml” 2
event file in the acar_EVIA database
4. Click OK
3
• This event will simulate a full course (5km) on the Imola track with various
speed, acceleration and brake situations

11 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Evaluate the Regeneration Performance on the Imola Track: Regen OFF

• From the treeview, display the ECU_Battery_sEV subsystem


• From the Adjust menu: GSE Parameters modify
• In the GSE field, browse for the ECU GSE control system
• Click Apply

• Modify the Regen Flag parameter to 0


• Click OK

12 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Evaluate the Regeneration Performance on the Imola Track: Regen OFF (Cont.)

• From the Simulate menu:


• Full Vehicle Analysis
• File Driver Event
1

1. Enter “regen_OFF” as name prefix


2. In the Road Data field, browse for the “3d_road_smooth_imola.xml”
file in the shared database
3. In the Driver Control Files field, browse for “imola_smart_driver.xml” 2
event file in the acar_EVIA database
4. Click OK
3
This event will simulate a full course (5km) on the Imola track with various
speed, acceleration and brake situations without regenerative braking

13 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Imola Track Regeneration Scenario: Review

• F8 to open ADAMS Postprocessor


• Plot the velocity profile during the course event (Chassis_Velocities.longitudinal) for regen_ON and regen_OFF

14 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Imola Track Regeneration Scenario: Review (Cont.)

• Plot the battery state of charge during the course event (ECU_Battery.ECU_request.battery_SOC) for regen_ON and
regen_OFF

15 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Regenerative Braking Adams Car Workshop
Imola Track Regeneration Scenario: Review (Cont.)

• Plot the front LCA bushing force during the course event (bkl_lca_front.fm_front) for regen_ON and regen_OFF
Considering the regenerative braking force compute a more accurate force transfer in the suspension components, more
suitable for further durability simulations.

16 | Simulating an EV Regenerative Braking Scenario using 3 EASY5 Control Systems © MSC Software Corporation
Thank You!
End of Chapter 3
Workshop 4
Hybrid Vehicle Torque Vectoring Control
Hybrid Vehicle Torque Vectoring Control
Introduction

• Welcome to the Adams Car & EASY5 Hybrid Vehicle Torque Vectoring Control

• This workshop illustrates the effect of using a new power source (from an electric motor, for example) in an existing
Adams Car model. A front-wheel drive (FWD) model will be enhanced to include an e-motor model acting on the rear
wheels, allowing for left/right torque control on the rear wheels. This workshop focuses on:
• Verifying the connections for an FMU control system,
• Simulating the vehicle with/without the control system,
• Modifying the control system parameters for more aggressive behavior.
• Optionally building a new controller model in Easy5.

• This workshop assumes that you are comfortable with the Adams Mechatronics methods for hooking up a control
system. Refer to Section 2 & Workshop 2 for instructions on configuring Mechatronics signals.

3 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Vehicle Torque Vectoring Control
Prerequisite

• Adams Car workshops require Adams Car 2021, Adams Controls and Adams Mechatronics

• EASY5 section (optional) requires EASY5 2020 with per user setup set to the Intel Fortran Compiler
(Compatible Intel Fortran Compiler, Intel Parallel Studio 2017 for example)

4 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
What You Will Do

• Load subcompact model


• Inspect control system signal connections
• Lane change event with torque vectoring active
• Lane change event without torque vectoring (FWD only)
• Compare system behavior with/without torque vectoring
• Increase maximum motor torque and activation limits
• Compare aggressive settings to baseline
• (Optional) Build FMU from Easy5

5 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Getting Started

• If needed, add the acar_EVIA database to your session:


• Start Adams Car Standard Interface.
• From the Tools menu, point to Database Management, and then select Add to Session.
• In the Database Alias text box, enter acar_EVIA.
• In the Database Path field, click on the Folder icon and point to acar_EVIA.cdb that the instructor provided.
• Click OK.

acar_EVIA
acar_EVIA.cdb

6 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Open Vehicle Model

• From the File menu: Open Assembly


• Browse for “subcompact_TV.asy” in the
acar_EVIA database

Note: that this model has a typical front wheel drive


(FWD) arrangement with an internal combustion
engine. We will add a system to the rear wheels that
represents an additional electric motor system with
torque vectoring logic.

7 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Inspect Signal Connections

• Note that the Mechatronics menu appears at the top of the window because this model contains these components.
• Inspect the items going into (Transducer Signals) and out of (Actuator Signals) the control system by using the menu
picks: Mechatronics  Info  Signals Ensure that there are 10 transducer and 6 actuator signals for this system,
like so:

Assembly: .subcompact_TV
---------------------------------------------------------------------
---------------------------------------------------------
Transducer Signals Actuator Signals
===================== =====================
Total Number :10 Total Number :6
Transducer Signal Subsystem Unit Type Actuator Signal Subsystem Unit Type
ues_cst_body_yaw_rate subcompact_body_TV user ues_csa_relative_slip torque_vectoring_control_system user
uel_cst_front_wheel_angular_velocity torque_vectoring_control_system ues_csa_percent_to_right torque_vectoring_control_system user
angular_velocity uel_csa_rear_wheel_vectoring_torque torque_vectoring_control_system
… torque
uer_cst_tire_long_slip_rear torque_vectoring_control_system angle uer_csa_rear_wheel_vectoring_torque torque_vectoring_control_system
torque
ues_cst_throttle_demand torque_vectoring_control_system user

8 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Active Simulation: Single Lane Change

• The model will first be simulated in a lane change event with the rear torque
controller active as a baseline.

• Ensure that the torque controller is active by:


• Mechatronics  Control System  Modify
• Select the ues_slip_torque_vectoring Control System.
• Ensure that this system has Active = on

• Simulate a Single Lane Change from the menus:


• Simulate  Full Vehicle Analysis  Open-Loop Steering Events  Single
Lane Change
• Use the Output Prefix tvon, for 'torque vectoring on'.

9 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
FWD Simulation: Single Lane Change

• Deactivate the controller to make the vehicle behave purely as a Front


Wheel Drive configuration. To do this, turn off the torque vectoring via
the menus:
• Mechatronics  Control System  Modify
• Select the ues_slip_torque_vectoring Control System.
• Ensure that this system has Active = off
• Be sure to select Apply

• Again, simulate the Single Lane Change from the menus:


• Simulate  Full Vehicle Analysis  Open-Loop Steering Events
 Single Lane Change
• Use the Output Prefix of tvoff, for 'torque vectoring off'.

10 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Comparison using Animation

Switch to Adams PostProcessor (F8) to inspect the results. First, we will overlay the animation for the two vehicles and
see what visual differences appear.

In PostProcessor:
• Load an animation, select the tvoff_sin results.
• Use the CTRL-f shortcut to fit the view to the vehicle (without ground)
• Go to the Overlay tab at the bottom of the window and select both (CTRL key) the tvoff_sin and tvon_sin results
• In the Camera tab use the Follow Object field to follow .subcompact_TV.subcompact_body_TV.ges_chassis.cm

• Animate the two results. The difference with/without the controller active is very subtle. We will soon change the
controller behavior to produce more of a response.

11 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Plot Comparison with a Plot Config File

• Next, create a new page in PostProcessor and set it to be of type Plotting (upper left dropdown menu).
• Import (from the File menu or use the Import button: ) a Plot Config File and specify both previous analyses to
generate the plots on the following pages:

• Ensure that you have:


• Selected both analyses, as shown above.
• Selected Cross Plotting and referenced the proper .plt file in the acar_EVIA database.

12 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Lane Change Comparison: Chassis States

• The plot config file should have created a page named chassis_states - view this plot page.
• Torque vectoring should improve the vehicle's cornering responsiveness. Compare the chassis side slip angle and yaw
rate from the two simulations: the controller does not seem to have much effect on the vehicle response in these plots:

13 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Lane Change Comparison: Wheel States

• Next, inspect the page named wheel_states.


• These plots show slight differences: the added torque at the rear wheels increases wheelspeed, as desired.
• Tire longitudinal slip on the rear wheel shows the tire transitioning from coasting (negative wheel slip) to driven
(positive wheel slip) at about 3s of simulation time as the rear torque becomes active.

14 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Lane Change Comparison: Wheel Torques

• Create a new plot page in PostProcessor and verify that controller is applying different torques on the rear sides by:
• Set Source to Requests and Filter on *torqueR*
• Plot the left and right torque signals that the control system applies. The torque should appear on the outer wheel
during a turn, so the lane change event shows a left/right distribution of torque as the vehicle changes lanes:

15 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Make Controller More Aggressive

• As shown in the previous animation & plots, the


controller does not have a noticeable effect on yaw rate
and sideslip angle. We will now tune the controller
parameters to make it more aggressive.

• To scale control system transducer/actuator signals:


• Mechatronics  Mechanical System 
Transducer (or Actuator)
• Select the yaw rate Transducer signal, as shown.
• Use the Scale Factor field to easily scale up/down
the inputs/outputs to the controller.
• Increase this Transducer's Scale Factor to be 1.5, as
highlighted.
• Increasing the yaw rate signal magnitude will
influence how quickly the system becomes active.

16 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Make Motors Larger by Scaling

• Actuator signals into the Adams Car system can also be


scaled easily.

• Study the effect of using a much larger rear motor by


increasing the maximum rear torque:
• Mechatronics  Mechanical System  Actuator
• Select one of the rear wheel vectoring torques.
• Increase this Actuator's Scale Factor to be 2.0, effectively
doubling the torque signal coming out of the controller.
• The left/right torque Actuators are symmetric, so changing
just one of these elements will alter both left and right sides.

17 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Active, Aggressive Simulation: Single Lane Change

• Simulate the model with the changes to the yaw rate and torque
signals.

• Ensure that the torque controller is active by:


• Mechatronics  Control System  Modify
• Select the ues_slip_torque_vectoring Control System.
• Ensure that this system has Active = on

• Simulate a Single Lane Change from the menus:


• Simulate  Full Vehicle Analysis  Open-Loop Steering
Events  Single Lane Change
• Use the Output Prefix tvon2x, for 'torque vectoring on, 2x motors'.

18 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Create Plots with New, Aggressive Controller

• Next, create a new page in PostProcessor and set it to be of type Plotting (upper left dropdown menu).
• Delete the old plot pages named chassis_states and wheel_states
• Import the Plot Config File again and specify all three analyses:

19 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Lane Change Comparison: Chassis States

• Again, inspect the chassis_states page.


• The more aggressive scaling of the signals results in a more noticeable activation for the sideslip angle and yaw rate:

20 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Lane Change Comparison: Wheel States

• Next, inspect the new page named wheel_states.


• Both angular velocity and longitudinal slip show noticeable increases with the more aggressive controller parameters:

21 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Lane Change Comparison: Wheel Torques

• Finally, re-create the wheel torques plot using the tvon_sin and tvon2x_sin analyses.
• Note how the wheel torque plot at the rear wheels is both higher (from the motor scaling) and wider (from the yaw rate
scaling) in the aggressive vs the original controller:

22 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Repeat Animation Comparison

• Create a new overlay animation between the tvoff_sin and


tvon2x_sin results.

• Suggestion: use a Trace Marker (found in the Animation tab of


PostProcessor) to plot the path of the chassis cm marker
(ges_chassis.cm) during the animation, as shown in the figure.

• The vehicle with the more aggressive settings should differ from the
FWD-only simulation.

23 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Optional: Building the Easy5 FMU

• Open the Easy5 model file


ez5_slip_vectoring.1.ezmf
(in folder /easy5_sEV/torqueVectoring_FMU/ )

• Verify the number of inputs/outputs to the FMI Master


(FM) block by modifying the FM block and check the
following:
• FMU is version 2
• FMU Type is co-simulation (this method is typically
more robust than Model Exchange)
• 4 Outputs, 6 Inputs

• Inspect the Inputs and Variables tabs. Note that the


Connected Inputs and Primary Variables have
sensible state names. This is a recommended
practice to help organize the states during connection
phases.

24 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Optional: Building the Easy5 FMU

• The model must be built (Build  Create Executable) before an FMU is exported.
Ensure that the model builds without errors.

• Once the model has built without errors, export the FMU using:
• Build  Export Model As  Functional Mockup Unit

• Fixed Parameters are variables that are exposed with the FMU to the master code.
The Max_Engine_Torque, for example, is a parameter in the throttle demand
portion of the model. This value can be changed by the FMU master code before the
co-simulation starts. With Adams Mechatronics these variables automatically get
created in the property file.

• Use the Export/Close button to create the FMU. This will create a file named
ez5_slip_vectoring.fmu in the working directory.

25 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Hybrid Torque Vectoring Workshop
Optional: Import FMU into Adams Car, Create Property File

• If an FMU has previously been integrated into the Adams Car model with the
exact same inputs & outputs, it is possible to import the new .fmu file into the
database and generate a new property file. To import a new .fmu and create a
new property file:

• In the Adams Car model that has a previously-built Mechatronics Control


System:
• Mechatronics  Control System Modify

• Use the Import code and generate default property file button at the bottom
of this dialog box.

• In the Generate ESL Property File dialog box choose the previously-created
.fmu file. Give a new name for the Property File and select a small number for
the Communication Interval. This procedure will do two important tasks:
• Copies the new .fmu into the \external_system_libraries.tbl folder
• Creates a property file (*.esl) in this same folder that can be referenced.
The newly-created FMU can be used by simply referencing this new property
file.
26 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation
Hybrid Torque Vectoring Workshop
Optional: Inspect Property File, Note Parameter Values

• The Generate ESL Property File dialog box does several important tasks:
1. Creates a property file for the control system in the database table named
acar_EVIA.cdb\external_system_libraries.tbl
2. Copies into this folder the necessary .fmu and .dll (/win64 subfolder) files
required to run the FMU,
3. Creates a Parameters section in the property file for all of the Fixed
Parameters from Easy5.

• Verify that the Fixed Parameters from Easy5 get created as Parameters in the
property file. To do this:
• Locate the \external_system_libraries.tbl folder in the acar_EVIA database,
• Open the property file (*.esl) that was created on the previous page and locate
the Parameters section. These should match with the Fixed Parameters from
Easy5.

27 | Hybrid Vehicle Torque Vectoring Control © MSC Software Corporation


Thank You!
End of Chapter 4
Appendix 1 (Workshop)
EASY5 Control System Files and Simulation
for the Regenerative Braking Scenario
EASY5 Control System Files and Simulation for the Regenerative Braking
Scenario
What You Will Do
• During this workshop, you will
• Explore an EASY5 simplified electric motor model and perform an acceleration scenario
• Generate an ESL library from this model for Adams Controls
• Explore an EASY5 simplified model of the Electronic Control Unit and the regenerative braking strategy

3 | Appendix 1 (Workshop): EASY5 Control System Files and Simulation for the Regenerative Braking Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Regenerative Braking
Scenario
Prerequisite
• The EASY5 workshop requires EASY5 2020 FP1 with per user setup set to the Intel Fortran Compiler
(Compatible Intel Fortran Compiler, Intel Parallel Studio 2017 for example)

4 | Appendix 1 (Workshop): EASY5 Control System Files and Simulation for the Regenerative Braking Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Regenerative Braking
Scenario
Getting Started
• Go to the EASY5_sEV/simpleEM_sim directory
• Open the simpleEM_sim.0.ezmf EASY5 model by double-clicking on it

5 | Appendix 1 (Workshop): EASY5 Control System Files and Simulation for the Regenerative Braking Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Regenerative Braking
Scenario
Explore the simpleEM Model
• The simple Electric motor model is connected to a simplified vehicle model (1D)
• The model is embedding the rotor rotational inertia and a flexible torsional shaft to be connected to the vehicle model
• It has some simple parameters for the Electric Motor performances such as:
• maxPower: power limitation in KW: above this limit, the torque is limited (at high speed)
• maxTorque: maximum output torque (N.m), rated at maximum throttle input
• maxRPM: the output power will cut off after this limit at high RPM speed.

• The input command is the throttle demand, normalized (-100 to 100), translated to a rotor Torque output.
• The model is able to run as motor or generator (negative torque) with a negative throttle input

6 | Appendix 1 (Workshop): EASY5 Control System Files and Simulation for the Regenerative Braking Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Regenerative Braking
Scenario
Simulate the simpleEM_sim Model
• Execute the predefined simulation (10 sec) by clicking on
the RUN button
• The vehicle is accelerating to the maximum speed.
• The maximum torque is produced during the first
simulation phase, then the torque is limited by the
maximum power rating, and by the RPM speed limit cut
off.

7 | Appendix 1 (Workshop): EASY5 Control System Files and Simulation for the Regenerative Braking Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Regenerative Braking
Scenario
How to Modify the EASY5 Motor Model and Generate a New ESL dll Library for ADAMS
• Open simpleEM_ESL.0.ezmf model
• This model is similar to the simpleEM_sim model, and could be modified before export to Adams Controls
• The 1D vehicle model is replaced by an AD block (ADAMS mechanism) defining the I/O signals from EASY5 to the
ADAMS vehile model

8 | Appendix 1 (Workshop): EASY5 Control System Files and Simulation for the Regenerative Braking Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Regenerative Braking
Scenario
How to Modify the EASY5 Model and Generate a New ESL dll Library for ADAMS
1. Under the Build menu, Export Model As, ADAMS External System Library
2. Keep “Use Design Parameters” and “Use Display Outputs” as defined
3. Click Export/Close

The files “simpleEM_ESL.dll” and “simpleEM_ESL.ezanl” are written in the local


EASY5 directory and will be used during the ADAMS/Controls creation steps
2
1

3
9 | Appendix 1 (Workshop): EASY5 Control System Files and Simulation for the Regenerative Braking Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Regenerative Braking
Scenario
ECU Model and Regenerative Braking Strategy
• Open the model regenECU_ESL.0.ezmf in the regenECU_ESL directory
• Explore the Vehicle Control Unit user code block: double click and Edit Component
• The VCU is computing the proper electric and mechanical brake signals based on various information coming from the
vehicle and the electric motors (velocity, available electric torque, driver braking command …) and manage the energy
recovery or consumption back to the battery pack.

10 | Appendix 1 (Workshop): EASY5 Control System Files and Simulation for the Regenerative Braking Scenario © MSC Software Corporation
Appendix 2 (Workshop)
EASY5 Control System Files and Simulation
for the Induction Motor Scenario
EASY5 Control System Files and Simulation for the Induction Motor
Scenario
What You Will Do
• During this workshop, you will
• Explore an EASY5 model of an Induction Motor and perform an acceleration scenario
• Generate an FMU from this model for the FMU induction motor A2 workshop in Adams Car

3 | Appendix 2 (Workshop): EASY5 Control System Files and Simulation for the Induction Motor Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Induction Motor
Scenario
Prerequisite
• The EASY5 workshop requires EASY5 2020 FP1 with per user setup set to the Intel Fortran Compiler
(Compatible Intel Fortran Compiler, Intel Parallel Studio 2017 for example)

4 | Appendix 2 (Workshop): EASY5 Control System Files and Simulation for the Induction Motor Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Induction Motor
Scenario
Getting Started
• Go to the EASY5_sEV/induction_motor_FMU directory
• Open the induction_motor_PWM_sim.0.ezmf EASY5 model by double-clicking on it

5 | Appendix 2 (Workshop): EASY5 Control System Files and Simulation for the Induction Motor Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Induction Motor
Scenario
Explore the Model
• This model is simulating an induction motor (EASY5 Electric System Library IM component) connected to a simplified
1D vehicle model.
• The Induction motor component from the Electric System library is powered by a simplified PWM power supply model ,
variable duty cycle, 10KHZ switching frequency.
• The input throttle demand is converted to a torque demand and simple PI controller is comparing the demand to the
resulting torque and computes a variable duty cycle to the PWM power supply.
• The motor control strategy is a simplified version of a classical variable Voltage/frequency command.
• The frequency command is variable,
and a frequency slip value is controlled and
Torque
maintained in the stable (normal) region of the
induction motor: maximum torque

(starting torque) (normal torque)

6 | Appendix 2 (Workshop): EASY5 Control System Files and Simulation for the Induction Motor Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Induction Motor
Scenario
Simulate the Model
• Execute the predefined simulation (12 sec) by clicking on
the RUN button
• The model is simulating a ramp up throttle demand to the
maximum from 3 to 5 sec.
• The throttle demand is converted to a torque demand
(black).
• The resulting torque (blue) is matching the torque
demand and reach a 50 KW power limitation caused by
the power supply voltage limitation (+/- 260 V).

7 | Appendix 2 (Workshop): EASY5 Control System Files and Simulation for the Induction Motor Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Induction Motor
Scenario
FMU Generation Procedure
• Go to the EASY5/induction_motor_FMU directory
• Open the induction_motor_PWM_FMU.0.ezmf EASY5 model by double-clicking on it

8 | Appendix 2 (Workshop): EASY5 Control System Files and Simulation for the Induction Motor Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Induction Motor
Scenario
Configure the FMU Export Process
• Configure the FMU export process
1. Open the FMU block by double-clicking on it
1
2. Make sure that Version 2 and Cosimulation option are selected for
FMU version and type
3. Then click on the Inputs tab
3

9 | Appendix 2 (Workshop): EASY5 Control System Files and Simulation for the Induction Motor Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Induction Motor
Scenario
Configure the FMU Export Process
1. Make sure the CommInterval is set to 100
2. Make sure the TimeIncrement is set to 1E-6
3. Click OK 1

• The time increment defines the time step used by the


internal EASY5 solver in the FMU block. It should be set
smaller than the PWM switching time step (1E-4)
• The CommIntervalMult should be set accordingly to the
communication interval when the FMU is imported in
ADAMS (1E-4) and to the TimeIncrement parameter: 1
• CommIntervalMult = 1E-4/1E-6 = 100 2

10 | Appendix 2 (Workshop): EASY5 Control System Files and Simulation for the Induction Motor Scenario © MSC Software Corporation
EASY5 Control System Files and Simulation for the Induction Motor
Scenario
Generate the FMU Model for ADAMS
1. Under the Build menu, Export Model As > Functinal Mockup Unit
2. Keep “Use Design Parameters” as defined
3. Click Export/Close

• The file “induction_motor_PWM_FMU.fmu” is written in the local EASY5 directory


and should be used during the ADAMS/Controls FMU creation steps
2

1 3

11 | Appendix 2 (Workshop): EASY5 Control System Files and Simulation for the Induction Motor Scenario © MSC Software Corporation
Appendix 2 (Workshop)
Simulating an Induction Motor EV using an
EASY5 FMU
Workshop A2: Simulating an Induction Motor EV using an EASY5 FMU
What You Will Do

• Getting started
• Replace the rear electric motor model by an FMU control system
• Simulate a simple acceleration full vehicle scenario

3 | Appendix 2 (Workshop): Simulating an Induction Motor EV using an EASY5 FMU © MSC Software Corporation
Workshop A2: Simulating an Induction Motor EV using an EASY5 FMU
Getting Started

• From the File menu, Close Assembly


• Copy the file “induction_motor_PWM_FMU.fmu” from the EASY5 directory to the local working directory
• Form the Tools menu, switch to the template builder mode
• Open the template “_Epowertrain_2motors_sEV.tpl” from the acar_EVIA database

• The 2 electric motor control systems are currently an ESL library control system (model exchange mode)
• The next operation will replace them by an EASY5 FMU model of an induction motor (co-simulation mode)

4 | Appendix 2 (Workshop): Simulating an Induction Motor EV using an EASY5 FMU © MSC Software Corporation
Workshop A2: Simulating an Induction Motor EV using an EASY5 FMU
Delete the ESL Rear Electric Motor

• From the Controls menu, Control System … Delete


• In the General State Equation Name, browse for the electric_motor_rear
• Click OK

5 | Appendix 2 (Workshop): Simulating an Induction Motor EV using an EASY5 FMU © MSC Software Corporation
Workshop A2: Simulating an Induction Motor EV using an EASY5 FMU
Create the FMU Rear Electric Induction Motor

• From the Controls menu, Control System … Import


• Adams Controls System Import: 1
1. General State Equation Name: electric_motor_rear 2
2. ESL: browse for the induction_motor_FMU.fmu
local file
3. Click on “From PINPUT”, then select 4 3
PINPUT_IM_rear
4. Click on “From POUTPUT”, then select
POUTPUT_rear
5. Select Static Hold=On 5
6. Set Communication interval to 0.0001 6
7. Click OK
7

6 | Appendix 2 (Workshop): Simulating an Induction Motor EV using an EASY5 FMU © MSC Software Corporation
Workshop A2: Simulating an Induction Motor EV using an EASY5 FMU
Create the Front Induction Motor

• Repeat the same operations for the front motor


• Delete the front_electric_motor control system
• Create the front induction motor from the FMU

7 | Appendix 2 (Workshop): Simulating an Induction Motor EV using an EASY5 FMU © MSC Software Corporation
Workshop A2: Simulating an Induction Motor EV using an EASY5 FMU
Acceleration Simulation

• From the File menu, Open Assembly …, the browse for the « simpleEV.asy »
assembly
• When prompted to use the existing template in memory, reply Yes
• From the Simulate menu, Full Vehicle Analysis , Straight-Line Events,
Acceleration 1
• Fill the dialog box as shown
1. Use a very large Number of Steps
2. Be sure to uncheck the Quasi-Static Straight option
2
• The CPU simulation time is longer, and the results file is huge (> 3Gb)
because of the high number of output steps

8 | Appendix 2 (Workshop): Simulating an Induction Motor EV using an EASY5 FMU © MSC Software Corporation
Workshop A2: Simulating an Induction Motor EV using an EASY5 FMU
Review

• F8 to open ADAMS Postprocessor


• From the Results Set, plot the torque_EM_front.Q and torque_EL_rear.Q results

We can observe an unstable behavior of the rear motor, caused by an electronic regulation problem

9 | Appendix 2 (Workshop): Simulating an Induction Motor EV using an EASY5 FMU © MSC Software Corporation
Workshop A2: Simulating an Induction Motor EV using an EASY5 FMU
Modify the Rear Motor Electronic Regulation

• From the treeview, display the Epowertain_2motors_sEV


subsystem
1
• From the Adjust menu: GSE Parameters modify
1. In the GSE field , browse for the electric_motor_rear GSE
control system
2. Modify the Tc La2 parameter to 0.05
3. Click OK

Tc_LA2 is the time constant for the feedback filter observing the rotor
velocity used for computing the power supply frequency command.
Modifying this parameter will improve the regulation

• Rerun the same acceleration simulation 2

10 | Appendix 2 (Workshop): Simulating an Induction Motor EV using an EASY5 FMU © MSC Software Corporation
Workshop A2: Simulating an Induction motor EV using an EASY5 FMU
Review the Improved Regulation Simulation

• F8 to open ADAMS Postprocessor


• From the Results Set, plot the torque_EM_front.Q and torque_EL_rear.Q results

The rear induction motor regulation has been improved

11 | Appendix 2 (Workshop): Simulating an Induction Motor EV using an EASY5 FMU © MSC Software Corporation
Thank You!

You might also like