class IIRFilter : public Pipe Digital IIR filter implementation API
| | IIRFilter (void) Default constructor. |
| | IIRFilter (double design_sample_rate) Default constructor. |
| | IIRFilter (unsigned int npoles, const dComplex* pole, unsigned int nzeros, const dComplex* zero, double design_sample_rate) Constructor from poles and zeros |
| | IIRFilter (unsigned int npoles, const dComplex* pole, unsigned int nzeros, const dComplex* zero, double design_sample_rate, double gain) Constructor from poles and zeros |
| | operator= (const IIRFilter& f) Assign filter characteristics from one IIR filter to another |
| | operator*= ( const IIRFilter& f ) Add an other IIRFilter to this one |
| | operator*= ( const IIRSos& sos ) Add a single second order section to an IIR filter |
| | operator*= ( const double& gainfactor ) Multiply filter gain by a numerical factor |
| | IIRFilter (const IIRFilter& f) copy constructor |
| | init (unsigned int npoles, const dComplex* pole, unsigned int nzeros, const dComplex* zero, double design_sample_rate, double gain) This function sets the pole and zero frequencies of the filter and the filter gain |
| | dumpSosData (std::ostream& output) const Print the values of the second order section coefficients |
| | dumpSPlaneRoots (std::ostream& output) const Print the root values |
| | ~IIRFilter (void) Default destructor. |
| | clone (void) const Clone the filter. |
| | apply (const TSeries& data_in) Apply filter to a timeseries. |
| | dataCheck (const TSeries& data_in) const Check data integrity |
| | reset (void) Not implemented. |
| | inUse (void) const Check filter for coefficients, history buffers. |
| | getStartTime (void) const Get data start time. |
| | getCurrentTime (void) const Get start time for current data. |
| | getOrder (void) const Filter order. |
| | hasSRepresentation (void) const Check if filter has s-plane representation. |
| | getRealPoles (void) const Real pole list. |
| | getComplexPoles (void) const Complex pole list. |
| | getRealZeros (void) const Real zero list. |
| | getComplexZeros (void) const Complex zero list. |
| | getGain (void) const Gain. |
| | getFSample (void) const Sampling rate . |
| | isInvertible (void) const Check if filter is invertible. |
| | getSOS (void) const SOS list. |
| | xfer (fComplex& coeff, double f) const Get a transfer coefficent of a Filter. |
IIR Filter implements digital IIR (Infinite Impulse Response) filters. An object of class IIRFilter is constructed by specifying the positions of the filter poles and zeros in the S plane and the sampling rate of the data. Any TSeries object can be filtered. Note that error trapping to spot gaps between successive TSeries inputs applied to the same filter is not yet implemented.
explicit IIRFilter(double design_sample_rate)
IIRFilter(unsigned int npoles, const dComplex* pole, unsigned int nzeros, const dComplex* zero, double design_sample_rate)
H(s) = \frac{(s - s_1)(s - s_2) \cdots}{(s - p_1)(s - p_2) \cdots}$$
pole - An array of type dComplex containing the list of poles.
Note that where a complex pole is in the list, its complex conjugate
must also be in the list. The convention for root specification is
the same as for Matlab, except that matlab expresses s plane values
in
whereas here s plane values are in Hz.
So to enter
Matlab generated poles and zeros with this software, divide real and
imaginary parts by
.
nzeros. - The number of zeros.
zero - An array of type dComplex containing the list of zeros.
See comment above for pole specification.
design_sample_rate - The sampling rate of the channel to be
filtered, in Hz.
IIRFilter(unsigned int npoles, const dComplex* pole, unsigned int nzeros, const dComplex* zero, double design_sample_rate, double gain)
pole - An array of type dComplex containing the list of poles.
Note that where a complex pole is in the list, its complex conjugate
must also be in the list. The convention for root specification is
the same as for Matlab, except that matlab expresses s plane values
in
whereas here s plane values are in Hz.
So to enter
Matlab generated poles and zeros with this software, divide real and
imaginary parts by
.
nzeros. - The number of zeros.
zero - An array of type dComplex containing the list of zeros.
See comment above for pole specification.
gain - The gain of the filter.
design_sample_rate - The sampling rate of the channel to be
filtered, in Hz.
IIRFilter& operator=(const IIRFilter& f)
IIRFilter& operator*=( const IIRFilter& f )
IIRFilter& operator*=( const IIRSos& sos )
IIRFilter& operator*=( const double& gainfactor )
IIRFilter(const IIRFilter& f)
void init(unsigned int npoles, const dComplex* pole, unsigned int nzeros, const dComplex* zero, double design_sample_rate, double gain)
. See documentation for constructors for details on how to
initialize filters.
int dumpSosData(std::ostream& output) const
int dumpSPlaneRoots(std::ostream& output) const
~IIRFilter(void)
IIRFilter* clone(void) const
TSeries apply(const TSeries& data_in)
void dataCheck(const TSeries& data_in) const
void reset(void)
bool inUse(void) const
Time getStartTime(void) const
Time getCurrentTime(void) const
unsigned getOrder(void) const
bool hasSRepresentation(void) const
const std::vector <double> & getRealPoles(void) const
const std::vector <dComplex> & getComplexPoles(void) const
const std::vector <double> & getRealZeros(void) const
const std::vector <dComplex> & getComplexZeros(void) const
double getGain(void) const
double getFSample(void) const
bool isInvertible(void) const
const std::vector <IIRSos> & getSOS(void) const
bool xfer(fComplex& coeff, double f) const
f - Frequency at which to sample the transfer function.
alphabetic index hierarchy of classes
Please send questions and comments to zweizig_j@ligo.caltech.edu
generated by doc++