Programming things
Xavier Louis Tardy (359) 27 posts |
Thanks Rick. |
Clive Semmens (2335) 3276 posts |
2002 Volvo V70 that I have does. The ECU seems very solid – although a temperature sensor failure giving an out-of-range value resulted in an undrivable vehicle, not a limp mode.
Yup. Cost £150 to get a new controller for the electric windows because it had to be paired with the ECU! Still – not too bad considering these are the only things to have gone wrong with the beast in 15 years and 149K miles. |
David Feugey (2125) 2709 posts |
Good summary :)
Only as an alternative to “just stop”. Sometimes there is just one wrong data or calculation. It’s important to be able to ignore it, as the main aim of a critical system is to never stop. Even for an hardware failure.
Only if the contract is correct. |
Clive Semmens (2335) 3276 posts |
When a car system crashes, it should not stop the engine. Well, okay, it didn’t stop the engine, but it did stop the engine producing any power. We were able to roll to a halt, fortunately managing to reach a fairly safe place. Declutching helped, but engine braking in top gear isn’t violent anyway. (My father’s Thames van skidded to a halt when a con rod broke and rammed the broken end into the cylinder wall, which really did stop the engine.) |
Rick Murray (539) 13840 posts |
Define “never stop”. What if the failed system is the one that controls location or direction? Would it be acceptable to run over a child in a self driving car because mud blocked the proximity detection from working correctly and… Never stop? The ideal thing to do would be to abort safely if the fault is not something that is recoverable. Ironically, in the case of the rocket, that was a safe failure. Imagine if it veered out of control and ploughed into an urban area…? Oops. There’s thick fog here today, been redirected because of an accident. Can just see a load of blue strobes. I’m guessing somebody tried to pass somebody and hit an oncoming car…? If humans cock it up, what hope a machine? |
Clive Semmens (2335) 3276 posts |
I think it’s fair to say that “never stop” means the program should never stop, not that a vehicle should never stop. The program should continue to consider what best to do in the circumstances, which may well mean “stop the vehicle” – but probably not by shutting the engine down, unless you’ve lost steering control or control of speed. You might well want to reduce engine power to “limp mode” so you can proceed to a safe place to stop. |
David Feugey (2125) 2709 posts |
Correct. As hardware or data failure can and will happens, it’s important sometimes to wait for more data before really crashing (what I called “ignoring the error”). Of course, we now there is an error, and we raise an alert. But in the same time we choose to ‘ignore’ it to maintain the status quo. All electronic systems in cars work like this. When you’ll connect a monitoring system, you’ll see a lot of abnormal data that is simply ignored. For example from the lambda sensor. But of course, the fuel injection will not stop working. It’ll just be in a very suboptimal state.
Correct. It should never stop (the program). |
Steffen Huber (91) 1953 posts |
If you have read the article Rick referenced to, and still think that it was somehow Ada’s (not ADA!) fault, read it again and try harder to understand the details. In short, the problem was created by blindly reusing software and components from a previous, completely different rocket type. Bottom line: Reusage is good. Reusage without engaging the brain is bad. |
Ralph Barrett (1603) 154 posts |
I would say that a major root cause of the loss of the rocket was poor testing. And thus poor project management. Like the space shuttle disaster, the real root cause was probably due to the way the project was being run from the top ? After the incident, they were able to run a simulation of the rocket launch with simulated inputs to the computer. This simulation behaved exactly like the ‘real’ rocket using the same (or similar) process inputs. Why wasn’t a full launch simulation done before the launch as part of a system software test, and not after ? Plus other ‘unit’ testing should have found such a basic error in the code. And they should never have been using mission-critical code with no exception handlers (apart from an exception causes the rocket to self-destruct in mid-air). Ralph |
Xavier Louis Tardy (359) 27 posts |
@Stephen Huber : I do not need to try to understand ‘harder’, please spare me your insisting patronising me, with despise, once for all (Yes : I remember the Google group, and will for a very long time). ‘ROTFL’ : excellent choice. It is obvious no programming language will prevent from blatant misusage … It is why we (the students) were so appalled by our ADA enthousiasts teachers, because of their stubborn attitude, as though ADA was a ‘gem’ among all available programming languages. |
Steve Pampling (1551) 8170 posts |
Either or both of:
1 I have a colleague who says he wouldn’t trust most project managers to “deliver” pizza. |
David Feugey (2125) 2709 posts |
For each mission, there are about 4 years of intensive tests and simulations. |
Rick Murray (539) 13840 posts |
My previous car – Citroen Saxo. Possibly had a fault with the oxygen sensor. When the engine idled, it would slowly rev up, then down, then up, then down. It’d take maybe 15-20 seconds to go from around 1000rpm to 1500rpm, then back to 1000. We took it to a garage who hooked up fancy monitoring equipment. Verdict? Probably the oxygen sensor but we can’t tell for sure. €600 to swap it for a new one, but no guarantee it’ll change anything. I looked up the part online (cost: about a third, accessibility, dead easy it is the thing that looks like a spark plug on top of the exhaust manifold). So I said forget it, kept the car a little longer, took it for trade in on the C1 that I have now. As it trims the engine to help keep emissions down, it wasn’t a particularly critical piece. Okay, we’d probably fail an MOT, but it’s not like the engine won’t work without it.
Ignoring the error and crashing? Not quite the same thing. ;-) And anyway, wait for what data? Somebody much smarter than me once said that doing something repeatedly expecting a different result was the very definition of madness. Now I do understand that there will be glitches in real world applications. Not so much sensor failure, more communications failures. A nearby lightning strike, driving under power lines, all sorts of things could mess with the data – though a well designed system will include some form of coding (hamming, CRC, whatever) to allow the receiver to know that the data was corrupted. Here is one to think about. You are an ECU. A fancy intelligent car. You know how fast the car is travelling, you know the engine RPM. These help you decide how best to mix the fuel for the way the user is driving… and maybe to also nag the user when they are in the wrong gear (hello Citroen C3, can you hear me?!?). Now you are doing 0. All of a sudden, your wheel rotation sensor says the car’s speed is zero. What action do you take? |
Steve Pampling (1551) 8170 posts |
Check the readings from the other wheel(s) |
Rick Murray (539) 13840 posts |
I chose this specifically because there are two equally viable actions for two equally viable events. Event #1: Sensor failure Event #2: Head on collision Remember, we are talking automotive devices here. It would be nice to say “okay, if one speed sensor has failed we can flag a warning and rely upon reading from the other one” but this is supposing that the car would be fitted with two. I doubt it. These are pieces of hardware selling for prices akin to ten grand or more, yet they still – in this day and age – cheap out on central locking and a frigging light bulb in the boot. I’m supposed to believe they’d fit redundant sensors? Yeah, right… So. Your two choices. Which would you settle upon as being the best course of action? |
Colin Ferris (399) 1814 posts |
There was a aircraft that had a speed sensor that froze up – the computer handed it over to the three pilot’s – which tried to work out what was wrong – while the plane stalled and went down like a stone. |
Rick Murray (539) 13840 posts |
Hmm… That’s kind of… Machine 0 : 0 Human |
Clive Semmens (2335) 3276 posts |
Actually, it was a couple of hundred people hitting the middle of the Atlantic quite fast iirc. |
David Feugey (2125) 2709 posts |
I wait a few milliseconds. Sensor can failed at time x, and not at time x+1. The same way some software works better with AE off . To be partly reliable is better than not to work at all… or not. Choices. Most of time for mission critical tasks, you’ll opt for the status quo, rather than for a full and immediate stop (AKA stalled and went down). Simply because the critical point is the mission (continue flying). Of course that’s just the first step before something else. Stopping the engine, for a car, but probably not for a plane. |
Dave Higton (1515) 3526 posts |
Gosh, I’m impressed with the calibre of the people posting to this thread. I hope the rocket and ECU companies are watching. They could hire people to solve all their problems. |
Ralph Barrett (1603) 154 posts |
The Airbus A330 (AF447) ‘handed-over’ to the two First Officers, who were on the flight deck. The captain was asleep having a programmed rest break when the ‘handover’ occurred. The pilot flying (PF) continued to pull-back the ‘joystick’ until the plane stalled, dropped like a stone and eventually hit the South Atlantic. By the time the crew had awakened the sleeping Captain, there was not much time left to avert the crash. However, the captain did instruct the PF to push the stick forward (which was not Ralph |
Rick Murray (539) 13840 posts |
Be better to hire people to hack the hell out of the things, then present them with a list of what not to do… I’ll give you an example of how ECU integration should never work: https://www.youtube.com/watch?v=MK0SrxBC1xs |
Colin Ferris (399) 1814 posts |
I dont’t think it was resolved why the pilot flew into a thunderstorm instead of going around it? Why the pilot ‘not in charge’ – kept pulling up on his joy stick? (ie not touching his joy stick – when not flying) Why the two joysticks didn’t have any feedback – bit like flying ‘Interdictor’ by two people with their own joysticks. |
David Feugey (2125) 2709 posts |
They already have better people for this… But even a ‘near perfection team’ will not be 100% crash proof :) |
Clive Semmens (2335) 3276 posts |
I’m not much impressed with the calibre of sarcasm on here. That there is criticism to be levelled at the rocket and ECU companies can scarcely be a matter of doubt. They do pretty well, but they ain’t perfect. Some of us on here are engineers, software or otherwise, and have worked in fairly high level jobs very comparable to those in rocket or ECU companies (in at least one case, actually in an ECU company). I for one am not levelling criticism at the engineers in those companies, but at the management – and the bean counters – and will continue to do so, sarcastic comments not withstanding. It’s also easier to be wise after an event, like now. |