Using LabVIEW Real-Time to Implement Complex Control Systems
Author(s):
Martin Baird - TRW Aeronautical Systems Group
Industry:
Aerospace/Avionics
Products:
LabVIEW
The Challenge:
Precisely implementing complex control algorithms specified in Matrix format.
The Solution:
Converting the control algorithms to LabVIEW and running them using LabVIEW Real-Time.
"LabVIEW Real-Time has provided us with a valuable tool to accurately implement control systems in a short time."
Introduction
TRW Aeronautical Systems (formally Lucas Aerospace) is a leading international organization providing advanced technological systems, products, and services to the world’s aerospace markets. In Birmingham, we are involved in the design and manufacture of engine control systems, in particular fuel systems, pumps, and linear actuators.
We have an ongoing program of research and development work involving the design and testing of new and innovative hydromechanical systems, some of which we are eventually including on engines. Many of the hydromechanical devices include transducers and actuators, controlled by closed-loop systems. In the aircraft, we control our hydromechanical systems by the engine full authority digital electronic controller (FADEC), but during the development and testing, a FADEC is often not available. Thus control systems are specially designed and built for each system.
Until recently, because of short time constraints and the frequent need to alter control laws, we have based our in-house control systems on analogue circuitry. With a simple PID controller configuration, a test system is tested and provides performances approaching that expected when included in the final production digital system.
However, hydromechanical systems are becoming more complicated; performance levels are increasing; and the designers now require us to provide control systems that precisely mimic the aircraft system so we can confirm system performance long before a FADEC is available. An analogue solution is no longer feasible.
We are building new test rigs using National Instruments data acquisition (DAQ) and control equipment running under LabVIEW. Specifically, we designed our new test units to use an RT Series (smart) DAQ board running LabVIEW Real-Time for real-time performance.
Although we initially considered a LabVIEW for Windows as a solution to our control problem, we rejected it because deterministic performance at very short cycle periods was not possible. LabVIEW Real-Time was announced right about the time that we were getting into some difficulty with a complex control system for the control for multistage spool valve system. The idea of a dedicated processor to run our control system - programmed in LabVIEW - was precisely what we wanted, and just in time.
Control Algorithm
For many users, one of the LabVIEW add-on packs such as the PID Control Toolkit or Control and Simulation Toolkit would provide an easy way to develop a control system, but this was not an option for us.
We were very familiar with LabVIEW, having used it successfully for a number of projects, but our control systems are designed using NI MATRIXx. Control algorithms are described in a graphical manner rather similar to LabVIEW with functional blocks joined by data paths (wires). Each block is a function or a subroutine similar to a LabVIEW (VI) program.
To succeed, we had to exactly duplicate every MATRIXx function and subroutine in LabVIEW. Most of the Matrixx functions have direct equivalents in LabVIEW. However, less obvious solutions involved blocks described by Laplace transforms or worse still (for the writer) z transforms. We could manage a Laplace transform of 1/s (an integrator), but implementing anything more complex was definitely going to be a struggle. We could easily implement z-transforms in LabVIEW (and most Laplace transforms convert to z-transforms). For example, we can implement the z-transform shown in the figure above. An initialization function is included.
Overcoming that hurdle meant that we could now implement the complete MATRIXx control algorithm in LabVIEW with direct correspondence between MATRIXx diagrams and LabVIEW VIs. It was a simple matter to test our new VI by closing the loop using a representative ‘load’ and exercising the system using step functions, all in software. A comparison with a similar exercise on the Matrixx system confirmed that the methods we were using in LabVIEW gave the correct results.
System Implementation
The RT Series board we used was a PCI-7030/6040E containing an AMD486DX5 processor. The complete control algorithm ran on the RT Series board in 330 us per cycle. However, adding I/O increased cycle time over our 2 ms target. By setting priority levels for all VIs to the subroutine level and running the RT system top-level VI at time-critical priority, we brought cycle time back under 2 ms. We could then set the scan rate accurately to 500 Hz using hardware timing.
Next came the design for the host LabVIEW program to provide the interface to the RT system. Although it is possible to design the RT system with a front panel so the host system is not required, the RT system can perform more work. With the RT system, we achieved maximum performance. Communication between the RT system and host system is via 1 KB of shared memory.
By using part of the shared memory as a circular buffer, the RT Series board could read and write data on everyone one of its cycles (once every 2 ms) while the host system could read and write variable size batches of data whenever it was ready. Writing the batches of data to a chart provided an excellent real-time display that the user could stop and expand at any time to give detailed information on test performance.
Results
LabVIEW Real-Time has provided us with a valuable tool to accurately implement control systems in a short time. Users particularly appreciate the flexibility of LabVIEW. We can set up new tests in minutes and can make changes to control parameters with just a few key strokes. We have further high-performance control systems to complete in the near future. Rather than spending hundreds of hours in designing and building special discrete control systems that would give only approximately correct control algorithms, we will spend a day or two writing a new LabVIEW Real-Time program in the certain knowledge that it will provide correct results.
For more information, contact:
Martin Baird
TRW Aeronautical Systems Group
Shaftmoore Lane, Hall Green Birmingham
B28 8SW, England
Tel: 0121-707-7111
Fax: 0121-706-9622
E-mail: martin.baird@lucasvarity.com
Related Case Studies
Using NI FieldPoint and LabVIEW Real-Time to Perform Closed-System Experiments at the Prototype Laboratory BiosphereUsing LabVIEW Real-Time and PXI to Enhance a Volvo Car Corporation Student Project
Monitoring the Structural Health of the Rion-Antirion Bridge Using LabVIEW Real-Time
Performing Nonlinear Feedback Control of a Single-Link Flexible Manipulator with LabVIEW Real-Time and PXI
LabVIEW Real-Time Provides Quality Compliance for Steel Mills
|
|
