MIT Students Use LabVIEW and CompactRIO to Design and Implement a Dynamic Output Feedback Controller

  Read in   |   Print Print

"Overall, the LabVIEW framework gave students the freedom to take greater control of the hardware controller design process."

- Professor Jonathan How, Massachusetts Institute of Technology

The Challenge:
Giving students the tools to implement control designs on real-world hardware, including a simulation environment for prototyping and validating their controllers to help overcome the challenges of moving from theory to practice.

The Solution:
Using NI LabVIEW software and CompactRIO hardware as a control platform to design and prototype controllers in simulation and implement them in real-world systems using a unified software architecture that easily takes students from the simulation environment and with a toggle switch on the LabVIEW front panel to deploy their controller to the physical hardware.

Professor Jonathan How - Massachusetts Institute of Technology
Professor Emilio Frazzoli - Massachusetts Institute of Technology
Brandon Luders - Massachusetts Institute of Technology

The Feedback Control Systems course at the Massachusetts Institute of Technology (MIT) focuses on designing and analyzing control systems with classical control and state-space techniques. This course is available to undergraduate and graduate students, with about 20 of each enrolling each fall. As part of the course, students are asked to design and implement roll, pitch, and yaw controllers for physical systems in a series of laboratory modules. Students design their classical controllers using root loci, Bode plots, and other techniques. They develop state-space controllers using linear-quadratic regulator (LQR), linear-quadratic Gaussian (LQG), and dynamic output feedback (DOFB) designs. Students perform state feedback, state estimation, and dynamic control law design using the LabVIEW Control Design and Simulation Module and LabVIEW MathScript RT Module. After validating their controllers in simulation, students deploy their designs to control a highly nonlinear Quanser 3 DOF helicopter plant using CompactRIO with the LabVIEW FPGA and LabVIEW Real-Time modules.

In the fall 2010 semester, 42 students (divided into groups of 3 or 4) completed the lab at one of six hardware stations. One of the biggest hurdles we have experienced in past semesters is getting all stations set up properly. With our old solution, we required an extensive amount of time at the beginning of each semester to troubleshoot connections and test each station. There were multiple cables connecting the PC to an external data acquisition module, which complicated the process; the board connected to an amplifier that amplified the signal to the Quanser plant. With CompactRIO, all sensor and actuator signals are transmitted back to the PC through a single Ethernet cable, simplifying the connections and setup

The course also uses computer-aided control design tools extensively. Students design the controllers based on a hardware model and ensure that the closed-loop system is stable while meeting all of the design requirements. In our previous framework, based on The MathWorks, Inc. Simulink® software, there were no diagnostic tools available in the lab for students to test their controllers before deploying them on the hardware; most testing was done by students with their own copies of The MathWorks, Inc. MATLAB® software. As a result, a significant amount of time in the lab was spent performing functions that did not require the hardware, such as diagnosing controller designs. The LabVIEW Control Design and Simulation and LabVIEW MathScript RT modules are great tools to analyze the linearized models and to assist with the students’ controller designs.

Throughout the semester, we introduced frequency domain techniques (such as Bode and Nyquist plots) and state-space techniques (such as regulators designed via LQR and estimators designed via LQE) to develop inner and outer loop controllers. In contrast to our previous approach, the LabVIEW front panel provides useful visualizations of the system via 3D picture control and displays all signal information needed for students to diagnose controller issues and update the controller design themselves. The 3D picture of the actual plant is extremely helpful, as students can compare the simulation and real-world system side by side to see how the two are related. Because of this, we effectively demonstrated model uncertainty, a concept that's typically challenging to show, and introduced ways to design powerful controllers that compensate for modeling errors.

Other than the flexibility of LabVIEW for tuning controllers within the full simulated system, the best benefit of using LabVIEW and CompactRIO is how intuitive and easy it is to switch between simulation and real-world implementation. Students can validate their controllers in simulation, then immediately deploy them to the CompactRIO to control the helicopter by toggling the front panel control. Because the simulation architecture so closely matches the hardware, the simulation acts as a strong predictor of success on the hardware, decreasing the amount of hardware testing needed. This is extremely useful in administering labs for large classes, where available lab time is at a premium.

The combination of LabVIEW and CompactRIO has proven effective for validating control theory and design methods, as well as engaging students’ interests. The interactive LabVIEW front panel provides an easy way to visualize the system; the ability to probe any signal in the block diagram is especially useful when debugging controllers. As the semester progressed, students became increasingly more comfortable modifying the LabVIEW code to suit their needs. As part of the final class project, several students designed their own VIs to implement multiple input, multiple output (MIMO) controller designs. At the end of the semester, we observed that numerous students spent extra time to participate in our optional competition, in which the helicopter is to autonomously traverse a virtual obstacle course. Since the completion of the term, several students have independently contacted the course staff due to increased interest in applying LabVIEW to other projects at MIT.


                                                    MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.

Author Information:
Professor Jonathan How
Massachusetts Institute of Technology

Bookmark and Share

Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community

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.

‌Learn‌ more‌ about‌ NI