Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
What is Developer Zone?
United States

Document TypeTutorial
NI Supported: Yes
Publish Date: Apr 04, 2012


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links -Products and Services

High-Performance Electric Motor Simulation Using NI VeriStand and JMAG-RT

3 Ratings | 4.67 out of 5
Read in  |  Print |  PDF

Overview

The JMAG add-on for NI VeriStand combines National Instruments real-time testing software technology with JMAG-RT, part of the JMAG finite element analysis (FEA) tool suite from JSOL Corporation. With the JMAG add-on for NI VeriStand, you can easily run high-fidelity finite element motor models in real time using NI VeriStand. This provides extremely accurate motor simulation, which reduces the time you spend on costly physical testing. You can run models in a simulation-only environment using a Windows OS-based computer, a hardware-in-the-loop (HIL) simulation using a real-time OS, or, for maximum performance, a field-programmable gate array (FPGA)-based HIL simulation using NI reconfigurable I/O (RIO) hardware.

The JMAG add-on for NI VeriStand is a software module developed in collaboration with JSOL Corporation, the creator of the popular JMAG simulation software for electromechanical design and development. The add-on is designed for use in real-time simulations of motor models using inductance and back electromotive force (emf) data generated by FEA. The FEA technique is required when classical D-Q models cannot be used due to large asymmetry in the motor construction, which generates nonsinusoidal fluxes and currents. This is important for hybrid vehicle manufacturers using high-speed motors optimized for space and cost.

Figure 1. The combination of NI VeriStand and JMAG RT offers unprecedented simulation fidelity and execution speed.

The Expanding Role of Electric Motors

The growing adoption of electric motors in the automotive industry and their presence in green energy applications have created new challenges for embedded control system developers and test engineers. One of these challenges is speed. Control algorithms for electric drive engine control units (ECUs) must run much faster than a power train ECU for an internal combustion engine. These higher speeds make the traditional approach to HIL test inadequate for testing electric motor ECUs. Electric motors must be simulated with high fidelity, and HIL test systems must be able to execute simulation models on the order of 1 µs to adequately represent the actual electric motor’s operation. This combination of simulation fidelity and execution speed has previously been impossible, and this limitation has forced many test engineers to rely on more costly dynamometer or field testing to validate their embedded software.

Figure 2. This outline shows the different phases of control system test for electric motors.

Benefits of Finite Element Analysis (FEA)-Based Simulation

One of the biggest challenges engineers face when conducting real-time simulation of advanced motor drives is how to attain an adequate combination of model fidelity and simulation step time. While a simple constant parameter D-Q model may be sufficient to conduct some HIL tests, increased model fidelity is often necessary for the design of advanced motor drives. High-fidelity simulation is also used for control system performance optimization in the high-efficiency electric motor applications commonly found in the automotive and energy industries. Using high-fidelity JMAG FEA models, you can simulate complex nonideal behavior, such as cogging torque, and design a controller to reduce torque ripple. Similarly, you can simulate the variation in motor inductance at high currents, which greatly affects the torque produced by the motor, and test the controller accordingly. Lower fidelity models do not adequately represent cogging torque, motor inductances at high currents, and other nonlinearities in the simulation. The absence of these characteristics reduces the effectiveness of HIL test, which results in more field testing and increased development time to adequately test embedded control software.

 

Figure 3. In these torque calculations obtained with a D-Q model, offline JMAG model, and JMAG-RT model, the D-Q model simulates the average value of the torque while the JMAG and JMAG-RT models simulate the torque distortion.

FEA is a simulation method that provides highly accurate motor models with enough fidelity to account for nonlinearities in electric motors. However, this high-fidelity simulation has historically been a difficult and time-consuming process. Design engineers had to measure motor parameters and perform the analysis during postprocessing. For complex motor models, this process took hours to complete. National Instruments has partnered with JSOL Corporation to use its FEA tools, JMAG and JMAG-RT, to generate high-fidelity models that you can use with NI LabVIEW system design software and NI VeriStand software for configuring real-time testing applications to complete validation tasks. With this partnership, NI is addressing key requirements for electric motor testing and simulation. Now you can run FEA motor models with microsecond timing by using LabVIEW FPGA and NI RIO FPGA-based hardware. These models can include complex nonlinear behavior for accurate simulation. And then you can connect the signals from the model running in FPGA to other hardware at the high I/O rates you need for complete testing. 

