News for hackers. Stuff that matters.
Re:Schiaparelli landing investigation makes progress by grondilu on Thursday November 24, 2016 @06:03AM (#13029689)
> the erroneous information generated an estimated altitude that was negative – that is, below ground level.

Kind of sad to see that computers nowadays still lack what we call common sense. I mean the machine received negative altimeter data but if it had been able to just look around, it could have seen that this data was erroneous. Hell, considering the descent profile was carefully prepared, the computer should also have noticed that it was way too early to reach the ground and should have concluded that something was wrong with the altitude measure.

Re:Schiaparelli landing investigation makes progress by rsp1984 on Thursday November 24, 2016 @06:30AM (#13029779)
It's a question of proper sensor fusion. The way it's typically done is with some form of bayesian prior + a robust estimator that can handle the case where your sensors give you disagreeing evidence of the true state.

So you have a prediction function that takes as input your previous estimated state and some form of "common sense" that's hard-coded or learned and which outputs a prediction of the current state. Then you look at your current measurements and if one of it disagrees to much it gets downweighted or outright discarded. The updated estimate is then computed from the prediction and the current measurements.

Re:Schiaparelli landing investigation makes progress by redcalx on Thursday November 24, 2016 @07:16AM (#13029929)
Indeed. I.e. have some probabilistic model of the 'world' and the probe's status within it (position, speed, rotation, etc). The sensor information then 'merely' informs that model, so e.g. if some sensor or piece of code says the probe has instantaneously jumped to a new location some distance away then the model can just disregard that as not conforming to anything like what was expected (the set of priors on how the probe moves, or essentially the laws of physics).

Or... run the flight controller through a 'fuzzer' that throws lots of unexpected scenarios at it. To be honest I'm rather disappointed that a project at this level has succumbed to a bug like this. It's a few thousand dollars of additional dev effort versus the whole project failing; classic small certain initial cost versus large possible future cost (see Taleb's Antifragile, systemic failure of financial markets, etc.)

Ho hum.

Re:Schiaparelli landing investigation makes progress by ansible on Thursday November 24, 2016 @12:50PM (#13031625)
It's a few thousand dollars of additional dev effort versus the whole project failing; classic small certain initial cost versus large possible future cost...

We in hindsight, now know that a little extra development could have avoided the problem.

The trick is trying to figure out where to spend your limited resources as the project is going.

There are lots of areas that might have caused problems. There may well be other flaws in the system that would also have caused a failure on descent.

Re:Schiaparelli landing investigation makes progress by redcalx on Thursday November 24, 2016 @01:34PM (#13031924)
> The trick is trying to figure out where to spend your limited resources as the project is going.

In a situation such as this where you don't have the funds to test everything to the level you would like and the cost of a failure is large, I wonder if a reasonable compromise is to hire a smallish team of 'adversaries'. I.e. their full time job is to try and find issues with other people's work; and to ask what could go wrong, or, what is likely to to go wrong - let's go see if we can break that.

I also find the idea of a risk register useful. I.e. during development you'll often have thoughts about whether particular edge cases are truly being handled properly, but often the day to day cost versus benefit decisions mean you can't explore all of these issues. If however you log them then this can serve as a source of ideas for an adversarial team, or indeed your own investigations if you happen to have bits of free time for testing.

Re:Schiaparelli landing investigation makes progress by plafl on Thursday November 24, 2016 @06:06PM (#13033360)
Engineering simulators are used for this purpose, I have worked on them, and seen them being used precisely for trying to find unexpected system behaviors under sensor or other subsystem failures (valves, computers, motors, power,...). This is quite costly. In commercial aviation there are teams for developing the simulations and separate teams just trying all kind of strange scenarios. In less critical projects, say for example drones, I have seen it done too although with smaller teams.

As I see it with the limited information we have right now it seems that either the error was made when writing the requirements for the IMU or the IMU wasn't the correct one. Having worked writing navigation software I cannot help siding with the software developers. The IMU is usually the central piece of the navigation system, at best they could have flagged it as failed but that is usually way more improbable that the altimeter failing. And even if they discarded the IMU measures I don't know what other sensors could be used to get at least the vehicle attitude. I think that after the saturation they were doomed and a software solution is not realistic.

Re:Schiaparelli landing investigation makes progress by redcalx on Thursday November 24, 2016 @07:26PM (#13033685)
> software solution is not realistic.

I would expect such a role to be holistic; to consider the entire system and ways it could fail. The boundaries between sub-systems would be high on the list of targets; software-software, software-hardware, hardware-hardware.

It's not a matter of siding with anyone, it's about accepting that an error has been made at some level, and asking if there are general purpose strategies for increasing the probability of identifying errors without having to build a simulation. Simulations of course have all the same problems - they're complex and therefore expensive and will contain defects.

Regarding the other point about probabilistic models compensating for sensor failures; it depends on which sensors fail and when. Parts of a descent are highly predictable, so e.g. if you know height and you're in free-fall then you can model pretty accurately where you're likely to be in +t seconds, and can use that as a prior for sensory input. OTOH if you're in the final landing stage using retro-thrusters then feedback sensors are paramount to doing landing correctly.

I accept that a probabilistic model would be more expensive to develop; initially anyway, and therefore may be unrealistic with the resources available.

Re:Schiaparelli landing investigation makes progress by Tomrn on Thursday November 24, 2016 @08:43AM (#13030273)
This reminds me of something I read a couple of years ago about an earth-orbit satellite collecting O-zone data.. when it encountered the 'hole' it ended up throwing away most of the data since it failed its 'common sense' test. Wish I could find the link.

In the case of an altimeter it makes sense to be aggressive with the 'common-sense' component to throw out bad data. But with other things like temperature, you wouldn't want to throw out data that could look wrong, but could actually be caused by some unknown phenomenon (like say, superheated gas pockets on mars) as that's exactly the type of weird stuff you'd be interested in.

I guess the problem is distinguishing [data that differs greatly from what was expected] and [data from a sensor malfunctions]

Re:Schiaparelli landing investigation makes progress by pvg on Thursday November 24, 2016 @12:58PM (#13031675)
It's just ozone, not a kind of zone.
Re:Schiaparelli landing investigation makes progress by grondilu on Thursday November 24, 2016 @06:51AM (#13029844)
Neat. There actually is a wikipedia entry about sensor fusion:

https://en.wikipedia.org/wiki/Sensor_fusion

TIL, thanks.

Re:Schiaparelli landing investigation makes progress by JohnStrange on Thursday November 24, 2016 @07:24AM (#13029952)
Yes, but maybe they should have implemented a more fault-tolerant system. With three different methods of determining altitude during decent, this problem shouldn't have occurred.
Re:Schiaparelli landing investigation makes progress by lmm on Thursday November 24, 2016 @10:10AM (#13030672)
> Kind of sad to see that computers nowadays still lack what we call common sense. I mean the machine received negative altimeter data but if it had been able to just look around, it could have seen that this data was erroneous. Hell, considering the descent profile was carefully prepared, the computer should also have noticed that it was way too early to reach the ground and should have concluded that something was wrong with the altitude measure.

Well, computer vision is a different issue. Imagine you're a human sealed inside this thing, with no vision from the outside. You reach the point when the parachute's supposed to deploy, you feel something goes wrong - there's a big force, or it's in the wrong direction. Did the parachute rip off? Did it fail? You look at your two altimeters; one says that you're 3.5km up, one says that you're at almost ground level (that it's negative is a red herring I think - the probe knows the readings might be noisy and expects to handle that). What do you do?

Re:Schiaparelli landing investigation makes progress by jobigoud on Thursday November 24, 2016 @01:18PM (#13031811)
I would look at the trajectory of data points so far. Can't expect the altitude to jump by several kilometers in a few seconds. Unless the two altimeters were always disagreeing but that doesn't seem to have been the case here.
Re:Schiaparelli landing investigation makes progress by ygra on Thursday November 24, 2016 @06:17AM (#13029733)
Well, common sense in a way would be enabled with assertions. But even if you know that you cannot be below ground, how would you recover? Your sensors clearly tell you that you're below ground, so what is the course of action? You have no way of knowing where you are, you just know that you don't know. It doesn't really change anything in the outcome. Sure, maybe you could go from altitude measurements to time measurements and most likely still leave a crater since it's not exact enough (there's a reason for the internal measurement instead of simpler ways, after all).

It would also require you to anticipate the malfunction in which case you already know that things like that could happen, in which case you'd likely determine how it could happen and how to avoid it and continue having useful data. Sounds to me like a better solution than trying to recover without data.

Re:Schiaparelli landing investigation makes progress by grondilu on Thursday November 24, 2016 @06:25AM (#13029762)
From the article:

> This in turn successively triggered a premature release of the parachute and the backshell, a brief firing of the braking thrusters and finally activation of the on-ground systems as if Schiaparelli had already landed.

It would have been better to do nothing, in the hope that the altimeter data will resume to reasonable values, especially since the article mentions that the error is not supposed to last long:

> Its output was generally as predicted except for this event, which persisted for about one second – longer than would be expected.

Re:Schiaparelli landing investigation makes progress by WalterBright on Thursday November 24, 2016 @06:27AM (#13029766)
There are several ways. First off, ignore the erroneous data. Then, estimate the altitude by other methods. As you mentioned, one way would be to integrate time and velocity.

All inputs and outputs should be run through sanity checks, with a plan for when they go wrong.

Essentially, when you've got a system that can't be fixed, plan for failure of each and every component (in isolation).

Re:Schiaparelli landing investigation makes progress by homero on Thursday November 24, 2016 @06:45AM (#13029817)
Cars do this, you can kill many sensors and an engine will still limp even with misfires. I guess consulting Bosch isn't an option tho
Re:Schiaparelli landing investigation makes progress by matheweis on Thursday November 24, 2016 @09:32AM (#13030471)
Not necessarily very well; my cars' mass airflow sensor went out a few months back... the performance was all over the place and sudden engine stalls were frequent. You could kill the engine just by accelerating quickly when it was cold.

... and that was a single sensor out.

Re:Schiaparelli landing investigation makes progress by TorKlingberg on Thursday November 24, 2016 @09:54AM (#13030588)
It helps that car engines don't really _need_ sensors to function. Cars existed before electronic sensors. A mars lander actually needs to know when to deploy parachutes.
Re:Schiaparelli landing investigation makes progress by WalterBright on Thursday November 24, 2016 @06:24PM (#13033423)
If the lander cannot function without an altimeter, and there is only one altimeter with no backup plan, then you can plan to lose the lander.

This is not a new idea. Airplanes cannot fly without instruments, and all the instruments have backups and alternate means. Everything deemed "flight critical" has a backup alternative.

Re:Schiaparelli landing investigation makes progress by gonzo on Thursday November 24, 2016 @06:57PM (#13033566)
You'll find that fuel injectors don't work well without input from the MAF and O2 sensor(s).
Re:Schiaparelli landing investigation makes progress by WalterBright on Thursday November 24, 2016 @09:21PM (#13034016)
True of modern EFI, but older mechanical fuel injectors did not have O2 sensors.
Re:Schiaparelli landing investigation makes progress by ethbro on Thursday November 24, 2016 @08:17AM (#13030156)
Some cars do this.

My friend's Honda literally stopped combustion when his battery died while driving (no, I have no idea how, but that was the diagnosis).

In contrast, I've limped my Miata along on alternator-only when the battery wouldn't hold a charge. Note: feathering the gas at a stop with brakes and clutch depressed to keep your spark from dying is an "interesting" experience.

Re:Schiaparelli landing investigation makes progress by dotancohen on Friday November 25, 2016 @01:41AM (#13034755)
At a stop pull the tranny out of gear and activate the parking brake.

More fun is driving a vehicle with no clutch: stalling at every stop and starting the motor in first gear, and shifting without clutching. I had to do that in my '83 280ZX in its last days.

Re:Schiaparelli landing investigation makes progress by acqq on Thursday November 24, 2016 @07:09AM (#13029898)
> your sensors clearly tell you that you're below ground

They weren't telling that. As far as I understood, the sensors were fully right, the software just hasn't expected the rotation to last "so long" -- the whole second, so it calculated the result wrong ("negative height") by incorrectly processing these multiple (in time) for their model unexpected inputs.

Re:Schiaparelli landing investigation makes progress by blutack on Thursday November 24, 2016 @07:15AM (#13029919)
For context, the lander did have a radar altimeter. A radar altimeter has maximum distance from ground above which it will not establish a lock.

If radar altimeter had never had a lock, either the radar altimeter has faulted in a way you can't detect, or you are above the lock range for your radar altimeter.

If the radar altimeter had locked, you have a very accurate measurement of height above ground.

Re:Schiaparelli landing investigation makes progress by moioci on Thursday November 24, 2016 @09:34AM (#13030487)
That's the surprising thing, though: "its radar Doppler altimeter functioned correctly and the measurements were included in the guidance, navigation and control system. "
Re:Schiaparelli landing investigation makes progress by pbhjpbhj on Thursday November 24, 2016 @11:42AM (#13031210)
And presumably mission time was in use too? Presumably they know to the (milli?)second when the lander should touchdown, at least from the point where the lander starts its descent. Time of flight send like a very strong, reliable signal?
Re:Schiaparelli landing investigation makes progress by dean on Thursday November 24, 2016 @01:09PM (#13031739)
Better to discard obviously bad data altogether. The system certainly should not act on that data, as seems to have been the case here.
Re:Schiaparelli landing investigation makes progress by mediocrejoker on Thursday November 24, 2016 @02:38PM (#13032294)
I would argue that at 1700 km/h, even not acting is an action. The decision to do nothing is still a decision.
Re:Schiaparelli landing investigation makes progress by simonh on Thursday November 24, 2016 @06:32AM (#13029783)
It's also not because the probe was constrained in terms of it's computing hardware. If you'd made the hardware a thousand times for powerful, it would have made zero difference to the 'smartness' of the software. Nor is it clear that applying the wonders of the modern AI age - Deep Blue, Watson, AphaGo, would help. They're massively optimized for the one task they're good at and completely useless at anything else.

This is why I'm deeply pessimistic about achieving human level AI any time soon, even within the next 100 years. I'm 50 years old today. AI researchers back when I was born expected to have substantially solved AI as a problem by now, but we're still barely scratching the surface of a very big domain. This accident is a really good demonstration of the limitations of modern computer systems in terms of autonomous independent situational awareness.

Re:Schiaparelli landing investigation makes progress by gonzo on Thursday November 24, 2016 @06:59PM (#13033574)
Happy Birthday
Re:Schiaparelli landing investigation makes progress by anvandare on Thursday November 24, 2016 @07:46AM (#13030020)
But what do you do when there is a bug with the hardware clock, or with the image analysis software that recognizes how far the ground is? Or, supposing you installed a laser measurement tool to gauge distance-to-ground level, with the software interpreting that? You could of course have quorums - with the majority of the systems deciding which solution (still a while to go / imminent crash!) is the correct one, but what if you had a problem with that part? And that's just the problem of figuring out that there is a problem.

>The first thing to do was to try to seal up the hole. This turned out to be impossible, because the ship’s sensors couldn’t see that there was a hole, and the supervisors, which should have said that the sensors weren’t working properly, weren’t working properly and kept saying that the sensors were fine. The ship could only deduce the existence of the hole from the fact that the robots had clearly fallen out of it, taking its spare brain-which would have enabled it to see the hole-with them.

You could stack layer upon layer of fault detecting modules and supervising software and error and redundancy modules, but then you'd probably wind up with something like Dark Star's Bomb 20:

>Unfortunately, Doolittle has mistakenly taught the bomb Cartesian doubt and, as a result, Bomb #20 determines that it can only trust itself and not external input. Convinced that only it exists, and that its sole purpose in life is to explode, Bomb #20 states "Let there be light," and promptly detonates.

Re:Schiaparelli landing investigation makes progress by ethbro on Thursday November 24, 2016 @08:21AM (#13030179)
There's some room between "sensor fusion is fragile enough that if a physical condition persists for an unexpected amount of time the craft is lost" and "all sensor faults can be handled."

Notably, this obviously wasn't a failure case they programmed for. But it does seem a pretty fragile system to throw across the solar system in retrospect.

Re:Schiaparelli landing investigation makes progress by Gmo on Thursday November 24, 2016 @09:40AM (#13030514)
I don't know how altitude is calculated on Mars, but, for instance, there are some landing strips of Schiphol Airport (Amsterdam) that are below sea level and I expect an altimeter to give a negative value there. But this value is correct though !

Not everything is as easy as it seems.

Re:Schiaparelli landing investigation makes progress by manarth on Thursday November 24, 2016 @10:03AM (#13030636)
There are two known ways of calculating altitude on Mars: firstly by atmospheric pressure, with an arbitrary value of 6.105mb chosen (based on readings from Voyager). In 2001, a new definition was chosen, based around an ellipsoid (the Areoid) formed by imaginary sphere of the mean radius of the planet.

The effect is that the intended landing site is at an altitude of -250m, and the lowest point on Mars is at an altitude of -8200m.

Re:Schiaparelli landing investigation makes progress by chewyfruitloop on Thursday November 24, 2016 @11:11AM (#13031001)
... or whoever wrote the code should have put boundary checks in to make sure a negative altitude was caught and handled properly
Re:Schiaparelli landing investigation makes progress by simosx on Thursday November 24, 2016 @06:26AM (#13029765)
It is an interesting problem and looks like a big extension to developing fault-tolerant software.

That is, how do you develop fault-tolerant software and at the same time have logic that would reject some sensor readings if they deviate too much from up-to-now readings?

How many readings would you reject in the hope that fresher readings would be better?

Re:Schiaparelli landing investigation makes progress by grondilu on Thursday November 24, 2016 @06:32AM (#13029784)
It's indeed a difficult problem and I'm not really surprised it's not solved by ESA even if they are probably extremely competent.

I doubt anyone care about my opinion, but since you ask, I do notice that simulation seems to be a big part of their development. So I'm sure there has to be a way to use some kind of an evolutionary algorithm for creating descent procedures.

Re:Schiaparelli landing investigation makes progress by NikolaeVarius on Thursday November 24, 2016 @08:40AM (#13030265)
I think this testing WAS that testing scenario to create better descent procedures
Re:Schiaparelli landing investigation makes progress by baq on Thursday November 24, 2016 @06:34AM (#13029788)
looks like a machine learning approach would be interesting to consider. not that i believe anybody will allow such an approach on a extraterrestial probe, but training a model to classify sensor data as trustworthy or not could lead to some advancement here and perhaps in other areas.
Re:Schiaparelli landing investigation makes progress by dkbrk on Thursday November 24, 2016 @08:46PM (#13033909)
Actually, the solution to this sort of problem is well understood: it's a combination of Bayesian probability theory and decision theory.

First, you define a Bayesian model for the system. This includes discrete propositions such as "sensor X is not working" as well as things like a description how the craft's velocity, angular velocity and displacement at t0 can evolve to at t1, expressed as a continuous probability distribution. This takes into account the prior distribution for altitude.

All sensor inputs have distributions -- generally gaussian -- describing what values they could read given the "actual" value they're supposed to be measuring if they're not broken and giving completely erroneous results.

Feeding sensor inputs into this model as they're received to produces a posterior describing the craft's physical state probabilistically. Dimensions which are relevant only insofar as they affect knowledge of the craft's physical state (such as "sensor X is not working") are marginalised out.

Secondly, you define a utility function. This function takes some definite physical state of the craft's and a possible control output, and describes how "good" the outcome of that is. Then you choose the control outputs that maximise the expected utility, integrated over the craft's posterior state distribution.

If sensor X started giving results unlikely under the time evolution model, P(Sensor X is not working|inputs,control signals,prior information) would start to increase very rapidly.

If, somewhow, this probability was only 0.5, but the sensor was showing results that the craft was below the ground, the decision process would "decide" that "if sensor X is telling the truth, firing the landing thrusters will not lead to successful mission completion; if sensor X is lying it is too early to fire the landing thrusters" and not fire the thrusters.

In reality, such a situation is absurd because sensor X showing the craft below the ground would lead to an extremely high probability for "sensor X is not working". However, the point is that even under extremely pathological conditions decision theory will continue to give reasonable results.

One important consequence to note is that the sensor readings and state estimate do not matter in themselves, only as inputs to the decision theory process.

To answer your specific question: if sensor X is determined to be, with high probability, faulty, its inputs aren't "discarded" per se, but will have a very small contribution to the state estimate. If sensor X is only believed to be faulty with moderate probability, both possibilities are considered and the optimal decision will be made given the information available and utility function.

For more information, I recommend reading chapters 13 and 14 of "Probability Theory: The Logic of Science" by E.T. Jaynes [0].

[0]: http://www.med.mcgill.ca/epidemiology/hanley/bios601/Gaussia...