I want to smooth the compass sensor data of a smartphone using the low pass filter and want to calculate the smoothing parameter for the low pass filter implementation.
I have a question concerning one of the question/post available on this forum
In the above post, author wants to smooth the sensor data using low pass filter and suggested to set the smoothing parameter (ALPHA) according to the needs. The smoothing parameter should lie between 0-1. The value near to 0 is smooth in the data.
Therefore, the author used the ALPHA = 0.15.
According to my opinion and scientifically one can not do this by closing the eyes and picking a random value from 0 to 1.
So my question is how to calculate the smoothing parameter (ALPHA), while my sampling rate is 100Hz. According to my opinion this smoothing parameter is different for different sampling rate. Therefore the guess or analysis of the smoothing parameter will not work in real time.
Therefore, I am looking for how to calculate the smoothing parameter for low pass filter. In this regard, I have seen this interesting presentation
On page 13 one can see the formula to calculate the smoothing parameter if one know the Time constant(Tau)
The formula to calculate the Tau= Capacitance * Resistance
from the data sheet of the electronics compass AK8974, I have calculated the Resistance and capacitance and calculated the (Tau)
knowing the Tau let easily calculation of the smoothing parameter using the following formula
ALPHA=Tau/Tau+deltaT
The value of ALPHA in my case is (0.00714)
I want opinions about the calculation of the time constant (Tau) and smoothing parameter. Is this the correct way to do justify the smoothing parameter? Is there any other way?