Electronic Design
NASA Interns Develop Model-Based-Design GNC Software for Quadcopter

NASA Interns Develop Model-Based-Design GNC Software for Quadcopter

Internship programs at NASA provide engineering students with opportunities to work on aerospace projects and introduce them to the tools and processes used by practicing engineers.

Download this article in .PDF format
This file type includes high resolution graphics and schematics when applicable.

A program at NASA’s Marshall Space Flight Center (MSFC) lets interns and junior engineers use model-based design with MATLAB and Simulink to develop guidance, navigation, and control (GNC) software for small multirotor aircraft. With model-based design, young engineers can build hardware, write flight software, and conduct flight tests to validate their models and control design in a 10-week program. They work with the same tools the NASA MSFC team used to develop the GNC algorithms for the Mighty Eagle robotic lander and other systems.

The Challenge

The NASA MSFC team sought a realistic yet economical way to give their interns opportunities to work directly with flight software and hardware. They selected a quadcopter vehicle and ArduPilot Mega 2.5 hardware for the program, but this approach presented several challenges.

Here, a NASA intern works with the quadcopter vehicle and ArduPilot Mega 2.5 hardware.

First, they needed to provide undergraduate engineers, many of whom had little control design or programming experience, with easy-to-learn tools to rapidly develop GNC algorithms. Second, to avoid damaging the aircraft, they required a simulation environment that would enable the interns to verify their algorithms before flight testing. Lastly, they needed an easy way for the interns to deploy algorithms to the ArduPilot hardware and interact with the accelerometers, gyroscopes, and other sensors on the ArduPilot board.

The Solution

The NASA MSFC team selected model-based design with MATLAB and Simulink for their engineering internship program. Interns learn modeling, simulation, and control design in Simulink by viewing the Simulink tutorials on mathworks.com and attending training sessions conducted by NASA engineers.

After assembling the quadcopter from a kit, they build a six-degree-of-freedom model of the quadcopter in Simulink, using Aerospace Blockset to model the equations of motion. Working in Simulink, they then create a controller model to provide stability augmentation for the quadcopter. To access input from ArduPilot sensors, including accelerometers, gyros, and the magnetometer, they add blocks from the APM2 Simulink Blockset to their controller model.

They acquire a linear model from Simulink, analyze the gain and phase margin with the SISO Design Tool from the Control System Toolbox, and then run simulations to verify the control system’s performance. Using a block from Aerospace Blockset, the interns connect the model to FlightGear flight simulation software to visualize simulation results, and then refine their design based on those results.

Using the Run on Target Hardware feature of Simulink, the interns load their controller model directly onto the ArduPilot Mega hardware for flight testing. Afterward, they post-process recorded flight data in MATLAB and use the results to fine-tune their control algorithms and plant model.

NASA MSFC engineers are currently revising their internship program. The new version will use a hexacopter. The ArduPilot Mega hardware will be replaced with the more powerful Pixhawk processor, which will enable interns to incorporate Kalman filtering, implement sliding mode controls, and handle engine out conditions. C code for the Pixhawk target will be generated from Simulink models using Embedded Coder.

The Results

GNC algorithms developed and implemented in 10 weeks: For working aerospace engineers, it can be a daunting task to develop a high-level control algorithm, write it in C, and integrate it with other code needed to fly the aircraft. With model-based design, NASA interns develop their control algorithms and have them flying in 10 weeks.

Streamlined hardware integration: With a single click, the interns deployed their Simulink model to the Arduino and were ready to test their algorithms in flight. The APM2 Simulink Blockset helped simplify communication with ArduPilot hardware.

Download this article in .PDF format
This file type includes high resolution graphics and schematics when applicable.

Acquisition of practical engineering experience: One of the interns used the knowledge he gained at NASA to design an advanced Kalman filter for flight control on his fourth-year engineering design project. Another was offered a job simulating quadcopters, in part because of his model-based design experience.

TAGS: Robotics EDA
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish