Naval Postgraduate School Speeds Development and Testing of Spacecraft Guidance Algorithms with a Rapid Control Prototyping Test Bed

“Simulink makes it possible to transition seamlessly from desktop simulation to testing on hardware, giving students invaluable hands-on experience with real hardware. Simulation, code generation, and data analysis with MATLAB and Simulink enable us to greatly accelerate our research.”

Challenge

Develop and test GNC algorithms for spacecraft rendezvous and proximity operations

Solution

Use Model-Based Design with MATLAB and Simulink to model and simulate algorithms, and generate code for testing and verification on floating spacecraft simulator

Results

  • Research productivity increased
  • Students freed to complete assignments outside the lab
  • Weeks-long research effort reduced to hours
Prof. Marcello Romano and the NPS Spacecraft Robotics Lab research team with the POSEIDYN test bed and floating spacecraft simulators.

Prof. Marcello Romano and the NPS Spacecraft Robotics Lab research team with the POSEIDYN test bed and floating spacecraft simulators. Left to right: Prof. Marcello Romano (lab director/PI), Dr. Josep Virgili-Llop (NRC postdoctoral researcher), Maj. Costantinos Zagaris (Ph.D. candidate), Richard Zappulla II (Ph.D. candidate), Dr. Hyeongjun Park (NRC postdoctoral researcher). Photo by Javier Chagoya.

As spacecraft rendezvous and proximity operations become more complex, there is a growing demand for more capable and increasingly autonomous on-board guidance, navigation, and control (GNC) algorithms. Debugging and testing these algorithms in space is cost-prohibitive, but the alternative—debugging and testing via desktop simulation—may not account for all the factors that affect real-world performance.

To address this challenge, researchers at the Spacecraft Robotics Laboratory (SRL) within the Department of Mechanical and Aerospace Engineering of the Naval Postgraduate School (NPS) have developed a test bed for verifying dynamic models and GNC algorithms with real-time, rapid control prototyping tests. The test bed is called POSEIDYN—Proximity Operation of Spacecraft: Experimental hardware-In-the-loop DYNamic Simulator—and it has been developed and refined by Dr. Romano and his research team members since 2004. The test bed consists of multiple floating spacecraft simulators (FSS), robotic vehicles that float on a cushion of air over a 4×4 meter granite slab. Each FSS is equipped with an onboard processor, sensors, and actuators that enable it to move with three degrees of freedom across the almost frictionless test bed surface.

Researchers and students at SRL use Model-Based Design with MATLAB® and Simulink® to develop and simulate GNC algorithms before verifying them on the test bed. They then use automatic code generation to implement the algorithms.

“The simulation environment we created with MATLAB and Simulink enables our research team and our students to develop and debug algorithms on any desktop PC and then translate the models to C code to run on the vehicles,” says Dr. Marcello Romano, professor of mechanical and aerospace engineering at the NPS and director/PI of the Spacecraft Robotics Lab. “With Simulink Coder we can transition from running simulations of a guidance algorithm to testing it on hardware in minutes.”

Challenge

A primary goal of developing the hardware-in-the-loop (HIL) test bed was to enable researchers to test their GNC algorithms in an environment that captured effects that are difficult to emulate in a software simulator. These include the high-frequency effects of thruster actuation and contact dynamics between vehicles. The embedded control systems on the FSS needed to process data from an onboard fiberoptic gyroscope at one clock rate while executing the guidance algorithm at another. Writing code for real-time, multirate software by hand would have been a significant challenge for researchers.

In addition to providing an experimental platform for researchers, Dr. Romano wanted to give NPS students an opportunity to complete hands-on projects using the FSS hardware. Few students had experience with writing real-time code, making it all but impossible to complete meaningful projects via hand-coding in a single 12-week quarter. Dr. Romano wanted the students to model control algorithms and debug them via simulation on their own computers and then test the verified algorithms on the FSS hardware in the lab.

Solution

NPS used Model-Based Design to establish a development and testing workflow for GNC algorithms used in spacecraft rendezvous and proximity operations.

Working in Simulink, the SRL researchers developed a plant model of the FSS, including its sensors, thrusters, and reaction wheel.

The SRL team created a Simulink library that contained blocks for individual FSS components and blocks for controlling those components, including a sigma-delta modulator block for the thrusters.

Next, they created a template model in Simulink that included the plant, basic navigation and control elements, and the guidance subsystem.

The researchers use this template to model and simulate guidance algorithms, replacing the guidance subsystem block with their own Simulink models. The Simulation Pace block in Aerospace Blockset™ enables them to slow the simulation rate so that the simulated FSS moves at roughly the same speed as its real-world counterpart.

After verifying their algorithms through simulation, the researchers generate C code from the Simulink models using Simulink Coder™, targeting the FSS onboard Intel® Atom™ processor, which runs a version of real-time Linux®.

During simulation tests, the researchers collect data on vehicle position, speed, and propellant consumed. They analyze this data in MATLAB to evaluate and refine their algorithms and to produce data visualizations for use in published papers.

NPS professors use MATLAB, Simulink, and the POSEIDYN test bed to teach two graduate-level courses. In Spacecraft Attitude, Determination, and Control, students use Simulink to model and simulate two attitude control systems, one using thrusters and the other using a reaction wheel.

In Robotic Multibody Systems, students complete final projects that combine the FSS with a four-link robotic arm. Students in both courses develop and debug their designs in Simulink before generating code for hardware tests.

Because NPS has a Campus-Wide License, students can work on assignments wherever they choose: in the lab, in the classroom, or on their own laptops at home.

SRL researchers are currently exploring improvements to the test bed, including adding tilt and pitch to the granite surface to simulate the dynamics experienced by spacecraft in orbit, implementing GPU-based parallel guidance and navigation algorithms, and creating an open-hardware version of the FSS to help other universities develop similar platforms.

Results

  • Research productivity increased. “Our group published more than five journal papers and six conference papers just last year,” says Dr. Romano. “MATLAB and Simulink have been critical factors in our higher productivity because they have shortened the time between starting a project and getting results.”
  • Students freed to complete assignments outside the lab. “With our Campus-Wide License, students have Campus-Wide License access to the tools from the day they arrive, so they can start being productive right away,” Dr. Romano says. “Students can use MATLAB and Simulink on their personal computers, which means they can work outside the ‘normal business hours’ of computer labs, and even without network connectivity.”
  • Weeks-long research effort reduced to hours. “Working in Simulink, we were able to implement a new algorithm, debug it, fine-tune it in simulation, run it on the test bed, and get results that we used for one of our journal papers—all in about six hours,” says Richard Zappulla II, a Ph.D. candidate at the NPS-SRL. “Hand-coding the algorithm in C would have been a formidable task requiring weeks of effort.”

Acknowledgements