30 ms·
Seems like a really clean and testable system, too. Can make a harness with a set of inputs, run the cycle and test outputs consistently. Performance is also ea
by sudhirj 5y ago
Seems like a really clean and testable system, too. Can make a harness with a set of inputs, run the cycle and test outputs consistently. Performance is also easily checked, each cycle needs to run without 100ms for the 10hz systems, I guess, including garbage collection.
Nice it see things kept this simple.
- canadianfella 5y agoWhat does “without 100ms” mean?
- WJW 5y agoPretty sure they use a language without a garbage collector for the control software. Probably C or ADA. Look at the FAA specifications for more guidelines. For airplanes it's DO-178C I think, not sure about rockets. EDIT: One of the coolest projects I saw in recent time was CoPilot, which is a Haskell dialect that compiles down to C control loops which are statically guaranteed to run in constant time and memory. There is also arduino-copilot for if you want to play with ultra-hard real time software but can't afford an entire rocket.
- helsinkiandrew 5y agoAccording to the Reddit AMA last year SpaceX use: "C & C++ for flight software, HTML, JavaScript & CSS for displays and python for testing"
- icegreentea2 5y agoYes, this stuff is nice. But it is worth noting that these control loops can often have some sort of memory, so you normally need to test over multiple cycles - you usually have a test vector to load in, and watch for the response vector. Trivial example would be if you had a PID controller implemented into your main loop. Your main loop would be storing the integral and "previous" error term.
- bagels 5y agoEquivalent to handling an additionaanl sensor input and an additional output, no?
- EmielMols 5y agoTrue, but you do want to test the emergent control system.
- jcims 5y agoThat's the irony of closed loop control systems. They appear to be simple but the emergent behavior, particularly when there is a hierarchy of control loops, is incredibly complex.
- icegreentea2 5y agoYes, you could in principle convert any memory within a given loop into a separate unit. You just gotta pick between the tradeoffs between having more I/O and software/hardware units, versus having more memory within specific software/hardware units. You just gotta find a balance that works for your requirements and constraints. In my application (it was medical devices), we found that stateful loops fit nicely.
- numpad0 5y agoI had once thinking about this type of system, and later found that the SNMP(1988) as well as NIST/Army 4D/RCS project(1980s) had this train of thought before I was even born. Now I'm wondering why this type of distributed, synchronized, hard realtime decision making framework don't seem to exist as some Apache Foundation project or something. It just sounds right and massively useful but I can't find an implementation, at least on public Internet -- why?
- mstipetic 5y agoThat’s mostly how kubernetes works also. It’s not that uncommon of a pattern
- StreamBright 5y agoThis is not how Kubernetes works. The concepts are completely different (pod, allocation etc.)
- mstipetic 5y agoall the main controllers work by running a reconciliation loop constantly, what are you talking about?
- pjc50 5y agoIt's not really a framework that you implement, more a process for making an implementation?
- icegreentea2 5y agoThere are a few layers to your question. If you mean distributed to mean "over multiple computers", then ya... this is a really specialized field. Your ability to synchronize and maintain hard real-timeness between computers is completely dependent on IO and hardware features, and topology. This makes it much harder to make a generalized framework. We we ignore the distributed portion, then you're describing a real-time operating system - in which case something like https://www.freertos.org/ https://www.freertos.org/ might fit the bill?
- jb1991 5y ago> including garbage collection. Not only does flight control software typically never use garbage collection, it is also preferable to never allocate memory during the runtime -- all memory ever needed is allocated at program startup, and memory is not acquired or released until landing or some other major end event. Because memory issues are often the most significant causes of crashes, which you don't want to translate into, well.. a different kind of crash. The creator of C++, Bjarne, wrote a nice paper on flight control software if you are interested in more.
- mrfusion 5y agoDo you have a link to bjarnes writeup? My ask Jeeves skills are failing me.
- LeifCarrotson 5y agoI don't think it was actually written by Bjarne, I think it was K. Carroll and others from Lockheed Martin, but I expect the document is this one: https://www.stroustrup.com/JSF-AV-rules.pdf https://www.stroustrup.com/JSF-AV-rules.pdf which is linked from the Applications page of Bjarne's website.
- jb1991 5y agoAh, thanks for the link; yes this is the one I was referring to. I had thought it was by Bjarne since it was on his site, but either way, it's an interesting read.
- maxlybbert 5y agoThere are a couple others as well: https://stroustrup.com/autonomics09.pdf https://stroustrup.com/autonomics09.pdf https://stroustrup.com/sec09.pdf https://stroustrup.com/sec09.pdf https://stroustrup.com/mbd09.pdf https://stroustrup.com/mbd09.pdf
- funklute 5y agoThis one might also be interesting https://web.cecs.pdx.edu/~kimchris/cs201/handouts/The%20Power%20of%2010%20-%20Rules%20for%20Developing%20Safety%20Critical%20Code.pdf https://web.cecs.pdx.edu/~kimchris/cs201/handouts/The%20Powe... It's basically just a quick list of 10 useful rules to follow for safety-critical code. (I've seen a different format in the past, that wasn't quite as fancy, but this is the only version I can find at the moment)
- treespace88 5y agoReally nice for integration testing. Not to be confused with unit testing. You could literally replay entire missions.