This is the same equation as that for an exponential smoothing filter which is a highly useful and low-computation smoothing technique similar to, but generally better than, an N-point average. A starting point for k is 0.5, which is roughly equal to a 4-point average.]
The formula for a first order lag filter is fairly simple:
new_filtered_value = k * raw_sensor_value + (1 - k) * old_filtered_value
The "magic" is determining an approprate value for k.
Calculate k
To calculate k, enter Tr, Ts and Frac from above into the following equation:k = 1 - eln(1 - Frac) * Ts / TrFor details, see http://my.execpc.com/~steidl/robotics/first_order_lag_filter.html
No comments:
Post a Comment