SPUC  3.0
Public Member Functions | Protected Attributes | List of all members
SPUC::iir_lpf1< Numeric, Coeff > Class Template Reference

Template Class for 1st Order lowpass iir filter. More...

#include <iir_lpf1.h>

Inheritance diagram for SPUC::iir_lpf1< Numeric, Coeff >:
Inheritance graph
[legend]
Collaboration diagram for SPUC::iir_lpf1< Numeric, Coeff >:
Collaboration graph
[legend]

Public Member Functions

 iir_lpf1 (Coeff A=0, long b=0)
 
void set_coeff (Coeff A)
 
void set_round_bits (long x)
 
 iir_lpf1 (const char *file)
 Constructor reading coefficient from a file. More...
 
void print ()
 Print out coefficients. More...
 
Numeric clock (Numeric input)
 Input new sample and calculate output. More...
 
void reset ()
 Reset. More...
 

Protected Attributes

Coeff gain
 
Numeric out
 
Numeric previous_out
 
Numeric previous_in
 
quantiser< Numeric > Q
 

Detailed Description

template<class Numeric, class Coeff = float_type>
class SPUC::iir_lpf1< Numeric, Coeff >

Template Class for 1st Order lowpass iir filter.

The filter is the first order low pass digital filter given by $ G(z) = \frac{1+z^-1}{1-az^-1} $

where a is real and |a| < 1 Note: Not normalized

Author
Tony Kirke

Constructor & Destructor Documentation

template<class Numeric, class Coeff = float_type>
SPUC::iir_lpf1< Numeric, Coeff >::iir_lpf1 ( Coeff  A = 0,
long  b = 0 
)
inline
template<class Numeric, class Coeff = float_type>
SPUC::iir_lpf1< Numeric, Coeff >::iir_lpf1 ( const char *  file)
inline

Constructor reading coefficient from a file.

References SPUC::iir_lpf1< Numeric, Coeff >::gain.

Member Function Documentation

template<class Numeric, class Coeff = float_type>
Numeric SPUC::iir_lpf1< Numeric, Coeff >::clock ( Numeric  input)
inline
template<class Numeric, class Coeff = float_type>
void SPUC::iir_lpf1< Numeric, Coeff >::print ( void  )
inline

Print out coefficients.

Referenced by SPUC::iir< Numeric, Coeff >::print().

template<class Numeric, class Coeff = float_type>
void SPUC::iir_lpf1< Numeric, Coeff >::reset ( void  )
inline

Reset.

Referenced by SPUC::iir< Numeric, Coeff >::reset().

template<class Numeric, class Coeff = float_type>
void SPUC::iir_lpf1< Numeric, Coeff >::set_coeff ( Coeff  A)
inline
template<class Numeric, class Coeff = float_type>
void SPUC::iir_lpf1< Numeric, Coeff >::set_round_bits ( long  x)
inline

References SPUC::quantiser< Numeric >::set_bits().

Referenced by SPUC::iir< Numeric, Coeff >::set_round_bits().

Here is the call graph for this function:

Member Data Documentation

template<class Numeric, class Coeff = float_type>
Coeff SPUC::iir_lpf1< Numeric, Coeff >::gain
protected
template<class Numeric, class Coeff = float_type>
Numeric SPUC::iir_lpf1< Numeric, Coeff >::out
protected
template<class Numeric, class Coeff = float_type>
Numeric SPUC::iir_lpf1< Numeric, Coeff >::previous_in
protected
template<class Numeric, class Coeff = float_type>
Numeric SPUC::iir_lpf1< Numeric, Coeff >::previous_out
protected
template<class Numeric, class Coeff = float_type>
quantiser<Numeric> SPUC::iir_lpf1< Numeric, Coeff >::Q
protected

The documentation for this class was generated from the following file: