hi there my name is xfj and as you might know i am a developer but I'm also a
huge SpaceX fan and that got me thinking what software and hardware powers the
Falcon 9 Falcon Heavy and Dragon let's first take a look at what challenges the
hardware and software of a spacecraft faces when it is being launched into
space first of all it's very hard to get your craft into orbit around the Earth a
launch on top of a rocket causes a lot of vibrations and that means that the
craft itself and the electronics have to be able to withstand that
and once you get into orbit you're welcomed by even more challenges dragon
for instance has to be able to cope with intense heat when it's facing the Sun
but also intense cold when sunlight is being blocked by the earth these
temperatures range from minus 150 all the way up to 120 degrees Celsius but
the biggest problem for the electronics is radiation this radiation comes from
high-energy particles that are ejected by our Sun particles trapped in Earth's
magnetic field and even cosmic rays or particles from outside our solar system
these particles can have a pretty severe effect on the systems inside a
spacecraft one of the biggest problems is what's called a bit flip this occurs
when a high-energy particle hits the memory or the processor of the
spacecraft if it hits the memory it can cause a zero to become a one essentially
corrupting a part of the memory luckily though the hardware on board SpaceX
vehicles can attack these bit flips and fix the corrupted memory by using parody
bits no big deal however when the processor is hit with
radiation it can cause the result of a calculation to be completely incorrect
to demonstrate this let's ask a processor to calculate 10 plus 10 in
binary that would look like this and the result is obviously 20 no surprises
there but let's now take a look at what happens when a bit flip occurs while
performing this calculation we still ask the processor to calculate 10 Plus 10
but because of the bit flip the processor is actually calculating
something completely different right now it will say that ten plus ten
equals twenty four because one of the bits flipped while running the
calculation wrong calculations can have pretty severe effects on spacecrafts
this was demonstrated by the maiden flight of the Ariane 5 rocket in 1996 it
didn't suffer from a bit flip but 40 seconds into the flight the rocket
software tried to put a 64-bit number into a 16-bit address causing the number
to be truncated and be completely different
the Rockets avionics then continued to perform their calculations with this
wrong number and performed an abrupt course correction because it thought it
was going the wrong way the vehicle eventually broke up because the
aerodynamic stress was simply too high now back to SpaceX how did they handle
the problem of radiation well they assume that you can't protect
electronics completely from radiation and they design their systems with this
in mind instead of using expensive radiation hardened parts SpaceX uses
off-the-shelf components let's look at dragon first according to John Moore
Ettore previous director of SpaceX vehicle certification each dragon is
equipped with three flight computers each of these flight computers is
powered by a dual-core x86 processor the computers however don't use this
multi-core capability instead they execute each calculation on the two
cores individually and then compare the results so three flight computers with
each a dual-core processor can be seen as six independent computers that are
constantly checking each other's calculations if one of the flight
computers is hit with radiation and produces a wrong calculation the others
will spot it and when that happens the malfunctioning computer will be rebooted
automatically to prevent further errors after rebooting the computer has to
perform what's called a resync it has to get up to speed with what the vehicle is
doing so it copies the memory of the other two computers and runs the same
programs a bit like rebooting your computer with the option to restore all
your windows when you log back in dragon can even handle a situation where all
three of its flight computers are by radiation at the same time although
that is very unlikely to happen besides three flight computers dragon has 18
other systems on board that also use triple redundancy computers and that
brings a total amount of processors up to 54 and that is just for a single
Dragon capsule but dragon isn't alone also the Falcon 9 has redundant systems
it has three computers for each engine and triple redundancy flight computers
which means that it carries 30 processors at least that was the
situation in 2012 right now it's possible that the Falcon 9 has even more
processors to handle the landing now at this point you might be thinking hang on
does NASA really allow SpaceX to use regular hardware components the ones you
and I can buy on Amazon while actually yes
NASA doesn't require the use of radiation hardened components instead
they require SpaceX to do extensive research into what effects the radiation
can have on their spacecrafts if they know how they'll be affected they can
compensate for it in fact this is called a radiation tolerant design and it is
different from a radiation hardened design nasa itself doesn't use radiation
hard part's everywhere the International Space Station for instance uses a mix of
radiation hardened parts but they also use regular laptops for some controls
even some parts on the Space Shuttle were radiation tolerant instead of
radiation hardened but back to SpaceX how do they select their parts while
they have two conditions first of all the parts have to be capable enough to
handle their tasks pretty obvious and secondly they take into account what
tooling is available for that particular part tooling determines what kind of
people SpaceX can hire off-the-shelf hardware is pretty generic and uses
software and tooling that a lot of developers already know and that means
that SpaceX has less trouble finding great engineers radiation hardened parts
however only work with special programming languages that few people
know thus limiting the ability to hire new people off-the-shelf hardware is
also cheaper and that allows SpaceX to extensively
test these systems John moratoria said that at one point over 40 flight
computers were sitting on people's desks for testing and development you simply
cannot do that with expensive and hard to come by hardware but enough about all
this hardware what about the software that controls everything while the
operating system of choice at SpaceX is Linux it runs on the desktops of the
engineers and it powers its vehicles using Linux everywhere allows them to
streamline the development process and use the robust tools that come with it
the programming language of choice is C++ and they use it for two main reasons
first it allows SpaceX to hire a lot of brilliant people because the language is
still relatively popular and secondly they benefit from the large C++
ecosystem no need to create custom software when you can just use the tools
that developers already know like GCC and gdb for instance but Linux isn't the
only platform that is being used they also use LabVIEW a graphical programming
tool that runs on Windows it is used to visualize the lemma tree that they get
from the Falcon 9 or a dragon during flight and ground teams use it to keep
an eye on important metrics another interesting fact is that SpaceX tries to
share as much code as possible between its vehicles the biggest advantage of
this is that bug fixes for one vehicle are automatically pushed to the other
vehicles as well oh and another interesting fact is that game developers
are usually a good fit for SpaceX because they are used to writing code
that runs in environments where memory and processing power are constrained the
last thing we'll take a look at is how SpaceX monitors their software and
vehicles engineers are encouraged to add metrics to everything they can think
about and when a vehicle is being used all these logs are collected and
analyzed by programs who raise an alarm if something is not within the safety
margins all these metrics are then stored together with the source code
that was running at the time if something goes wrong with the vehicle
SpaceX can recreate the exact environment
to reproduce a problem and fix it and finally they're using continuous
integration to automatically test all the code that is being written by
engineers they even have test sense with all the components of a falcon 9 bolted
on so they can simulate a complete flight to discover potential problems
now more details about the used hardware and software aren't really available and
that's because the United States government considers it classified a
rocket like the Falcon 9 is basically a missile that goes to space so in the
wrong hands the technology could be misused and cause harm but even with
limited information we got a pretty good view and what software and hardware is
being used at SpaceX and what challenges the teams face so that was it for this
video if you liked it hit the thumbs up button and consider subscribing also
follow me on Twitter for more updates and as always thank you very much for
watching
you