For a better experience on, enable JavaScript in your browser. Thank you!

Why Electric Drives?

Electric drives offer numerous advantages and have a wide-ranging application potential, so it is only natural that their use has increased during the last years. Electric motors can be very small and fit almost anywhere. They have very high dynamics and provide high torques at low rotational speeds. Other advantages include improved energy savings due to power-on-demand functionality, better controllability, and easier maintenance.

All this combined with the increasingly strict regulations regarding emission standards for automotive applications will further boost the use of electric drives.


All the advantages of electric drives also come with specific requirements for the development and test process.

As electric drives provide high dynamics, the same is needed for the prototyping systems used to validate and run the controller in the real environment and for the test system that verifies the correct behavior of the final production ECU. Some of the resulting challenges are short simulation step sizes, the simulation of sensor input, and the synchronization with pulse width modulation (PWM).


With decades of experience, dSPACE knows about the special requirements of electric drives and offers a comprehensive tool chain for rapid control prototyping (RCP), ECU autocoding, and hardware-in-the-loop (HIL) simulation. The dSPACE products work together seamlessly to provide a convenient development and test environment. They benefit from hardware such as powerful real-time processors, user-programmable FPGAs, and comprehensive I/O interfaces. dSPACE also offers dedicated function libraries for data processing and for controller or plant models. Sophisticated software supports the transition from the first function model in Simulink® to comprehensive real-time tests. dSPACE hardware and software together provide a seamless tool chain whose individual parts are finely tuned to each other.

dSPACE supports customers worldwide from the first controller development to the last approval tests. Throughout the development process, dSPACE Engineering Services provide assistance for even the most challenging projects. All this to provide the greatest flexibility at the highest convenience.

Development process with rapid control prototyping.

Controller Design and Rapid Control Prototyping

The increasing popularity of electric motors entails a higher effort for developing, validating and implementing the required control algorithms. This additional workload can be minimized by using model-based design along with rapid control prototyping (RCP) to accelerate design iterations of the control algorithm on the real ECU.

New controller functions are typically developed on the basis of models in MATLAB®/Simulink®/Stateflow®.

The dSPACE RCP systems make the new control algorithm tangible and let you optimize and test new control strategies in a real environment quickly and without barriers. This helps you detect design faults and correct them immediately.

Fast Iterations – Maximum Freedom

dSPACE offers a wide range of off-the-shelf software and hardware components for in-vehicle use (e.g., the modular AutoBox and compact MicroAutoBox II) and laboratory or test bench use (e.g., the modular Expansion Box and compact MicroLabBox®). Since the RCP hardware is far more powerful than actual production ECUs with regard to processing power and memory space, almost no hardware limitations have to be considered. The RCP hardware can be used as an ECU substitute or extension of an existing ECU, e.g., if you have to adapt only parts of the ECU functionality. To connect RCP systems to an existing ECU, dSPACE offers a comprehensive ECU interface tool environment (e.g., ECU Interface Manager, DCI-GSI2).

With the dSPACE implementation software Real-Time Interface (RTI), models designed with MATLAB®/Simulink®/Stateflow® can be implemented on the dSPACE RCP hardware at the click of a button. The graphical RTI block library with numerous interface functions lets you connect inputs and outputs to the model. With the dSPACE experiment software ControlDesk®, you can use graphical instruments to optimize the control algorithm by monitoring and tuning variables during run time. If the function of the control algorithm itself has to be modified during the tests, you can simply correct it in Simulink and flash it to the hardware again until all requirements are met. The perfect interaction of dSPACE hardware and software provides a convenient development and test environment. 

The TargetLink code easily matches the efficiency of human programmers in terms of memory consumption and execution speed – without compromising readability. 

Controller Implementation and Production Code Generation

Once the new functions are developed and tested thoroughly, they need to be implemented on the target ECU. This means generating production code from the MATLAB®/Simulink®/Stateflow® model while taking into account the specific ECU's characteristics, such as memory and computing power.

