Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void ExpAverageFilter(TVec *Data, double &State, double Decay = 50); | Filter data with an exponential average filter. |
| 2 | double ExpAverageFilter(const double Data, double &State, double Decay = 50); | Filter data with an exponential averaging filter. |
| 3 | void ExpAverageFilter(TVec *Data, TCplx &State, double Decay = 50); | Filter data with an exponential average filter. |
| 4 | void ExpAverageFilter(double Decay, TVec *Num, TVec *Den); | Design an exponential filter with Decay parameter and place the transfer function in Num (numerator) and Den (denominator). |
Overload 1: void ExpAverageFilter(TVec *Data, double &State, double Decay = 50);
Filter data with an exponential average filter.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Data | TVec * | |
| 2 | State | double & | |
| 3 | Decay = 50 | double |
Exponential average filter without the TIirState structure. The function can be called to filter sample by sample. Initialize the State to 0 on the first call. Decay defines the decay from sample to sample and is initialized to 50% by default. With each new sample, the filter will take average from the 50% of the new sample and 50% of the previous average. The exponential average filter implements the following difference equation:
y[i] = 1/d * x[i] + (d-1)/d * y[i-1] x.. input signal y.. output signal d.. Decay factor In terms of percentage: y[i] = a * x[i] + b * y[i-1] , a + b = 1 a*100 ... percent of the new data used. b*100 ... percent of the old average used to compute the new average.
Overload 2: double ExpAverageFilter(const double Data, double &State, double Decay = 50);
Filter data with an exponential averaging filter.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Data | const double | |
| 2 | State | double & | |
| 3 | Decay = 50 | double |
Single sample non-vectorized variant of the exponential averaging.
Overload 3: void ExpAverageFilter(TVec *Data, TCplx &State, double Decay = 50);
Filter data with an exponential average filter.
Exponential average filter without the TIirState structure for complex data.
Overload 4: void ExpAverageFilter(double Decay, TVec *Num, TVec *Den);
Design an exponential filter with Decay parameter and place the transfer function in Num (numerator) and Den (denominator).
Transfer function can be used to initialize an IIR filter by passing num and den to the IirInit routine.