|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.oregondsp.signalProcessing.filter.iir.SecondOrderSection
public class SecondOrderSection
Class to implement a second order section - basic unit of an Infinite Impulse Response digital filter.
Implements the finite difference equation:
y[n] = -a[1]*y[n-1] - a[2]*y[n-2] + b[0]*x[n] + b[1]*x[n-1] + b[2]*x[n-2]
Constructor Summary | |
---|---|
SecondOrderSection(double b0,
double b1,
double b2,
double a1,
double a2)
Instantiates a new second order section, with values for the numerator and denominator coefficients. |
Method Summary | |
---|---|
float |
filter(float x)
Filters a single input sample (single-step filtering). |
void |
filter(float[] x,
float[] y)
Filters a sequence of input samples. |
void |
initialize()
Initializes states to zero. |
void |
print(java.io.PrintStream ps)
Prints the filter coefficients and states. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecondOrderSection(double b0, double b1, double b2, double a1, double a2)
b0
- Numerator coefficient b[0].b1
- Numerator coefficient b[1].b2
- Numerator coefficient b[2].a1
- Denominator coefficient a[1].a2
- Denominator coefficient a[2].Method Detail |
---|
public void initialize()
public float filter(float x)
x
- float containing value of the single input sample.
public void filter(float[] x, float[] y)
x
- float[] containing the sequence of input samples.y
- float[] containing the filtered result. May be the same array as x.public void print(java.io.PrintStream ps)
ps
- PrintStream to which the filter coefficients and states are printed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |