SPUC  3.0
Public Member Functions | Public Attributes | List of all members
SPUC::iir_coeff Class Reference

Class for iir filter design. More...

#include <iir_coeff.h>

Public Member Functions

 iir_coeff (long ord=1)
 ord = Filter order More...
 
 ~iir_coeff ()
 Destructor. More...
 
void bilinear ()
 Do bilinear transformation. More...
 
void bilinear2 ()
 
void convert_to_ab ()
 
void z_root_to_ab (std::vector< complex< float_type > > &z)
 
void pz_to_ap ()
 
void ab_to_tf ()
 
std::vector< float_typep2_to_poly (const std::vector< complex< float_type > > &ab)
 
std::vector< float_typepz_to_poly (const std::vector< complex< float_type > > &z)
 
complex< float_typeget_root (long i)
 
complex< float_typeget_zero (long i)
 
float_type get_a (long i)
 
float_type get_b (long i)
 
float_type get_coeff_a (long i)
 
float_type get_coeff_b (long i)
 
float_type max_abs_coeff ()
 
void quantize (int bits)
 
float_type freqz_mag (float_type freq)
 

Public Attributes

long order
 
long odd
 
long n2
 
std::vector< complex
< float_type > > 
poles
 
std::vector< complex
< float_type > > 
zeros
 
std::vector< float_typea_tf
 
std::vector< float_typeb_tf
 
float_type gain
 
float_type hpf_gain
 
long state
 
long tf_state
 
long ap_state
 

Detailed Description

Class for iir filter design.

Author
Tony Kirke

Constructor & Destructor Documentation

SPUC::iir_coeff::iir_coeff ( long  ord = 1)

ord = Filter order

References ap_state, n2, odd, order, poles, state, tf_state, and zeros.

SPUC::iir_coeff::~iir_coeff ( )

Destructor.

Member Function Documentation

void SPUC::iir_coeff::ab_to_tf ( )

References a_tf, b_tf, p2_to_poly(), poles, state, and zeros.

Referenced by quantize().

Here is the call graph for this function:

void SPUC::iir_coeff::bilinear ( )

Do bilinear transformation.

References n2, poles, state, and zeros.

Referenced by SPUC::butterworth_iir(), SPUC::chebyshev_iir(), and SPUC::elliptic_iir().

void SPUC::iir_coeff::bilinear2 ( )
void SPUC::iir_coeff::convert_to_ab ( )
float_type SPUC::iir_coeff::freqz_mag ( float_type  freq)

References a_tf, b_tf, SPUC::cos(), SPUC::magsq(), order, and SPUC::sqrt().

Here is the call graph for this function:

float_type SPUC::iir_coeff::get_a ( long  i)

References a_tf, and order.

float_type SPUC::iir_coeff::get_b ( long  i)

References b_tf, and order.

float_type SPUC::iir_coeff::get_coeff_a ( long  i)

References order, and poles.

Referenced by main().

float_type SPUC::iir_coeff::get_coeff_b ( long  i)

References order, and zeros.

complex< float_type > SPUC::iir_coeff::get_root ( long  i)

References n2, and poles.

Referenced by main().

complex< float_type > SPUC::iir_coeff::get_zero ( long  i)

References n2, and zeros.

float_type SPUC::iir_coeff::max_abs_coeff ( )

References SPUC::ABS(), n2, poles, and zeros.

Referenced by quantize().

Here is the call graph for this function:

std::vector< float_type > SPUC::iir_coeff::p2_to_poly ( const std::vector< complex< float_type > > &  ab)

References n2, odd, order, and SPUC::partial_convolve().

Referenced by ab_to_tf(), and convert_to_ab().

Here is the call graph for this function:

void SPUC::iir_coeff::pz_to_ap ( )

References a_tf, ap_state, b_tf, SPUC::convolve(), SPUC::find_roots(), SPUC::fliplr(), SPUC::magsq(), order, poles, pz_to_poly(), SPUC::sqrt(), state, and zeros.

Here is the call graph for this function:

std::vector< float_type > SPUC::iir_coeff::pz_to_poly ( const std::vector< complex< float_type > > &  z)

References SPUC::magsq(), n2, order, SPUC::partial_convolve(), and tf_state.

Referenced by pz_to_ap().

Here is the call graph for this function:

void SPUC::iir_coeff::quantize ( int  bits)

References ab_to_tf(), max_abs_coeff(), n2, poles, and zeros.

Referenced by main().

Here is the call graph for this function:

void SPUC::iir_coeff::z_root_to_ab ( std::vector< complex< float_type > > &  z)

References gain, hpf_gain, SPUC::magsq(), n2, odd, and state.

Referenced by convert_to_ab().

Here is the call graph for this function:

Member Data Documentation

std::vector<float_type > SPUC::iir_coeff::a_tf
long SPUC::iir_coeff::ap_state

Referenced by iir_coeff(), and pz_to_ap().

std::vector<float_type > SPUC::iir_coeff::b_tf
float_type SPUC::iir_coeff::gain
float_type SPUC::iir_coeff::hpf_gain

Referenced by convert_to_ab(), and z_root_to_ab().

long SPUC::iir_coeff::n2
long SPUC::iir_coeff::odd
long SPUC::iir_coeff::order
std::vector<complex<float_type> > SPUC::iir_coeff::poles
long SPUC::iir_coeff::state
long SPUC::iir_coeff::tf_state

Referenced by iir_coeff(), and pz_to_poly().

std::vector<complex<float_type> > SPUC::iir_coeff::zeros

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