Typhoon HIL Blog


A Better Way to Design and Test Software for Electric Vehicle Motor Drives

Posted by Debora Santo and Sergio Costa on Jun 2, 2020 1:11:50 PM

Asset 38@3x-8

 

  • Employ high-fidelity modeling of electronic and EV systems.
  • Safely catch control issues before deployment.
  • Improve project schedule performance and streamline workflow.
  • Fully automate testing.
  • Easily import model parameters.

 

Model-based software development is a widely accepted practice in the automotive industry, motivated by the software's safety critical nature and the need for the development and testing process to comply with the ISO 26262 standard. With the availability of accurate physical plant models (e.g. motor drive), software testing can start early in the development process, allowing you to discover and fix problems as soon as they arise.
Model-based software development workflow usually goes through three stages: Model in the Loop (MIL), Software in the Loop (SIL), and Hardware in the Loop (HIL) or Controller HIL (C-HIL). For traditional internal combustion engine vehicles, the model fidelity of the physical subsystem is easy to maintain throughout development stages (it is relatively easy to achieve real-time simulation). However, in electric vehicles (EV), it has been challenging to obtain the required model fidelity for real-time HIL simulation.


WHY use model-based engineering when designing motor drives?
JMAG-Typhoon HIL integration now enables EV software developers to have the same fidelity level plant model across MIL/SIL and HIL. Indeed, model continuity is maintained across the whole software development workflow through the use of high-fidelity machine models generated from the Finite Element Model. This dramatically improves testing efficiency and effectiveness, and communication between hardware and control design teams. Model-based design and testing successfully streamlines the product development processes, improves project schedule performance, and reduces the number of software defects.

HOW does JMAG-Typhoon HIL support your model-based engineering workflow?

The high-fidelity FEA motor model is as close of a representation of an actual physical motor as it gets. You can extract and import a look-up table of your model's lumped circuit parameters directly into the Typhoon HIL Software Toolchain with one click. Then, we simulate your motor in real time in the loop with the actual ECU (engine control unit). Motor model includes non-linear flux saturation effects, spatial harmonics, and loss data. This enables your HIL simulation to emulate the behaviors of the physical system as close as possible and lets you automate the testing of the embedded software through a wide range of scenarios and operating conditions, including faults, in a repeatable manner.

HOW does the JMAG RT-Typhoon solution’s workflow look like?

There are several ways to generate motor model data (see Fig. 1). JMAG - Designer gives you the widest options for setting up your FEA model, while JMAG - Express can help with pre-made templates. You can also use measurements or data from a library.

Fig. 1.
Fig. 1. Methods for creating the motor model.

JMAG RT generates an RTT file in a form of a look-up table, sometimes referred to as the 1D model or lumped circuit motor model. This file can be directly imported and added to the remaining electric drive system built in the Typhoon HIL Schematic Editor.

HOW does ultra-high fidelity make a difference?

Typhoon HIL hardware is built for power electronics applications and optimized through 4 generations of HIL design. Key features include 200ns time-step ultra-high fidelity simulation and ultra-low latency that stem from the FPGA processor design. The accompanying vertically integrated software can then not only define how the hardware runs the model, but also includes an extensive library of motor models, support for native position and speed feedback signals, as well as various encoder communication standards that all support various drive applications.

C-HIL enables fully automated testing of drive control software: functional, performance, fault, regression testing. Using C-HIL, you can test the real unmodified controller with its real hardware, software, and firmware. Compared to lab testing, there is no concern for damaging equipment, test coverage is orders of magnitude higher, and you can automate software regression testing. It gives you the highest test coverage paired with very high testing fidelity (see Fig. 2).

Fig. 2.Fig. 2. The comparison of testing approaches

For more information:

See the Better Way to Design and Test Motor Drives for EV's webinar recording for a demo of the integrated toolchain solution. You can read more about POWERSYS Solutions' and Typhoon HIL's product offering on the company webpages.

 

Download Technical Article PDF

Recent Posts