Documentation
Tools for embedded systems
Loading...
Searching...
No Matches
qlibs::smootherALNF Class Reference

Adaptive Filter LMS. More...

#include <smoother.hpp>

Inheritance diagram for qlibs::smootherALNF:
qlibs::smoother

Public Member Functions

virtual ~smootherALNF ()
 
bool setup (const real_t a, const real_t m, const size_t wsize, real_t *window, real_t *weights, real_t *w1=nullptr)
 Setup an initialize the Adaptive Filter LMS.
 
template<size_t windowSize>
bool setup (const real_t a, const real_t m, real_t(&window)[windowSize], real_t(&weights)[windowSize], real_t(&w1)[windowSize])
 Setup an initialize the Adaptive Filter LMS.
 
template<size_t windowSize>
bool setup (const real_t a, real_t(&window)[windowSize], real_t(&weights)[windowSize])
 Setup an initialize the Adaptive Filter LMS.
 
real_t smooth (const real_t x) override
 Perform the smooth operation recursively for the input signal x.
 
- Public Member Functions inherited from qlibs::smoother
virtual ~smoother ()
 
bool isInitialized (void) const
 Check if the smoother filter is initialized.
 
bool reset (void)
 Reset the the smoother filter.
 

Detailed Description

Adaptive Filter LMS.

Constructor & Destructor Documentation

◆ ~smootherALNF()

virtual qlibs::smootherALNF::~smootherALNF ( )
inlinevirtual

Member Function Documentation

◆ setup() [1/3]

bool smootherALNF::setup ( const real_t a,
const real_t m,
const size_t wsize,
real_t * window,
real_t * weights,
real_t * w1 = nullptr )

Setup an initialize the Adaptive Filter LMS.

Parameters
[in]aLearning rate [ 0 < a < 1 ]
[in]mMomentum [ 0 < m < 1 ]
[in]wsizeThe size of the window array
[in]windowAn array to store the window samples.
[in]weightsAn array to store the filter weights
[in]w1An array to keep previous estimated wights. To ignore pass nullptr as argument.
Returns
true on success, otherwise return false.

◆ setup() [2/3]

template<size_t windowSize>
bool qlibs::smootherALNF::setup ( const real_t a,
const real_t m,
real_t(&) window[windowSize],
real_t(&) weights[windowSize],
real_t(&) w1[windowSize] )
inline

Setup an initialize the Adaptive Filter LMS.

Parameters
[in]aLearning rate [ 0 < a < 1 ]
[in]mMomentum [ 0 < m < 1 ]
[in]windowAn array to store the window samples.
[in]weightsAn array to store the filter weights
[in]w1An array to keep previous estimated wights.
Returns
true on success, otherwise return false.

◆ setup() [3/3]

template<size_t windowSize>
bool qlibs::smootherALNF::setup ( const real_t a,
real_t(&) window[windowSize],
real_t(&) weights[windowSize] )
inline

Setup an initialize the Adaptive Filter LMS.

Parameters
[in]aLearning rate [ 0 < a < 1 ]
[in]windowAn array to store the window samples.
[in]weightsAn array to store the filter weights.
Returns
true on success, otherwise return false.

◆ smooth()

real_t smootherALNF::smooth ( const real_t x)
overridevirtual

Perform the smooth operation recursively for the input signal x.

Precondition
Instance must be previously initialized
Parameters
[in]xA sample of the input signal.
Returns
The smoothed output.

Implements qlibs::smoother.