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

RMS calculator for complex signals
Core function: SIM::rms_x.process()
. More...

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

Public Member Functions

 rms_x ()
 
 ~rms_x ()
 
void set_size (int n)
 
void set_output (double yout)
 
int get_size (void)
 
double get_output (void)
 
vec process (const bvec &ce, const cvec &x)
 

Detailed Description

RMS calculator for complex signals
Core function: SIM::rms_x.process()
.

y=sqrt(MAV<real(x*conj(x))>) where MAV is a moving avarage of N samples implemented as a FIR filter mav< s > = (s[i]+s[i-1]+...s[i-N-1])/N

Constructor & Destructor Documentation

SIM::rms_x::rms_x ( )
inline
SIM::rms_x::~rms_x ( )
inline

Member Function Documentation

double SIM::rms_x::get_output ( void  )

get initial/idle output symbol

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

get size of a MAV filter

Returns
- [int] size of MAV
vec SIM::rms_x::process ( const bvec &  ce,
const cvec &  x 
)

for active clock ticks ce[i] calculate RMS using moving avarage of squared input module

Parameters
ce- [bvec] - clock enable vector - sizeof(ce)=N
x- [cvec] - input vector sizeof(x)=[N]
Returns
y - [vec] - output vector - sizeof(y)=[N]
void SIM::rms_x::set_output ( double  yout)

sets initial/idle output symbol

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

set size of a MAV filter

Parameters
[in]n- [int] size of MAV

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