meta data for this page
  •  

This is an old revision of the document!


Low-pass filters

IIR

y[i] :=  ß * x[i] + (1-ß) * y[i-1]

From Wiki: This discrete-time implementation of a simple RC low-pass filter is the exponentially weighted moving average (aka Exponential smoothing)

Exponential smoothing:
y[i] :=  y[i-1] +  α * (x[i] - y[i-1])
where  α = (1-ß) (from above)
#define ALPHA_PERCENT 60
int16_t exponential_smoothing(int16_t input, int16_t old_value) {
    int32_t val = old_value;
    int32_t diff = input - old_value;
 
    val += (ALPHA_PERCENT * diff) / 100;
    return val;
}

Change detection

aka: anomaly detection

CuSum

CUSUM - Cumulative sum control chart