com.oregondsp.signalProcessing.filter.iir
Class AnalogPrototype

java.lang.Object
  extended by com.oregondsp.signalProcessing.filter.iir.AnalogPrototype
Direct Known Subclasses:
AnalogButterworth, AnalogChebyshevI, AnalogChebyshevII

public class AnalogPrototype
extends java.lang.Object

Base class, with partial implementation, for analog prototype filters.

Author:
David B. Harris, Deschutes Signal Processing LLC

Constructor Summary
AnalogPrototype()
          Default constructor for a new analog prototype.
 
Method Summary
 void addSection(Rational R)
          Method to add a second order section to the analog prototype representation.
 Rational getSection(int index)
          Accessor for second order sections in the prototype representation.
 Rational getTransferFunction()
          Accessor for the transfer function representation for the filter.
 AnalogPrototype lptobp(double omega1, double omega2)
          Converts a lowpass analog prototype with cutoff at 1 rad/sec to a bandpass filter with specified cutoffs.
 AnalogPrototype lptohp(double omega0)
          Converts a lowpass analog prototype with cutoff at 1 rad/sec to a highpass filter with a new cutoff.
 AnalogPrototype lptolp(double omega0)
          Converts a lowpass prototype with cutoff at 1 rad/sec to lowpass with a new cutoff frequency.
 int nSections()
          Returns the number of second order sections in the analog prototype representation.
 void print(java.io.PrintStream ps)
          Prints the coefficients of the second-order section factors of this analog prototype filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnalogPrototype

public AnalogPrototype()
Default constructor for a new analog prototype. Instantiates an analog prototype with no second order sections. This constructor is called by the super() methods in subclasses.

Method Detail

addSection

public void addSection(Rational R)
Method to add a second order section to the analog prototype representation.

Parameters:
R - Rational object containing a second order section representation.

nSections

public int nSections()
Returns the number of second order sections in the analog prototype representation.

Returns:
int containing the number of second order sections.

getSection

public Rational getSection(int index)
Accessor for second order sections in the prototype representation.

Parameters:
index - int specifying the desired second order section.
Returns:
Rational object containing the representation of the desired section.

lptolp

public AnalogPrototype lptolp(double omega0)
Converts a lowpass prototype with cutoff at 1 rad/sec to lowpass with a new cutoff frequency.

Parameters:
omega0 - double specifying the cutoff of the transformed lowpass prototype filter.
Returns:
AnalogPrototype object containing the transformed filter representation.

lptohp

public AnalogPrototype lptohp(double omega0)
Converts a lowpass analog prototype with cutoff at 1 rad/sec to a highpass filter with a new cutoff.

Parameters:
omega0 - double specifying the desired new cutoff frequency - now a low cutoff.
Returns:
AnalogPrototype object containing the transformed filter representation.

lptobp

public AnalogPrototype lptobp(double omega1,
                              double omega2)
Converts a lowpass analog prototype with cutoff at 1 rad/sec to a bandpass filter with specified cutoffs.

Parameters:
omega1 - double containing the low cutoff frequency in radians/sec.
omega2 - double containing the high cutoff frequency in radians/sec.
Returns:
AnalogPrototype object containing the transformed filter representation.

getTransferFunction

public Rational getTransferFunction()
Accessor for the transfer function representation for the filter.

Returns:
Rational object containing the transfer function representation for the filter.

print

public void print(java.io.PrintStream ps)
Prints the coefficients of the second-order section factors of this analog prototype filter.

Parameters:
ps - PrintStream to which the representation is printed.