Introduction
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 the development stages (it is relatively easy to achieve real-time simulation). However, in electric vehicles (EVs), 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, improve 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). The 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 closely 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.
What 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.
JMAG RT generates an RTT file in the 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 200 ns 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, and 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).
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 offerings on the company websites.
Credits
Authors | Sergio Costa, Debora Santo
Visuals | Karl Mickei
Editor | Debora Santo