Filtering Phidget Data - Possible?


#1

Have set up a sensor array that I would like to use to trigger events in intutiface.

The sensors are running through a phidget interface, and intuiface is doing a great job taking in the raw data.

Unfortunately the sensors are analog and a bit noisy. Using a threshold to activate a trigger is resulting in too many false positives. However, the data are very stable and consistant when I have a true positive.

Is there a way to set up a weighted average for a number of samples of the incoming data?

Or some other way to filter out false positives that I might not have looked at?


#2

Now I have set up a rather ugly solution which increments a counter whenever the data from a given sensor goes above a threshold or decrements the counter if it goes below. Then I set a second threshold on the counter, which activates a trigger to do what I want to do.

It is more stable than the unfiltered version, but not as stable as I would like.

I am using the triggers to move assets around, and the interaction still feels jittery, with assets sometimes moving unexpectedly/randomly.


#3

Hi Philippe,

Could you tell us more about your hardware setup: what kind of sensors are you using, how many of them and what’s their global purpose?

Before trying to solve the noise issue, it would help to understand why you get so much noise.

Regarding the Phidget sensor IA, one of the “easiest” and most rosbust solution to add some threshold mechanism would be to modify the source code if the IA and adapt it to your need.

Seb


#4

I am using 8 analog IR distance sensors arrayed along the edge of a table at 9 inch intervals. They track the position of a user across the width of the table so that the content displayed on the table moves with them.

A bit more on the set up, the sensors are not drawing power through the phidget, but rather from a large external power supply. The phidget is drawing power through usb. I have put a 0.1 micro farad capacitor across power and ground at each sensor (lower than I’d like but it’s what I had on hand).

I believe they are picking up a lot of noise because when no one is there they are just pointing outward into the room where IR is bouncing around and reflecting of the various other surfaces in the room that I am not trying to track. When there is something to detect in their range, the signal is not noisy at all.

I’ll look at modifying the source code, but this is my first foray into C# and it is a bit daunting.


#5

Hi Philippe,

Which is your sensor model ?
Few month ago, we have made some internal tests with similar use case (detect user presence in front of a kiosk). The Sharp distances sensors, ref 3520_0 (4-30cm) and ref 3521_0 (10-80cm), have given good results.

Jérôme


#6

I am using almost identical sharp sensors.

You did not need to do any filtering?


#7

Under good conditions, without IR disturbance, and good sensor hardware integration, those sensors have a good output signal.
During our tests we have not use a real signal filtering, but yes a little bit of code on IA side, necessary if you want an high accurate and a perfect detection.
Use a simple hysteresis. Controlled with two paramaters, first: the distance value to detect presence, and second: distance value to detect absence. Meaning that it is necessary to be sufficiently close to be detected, and sufficiently far to not (could be also implemented with Intuiface triggers).
To consolidate the system (and avoid false triggers) you could add two others control parameters, a delay after which the presence trigger will be really triggered, and a delay after which the absence trigger will be really triggered.

Jérôme


#8

How short a delay can I program with Intuiface? I took a look at the timers and they seem to only work in increments of 1 second, which seems to long for an activation trigger. Do they work on shorter intervals?


#9

Hi Philippe,

Yes the Chronometer or Countdown IA only work in increments of 1 second.
The delay (and also hysteresis) must be implemented directly on the IA .NET code.

Jérôme