![]() smoothingFactor is between 0.0 (no smoothing) and 0.9999. ![]() This includes the "steady state" (0 Hz) component, so typically the output will represent short term changes in the input.Ī very crude high pass filter: for (i = 1 i < N ++i)Īn Exponential Moving Average Infinite Impulse Response (IIR) can achieve smoother results at a lower price than it's corresponding Finite Impulse Response (FIR) filter of the same magnitude would. Note that the frequency response of such a moving average filter is fairly poor - it's find for some fairly simple tasks, such as filtering noise from time series data such as stock prices, but for more demanding applications we typically use a more sophisticated filter design.Ī high pass filter is the complement of a low pass filter, in that it filters out the low frequency components. Output = (input + input + input) / 3 Īs you increase M you get more smoothing (because you're averaging more points) - another way of looking at this is that more of the high frequency components of your data (typically noise) are removed. For each output data point you take the average of N input points, e.g. A moving average of M data points is simple but fairly crude low pass filter which smooths the data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |