top of page


Welcome to the application example of an Electric vehicle powertrain emulation using a permanent magnet synchronous motor. Here, we implement a field-oriented control system to regulate the speed and torque of the motor.

Fig 1. EV Powertrain

The Fig. 1. depicts the powertrain configuration wherein a high-voltage battery is linked to the motor via the inverter, which provides the necessary voltage for the motor's operation directly from the battery.


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 Field-Oriented-Control (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. Field-Oriented Control of PMSM

The other sub-module inside the drive model is the DQ-to-ABC 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. DQ-to-ABC 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 field-oriented 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 two-dimensional 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.


Fig 10. Impedyme’s CHP Cabinet

The input power is thus computed to be,

We allocate the first drawer, that is the top-most 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 bottom-most 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 3-phase 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 sub-modules underneath, and they are: DQ Speed-Current Controller, DQ-to-ABC Phase Transformer, A Space Vector Modulation Function model, and a Switching Inverter model.

The speed-current 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


The system parameters for the experiment are as follows.


  1. A. Nazari, “Terminal Behavioral Modeling of Electric Machines for Real-Time Emulation and System-level Analyses”, Master’s Thesis, May 2022

Fig 5. DQ Speed-Current Controller

The final sub-module outlines implementation of Space Vector Pulse Width Modulation (SVPWM) inverter control for Permanent Magnet Synchronous Motor (PMSM) Field-Oriented Control (FOC) aimed at speed-current 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 (V-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 well-known equations of the motor.  These represent the flux linkages in D-Q 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 giga-bits per second. For simulations with ultra-low step-times, the equipment supports FPGA-based tests, that allows you to have time steps as low as a few nanoseconds. Moreover, the FPGA brings in a better performance for your real-time emulation since the processing speed of an FPGA is much higher than that of a CPU.

Also, for high-speed 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 pre-designed 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 real-time 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 real-time. 

 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 Step-Load Change

Likewise, the output power is calculated as, 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 speed-controller, the motor quickly tracks the speed set-point, 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 hardware-in-the-loop (HIL) and power hardware-in-the-loop (PHIL) capabilities, offering unparalleled accuracy and efficiency in EV development. With CHP, engineers can simulate real-world 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 time-to-market 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:

bottom of page