User Stories

Embry-Riddle Students and Gulfstream Engineers Design and Implement Embedded Flight Control Systems on the Arduino Platform


Enable aerospace engineering students to put guidance, navigation, and control theory into practice


Develop a Simulink blockset for ArduPilot Mega hardware that students can use to design, simulate, implement, and test a UAV flight control system in one semester


  • Focus on core concepts restored
  • Control laws verified before flight testing
  • Real-world experience acquired

“Developed by current Embry-Riddle students—who are also Gulfstream engineers—to improve the educational experience of future students, the new Simulink blockset adds support for ArduPilot hardware and underscores the value of the relationship between Embry-Riddle and Gulfstream.”

Dr. Hever Moncayo, Embry-Riddle Aeronautical University
The Skywalker UAV used by Embry-Riddle students to test embedded control systems.

Embry-Riddle Aeronautical University and Gulfstream Aerospace Corporation engineers have developed a Simulink® blockset that enables Embry-Riddle students to develop autonomous flight control systems in Simulink, implement them on a fully programmable Arduino Mega 2560 compatible board, and test them on small unmanned aerial vehicles (UAVs). The engineers, who are pursuing a master’s degree in aerospace engineering at Embry-Riddle while working full-time at Gulfstream, created the Simulink blocks to enable fellow students to apply guidance, navigation, and control (GNC) theory without getting bogged down in low-level programming and hardware interface details.

Flight control system design, simulation, and implementation are key elements of an aerospace curriculum that integrates MATLAB® and Simulink into undergraduate- and graduate-level courses. “In the Aerospace Engineering Department at Embry-Riddle, many courses are based on MATLAB and Simulink, from undergraduate classes through the master’s degree program,” says Dr. Hever Moncayo, assistant professor at Embry-Riddle. “One advantage of our approach is that students can use experience acquired in previous classes—on flight dynamics and controls, among other topics—to design and implement real systems.”


When Gulfstream engineers François Hugon and Robert Hartley took the graduate-level GNC course at Embry Riddle, they worked on a semester-long project to design and implement a flight control system for a Skywalker UAV. The students faced the challenge of integrating and calibrating many board-level sensors and devices. They also had to develop sensor interface firmware and a rudimentary operating system in C, leaving almost no time to design and test the flight control software.

“We spent so much time writing and debugging hundreds of lines of C code to access and process sensor output data to use for controlling the aircraft that the overall goals of the course were all but impossible to meet in a single semester,” recalls Hartley. “We wanted to eliminate the low-level computer and software engineering aspects so that the next students who took the course could focus on GNC design and test their flight control systems in real flight tests.”


The two engineers were part of a team that developed the ArduPilot Mega Simulink blockset, refining and verifying it via flight tests on a Skywalker UAV.

The blockset contains components used to access the GPS, accelerometer, magnetometer, and other ArduPilot sensors. Hugon and Hartley developed the sensor interface code for each block in C, using open-source versions of the code as a starting point. They then refined the code based on test data, and wrapped it in an S-function so that it could be used in a Simulink model.

The engineers proved that the blockset functioned by using it to implement a control system that they developed as part of their Embry-Riddle GNC course. This system also included navigation algorithms, Kalman filter estimation algorithms, and control laws modeled in Simulink.

To prepare for closed-loop simulations, they created a plant model of the UAV in Simulink. In the course Flight Dynamics and Control, Embry-Riddle students use Simulink to create similar flight dynamics models for other aircraft.

The engineers conducted simulations in Simulink with the ArduPilot Mega blockset in the loop to design and tune their flight control model. Simulink built-in support for target hardware enabled them to load their flight control model directly onto the ArduPilot Mega hardware for use in flight tests. Starting with simple functionality, they collected data during flight, analyzed that data in MATLAB, and refined the simulation and control solution based on the results. After only six test flights, the students were able to finalize the simulation and control solution.

On the final test flight, the aircraft autonomously navigated a course with 12 waypoints.

Professor Moncayo is using the ArduPilot Mega blockset in his own research to build low-cost UAVs for initial testing of fault-tolerant flight control systems. It is expected that Embry-Riddle students will also use it in upcoming GNC courses.


  • Focus on core concepts restored. “Formerly, students in the GNC course spent too much time programming in C and working on low-level hardware issues,” says Moncayo. “Now, C programming is not required; students use Simulink to apply the concepts they learn in class to develop a real flight control system and watch it perform in flight.”

  • Control laws verified before flight testing. “Simulations in Simulink were critical because they enabled us to test our control laws in an instrumented risk-free environment,” says Hartley. “In industry we perform extensive simulations; they are faster and less costly than test flights, and they make it easier to understand the control system performance without exposing crews to unnecessary risk.”

  • Real-world experience acquired. “Simulation is vital, but no simulation can capture all real-world effects, including weather, sensor drop-outs, and unforeseen hardware limitations,” says Moncayo. “With the new blockset and Simulink support for target hardware, students go beyond simulation and put theory into practice on a real system.”