Real-Time Control of a Switched Reluctance Motor Using NI LabVIEW FPGA and CompactRIO
To demonstrate real-time speed control of the SRM, we connected our N+1 converter and two-phase SRM to the NI CompactRIO industrial control and acquisition platform.
"Using LabVIEW, we were able to quickly verify the simulation models using practical, measured data and create a reconfigurable platform to iteratively improve our simulation models, power electronics, and control system designs."
- Keunsoo Ha,
Developing a real-time speed control system for switched reluctance motor (SRM) drives.
Using the National Instruments LabVIEW FPGA Module and CompactRIO embedded system to design, prototype, and deploy an experimental environment for developing new SRM simulation, control system, and drive technology.
Keunsoo Ha - Virginia Tech
Because of its mechanical simplicity and inexpensiveness, the Switched Reluctance Motor (SRM) has become the subject of great interest in the field of electrical motor drives. The Center for Rapid Transit Systems at Virginia Tech is an internationally recognized drive systems and motion control research group with expertise in the design, simulation, and control of SRMs and power converter topologies.
Rapid Design and Simulation in LabVIEW
We used NI LabVIEW to create a design and simulation platform for developing new control algorithms and power electronics. With the LabVIEW Simulation Module, we could simulate the closed-loop system dynamics of the SRM, and we used the LabVIEW Control Design Toolkit to design the motor current and speed control loops. We used lookup table (LUT) functions in LabVIEW to represent nonlinear relationships in the simulation model. SRMs have a nonlinear, three-dimensional relationship that relates inductance and torque to current and position. Then we added a model for the power electronics N+1 converter, which was invented by Virginia Tech professor Krishnan Ramu. After that, we added a LabVIEW block (for the commutation logic used to control the converter) to the model and validated the block using simulation.
We conducted a simulation at 1,000 rpm to prove the validity of the commutation logic and closed-loop speed control system. The simulation included a precise model of the two-phase SRM, N+1 converter, commutation logic, two proportional integral derivative (PID) controllers, and two routines to find the inductance and the torque from the magnetization characteristic LUTs of the motor. For the continuous solver method, we used the Runge-Kutta 4 solver. After tuning, the control system performed well with a speed overshoot of less than 1 percent under no-load conditions and a settling time of about 50 ms.
The control strategy development for SRM drive systems is more complicated than other types of motors because the machine inductance is a function of both the rotor and excitation current, even for small currents. With the LabVIEW environment, we could develop a complex dynamic simulation model in which we could include all of the programming structures of a complete programming language, such as case structures, for loops, and formula nodes. We used a formula node to easily make several control blocks, such as the model of the two-phase SRM, N+1 converter, and the commutation logic. The LabVIEW environment also made it easy to model special phenomena such as the reduction of the negative torque in the running the motor. In the LabVIEW simulation diagram, we could easily mix traditional LabVIEW code with model-based simulation objects such as the transfer function block. By using a true programming language, we were not limited to the single execution model and restricted functions palette of traditional dynamic simulation tools. Also, our LabVIEW code was very portable, and we could easily reuse the control algorithms and logic we developed later in the process for real-time control. With these simulations, we could validate the actual code used in the real-time target and take advantage of the full debugging and user interface visualization capabilities of LabVIEW.
Using CompactRIO for Real-Time Speed Control of the Motor
To demonstrate real-time speed control of the SRM, we connected our N+1 converter and two-phase SRM to the NI CompactRIO industrial control and acquisition platform. The CompactRIO I/O modules and user-programmable FPGA made it easy to connect our control algorithms to the actual motor hardware. The FPGA offered the ability to provide high-speed control of the power converter circuitry and motor current. The real-time control system software comprised five key modules – pulse-width modulation (PWM), commutation logic with programmable advance and commutation angles, high-speed inner current control loop, slower outer speed control loop, and self-starting logic. With the hierarchical nature of LabVIEW, we could capture the multirate cascaded control system logic in an intuitive graphical embedded software application. Because we could reuse the LabVIEW control algorithm code developed during the design and simulation phase, we were able to fine-tune the current control loops based on PI gains calculated during simulations. Consequently, we were able to quickly verify the simulation models using practical, measured data and create a reconfigurable platform to iteratively improve our simulation models, power electronics, and control system designs.
Explore the NI Developer Community
Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.
Who is National Instruments?
National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.