|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.oregondsp.signalProcessing.filter.iir.Allpass
public class Allpass
Allpass filter class.
Implements a digital allpass filter, using a lattice structure implementation. Allpass filters have unit gain by construction, and are used to alter the phase of signals with altering their magnitude responses.
An allpass filter has the form: z-N AN(z-1) / AN(z), where N is the order of the filter and AN(z) is a polynomial. The numerator polynomial is a "reflection" of the denominator polynomial. If
AN(z) = a0 + a1*z-1 + a2*z-2 + ... + aN*z-N
then the numerator has the following form:
z-N AN(z-1) = aN + aN-1*z-1) + ... + a0*z-N
The allpass filter is represented internally as a set of reflection coefficients. These are numbers k in the open interval (-1, 1) and define AN(z) by the recursion:
Ai(z) = Ai-1(z) + z-i*k(i)*Ai-1(z-1) i = 1, ..., N
A0(z) = 1
Constructor Summary | |
---|---|
Allpass(double[] k)
Instantiates a new allpass filter object from a double[] containing the reflection coefficients. |
|
Allpass(int order)
Instantiates a new allpass filter of a given order with zero reflection coefficients. |
|
Allpass(Polynomial A)
Instantiates a new allpass filter object from a Polynomial representing the allpass denominator. |
Method Summary | |
---|---|
Complex |
evaluate(double omega)
Evaluate the filters response at digital frequency omega, element of [0, pi]. |
float |
filter(float x)
Filters a single sample of a sequence. |
void |
filter(float[] x)
Filters a sequence or a segment of a sequence contained in a float array. |
double |
groupDelay(double Omega)
Evaluates the group delay of the allpass filter at digital frequency Omega, element of [0, pi]. |
void |
initialize()
Initializes the states of the filter to zero. |
void |
print(java.io.PrintStream ps)
Prints the reflection coefficients defining this allpass filter and the state vector. |
Rational |
rationalRepresentation()
Accessor for the Rational representation of this allpass filter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Allpass(int order)
order
- int containing the order of the filter.public Allpass(Polynomial A)
A
- Polynomial object containing the polynomial coefficient representation for the allpass filter.public Allpass(double[] k)
k
- double[] containing the reflection coefficients.Method Detail |
---|
public void initialize()
public float filter(float x)
x
- float containing the single sample of a sequence.
public void filter(float[] x)
x
- float[] containing the sequence or segment of a sequence upon call. Contains
the filtered array following the call.public Complex evaluate(double omega)
omega
- double specifying the discrete frequency for evaluation.
public double groupDelay(double Omega)
Omega
- double containing the discrete frequency for evaluation of the group delay.
public Rational rationalRepresentation()
public void print(java.io.PrintStream ps)
ps
- PrintStream to which the allpass filter description is printed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |