EV PMSM POWERTRAIN EMULATION
Welcome to the application example of an Electric vehicle powertrain emulation using a permanent magnet synchronous motor. Here, we implement a fieldoriented control system to regulate the speed and torque of the motor.
Fig 1. EV Powertrain
The Fig. 1. depicts the powertrain configuration wherein a highvoltage battery is linked to the motor via the inverter, which provides the necessary voltage for the motor's operation directly from the battery.
EV MODEL IMPLEMENTATION:
Battery Pack Modeling:
The Simulink model of the battery for the EV is shown in the figure below. The model relies on the battery current to estimate the state of charge (SoC), and similarly predicts the open circuit voltage dynamically as a function of SoC. This Coulombic counting approach is known for its simplicity and is primarily dependent on the discharge from the battery pack.
Fig 3. Simulink Battery Model
Drive Modeling:
This linearized model represents a permanent magnet synchronous machine, utilized for modeling the motor drive in a Simulink simulation. The matrices encapsulate the rate of change of currents (i_d and i_q) and the motor speed. Employed alongside is a FieldOrientedControl (FOC) scheme, the structure of which is illustrated in Fig. 4.
Furthermore, the control parameters for our simulation were derived using the equations provided below the image. Here, Ld and Lq are the quadrature and direct inductances. Likewise, P is the number of pairs of poles and λ𝑝𝑚 is the permanent magnet flux of the machine.
Fig 4. FieldOriented Control of PMSM
The other submodule inside the drive model is the DQtoABC transformer that takes the Vd reference, Vq reference, and rotor angle as inputs and transforms DQ to ABC phases. The Simulink model of how it is done is as follows:
Fig 6. DQtoABC Transformation Model
The Space vector modulation (SVM) is a technique widely used in for controlling the output voltage of inverters. When applied to Permanent Magnet Synchronous Motors (PMSMs) for fieldoriented control (FOC) of speed and current, SVM enables efficient and precise motor control by modulating the reference voltage vectors within the voltage space vector diagram to synthesize the desired output voltage waveform.
This ensures that the inverter output closely follows the reference voltage required for optimal motor operation.
In SVM, the output voltage of the inverter is represented as a combination of six or more voltage vectors arranged in a hexagonal pattern in a twodimensional voltage space. SVM often employs a technique called Space Vector Pulse Width Modulation (SVPWM) to generate the switching signals for the inverter. SVPWM calculates the duty cycles of the switching devices to approximate the space vector by adjusting the pulse widths of the voltage vectors.
IMPEDYME’S CHP TECHNOLOGY
Fig 10. Impedyme’s CHP Cabinet
The input power is thus computed to be,
We allocate the first drawer, that is the topmost drawer, for the battery model and the second drawer for the inverter drive. Likewise, finally, the third drawer is dedicated for the PMSM motor model for the EV. The last two, that is the two bottommost drawers are dedicated for the Active Front end Converters that provide the DC coupling for the emulation.
Now, let’s see how the connections are made to allocate these drawers. the power connections are given on the backside of the cabinets. The DC supply from the active front end drawer is given to the battery model drawer and the battery voltage is provided to the inverter’s input supply. The second drawer emulates the action of an inverter and converts the DC from the battery to 3phase AC (purple connections), which are subsequently provided to the motor drawer below, and finally the DC coupling is given back to the active front end drawer from the motor to have a circulating power flow. Since the connections are complete, we are now ready to test.
Let us now see how each of these modules are modeled in Simulink.
Fig 2. Simulink Implementation of EV Powertrain
The Simulink Model of the drive consists of 4 submodules underneath, and they are: DQ SpeedCurrent Controller, DQtoABC Phase Transformer, A Space Vector Modulation Function model, and a Switching Inverter model.
The speedcurrent controller’s model is provided in Fig. 5, where the generated electromagnetic torque equation related to PMSM is simplified to include just the q axis current.
Fig 7. SVM Simulink Function Implementation
EMULATION PARAMETERS & EXPERIMENT RESULTS
The system parameters for the experiment are as follows.
REFERENCES

A. Nazari, “Terminal Behavioral Modeling of Electric Machines for RealTime Emulation and Systemlevel Analyses”, Master’s Thesis, May 2022
Fig 5. DQ SpeedCurrent Controller
The final submodule outlines implementation of Space Vector Pulse Width Modulation (SVPWM) inverter control for Permanent Magnet Synchronous Motor (PMSM) FieldOriented Control (FOC) aimed at speedcurrent regulation. The generated SVPWM consists of optimal switching signals for the inverter based on the location of the reference space vector within six sectors.
Where, m is the modulation index, Vi is the magnitude of voltage vector and Vdc is the DC bus voltage from the battery. Moreover, the equation 2/3 (Va 1) serves as a critical decision criterion in Space Vector Pulse Width Modulation (SVPWM) for inverter control. It determines whether inverter switches should be active or inactive based on the phase voltage, where Va represents the magnitude of the phase voltage in the ABC reference frame.
Fig 8. Simulink Inverter Implementation
PMSM Modeling:
The motor utilized for the EV Model is a permanent magnet synchronous machine and these are the wellknown equations of the motor. These represent the flux linkages in DQ phases, along with the equations to determine the D and Q currents
Fig 9.
The Impedyme’s emulation solutions mimic your MATLAB Simulink models that can be used for high power tests, up to a few Mega Watts scale, for bandwidths up to 20 kHz. Simply connect the optical links to our cabinets and deploy your models to begin the testing. The cabinets have multiple optical links each up to 12.5 gigabits per second. For simulations with ultralow steptimes, the equipment supports FPGAbased tests, that allows you to have time steps as low as a few nanoseconds. Moreover, the FPGA brings in a better performance for your realtime emulation since the processing speed of an FPGA is much higher than that of a CPU.
Also, for highspeed emulations, the individual FPGAs of the drawers can communicate among them. The testing using Impedyme’s CHP is straightforward as it uses Simulink designs. Our products come with a wide range of predesigned models, which you can customize the designs according to your needs and requirements. Furthermore, if we were to emulate both the input and the output side of the power systems, we can have a circulating power flow. Since the power is recirculated, we only must feed in power losses from the grid. By having such a technology can reduce the power requirements of your lab for testing large power systems. Moreover, during the realtime emulation of your models, our integrated thermal management utilizes an advanced liquid + air cooling technology that ensures that does not require any additional chiller for cooling. Thus, we use Impedyme’s CHP to emulate the developed powertrain model in realtime.
Now that we have developed the full powertrain model, let us see how the connections are given to kickstart the testing process.
Fig 11. EV Emulation CHP Connection Diagram
Fig 12. EV Powertrain Startup Transients
Fig 13. EV Powertrain StepLoad Change
Likewise, the output power is calculated as,
Fig.13.is an illustrative example showcasing the adaptability of FOC system to sudden changes in torque load. In this instance, the torque load decreases from 125 to 75 Nm. Notably, the control system efficiently tracks this change within 2 seconds, even when subjected to heavy additional moment of inertia loadings. since we decreased the torque to 75 Nm, the current fell while there is not much effect on the voltage. Likewise, the speed of the motor dipped, however, since the system is provided with a speedcontroller, the motor quickly tracks the speed setpoint, which is 1500 RPM. Hence, this validates the powertrain and the controller’s performance.
The Simulink model of the motor is represented in Fig. 9. All models have now been built, and before proceeding to the tests, let us get introduced to Impedyme’s CHP technology.
CHP seamlessly integrates hardwareintheloop (HIL) and power hardwareintheloop (PHIL) capabilities, offering unparalleled accuracy and efficiency in EV development. With CHP, engineers can simulate realworld scenarios with precision, testing EV components and systems under dynamic conditions. From battery management systems to motor controllers, CHP empowers manufacturers to optimize performance, enhance reliability, and accelerate timetomarket for their EVs. Its modular design ensures flexibility to adapt to evolving testing needs, while its intuitive Simulink interface streamlines the testing.
Some of Impedyme CHP’s features include: