The PXI system fully controlled the physical model, simulating the discrete state-space controller.

"LabVIEW and the PXI system gave us an advantage and the opportunity to complete the project step by step. We learned the inner states of the complex system and observed changes in behavior when we changed the control values."

The Challenge: Simulating a nonlinear, hard-coupled dynamic sixth-order system for control design, and controlling the process using a digital observer.

The Solution: Using a real-time loop in the NI LabVIEW graphical programming environment to simulate a deployed model, controlling it through another loop where the controller is deployed, and subsequently controlling a deployed model by the controller loop using LabVIEW with two NI data acquisition (DAQ) extension cards to connect the model to the NI PXI-1002 chassis.

In four months, we created an application that simulates and controls a laboratory twin-rotor multiple input, multiple output (MIMO) system (TRMS 33-220) helicopter model, manufactured by Feedback Instruments Ltd, using NI LabVIEW software and NI DAQ and PXI hardware.

TRMS Model

Two DC motors coupled to a propeller drive the TRMS physical model. Like a real helicopter, the two propellers are perpendicular to each other. The two motors are connected by a beam pivoted on its base that can move freely in both horizontal and vertical planes, and a counterweight mounted to another beam fixed perpendicular to the main one. The beam moves by changing the input voltages of the motors to affect the rotational speed or the rotor.

Even though the helicopter laboratory model is different from the real application, it adequately resembles behavior when we design a control such as the strong cross-coupling between the main and the tail rotor. We tried to precisely describe the physical model using the implemented mathematical model with Newtonian equations.

Model Control and Simulation

Our control objectives were to keep the helicopter at a certain point and follow a given trajectory. Because the system consists of two inputs (the voltages of the rotor systems) and two outputs (the vertical and horizontal angle of the helicopter) that we hard-coupled to each other, we had to control it using state-space control.

The electromechanical coupling of the main rotor movement made it difficult to independently control the two axes. According to Newton’s third law, moments that are built up by the DC motors have a counter force and, in this case, a torque that respectively affects the other axis.

Therefore, our first effort was to measure the particular parameters of the system and conduct several experiments to build the nonlinear model and describe the system by physical equations.

Finally, we obtained a nonlinear system of the eighth order, which we simplified to a system of the sixth order because the DC motor time constants were small compared to the physical time constants that appeared in the system. We defined the states as vertical angle, vertical angular velocity, angular speed of the main rotor, horizontal angle, horizontal angular velocity, and angular speed of the tail rotor.

We implemented the system in a LabVIEW real-time loop to check the consistency of the model as it performed several step responses, and we conducted experiments on the physical and simulated models. Using LabVIEW, we could easily adjust parameters because we could directly connect critical values to buttons or turn knobs on the front end. As a result, we observed system behavior changes in real time. Furthermore, while setting up the model, we connected scopes to the inner states of the system, which was beneficial for debugging the model.

After reaching satisfactory results, we completed the control design in the continuous time domain using the linear-quadratic regulator (LQR) method based on the linear model. We transformed the controller to the discrete domain after designing it in the continuous domain. We used a Luenberger observer to control this complex system by pole placing in the continuous domain and transforming it afterward to the discrete domain to make it suitable for simulation in LabVIEW.

Then we added a second real-time loop where we implemented the controller. Global variables connected the model and controller systems so that we could test the controlling behavior. Because the design of the state-space control is based on a linear model, we had to adjust the controller in this environment and outside the proximity of the working points to obtain the expected behavior.

To check the disturbance influence, we connected the two loops with a cable using the DAQ extension cards for analog-to-digital and digital-to-analog conversions. We had to adjust the model output scaling to be similar to the physical model outputs because placement of the observer eigenvalues is heavily dependent on the measurement noise of the feedback input. If the poles are placed near the system’s poles, the estimation error decays very slowly; however, placing them too far on the left creates a gain in the measurement noise beyond an acceptable level.

After adjusting the observer, our final objective was to connect the physical model to the PXI system, delete the model loop, and connect the controller’s inputs and outputs directly to the physical model. The PXI system fully controlled the physical model, simulating the discrete state-space controller.

Results

LabVIEW and the PXI system gave us an advantage and the opportunity to complete the project step by step. We learned the inner states of the complex system and observed changes in behavior when we changed the control values.

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.