itpp_sci  1.0.0
it++ based simulation framework for scicoslab, scilab and scipy
Public Member Functions | Public Attributes | List of all members
SIM::src Class Reference

sample rate converter with sinc reconstruction filter
Core function: SIM::src.process()
More...

Inheritance diagram for SIM::src:
Inheritance graph
[legend]

Public Member Functions

double re_samp (double tau)
 
void xcb (double x_new)
 
 src ()
 
 ~src ()
 
void set_size (int n)
 
void set_win_type (int w)
 
void set_output (double yout)
 
int get_size (void)
 
int get_win_type (void)
 
double get_output (void)
 
vec process (const bmat &ceio, const mat &xt)
 

Public Attributes

double y0
 registered filter output More...
 

Detailed Description

sample rate converter with sinc reconstruction filter
Core function: SIM::src.process()

Constructor & Destructor Documentation

SIM::src::src ( )
inline

default SRC uses 15 taps sinc kernel with hanning window

SIM::src::~src ( )
inline

Member Function Documentation

double SIM::src::get_output ( void  )

get output

Returns
- [double] y0
int SIM::src::get_size ( void  )

get sinc kernel size

Returns
- [int] sinc fir kernel size
int SIM::src::get_win_type ( void  )

get sinc window type

Returns
- [int] sinc fir kernel window type WIN_HANNING=1, WIN_KAISER_BESSEL=2, WIN_FLAT_TOP=3
vec SIM::src::process ( const bmat &  ceio,
const mat &  xt 
)

process input samples xt[0,i] for active input clock ticks ce[0,i]
for active output clock tick ce[1,i] reconstruct output y[i] for a given fractional time xt[1,i]

Parameters
ceio- bmat - input/output [cei|ceo] clock enable matrix
xt- mat - input sample and fractional time xt=[x|t] matrix
Returns
y - vec - output sample vector
double SIM::src::re_samp ( double  tau)

reconstructed kernel response h=h_t(tau), tau - normalized time tau=dT/Ts

Parameters
[in]tau- [double] - tau - is a Ts fraction
Returns
- [double] impulse response value
void SIM::src::set_output ( double  yout)

set output value y0

Parameters
[in]yout- [double] => y0
void SIM::src::set_size ( int  n)

set sinc kernel size

Parameters
[in]n- [int] kernel size
void SIM::src::set_win_type ( int  w)

set window type

Parameters
[in]w- [int] window type WIN_HANNING=1, WIN_KAISER_BESSEL=2, WIN_FLAT_TOP=3
void SIM::src::xcb ( double  x_new)

samples circular buffer

Parameters
[in]x_new- [double] new sample

Member Data Documentation

double SIM::src::y0

registered filter output


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