MATLAB, Simulink, and the New Horizons Mission to Pluto
[This post has been updated on 04-Sep–2015 to describe the use of Simulink in the flight control system design and implementation. I’d like to thank Jon Friedman for providing this information.]
MATLAB and Simulink played an important role in both navigation and the flight control system for the New Horizons mission to Pluto. This post describes both aspects of the mission.
Optical Navigation (Opnav)
Beginning about one year before finally arriving at Pluto, the New Horizons spacecraft and program team used its onboard cameras to refine its trajectory towards Pluto. NASA calls this process Opnav (optical navigation).
Starting on July 20, 2014 and continuing through this month, the spacecraft acquired almost 800 pictures using three different scientific cameras. The pictures were transmitted to Earth for processing by two independent navigation teams. The PNAV (Project Navigation) team at KinetX had primary navigation responsibility. The PNAV team used MATLAB software. The INAV (Independent Navigation) team at the Jet Propulsion Laboratory used software written in Fortran and C. The PNAV and INAV navigation systems were tested and compared with each other during the mission’s Jupiter flyby in 2007 and were found to be in agreement.
Image Analysis and Optimization Applied to Navigation
Image processing and optimization methods were used to determine the location of Pluto and its moons with high precision as soon as possible in the mission. Accurate course corrections early saves much fuel later.
Several factors posed challenges to determining the exact trajectory to Pluto:
- The low resolution of pictures while the spacecraft was still far away limited the precision of the computations.
- The size, shape, and surface brightness variation of Pluto and its moons were not well known. These unknowns had to be estimated and compensated for.
- The effects of spacecraft motion, pointing drift while the camera was collecting light, and the travel time of light all had to be included in the computation.
The SPICE Toolkit
The PNAV team at KinetX used the MATLAB version of NASA’s SPICE Toolkit, which is used in multiple planetary missions to determine:
- Where the spacecraft is located
- How the spacecraft and its instruments are oriented
- The location, size, shape, and orientation of the target being observed
- The events on the spacecraft or ground that might affect scientific observations
Main Navigational Analysis Steps
Determining the best path to Pluto required three steps:
- Find the center of the stars in the field of view and match them to star catalogs.
- Find the spacecraft attitude, or direction that the spacecraft is pointing.
- Find the center of the target bodies (Pluto and its moons).
Like the overall approach of using two independent navigation programs for the program, each of these analysis steps was solved using two different algorithms, and the results were cross-checked.
In each case, one of the algorithms was based on image processing methods, and the other was based on a nonlinear least squares estimator. Ultimately, the image processing methods were used to compute an initial solution that was then refined using nonlinear least squares.
Finding the center of stars was accomplished using matched filtering using previously acquired images of stars in the star catalog.
Spacecraft attitude was determined using an image registration technique that compensated for x- and y-shifts in the image plane as well as rotation.
Target body center-finding used cross-correlation with a model of the target body. As the mission proceeded, the target body models were refined based on new data about the size, shape, and surface brightness variations of Pluto and its moons.
Callirrhoe moon images from Jupiter flyby test
Image credit: Owen, Dumont, and Jackman, “Optical Navigation Preparations for New Horizons Pluto Flyby”
Simulated observations of Pluto system during final approach
Image credit: [APL / New Horizons GeoViz]
Pluto and Charon images, April 12–18, 2015
Image credit: NASA/Johns Hopkins University Applied Physics Laboratory/Southwest Research Institute
Flight Control Design and Implementation
MATLAB and Simulink played an important role in the design and implementation of the New Horizons spacecraft’s flight control system development and implementation. Using a process initially developed for the MESSENGER program, Engineers at John Hopkins University Applied Physics Lab (APL) used MATLAB & Simulink to develop the Guidance and Control (G&C) algorithms. Using Simulink models of both the algorithms and the New Horizons probe they were able to verify that their design would meet the mission requirements well before launching the spacecraft. According to APL engineers, “If there was any one innovation that reduced the development schedule, mission risk, and also cost of the MESSENGER flight software it is that the G&C “truth” dynamic and environmental algorithms, as well as the flight control, estimation, and guidance functions, were all modeled and tested within MathWorks’ Simulink product.”
The G&C algorithms perform a wide range of tasks on New Horizons, including estimation and control of the spacecraft attitude to maintain a 3-axis stabilized Sun-pointing attitude, as well as pointing options for instrument operations. G&C algorithms manage the propulsion system and fuel flow during thruster maneuvers, “which can be commanded from ground control or can take place autonomously in the event of a Sun-pointing violation or a need to reduce momentum to slow down the reaction wheels.” “G&C also controls rotation of the solar panels to optimize power and keep the panels within a designated temperature range,” and is responsible for pointing the communications antennas at Earth and pointing the sensors at their respective targets.
In addition to modeling the algorithms, Simulink allowed the engineers to explore and verify that the multi-rate multi-tasking software configuration on New Horizons was implemented correctly through simulation. Once the algorithms were verified in Simulink, engineers used Simulink Coder to deploy the models to an external simulation environment which allowed them to run many times faster than real-time to put the probe through a variety of mission scenarios. This external simulation was run from MATLAB, which was used to load the mission parameters and collect and analyze the simulation results. After engineers verified that the G&C algorithms met the wider range of mission requirements, they used Embedded Coder to generate ANSI C code for the Flight Software Team to integrate them into the overall Flight Software including the “human-generated code (HGC) such as the Boot software and Data Handling & Drivers.
From everyone at MathWorks to everyone on the New Horizons program, thank you for using MATLAB and Simulink to accelerate the pace of discovery 4.9 billion kilometers from Earth.
Johns Hopkins Applied Physics Laboratory New Horizons mission page
“Optical Navigation Capabilities for Deep Space Missions”
“Optical Navigation Preparations for New Horizons Pluto Flyby”
“New Horizons to take new photos of Pluto and Charon, beginning optical navigation campaign”
“An Overview of SPICE: NASA’s Ancillary Data System for Planetary Missions”
Documentation for MATLAB implementation of SPICE Toolkit
“MESSENGER: Flight Software Design for a Deep Space Mission”
“Operating systemm of New Horizons spacecraft”
“Linux and the Spacecraft Flight Software Environment”
“We’re scientists on the NASA New Horizons team, which is at Pluto. Ask us anything about the mission & Pluto!”
Trajectory correction, a 93-second thruster burn, on March 10, 2015, guided in part by optical-navigation images of the Pluto system taken in January and February
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.