Dual sensor error detection

Discussion in 'The Projects Forum' started by side-flip, Dec 10, 2013.

  1. side-flip

    Thread Starter New Member

    Dec 10, 2013
    3
    0
    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?
     
  2. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    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.
     
  3. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,281
    1,232
    The other possibility is if the sensors have boundaries. Then you could throw out the one outside the boundary.
     
  4. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    That works for a gross failure but not if the failure generates a false condition within the boundaries.
     
  5. #12

    Expert

    Nov 30, 2010
    16,252
    6,751
    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."
     
  6. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    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.
     
  7. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    Which is why you need at least three sensors for proper redundancy, so you can set up a majority vote.
     
  8. side-flip

    Thread Starter New Member

    Dec 10, 2013
    3
    0
    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?
     
  9. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    I you can point out for any kind of sensor, otherwise it won't have any help.
     
  10. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    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.
     
  11. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,281
    1,232
    Or think about it this way.. With twice as much stuff it will be twice as likely that one will fail.:eek:
     
  12. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    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).
     
  13. side-flip

    Thread Starter New Member

    Dec 10, 2013
    3
    0
    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 :/
     
  14. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,281
    1,232
    Nope, you need a VP to break the tie.
     
  15. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    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.
     
  16. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    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: Dec 12, 2013
  17. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    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: Dec 12, 2013
  18. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    That improves redundancy. But you still have to determine which one is right if they disagree. ;)
     
  19. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Right, that is up to the Pilot
     
  20. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    Which, in this case, is the μP. So the trick is to try to get the μP as smart as the Pilot in recognizing which is the correct reading.
     
Loading...