Real-Time Simulation Breakthroughs Help Engineers Overcome the Challenge of Developing High-Precision, High Performance Motors and Electric Drives
| Originally published | ![]() |
| in the December 2009 | |
| issue of Planet-RT |
Motors have played central role in daily life for over a century,
From common household appliances to large scale industrial applications, motors are everywhere. Electric cars and trains, renewable energy sources, industrial manufacturing, and even high-speed hard disks and digital cameras have benefitted from constant advancement in motor technology.
But, even as motor technology has advanced in recent years, particularly in response to consumer demand and government regulations calling for greater energy efficiency, it is the rapid evolution of motor drives, which control the motion of a motor, that has enabled the development of high-precision devices like wind turbines, hybrid-electric & all-electric vehicles and electric train networks.
Electric drives enable electrical energy to be converted to the mechanical energy that drives a motor. They also control the rate at which energy is applied; starting and stopping the motor as required, varying current that is applied to the motor, thereby varying the speed and torque of the motor.
The complexity of an electric drive will vary depending on the precision needs of the application. For a simple pump, fan or conveyor, for example, the requirements will be far less than for a high-precision application like an electric vehicle, advanced robotic device or wind turbine.
This increased complexity, coupled with the pressure to develop new products in a shorter timeframe and at a lower cost, has created challenges for engineers responsible for the creation of new motor and electric drive technologies and products.
Historically, an important aspect of electric drive design has been testing the drive controller under development very early in the design process by attaching it to a physical motor.
However, today it is becoming increasingly common to test controllers by interfacing them with mathematical models of motors, simulated using a PC-based real-time engineering simulator.
This approach offers some distinct advantages. For example, the simulated motor can be tested with borderline conditions that would damage a real motor, often a costly prototype. Or, the motor itself may be under development in parallel to the electric drive and therefore not available for testing.
While testing, a drive controller is interfaced with the real-time simulated motor through a set of inputs and outputs (I/Os) that are incorporated into the real-time simulator. This is called hardware-in-the-loop (HIL) simulation. Such motor drive simulation is required by hybrid vehicle OEMs and other manufacturers to accelerate development and testing time by using real-time simulation before conducting tests on physical prototypes.
But even the use of HIL simulation presents challenges. A digital motor drive controller can have a very small sampling time, in a range below 50 microseconds. This requires the real-time simulated motor to have a much lower computational time, since the motor model’s computation time, including the time required to access the I/O, adds a delay in the closed-loop response of the controlled motor that would not be present in a real motor. Consequently, if the added delay is too large than the HIL simulation may not be representative of how the drive controller will respond to a real motor. This can lead to unexpected and perhaps dangerous results when the physical motor and drive are built and in use in a real world application.
Another point of concern is the precision of the model used. For example, most Permanent Magnet Synchronous Motor (PMSM) drive simulators in use today are based on Park two-axis (d-q) mathematical models. These simulators are typically capable of achieving fast calculation times resulting in fast simulations. However, Park two-axis models are built using assumptions regarding flux distribution and electric torque production that can significantly limit the precision achieved through simulation, thereby limiting what kinds of applications they can be used for.
One of the leading Finite Element Analysis software tools for electromechanical design available today is JMAG, developed by JSOL Corporation of Japan. First developed in the early 1980s, JMAG has become standard software, particularly within the Japanese automotive engineering community, where it has been used in a wide variety of electro-mechanical design projects.
Finite Element Analysis (FEA) is a computer-based numerical technique for calculating the strength and behavior of mechanical structures and magnetic fluxes, and is perfectly suited to the design and simulation of motors and electric drives. FEA can handle complex boundaries better than finite difference equations, and can provide answers to "real world" engineering problems.
By using the FEA technique supported by JMAG, a structure is broken down into many small simple blocks or elements. The behavior of an individual element can be described with a relatively simple set of equations. Just as a set of elements would be joined together to build a whole structure, the equations describing the behavior of the individual elements are joined into an extremely large set of equations that describe the behavior of the whole structure. This large set of simultaneous equations is then solved by computing magnetic fluxes based on motor geometry and material characteristics. From the solution, the simulator can extract the behavior of each individual element.
A traditional drawback of the FEA Method, however, has been that simulations of phenomena lasting only several seconds could take several hours to simulate. Therefore, such a simulation approach cannot be used to optimize controls for hundreds of operating conditions.
In addition, performance limitations of early model single CPU simulators limited the precision of the simulations being conducted; further restricting what applications the FEA method could be used for.
To address these issues, JSOL teamed with Opal-RT Technologies, the leading developer of PC-based Real-Time Simulators, to develop JMAG-RT, which offers a number of enhancements, including very powerful code optimization and use of lookup tables, which enable JMAG-RT models to be run using a modeling software environment like MATLAB/Simulink from The MathWorks.
Using the RTLAB.JMAG simulation software module from Opal-RT, JMAG-RT models can then be executed on Opal-RT’s RT-LAB PC-based Real-Time Simulator.
RTLAB.JMAG, which integrates JMAG-RT into the RT-LAB real-time simulation environment addresses issues of both accuracy and simulation speed. Because of JMAG-RT’s powerful code optimization and usage of lookup tables, real-time simulation of FEA-based PMSM drives can be conducted at time steps close to 20 microseconds on an RT-LAB Simulator’s multi-core INTEL CPU. The concept behind this is to use classical and simple phase-domain motor models, but to update the inductance and back EMF at each time step from values pre-computed by the FEA model.
As illustrated below, using Finite-Element Analysis-based methods of simulation can solve this accuracy problem.
The top figure illustrates the inductor variation of a typical PMSM motor as a function of rotor position, caused by the asymmetrical construction of the motor. This figure also illustrates that the inductor varies with the magnitude of the current. This is due to core saturation. These two non-linear phenomena are neglected by traditional d-q models, as illustrated by the lower figure. It can be observed that the distortion, called cogging torque, can be executed in real-time on an Opal-RT simulator using a FEA-detailed model and RT-LAB.JMAG (JMAG-RT). However, such accuracy cannot be reproduced by simplified dq models. It is obvious that controller algorithms intend to decrease or eliminate cogging torque effects. But, this cannot be tested using simple dq models.
In addition, motors and associated drive controllers may require a sub-10-microsecond time step for applications involving high-speed motors connected to high-frequency PWM converters. Models with special solvers using real-time interpolation techniques are now available to power electronic manufacturers needing to simulate the effect of a firing delay of less than one microsecond.
This is where real-time simulation using Field Programmable Gate Array (FPGA) processors comes in.
FPGA processors are being increasingly used in conventional high performance computing applications where computations are performed on the FPGA instead of a PC CPU.
For simulation applications, FPGAs can provide radically improved sampling time performance and accuracy compared to conventional CPUs.
RT-LAB provides full support for FPGA-based real-time simulation, enabling FEA-based JMAG motor models to be executed on FPGA processors with a time step of less than 300 nanoseconds. Such precision could otherwise only be achieved by using a physical motor and power converters to emulate the mechanical torque provided by the dynamic loads. Using a real motor is available can be very expensive. Such an approach cannot be used to analyze extreme fault conditions without risking damage to the test bench. This is the reason why several leading power electronic manufacturers have either replaced or are considering replacing existing analog test benches with virtual plants capable of testing actual controllers in real-time.
Indeed, Opal-RT has further enhanced the use of FPGA technology for real-time simulation with the recent launch of RT-XSG, a blockset for use in the development of models in the MATLAB/Simulink environment.
RT-XSG enables engineers to generate custom, application specific models, like electric drives and motors, for implementation on an FPGA processor. Signal conditioning and conversion modules enable the custom model to be used for Real-Time Simulation and Hardware-in-the-Loop (HIL) data processing. RT-XSG can also be used when modeling within the RT-LAB environment, providing the engineer with a state-of-the-art solution for advanced FPGA-accelerated Real-Time and HIL system simulation.
In addition, RT-XSG provides a convenient, Simulink-based way to build models. Using the RT-XSG toolbox saves time when conducting FPGA-based co-simulation, since it automatically manages configuration file generation on each supported platform. It also manages the configuration of the platform, along with the transfer of high-bandwidth data between RT-LAB simulation models and the user-defined custom model, built using RT-XSG, and executed on an FPGA device.
With the help of Xilinx’s System Generator, only minimal technical knowledge of programmable logic is needed to use RT-XSG. This blockset is used to translate a Simulink design built using particular library blocks into HDL. This translated design is used by additional Opal-RT tools to provide access to fast I/O interfaces and debugging facilities.
The end result is that engineers now have access to a complete real-time simulation platform for motors and drives that incorporates the extreme accuracy of industry standard FEA tools with the high-performance of commercially available PC and FPGA technology. Many leading power electronic manufacturers are now using virtual plants to design and test advanced controls and drives that would be too difficult or too expensive to test with conventional analog benches. An important reason for this is that analog test benches are typically used at the end of the design process or only at the system integration testing phase. Virtual testing and design test platform will soon become standard tools for engineers in any industry involved with motor and motor drive development.



