- class Filter
One dimensional extended Kalman filter.
|iQ||process noise covariance|
|iR||measurement noise covariance|
The default arguments should work fine for most signal filtering. It won't hurt to graph your signal and the filtered result, and check if the filter is doing its job.
Q is the covariance of the process noise and R is the covariance of the observation noise. The default values for Q and R should be a modest balance between trust in the sensor and FIR filtering.
Think of R as how noisy your sensor is. Its value can be found mathematically by computing the standard deviation of your sensor reading vs. "truth" (of course, "truth" is still an estimate; try to calibrate your robot in a controlled setting where you can minimize the error in what "truth" is).
Think of Q as how noisy your model is. It decides how much "smoothing" the filter does and how far it lags behind the true signal. This parameter is most often used as a "tuning" parameter to adjust the response of the filter.
EKFFilter:: filter(double ireading) override
Filters a value, like a sensor reading.
Assumes the control input is zero.
EKFFilter:: filter(double ireading,
double icontrol) virtual
Filters a reading with a control input.
EKFFilter:: getOutput() const override
Returns the previous output from filter.
|Returns||the previous output from filter|