JMAG Add-On for NI VeriStand

NI VeriStand is a configuration-based software environment for creating real-time testing applications. Out of the box, it helps you perform real-time target-to-host communication, data logging, stimulus generation, and alarm detection and response. NI VeriStand also transitions quickly from simulation-only testing to HIL testing, which helps you reuse test components such as test profiles, alarms, procedures, and analysis routines. You can easily remap parameters from models to hardware channels to facilitate real-world I/O. This easy transition saves you time when performing regression testing and helps you automate tests using test executive software such as NI TestStand.

NI VeriStand features an open framework that you can use to create application-specific functionality via real-time plug-ins. This provides maximum flexibility in your test system. The JMAG add-on for NI VeriStand is a plug-in you can use to implement high-fidelity real-time models for HIL tests. It enables inline FEA simulation, which can reduce analysis times from hours to microseconds. You can run medium-fidelity FEA models on NI PXI real-time controllers with approximately 20 to 30 µs simulation step sizes. For applications that require extremely high fidelity, you can run FEA models on NI RIO-based FPGAs. These FPGA-based models can run with step sizes as low as 1 µs. The JMAG motor model library offers a variety of motor types to match a wide range of motor models. You can modify the highly customizable models to specific motor types to generally avoid the need for custom model creation. 

Figure 4. This overview of the electric motor simulation workflow shows how you can deploy the JMAG add-on for NI VeriStand to different targets depending on your application requirements.

NI VeriStand and the JMAG add-on for NI VeriStand are designed to run on NI PXI real-time controllers and NI RIO FPGA I/O devices. NI PXI provides access to a large variety of high-speed and high-precision I/O modules, which ensures that you always have the I/O you need to meet your specific application requirements. In addition to real-time PXI functionality, NI RIO modules for PXI offer extremely high-speed processing that is performed on FPGAs. The NI PXIe-7965R provides extremely high performance, so you can offload model calculations to the FPGA even when using the highest fidelity JMAG-RT FEA models.

 

 Model

Execution Target

Simulation Fidelity

Real-Time Simulation Speed

Recommended Execution Target Hardware

Minimum Execution Target Hardware

FEA With JMAG  Windows  High Non-Real Time: Minutes to Hours NI PXIe-8133 Windows PC
D-Q Model With Constant Parameters

Windows

 

LabVIEW Real-Time

 

Low

 

 

20 to 30 µs

 

 

NI PXIe-8133 RT

 

 

NI PXIe-8108 RT Real-Time Controller

 

 

 NI FPGA
Hardware
Medium 1 to 2 µs NI PXIe-7965R FPGA Module for NI FlexRIO NI PXI-7854R R Series Multifunction RIO
D-Q Model With JMAG-RT

Windows

 

LabVIEW Real-Time

 

Medium 20 to 30 µs

NI PXIe-8133 RT

 

 

NI PXIe-8108 RT Real-Time Controller

 

 

 NI FPGA
Hardware
Medium 2 to 3 µs NI PXIe-7965R FPGA Module for NI FlexRIO NI PXI-7854R R Series Multifunction RIO
JMAG Spatial Harmonic Model

Windows

 

LabVIEW Real-Time

Medium 20 to 30 µs

NI PXIe-8133 RT

 

NI PXIe-8108 RT Real-Time Controller

 

 NI FPGA
Hardware
High 1 µs NI PXIe-7965R FPGA Module for NI FlexRIO NI PXIe-7965R FPGA Module for NI FlexRIO

 

             

Summary

With real-time high-fidelity electric motor simulation, you can test many types of transient and fault conditions that would be difficult or impractical to perform with real systems. Many of these conditions, such as faults on motor terminals or faults between DC and AC buses, have historically been impossible to implement during HIL testing with the standard D-Q models of electric motors.

The National Instruments HIL platform provides the highest fidelity real-time simulations available, so you can find problems and optimize performance earlier in the development process. This extensive HIL test reduces the amount of field testing required to validate embedded software, which ultimately reduces time to market and improves development efficiency. 

Additional Resources

Learn More About NI VeriStand

To inquire About an NI Electric Motor HIL System, email electricmotorsim@ni.com

 

3 Ratings | 4.67 out of 5
Read in  |  Print |  PDF

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).