I would like to apply a Kalman filter to remove noise from my measured acceleration data. The idea is then to compare the results obtained in this way whit the results obtained by applying a low-pass filter.
So, the Kalman filter equations are the following:
$x_k = Ax_{k-1}+q_{k-1}$
$z_k = Hx_k+r_k$
where $x$ is the state vector, $A$ is the transition matrix, $z$ is the vector of measurements and $H$ the observation matrix. $q$ and $r$ represent the process and measurement noise respectively.
Since I am working with one signal only (acceleration), the state vector $x$ is actually a scalar entity and so are all the other terms in the previous equations. In my case I had $A = 1$ and $H = 1$.
My understanding of the Kalman filter is that it computes an estimate of the input signal, therefore it is not a proper filter. So what I have to tune to smoothen the measured data is the $Q$ value (process noise covariance) in order to change the way in which the signal is estimated. The idea is to have a "worse" estimate in such a way that the peaks introduced by the noise are removed from the signal (which means the filter follows the original signal less accurately).
Is this the correct way to procede?