dSPACE’s production code generator, TargetLink®, generates highly efficient C code straight from MATLAB/Simulink/Stateflow and allows for early verification through built-in simulation and testing. This drastically reduces the time needed for implementation and achieves systematic consistency between the specifications and the production code. Changes at the model level are quickly transferred to the code.

Highly Efficient, Highly Configurable Code

TargetLink was specifically designed for production-quality autocoding. The highly efficient code it produces has two major benefits: 

  • A low impact on the RAM/ROM/stack memory
  • Short worst-case execution times (WCET)

TargetLink Features at a Glance

Typical development process for production code generation with TargetLink.

  • Production code generation directly from Simulink®/ Stateflow
  • Highly efficient fixed-point and floating-point code
  • Comprehensive fixed-point support including autoscaling
  • Powerful software design and testing features
  • Direct verification by MIL/SIL/PIL simulation with integrated data logging and plotting
  • Support of modular, component-based development
  • Efficient data management with the TargetLink Data Dictionary
  • High-performance, native AUTOSAR support
  • Certified for ISO 26262, IEC 61508, and derived standards
  • TargetLink Ecosystem – powerful tool chain for model-based development extended by complementary tools and services from third-party providers

Controller Tests and Hardware-in-the-Loop Simulation

Once the ECU functions are implemented on the production ECU, they have to be tested in realistic scenarios. This can be done by means of hardware-in-the-loop (HIL) simulation, which simulates the ECU’s environment (interacting components or even a whole system). With HIL simulation, you can easily cover all the different motor varieties and their ECUs.

For realistic battery management controller tests, dSPACE offers the HIL simulator system SCALEXIO® and special hardware and software for battery simulation, such as real-time hardware for HIL tests with high-voltage accuracy and galvanic isolation or simulation models for lithium-ion batteries and nickel-metal hydride batteries. For the real-time simulation of electric drive systems, dSPACE provides FPGA-based I/O for capturing the gate driver signals and simulating the motor current. Combined with simulation models, e.g., the ASM Electric Components Library for processor-based simulation and the XSG Electric Components Library for FPGA-based simulation, you can build a powerful HIL test system. With the new Electrical Power Systems Simulation Package, the simulation models for processors and FPGAs can simply be generated directly from the circuit topology. dSPACE systems cover applications from rectifiers and inverters for closed-loop simulation with an electric drive controller, to DC/DC converters, to wind/solar energy converters.

Simulating the ECU’s environment (interacting components or even a whole system) has several advantages:

  • Function tests are possible at an early development stage, even before all parts are available in reality
  • Laboratory tests reduce time and costs and take place under controlled conditions
  • Failures and the ECU’s behavior in what are normally dangerous situations can be tested with no risk for the driver or the controlled machine
  • The tests are reproducible and can be automated

Different Ways to Access Electric Motor ECUs

ECUs and other systems for controlling electric motors can be accessed by the HIL simulator at different levels. Which interface to use depends on the testing purpose and project conditions:

  • Signal level: Simulation of the power electronics, the electric motor, and the mechanical environment:
    • Very scalable, as parameters can be set flexibly regardless of the power level
    • Full access to the model
    • Internal signals of the ECU must be accessible
  • Electric power level: Emulation of the electric motor and simulation of the mechanical environment:
    • Production ECU, including power stages, can be used
    • Full access to the model
    • Motor parameters can be set flexibly within a certain power range
  • Mechanical level: Simulation of the mechanical environment, production ECU, and real motor:
    • Testing of mechanical parts


In view of growing environmental concerns, vehicle concepts of the future must focus on alternative power systems. dSPACE offers a wide range of products and decades of experience for supporting your projects.

Electric Power Industry

dSPACE products offer comprehensive support for developing electric power industry applications – from controller design and rapid control prototyping to controller implementation and controller tests.

Further Information Success Stories