2

Similar Question: What computer and software is used by the Falcon 9?

What would the formula (function) calculating the changes in angle of attack of the Grid Fins (Falcon 9) before landing look like?

enter image description here

This question highlights a newly developed tendency in the progress of Space Exploration. Long stagnated advances in the development of space rocket technologies (SLS as an example) were boosted by advances in computing power and Artificial Intelligence (SpaceX Falcon 9, Starship).

merged from deleted answer:

Advances in onboard computers processing power and the 'brute force' approach to calculation of avionics control commands could have made vertical landing of the first stage practical and affordable for commercial entities like SpaceX.

uhoh
  • 148,791
  • 53
  • 476
  • 1,473
  • one question at a time, not two in the title and a third in the body – Erin Anne Feb 18 '23 at 18:35
  • SpaceX Falcon 9 is revolutionizing the Space Industry. Yet, Falcon 9 is built with old and proven technologies. Maybe the revolution is in software used to control vertical landing? – TheMatrix Equation-balance Feb 18 '23 at 22:28
  • 1
    Sarcastic answer is to point to 'the missile knows where it isn't' https://www.youtube.com/watch?v=c-FT0T9Ei-4 which was already a meme for being a terrible explanation for this in the 90s. The core remains the same though, with a known position and an aim point generate controls signals to reduce error. – GremlinWranger Feb 18 '23 at 22:51
  • @TheMatrixEquation-balance Is your interest in control systems theory in general, or 'was spaceX ground breaking'? the question points to the former, your comment the latter? – GremlinWranger Feb 18 '23 at 22:55
  • @GremlinWranger - my question is simple. "How Do They Do It?" – TheMatrix Equation-balance Feb 18 '23 at 23:07
  • I don't think this question can be answered except by revealing proprietary SpaceX info, but I am voting to reopen because as currently edited, it is not too broad. – Organic Marble Feb 19 '23 at 03:03
  • @OrganicMarble - I agree that it is unlikely that we will get any specific information. But it would be interesting to learn about this Giant Leap from conventional avionics that can land commercial airliners to software that can fly a telegraph pole from orbit and land it with 2 meters precision. – TheMatrix Equation-balance Feb 19 '23 at 03:16
  • 1
    Is it such a Giant Leap, though? Blue Origin also autonomously lands their New Shepard booster, and even did it successfully before SpaceX did (although, of course, New Shepard is not an orbital system, it just goes straight up and down again). The DC-X demonstrated autonomous vertical landing in 1993 (it was intended to land from orbit, but all demonstrations were just hops of at most ~3km; on its penultimate flight, it even demonstrated the Starship-style reorientation from belly-down to landing feets-down). Autonomous landing from orbit (but not vertical) was demonstrated with Buran in … – Jörg W Mittag Feb 19 '23 at 14:52
  • … 1988. Autonomous landing of an aircraft was demonstrated in 1945. I don't think there was a "Giant Leap". It's not that it couldn't be done before or that nobody else could do it, it's just that nobody bothered. Why land a rocket if you can charge the government more for throwing it away? – Jörg W Mittag Feb 19 '23 at 14:52
  • 1
    Have a look at https://bps.space/ . He did it with solid rocket motors and most of the stuff is public. – Greg Miller Feb 19 '23 at 23:36
  • 1
    Stack Exchange takes some getting used-to, it works differently than most (all?) other sites. You can improve this question in several ways. "I am trying to understand the formula..." pretty much requires you to add a link to the actual formula you are trying to understand, or to include a few yourself. If you don't have any yet, you can change this to "I would like to learn about..." and then simply list one or two places you've checked first. Some amount of prior research is usually expected in an SE question (thought it's not an absolute) and a photo of a person looking at a grid fin... – uhoh Feb 20 '23 at 00:11
  • 2
    ...doesn't quite satisfy that. If you hover a cursor over the up and down voting arrows, you can see that the tooltip even suggests prior research is a basis for voting up or down on questions. https://i.stack.imgur.com/rCROe.png We generally avoid making significant changes to questions once answers start to be posted to avoid making them a "moving target" and making current answers less valid. So in this case I think you can ask a follow-up reference-request question, perhaps something like: – uhoh Feb 20 '23 at 00:16
  • 1
    "Where can I read about the theory and implementation of rocket landing control?" And you also could ask a separate question about grid-fin control. Though there won't be much about their use in landing, they certainly do show up in both rockets and missiles. Basically you can ask as many good questions as you like, and for something like this it's better to take it one step at a time. Rather than worry about getting this particular question post to "positive territory" it might be easier to just ask a few more narrowly-scoped questions including at least a bit of prior research. – uhoh Feb 20 '23 at 00:20
  • 1
    @uhoh - Thank you very much for a detailed explanation and help. I have been able to learn a bit since I joined SE and received very valuable information/corrections for my article. I am still trying to adjust to the rough and aggressive attitudes when your question is getting shutdown in 10-15 minutes after posting. If the moderator does not like or doesn't understand the question, it does not mean that other people should not have a chance to weigh in. – TheMatrix Equation-balance Feb 20 '23 at 01:10
  • 2
    @TheMatrixEquation-balance ya that's the number-one challenge to get used to, having questions closed when we think they can have good answers. It was a real struggle for me in the beginning, but I found that if I deferred to the community a bit and kept at it (continued to post) I started getting better at constructing questions in the "Stack Exchange" way. The site is open to (almost) the entire internet, and yet is incredibly smooth and peaceful compared to most of it, and that's because it's fairly rigidly structured and the moderators and community do a good job of helping us adhere to it – uhoh Feb 20 '23 at 01:19
  • 1
    @uhoh - Thank you for your help! – TheMatrix Equation-balance Feb 21 '23 at 15:56

2 Answers2

5

While SpaceX has not published anything specific on the flight control logic, the underlying process is by no means magic.

The basic control mode for a system is generate a control signal that moves towards the set point. The most basic being the classic thermostat that turns off when too hot and on when too cold and oscillates either side. More precise control can be done with proportional control, where if far from setpoint you drive harder towards it. This has a tendency to drive hard and overshoot, so you also factor in rate of approach to set point and damp the drive rate down as it approaches.

This system is referred to as proportional-integeral-derivative (PID) control and are a well established technology. Where the magic happens is tuning the three values to achieve fast control without overshoot and/or oscillation. This is complicated for spacecraft descent in that the control effects change with speed and air density, so ideally you do a combination of modelling and testing to find ideal values for all possible speed/altitude/mass combinations.

This answers the question as written, but possibly not the question as intended in terms of how to actually determine the intended flight path. The SpaceX method does not appear to have been made public, but published work by others seem to use a combination of pre computed path switching to a live terminal descent mode that predicts impact point without control inputs and iterates towards a sequence of control inputs that will achieve touchdown. The involved maths is complex for a human but solvable even with Apollo era hardware, though faster processing allows more optimal solutions to be found without impacting during number crunching or by exceeding stability limits. In particular Apollo Lunar descent had a rather simpler inverted pendulum to deal with than SpaceX.

Powered descent has even been achieved by a hobbist on a solid rocket motor which while working only at a single atmospheric pressure and without aerodynamic surfaces is of interest in showing the mechanical and PID tuning process involved.

GremlinWranger
  • 22,391
  • 1
  • 56
  • 87
  • 2
    BTW, Joe Barnard has an almost 2 hour long "engineering cut" of the Scout F development process: https://youtu.be/4OmOwSB7xP8 It includes, among other things, a discussion of the control loop. There's also Joe's "Landing Model Rockets" series: https://youtube.com/playlist?list=PLyV774-3p8348Fl5V6ciIBh0ZA446q93I, especially episode 8 about the Flight Software: https://youtu.be/ha-0-D1vHmY – Jörg W Mittag Feb 19 '23 at 12:59
  • "@GremlinWranger" - 'PID' - is probably a granddaddy of flight control systems. To put it in perspective, the Russians were always behind on stealth aircraft technologies because flight control (avionics) software is exponentially more complex for an unstable airframe (F-117 Nighthawk ). Humans could never fly it without computer aid. But this 'magic' software did fly Falcon 9, Blue Origin's New Shepard, Starship without a hitch (too easy to be true). – TheMatrix Equation-balance Feb 19 '23 at 14:44
  • Most existing Avionics software is written in Ada The Boing 777 is 99.9% Ada as are most of Boing's offerings. The F-22 is also done in Ada – TheMatrix Equation-balance Feb 19 '23 at 14:47
  • @TheMatrixEquation-balance why do you say that it’s too easy to be true? – fyrepenguin Feb 19 '23 at 19:00
  • @fyrepenguin - because in the first flight of Falcon 9 (first real test of avionics software) and in the first flight of Starship, in-flight controls worked perfectly, almost miraculously. Apparently, it does not matter to this software, what it is connected to in terms of aileron/rudder, Grid Fins or New Shepard's tilting fins. – TheMatrix Equation-balance Feb 19 '23 at 19:22
  • 3
    @TheMatrixEquation-balance I don't know why you brought up Ada, since language choice has nothing to do with PID controllers, but SpaceX has been quite public about their flight software being written in C++ – Erin Anne Feb 19 '23 at 20:27
  • 1
    @TheMatrixEquation-balance not really related here but you may find the answers interesting: What makes Ada the language of choice for the ISS's safety-critical systems? and What computer and software is used by the Falcon 9? – uhoh Feb 20 '23 at 00:07
  • 1
    @TheMatrixEquation-balance do you understand that PID control isn't one piece of software, it's a class of control loop? Additional work does have to be done to implement a specific controller for Starship or for an aircraft, but it broadly applies to a lot of situations and is quick/easy to get "good enough" control from. It's never perfect the first time, but engineers don't make perfect things because we don't have infinite money or time. – Erin Anne Feb 20 '23 at 02:46
  • @ErinAnne - In this question we are looking for a particular new capability (which was not available 10 years ago) that made vertical landing of the first stage possible. – TheMatrix Equation-balance Feb 20 '23 at 02:57
  • 2
    @TheMatrixEquation-balance it is completely incorrect to assert that there was a new technology developed in the last 10 years to allow the Falcon 9 landings; as Jorg Mittag pointed out, DC-X did it in 1993. Also, that's not the question you asked. So ???? – Erin Anne Feb 20 '23 at 03:39
  • 1
    @TheMatrixEquation-balance I am not relevant to discuss. I am not having a fight with you. I am earnestly asking if you understand this answer, because you seem to be dismissing it. Maybe the answer can be improved to help you and others who wonder the same thing. That's the outcome I'm after, because that's the point of the site. – Erin Anne Feb 20 '23 at 04:05
2

Landing of the Falcon 9 is very challenging from a number of perspectives. Firstly it can't hover as the engine thrust cannot be throttled sufficiently to prevent it accelerating into the air. So the only option is to ensure that deceleration to 0m/s is matched to 0m altitude and then turn off the engine.

As for the grid fins I suspect that initially they made some best guess estimates based on simulation of what should happen to the rocket if the grid fins moved in a particular way and then tried it out with a lot of telemetry. From that they must have discovered exactly how the grid fins do affect the flight profile when they move in a particular way.

It took them a considerable time and lots of exploding boosters, but they eventually managed to iterate the control software to make a soft landing at sea. There is no way that it would be possible to access the exact software program that they use. It is probably extremely complex.

Slarty
  • 9,303
  • 26
  • 50