Ah….. that noise

Accelerometers are notoriously noisy, as most sensors are, and this inevitably will generate inaccuracies. PhoneLabs is about tool building and we need to figure out how best to deal with noise. There are many ways to do it.

Lets get some data

I swung my phone around for about 7 seconds and this is what was emailed to me by  the Physics Tool Box app.

noise

 

Hope you can see some noise. Lets try averaging it.

 

 

 

 

 

 

 

 Averaging

smooth

We can find averages in Excel by using = AVERAGE( ). Lets try averaging 3, 10, and 20 readings. Now you can see the data getting smother, but its shifting or a small delay is caused by averaging. So this is just one simple way of reducing noise.There is another way.

 

 

 

 

.

Low Pass Filter

As Explained in Raw Engineering > “A low-pass filter passes low-frequency signals/values and attenuates (reduces the amplitude of) signals/values with frequencies higher than the cutoff frequency.”

…. and it seems to be easy as it is based on this formula :

y[ i ] : = y[ i-1 ] + Alpha*( x[ i ] – y[ i-1 ] )

 

smooth_lowSo I tried it out. Here is what I got when I set  Alpha value to 0.05, 0.1 and 0.2 .

It worked nicely. But there is a little shift in the other direction (not sure why). The noisy kinks are gone for sure.

So we now know how to get rid of noise.

 

.

.

You can download this data in Excel and have a play.