Designing and Testing Guidance, Navigation, and Control Software for Landing on Mars Using NI LabVIEW and the ATA Aerospace Toolkit

"Because of LabVIEW features, including the driver support, easily configured I/O, and ease of real-time application development, we completed our tests within budget and on schedule."

- Chris Scruggs, Advanced Technology Associates, Inc.

The Challenge:

Building and testing a complete dynamic flight system including guidance, navigation, and control (GN&C) flight software and a high-fidelity flight vehicle simulation (truth model) that demonstrates a client’s innovative propulsion technologies meet mission requirements using a limited budget and a low-risk development approach.

The Solution:

Creating a low-risk, low-cost development and test environment for GN&C software and a high-fidelity truth model using the NI LabVIEW graphical development environment, NI PXI hardware, and the ATA Aerospace Toolkit for LabVIEW.

Recent advances in solid propulsion technology for spacecraft have led to the application of this technology to missions that previously were only considered suitable for liquid propulsion systems. National Instruments Alliance Partner Advanced Technology Associates Inc. (ATA) and Alliant Techsystems (ATK) worked together to demonstrate that an all solid propulsion system can perform the Mars Science Laboratory (MSL) mission (a NASA program to land a large rover on Mars) with 10 percent less total weight and 20 percent less propulsion space requirements than a comparable liquid propulsion system.

 

Traditionally, a characteristic of solid propulsion systems is that once the propellant is ignited, it burns until exhausted; such systems generally do not have the control and flexibility required for descent and landing on planetary surfaces. To accomplish the MSL mission, ATA helped ATK develop new GN&C software for a throttleable all-solid system capable of landing on Mars. The ATK MSL design used four throttleable solid rocket motor modules with variable nozzles that provided thrust for braking during descent. Each motor module also had small thrusters oriented to provide early attitude control and internal gas generator pressure regulation. The NASA Jet Propulsion Laboratory and ATK wanted to demonstrate this system in a live fire test. The demonstration was performed under the JPL Mars Technology Program (MTP) as well as the NASA Innovative Partnerships Program (IPP).

 

ATA developed the guidance and navigation scheme used during the descent and landing on the Martian surface, the software to control the throttleable solid engine, and a dynamic vehicle simulation, as well as integrated the hardware into the test system.

 

We built this project based on previous efforts to design and develop a controllable all-solid propellant system. The development program for the GN&C of the all-solid system for the MSL mission had three distinct phases: software-in-the-loop (SIL), processor-in-the-loop (PIL), and hardware-in-the-loop (HIL).

 

Software-in-the-Loop and Processor-in-the-Loop Test

For a long time, the aerospace industry used simulation for testing and integrating software projects. The first phase of the project involved developing separate and distinct models for the GN&C flight software and vehicle flight simulation used to test the flight code. We constructed a SIL using a single PC hosting LabVIEW and the ATA Aerospace Toolkit. We used LabVIEW to create the overall simulation framework and the graphical user interface design for all phases of this project.

 

We chose LabVIEW and National Instruments hardware for its ease of use in creating simulations, for easily reconfigurable I/O solutions, extensive driver support, and code deployment ease to real-time systems. We used the ATA Aerospace Toolkit to build the vehicle flight simulation code in LabVIEW. With this toolkit, we quickly modeled forces and torques due to aerodynamics, gravity, and thrust in a high-fidelity simulation. Also, for this project, we had to implement a special gravity model for Mars.

 

The graphical nature of LabVIEW considerably aided the functional separation of the models by  representing the GN&C and truth models as conceptual blocks (virtual instruments or VIs). The connections between the VIs represented the eventual physical connections with the hardware. Using this technology, ATA constructed a high-fidelity six-degrees-of-freedom simulation of the MSL mission.

 

 

 

We could have constructed the GN&C model in LabVIEW with the ATA Aerospace Toolkit, but instead we used ANSI C to implement the GN&C software because we anticipated that eventually the flight code would fly in an actual vehicle. The C programming language is considered to have a large amount of overhead in terms of development time when compared with other modern languages; however, it has compilers for a wide range of flight-qualified embedded targets that are well-tested and accepted by the aerospace industry. Any eventual qualification of this actual code for flight is easier when implemented in C. In addition, ATA used a large in-house database of previously written and tested ANSI C code, which considerably cut development times and required little modification to target to the flight controller. For the test system purposes, we compiled the ANSI C code into a DLL and called the code from LabVIEW.

 

The purpose of the SIL phase was to construct an analysis tool and perform system-level software integration. The SIL featured more than 300 user-variable parameters that we read from an Excel spreadsheet.

 

The visualization of the ATK MSL lander shows the descent and landing phase of the MSL mission. We made the video using trajectory files generated by the SIL test and created the video file using an Interactive Data Language (IDL) application that interprets and displays the trajectory.

 

During the PIL development phase, an intermediate step, our goal was to incorporate actual embedded controllers into the project. We targeted the vehicle flight controller with the GN&C software developed during the SIL and then used serial and analog signals to integrate the control system into the simulation loop.  At this point, we imposed real-time requirements on both the control algorithm and the vehicle flight simulation, deployed the SIL application to NI PXI hardware running the LabVIEW Real-Time Module software, and made modifications to the simulation as needed to ensure real-time performance.

 

The modifications to progress from a SIL to a PIL simulation can be large or small, depending on the code architecture decisions made during the SIL design phase. Although both LabVIEW and the ATA Aerospace Toolkit can implement real-time operation, it is not always desirable to develop a SIL application to the degree that no modification is required between the SIL and PIL phases because it greatly increases SIL development costs before hardware requirements are baselined and results in wasted work. Using LabVIEW and the ATA Aerospace Toolkit, we were confident that we could deploy the application developed during the SIL phase to real-time systems with a reasonable amount of modifications.

 

Formal PIL test development helped our engineers work out communication and timing details between the controller and the simulation. We completed this phase when the simulation ran correctly with the real-time operational requirements given for the subsequent HIL phase and with the actual flight controller in the loop.

 

Although it was not a formal phase of the project, we modified the PIL project by moving one of the four simulated motor modules to its own PXI controller. The other three motor modules and the vehicle flight simulation model remained on a single separate PXI controller. We modified the inputs and outputs of the PXI controller containing the single motor model to exactly match the actual motor module used during the HIL demonstration, thereby minimizing risk for the live fire test. We also verified the correct operation of this modified PIL test.

 

 

 

The Live Fire Demonstration

The final phase of the project, known as the quarter-scale-system HIL test, was an HIL live fire demonstration of the throttleable solid rocket motor technology flying the MSL mission. For this test, we replaced the PXI controller hosting the single solid rocket motor module simulation with an actual solid rocket motor module consisting of a live gas generator and actuated proportional valves. The flight controller, verified during the PIL phase, controlled the solid rocket motor module.  We made no other configuration changes to the PIL to conduct the HIL test.

 

System Completion with a Successful Demonstration

The care with which we performed the SIL and PIL phases of the project gave us successful results. We used the exact same vehicle simulation and GN&C control code used in the PIL for simulation during the HIL, and we did not have to make any modifications to the model logic to accommodate scaling; changes to the model parameters in the Excel spreadsheet were sufficient.

 

We concluded the development and demonstration of controllable solid-motor technology with a motor hot-fire test in a high-altitude test chamber, at varying thrust levels, simulating an MSL descent in real time. We completed the development and live testing in less than one year. Because of LabVIEW features, including the driver support, easily configured I/O, and ease of real-time application development, we completed our tests within budget and on schedule. We analyzed similar projects we have worked on and demonstrated an approximate 40 percent labor reduction.

 

A National Instruments Alliance Partner is a business entity independent from National Instruments and has no agency, partnership, or joint-venture relationship with National Instruments

 

Author Information:

Chris Scruggs
Advanced Technology Associates, Inc.
6004 South Kipling Street, Suite 208
Littleton, CO, CO 80127
United States
Tel: (303) 948-7980
cscruggs@atacolorado.com

Visualization of the All-Solid-Propulsion MSL Vehicle
Comparing a Liquid Propulsion Vehicle (Left) with a Solid Propulsion Vehicle (Right)
Representation of the MSL PIL Test Setup
Representation of the MSL HIL Test Setup (Note that one NI PXI was Replaced with the Actual Gas Generator (UUT))