Dual sensor error detection

Thread Starter

side-flip

Joined Dec 10, 2013
3
Hello everyone,

I am doing a project at university and it requires two sensors to measure the same thing for safety purposes and what i am stuck on is how to figure out which one has failed if one does fail, because the micro doesnt know which is right and wrong.

Is there a way to attempt to find the faulty signal?
 

crutschow

Joined Mar 14, 2008
34,282
Normally if you are concerned about safety, then you use three sensors and use a voting circuit to toss out the bad reading from a failed sensor (and notify the operator of the failure).

With two sensors the only thing to do, if it's a safety issue, would be to use a fail-safe approach and respond to the sensor that indicates a bad/unsafe condition, even if that signal is in error.
 

ronv

Joined Nov 12, 2008
3,770
The other possibility is if the sensors have boundaries. Then you could throw out the one outside the boundary.
 

#12

Joined Nov 30, 2010
18,224
Yes. Risky business. I can remember telling a customer, "Either that is impossible and you are wrong, or it's very, very bad and I'll be there in 20 minutes."
 

THE_RB

Joined Feb 11, 2008
5,438
Any fail tests that work on a single sensor will be valid for testing a sensor pair.

For example; common faults are a short or open circuit of the sensor wire, so instead of the sensor giving an analogue voltage it will fix to 0v or 5v.

Or a sensor with intermittant fail might have large fluctuations in readings (high rate of change) compared to the slowly ramping rate of change of a good sensor.
 

Thread Starter

side-flip

Joined Dec 10, 2013
3
i have thought about adding the 3rd sensor, but then i think about industry use and most companies wont add a third one for cost and space issues i think :/

and yeah i if the values are out of range then it's straight forward to eliminate the faulty signal but if it's only off by a signal by a small amount the it's a problem because the uC is still confused so the problem again is a way to some how create a way to detect the faulty one...

from the work i have done, i feel it's impossible to figure out which one is wrong if it's only a small change.

The only possibility i can think of is to keep comparing the last value recieved and if one changes by more than a set margin then thats the faulty one, but im not sure...

any other tricks which may catch a faulty one?
 

crutschow

Joined Mar 14, 2008
34,282
I think the best solution for two sensors, from a safety point-of-view, is to respond to either signal if it indicates a fault, even if that may give a false warning.
 

tshuck

Joined Oct 18, 2012
3,534
Also, you might use redundant sensors that sense the variable using different technologies, making the reading more immune to to limitations of a single sensor type (e.g. using ultrasonic and laser rangefinders to determine distance when acoustic reflections may give false readings, but the laser will measure it properly, given line of sight).
 

Thread Starter

side-flip

Joined Dec 10, 2013
3
that's a valid point you made but using different technology won't help the micro figure out which one is wrong if both outputs are still within the range but one is wrong :/
 

tshuck

Joined Oct 18, 2012
3,534
that's a valid point you made but using different technology won't help the micro figure out which one is wrong if both outputs are still within the range but one is wrong :/
Yes, but you can weigh the validity of the outputs based on which technology is less likely to fail. This sounds like you may want to look at sensor fusion. There are numerous papers regarding sensor fusion and using it to minimize potential failures.

Ultimately, there is always a chance that all of your sensors will fail and provide seemingly valid data. Sensor redundancies help minimize this risk, but it is impossible to mitigate entirely. It its up to you, the designer, to weigh the added cost of the sensors against added benefit of adding another redundant sensor.
 

THE_RB

Joined Feb 11, 2008
5,438
(re my suggestions); Which is why you need at least three sensors for proper redundancy, so you can set up a majority vote.
From my background in repair I've had a lot of experience in sensor fail.

It's rare for a sensor to fail slightly (ie work normally but give a slightly different reading). Normally they fail badly or produce noise, or with a common intermittant fault in thermistors etc the sensor reading jumps higher or lower at times, which can be detected as a high rate of change.

The points I mentioned are valid and will easily detect any of those faults, because the microcontroller etc can detect errors like rate of change and noise.

The only situation that requires 3 sensor voting is if one sensor is working very normally but gives a slightly different reading to the other two. And like I said, that type of sensor is a rarer situation than the majority of sensor faults. Since that situation had already been covered and solved I was providing other solutions applicable to the two sensor application. :)
 
Last edited:

MikeML

Joined Oct 2, 2009
5,444
Do it the way that it is done in aircraft. Run one gyro on engine vacuum; another on electrics. Run one navigation system on the alternator, another on battery backup.

It not about having two sensors, it is about having two types of sensors that are powered differently that show similar info...
 
Last edited:

crutschow

Joined Mar 14, 2008
34,282
Do it the way that it is done in aircraft. Run one gyro on engine vacuum; another on electrics. Run one navigation system on the alternator, another on battery backup.

It not about having two sensors, it is about having two types of sensors that are powered differently that show similar info...
That improves redundancy. But you still have to determine which one is right if they disagree. ;)
 
Top