168
$\begingroup$

I don't know if this would be public, but what CPU / Microcontrollers are used and what software do they run on the Falcon 9? Do they use an OS or is it just bare metal programming?

I found some model rocket flight computers that are available for purchase and just wanted to know what approach SpaceX took towards this.

$\endgroup$
0

2 Answers 2

117
$\begingroup$

In this AMA by the SpaceX software development team, they wrote:

We've been getting a lot of questions about how C#/MVC/etc have to do with rockets. They don't.

About their development they said:

The Flight Software team is about 35 people. We write all the code for Falcon 9, Grasshopper, and Dragon applications; and do the core platform work, also on those vehicles; we also write simulation software; test the flight code; write the communications and analysis software, deployed in our ground stations. We also work in Mission Control to support active missions.

The Ground Software team is about 9 people. We primarily code in LabVIEW. We develop the GUIs used in Mission and Launch control, for engineers and operators to monitor vehicle telemetry and command the rocket, spacecraft, and pad support equipment. We are pushing high bandwidth data around a highly distributed system and implementing complex user interfaces with strict requirements to ensure operators can control and evaluate spacecraft in a timely manner.

They also said:

Dragon and Falcon 9 use a version of Linux.


They unfortunately replied to this question:

What sort of computing power (CPU, RAM, Storage, etc.) do you have access to on board the rockets and capsules themselves? What's "smarter," the Falcon 9 or the Dragon?

with:

100 Dragon sized Falcons or 1 Regular Sized Dragon

So I'm guessing any further information is strictly classified :)

$\endgroup$
3
  • 9
    $\begingroup$ Unrelated to your question, but the rockets and capsules are modelled using Siemens PLM software. $\endgroup$ Commented May 29, 2015 at 10:02
  • 1
    $\begingroup$ It might be unrelated to the question, but if you are going to include that information, please include it in your answer. Comments are subject to deletion at any time. $\endgroup$
    – user
    Commented Jun 9, 2015 at 7:16
  • $\begingroup$ I gather from the infographic koan above that the Dragon is approximately 100 times smarter than a Falcon, or about the same ratio as the two beasts. $\endgroup$ Commented Jan 17, 2017 at 1:42
196
$\begingroup$

SpaceX uses an Actor-Judge system to provide triple redundancy to its rockets and spacecraft. The Falcon 9 has 3 dual core x86 processors running an instance of linux on each core. The flight software is written in C/C++ and runs in the x86 environment. For each calculation/decision, the "flight string" compares the results from both cores. If there is a inconsistency, the string is bad and doesn't send any commands. If both cores return the same response, the string sends the command to the various microcontrollers on the rocket that control things like the engines and grid fins.

The microcontrollers, running on PowerPC processors, received three commands from the three flight strings. They act as a judge to choose the correct course of actions. If all three strings are in agreement the microcontroller executes the command, but if 1 of the 3 is bad, it will go with the strings that have previously been correct. The Falcon 9 can successfully complete its mission with a single flight string.

The triple redundancy gives the system radiation tolerance without the need for expensive rad hardened components. SpaceX tests all flight software on what can be called a table rocket. They lay out all the computers and flight controllers on the Falcon 9 on a table and connect them like they would be on the actual rocket. They then run a complete simulated flight on the components, monitoring performance and potential failures.

SpaceX engineers perform what they call "Cutting the strings" where they randomly shut off a flight computer mid simulation, to see how it responds.

Dragon uses a similar triple redundant system for its flight computers.

Bonus: Dragon V2 control panels are modified 17" Tesla Model S touchscreens and include the same Nvidia Tegra SoCs. They are not part of the flight hardware and are only used to display the GUI. After talking with the Dragon team at GDC2016, it appears Tesla hardware is not used. They do use some interesting software on Dragon 2. They use Chromium and JavaScript for the Dragon 2 flight interface. The actual flight computers still run on C++.

Source: Discussion with various SpaceX engineers at GDC 2015/2016

Update: After four years, SpaceX software engineers have confirmed Chromium and JS powered Crew Dragon's displays on-orbit during a Reddit AMA.

$\endgroup$
12
  • 17
    $\begingroup$ @briligg Presentation by Jinnah Hosein, VP of Software Engineering at SpaceX I was in attendance and took notes on the talk. $\endgroup$ Commented Jun 9, 2015 at 3:28
  • 10
    $\begingroup$ "The triple redundancy gives the system radiation tolerance without the need for expensive rad hardened components. " Most flight control systems are triple redundant for reliability ("triplex"). The use of rad hard components is not needed for a suborbital FCS system like that used on Falcon rockets as the flight control is not exposed to enough radiation over a long enough period to induce a fault in the processor, bus, etc. System that are on-orbit or used for deep space control would generally use rad hard silicon on insulator or silicon on sapphire processors like the hardened PowerPC $\endgroup$
    – Larry_C
    Commented Jan 16, 2017 at 20:29
  • 10
    $\begingroup$ In case anyone is wondering, the reason for the triple redundancy is that solar radiation can cause bits to flip e.g. from 0 to 1, which can completely throw out calculations. So, there have to be a number of cores in agreement so that if one of the cores has been affected by a bit flip, it can be detected. $\endgroup$ Commented Feb 13, 2019 at 20:53
  • 5
    $\begingroup$ @craq Each dual core processor runs a version of the flight software on each core. So there is in effect 6 processes running the flight software at any one time. The outputs from each core are compared in processor, and then the result from each processor is compared using the actor-judge model. $\endgroup$ Commented Aug 6, 2019 at 16:15
  • 4
    $\begingroup$ Are the powerpc micros rad tolerant (e.g., Rad750?) $\endgroup$ Commented May 31, 2020 at 13:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.