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

RMS calculator for real-value signals
Core function: SIM::rms.process()
. More...

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

Public Member Functions

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

Detailed Description

RMS calculator for real-value signals
Core function: SIM::rms.process()
.

y=sqrt(MAV< x^2 >) 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::rms ( )
inline
SIM::rms::~rms ( )
inline

Member Function Documentation

double SIM::rms::get_output ( void  )

get initial/idle output symbol

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

get size of a MAV filter

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

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

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

sets initial/idle output symbol

Parameters
[in]yout- [int] y0 = yout
void SIM::rms::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: