public class IirFilter extends Object implements SignalFilter
Filter schema: Wikipedia
Formula:
y[i] = x[i] * b[0] + x[i-1] * b[1] + x[i-2] * b[2] + ... - y[i-1] * a[1] - y[i-2] * a[2] - ...(x = input, y = output, a and b = filter coefficients, a[0] must be 1)
Constructor and Description |
---|
IirFilter(IirFilterCoefficients coeffs)
Creates an IIR filter.
|
Modifier and Type | Method and Description |
---|---|
double |
step(double inputValue)
Processes an input signal value and returns the next output signal value.
|
public IirFilter(IirFilterCoefficients coeffs)
coeffs
- The A and B coefficients. a[0] must be 1.public double step(double inputValue)
SignalFilter
step
in interface SignalFilter