Using myDAQ and myRIO to Implement Rapid Control Prototyping and HIL Simulation in a Laboratory Environment

"Studying this lab, I got a chance to apply my theoretical knowledge into practice on a real application. Working with LabVIEW and myDAQ has allowed me to go through the entire process of modelling, simulation, and prototyping my application within a few lab sessions. Seeing the implementation of my code to control the inherently unstable helicopter rig has improved my understanding and given me confidence in my own skills."

- Bryn Jones, Department of Automatic Control & Systems Engineering, The University of Sheffield

The Challenge:

Creating a ‘take-home’ student lab to teach rapid control prototyping and HIL simulation.

The Solution:

Using myDAQ, myRIO, and LabVIEW as a complete platform to perform data acquisition and control.

The Department of Automatic Control and Systems Engineering at the University of Sheffield recently launched a brand-new course in hardware-in-the-loop (HIL) and rapid control prototyping. In this innovative course, students receive their own portable take-home lab kits. The take-home hardware consists of a miniature three-degree-of-freedom helicopter and myDAQ. The helicopter rig moves in response to PC signals coming from myDAQ.

 

This course aims to create a modular, portable laboratory to assist students in learning. The biggest challenge in creating these laboratories was finding a flexible, low-cost platform on which to develop them. We decided to use LabVIEW and myDAQ because they offer open integration with in-house-built helicopter rigs.

 

Because the entire take-home kit is portable and compact, it removes traditional laboratory-based teaching limitations so that students can learn more intuitively at the time and place of their choice.

 

 

 

Laboratory Objectives

The course challenges students to design an autopilot control system to stabilise the helicopter around a given trajectory, using information from positional sensors. As such, the course provides students with hands-on learning in a range of disciplines, including real-time data acquisition and control, dynamic systems, and advanced multivariable control, and exposes students to industry-standard design software such as LabVIEW.

 

Further Project Extension

To extend the model helicopter system functionality and widen its potential uses, we implemented it in a final-year aerospace engineering project. To address growing interest in low-cost system validation techniques, we used the same helicopter rig as the previous application for implementing the HIL technique. Students can use HIL simulation to perform fault injection and analysis on the helicopter system without risking expensive damage.

 

 

 

According to Shaun Swindell, ”HIL simulation involves replacing a physical plant with a computer simulation that fully exercises the surrounding hardware and software. It is widely used across many industries for a growing range of system development and testing applications because of the time, cost, and safety advantages it offers. It reduces development and testing time by developing and testing different system parts in parallel with those of the physical plant. Testing systems in dangerous scenarios without the risk of damaging expensive equipment or causing harm to people significantly improves safety whilst lowering costs.”

 

The first step of teaching this new HIL simulation with the helicopter was to find a suitable control platform. As in the previous application, we wanted the student to spend more time understanding and developing HIL algorithms instead of integrating different systems.

 

We decided to extend our existing lab using myRIO as the control platform. We simulated helicopter rig motion by implementing motion as a block diagram within a control and simulation loop. We deployed the same simulations on myRIO, which recorded data directly from the helicopter rig. We analyzed this recorded data, along with the simulated data, to validate HIL simulation accuracy. Using the close LabVIEW integration across platforms, we tested simulations on a Windows PC environment before executing it on myRIO.

 

The final outcome was a fully operational HIL simulation running on myRIO with an interactive user interface that displays all of the I/O signals in real time. We also created a 3D animation of the helicopter rig using the 3D Picture Control Toolkit in LabVIEW that replicated helicopter motion using the simulation data.

 

Author Information:

Bryn Jones
Department of Automatic Control & Systems Engineering, The University of Sheffield
ACSE, The University of Sheffield, Portobello Street
Sheffield S1 3JD
United Kingdom
b.l.jones@sheffield.ac.uk

Figure 1. Assembled Take-Home Lab Kit Controlled via LabVIEW
Figure 2. HIL Simulation with myRIO