Electric Motorcycle Simulation: How to couple Power Electronics with Multibody and Control systems
Overview
Abstract
In this article we couple the mechanical and electrical simulation words to create a virtual prototype of a motorcycle. By tightly integrating the electric powertrain with the multibody dynamics and control systems together enables us to study the interactions between these systems, evaluate the overall system performance and discover individual bottlenecks.
Introduction
On this application we simulate an electric powered motorcycle on demanding maneuvers such as:
- Hard acceleration on varying/slippery friction surface
- Full Lap around a circuit
The motorcycle model is made by three individual sub-systems consisting of the:
- e-powertrain
- chassis/frame
- control systems
The electric powertrain system is modeled through the power electronics software Altair PSIM®. It consists of the PMSM Motor, the Inverter and finally the Battery pack.
The motorcycle chassis including the tire-road interaction is simulated with the aid of Altair’s multibody dynamics software, MotionSolve®.
Activate® is used as integration platform between the solvers and to model the traction (tire slip) controller.
The Challenge
The objective of these analyses is to evaluate the interaction between the electric powertrain and the chassis dynamics, as well as to validate the overall system response and efficiency. Different motor control strategies can be investigated to ensure stable response and improve drivability.
Modelling Details
We have two different options to couple the electric powertrain with the chassis and the control system, we can:
- Link PSIM natively with Activate which is also used as integration platform
- Export the PSIM model as an FMU to be used within MotionSolve (where also the control system can be handled).
In this example we will use the first one, as the coupling is native and allows more flexibility. However, if you will be making more frequent changes on the multibody model, then the latter approach might better suit you.
PSIM Model Details
Regarding the E-motor and inverter, we have the option inside PSIM to choose models with different fidelity to tune the trade-off between “results accuracy” vs “computational speed”.
On this application, we switch between the Ideal PMSM and a reduced PMSM(Flux) model, both being 3-phase permanent magnet synchronous type motors. The PMSM(Flux) model is generated based on a Flux model but uses Look up Tables (LUT) for non-linear inductance parameters and the losses calculation which allows for quite faster simulation times compared to a FluxMotor model.
Regarding the Inverter model, we will interchange between the Ideal and the Thermal – IGBT one. In the first the switching control is idealized whereas on the latter the switching devices are derived from PSIM’s Thermal Module functions and thus switching losses are also calculated.
Below you may see the PSIM model overview. For this demo the “PMSM (IPM) Drive (Flux)” base model is taken from the “Motor Control Design Suite”. It is then modified to include the Battery pack and the coupling interface with the MS & Activate model.
Inputs to the PSIM model are:
- Motor Speed (angular velocity from the gearbox on the multibody motorcycle)
- Throttle position after the traction controller module (ECU Throttle)
- Regenerative braking signal
Output from the PSIM model is the Motor developed torque.
You may notice that the motor output is processed by a Mechanical-Electrical Interface block. This allows more complex load components to be used if needed. More info regarding this can be found here: link to YouTube video
A similar workflow applies to create the Ideal motor / Ideal inverter combination model.
MotionSolve Model Details
For this demo the standard Electric Sport Bike model is taken from the “Vehicle Tools -> Example models” library and is modified accordingly to include the Input/Output Arrays for the co-simulation.
To further increase the fidelity, one may include the frame Flexibility as demonstrated on the example model found here
Activate Model Details
Activate here serves a dual purpose. First, to model the PI anti-wind-up controller used to control the tire slip on the driven wheel (TCS). The task is accomplished by interfering between the driver throttle signal and the actual ECU throttle sent to the motor. Different Regenerative braking control algorithms can also be tested here.
Secondly, Activate manages the co-simulation with PSIM and MS. Solver maximum step size may be useful to tune if issues with noise arise.
In the example shown here the Altair Driver from MotionSolve is responsible for giving the throttle demand signal (before the TCS) and to control the lateral / leaning motion of the motorcycle. For custom needs, one could replace Altair Driver entirely with controllers made inside Activate.
Simulation Results
Acceleration on Slippery surface
For the first maneuver a low friction surface is used to trigger the launch control. After a few meters friction is increased to pose a sudden load increase to the system. Our goal is to maintain a stable response through the whole maneuver.
Running the simulation with the Ideal PMSM motor everything works as intended. However, when we introduce the PMSM(Flux) motor model, initially the system appears to be uncontrollable, meaning that even though the TCS algorithm cuts the throttle, torque is still developed by the motor (FOC fail). To fix this, we re-design the PSIM motor controller by modifying the current loop crossover frequency. With this change the system is again stable.
So what do we learn from this? The higher fidelity PMSM(Flux) model exposes a badly designed controller interacting with the Multibody model in contrast to the ideal PMSM model.
Full lap drive cycle
On this maneuver, we test our motorcycle on a longer drive cycle of around 35 secs. On such scenarios we are able to monitor the electrical losses, individual components efficiency as well as different regenerative braking strategies. One design issue with regen on electric motorcycles is that on high deaccelerations the vertical force on the rear tire gets quite low. Aggressive regen braking can cause instability if care is not taken.
Different PWM algorithms on the motor control can also be investigated. For example, changing from SVPWM to DPWM1 seems to reduce the overall inverter losses while maintaining motor performance.
Usage/Installation Instructions
Model ready to run
Post-Requisite
You may find more tutorials and tips regarding PSIM here
The Motor Control Design Suite from PSIM
The New and Improved Motor Control Design Suite in PSIM v2021a
How to Implement Field Oriented Control of PMSM with PSIM & SmartCtrl
Co-simulation of Simulink and PSIM with SimCoupler
PSIM Webinars
Motor Drives with High-Frequency Interactions (altair.com)
Motor Drive Design, Simulation and Implementation - Start to Finish (altair.com)
Want to learn more? Please join our webinar series on power electronics: Register Here