Documentation
Tools for embedded systems
|
API for the qSSmoother library. More...
Data Structures | |
struct | qSSmoother_LPF1_t |
A 1st order Low-Pass Filter. More... | |
struct | qSSmoother_LPF2_t |
A 2nd order Low-Pass Filter. More... | |
struct | qSSmoother_MWM1_t |
A Moving Window Median filter. More... | |
struct | qSSmoother_MWM2_t |
A Moving Window Median filter. More... | |
struct | qSSmoother_MOR1_t |
A Moving Outlier Removal filter. More... | |
struct | qSSmoother_MOR2_t |
A Moving Outlier Removal filter. More... | |
struct | qSSmoother_GMWF_t |
A Gaussian filter. More... | |
struct | qSSmoother_EXPW_t |
An Exponential weighting filter. More... | |
struct | qSSmoother_KLMN_t |
A scalar Kalman filter. More... | |
struct | qSSmoother_DESF_t |
Double exponential smoothing (Holt’s Method) More... | |
struct | qSSmoother_ALNF_t |
Adaptive Filter LMS. More... | |
Enumerations | |
enum | qSSmoother_Type_t { QSSMOOTHER_TYPE_LPF1 , QSSMOOTHER_TYPE_LPF2 , QSSMOOTHER_TYPE_MWM1 , QSSMOOTHER_TYPE_MWM2 , QSSMOOTHER_TYPE_MOR1 , QSSMOOTHER_TYPE_MOR2 , QSSMOOTHER_TYPE_GMWF , QSSMOOTHER_TYPE_KLMN , QSSMOOTHER_TYPE_EXPW , QSSMOOTHER_TYPE_DESF , QSSMOOTHER_TYPE_ALNF } |
Supported Filters by the qSSmoother library. More... | |
Functions | |
int | qSSmoother_IsInitialized (const qSSmootherPtr_t *const s) |
Check if the smoother filter is initialized. | |
int | qSSmoother_Reset (qSSmootherPtr_t *const s) |
Reset the the smoother filter. | |
float | qSSmoother_Perform (qSSmootherPtr_t *const s, const float x) |
Perform the smooth operation recursively for the input signal x. | |
int | qSSmoother_Setup (qSSmootherPtr_t *const s, const qSSmoother_Type_t type, const float *const param, float *window, const size_t wsize) |
Setup an initialize smoother filter. | |
API for the qSSmoother library.
For a brief description of this module, please read Filters for signal smoothing
enum qSSmoother_Type_t |
Supported Filters by the qSSmoother library.
int qSSmoother_IsInitialized | ( | const qSSmootherPtr_t *const | s | ) |
Check if the smoother filter is initialized.
[in] | s | A pointer to the signal smoother instance. |
float qSSmoother_Perform | ( | qSSmootherPtr_t *const | s, |
const float | x ) |
Perform the smooth operation recursively for the input signal x.
[in] | s | A pointer to the signal smoother instance. |
[in] | x | A sample of the input signal. |
int qSSmoother_Reset | ( | qSSmootherPtr_t *const | s | ) |
Reset the the smoother filter.
[in] | s | A pointer to the signal smoother instance. |
int qSSmoother_Setup | ( | qSSmootherPtr_t *const | s, |
const qSSmoother_Type_t | type, | ||
const float *const | param, | ||
float * | window, | ||
const size_t | wsize ) |
Setup an initialize smoother filter.
[in] | s | A pointer to the signal smoother instance. |
[in] | type | The filter type. Use one of the following values: |
[in] | param | The smoother parameters. Depends of the type selected: |
if QSSMOOTHER_TYPE_LPF1 a pointer to a value between [ 0 < alpha < 1 ]
if QSSMOOTHER_TYPE_LPF2 a pointer to a value between [ 0 < alpha < 1 ]
if QSSMOOTHER_TYPE_MWM1 can be ignored. Pass NULL
as argument.
if QSSMOOTHER_TYPE_MWM2 can be ignored. Pass NULL
as argument.
if QSSMOOTHER_TYPE_MOR1 a pointer to a value between [ 0 < alpha < 1 ]
if QSSMOOTHER_TYPE_MOR2 a pointer to a value between [ 0 < alpha < 1 ]
if QSSMOOTHER_TYPE_GMWF, an array with two values. The first element with the Standard deviation [ sigma > 0 ]. The second element with the offset of the gaussian center. [ 0 < offset < ( wsize - 1 ) ].
if QSSMOOTHER_TYPE_KLMN, an array with three values. The first element with the initial estimated error covariance. The second element with the process(predict) noise covariance. The third element with the measure noise convariance
if QSSMOOTHER_TYPE_EXPW, a pointer to a value between [ 0 < lambda < 1 ] that represents the forgetting factor.
if QSSMOOTHER_TYPE_DESF, an array with three values. The first element [ 0 < alpha < 1 ] that represents the weight for the level, the second, [ 0 < beta < 1 ] weight for the trend. The third element with the number of step for the forecast, should be an integer value greater or equal to zero.
if QSSMOOTHER_TYPE_ALNF, an array with two values. The first element with learning rate [ 0 < alpha < 1 ]. The second element with the momentum [ 0 < mu < 1 ].
[in] | window | The filter window and coefficients. Depends of the type selected: |
if QSSMOOTHER_TYPE_LPF1, can be ignored. Pass NULL
as argument.
if QSSMOOTHER_TYPE_LPF2, can be ignored. Pass NULL
as argument.
if QSSMOOTHER_TYPE_MWM1, An array of wsize elements.
if QSSMOOTHER_TYPE_MWM2, An array of wsize elements.
if QSSMOOTHER_TYPE_MOR1, An array of wsize elements.
if QSSMOOTHER_TYPE_MOR2, An array of wsize elements.
if QSSMOOTHER_TYPE_GMWF, An array of 2* wsize to hold both, the window and the gaussian kernel coefficients.
if QSSMOOTHER_TYPE_KLMN, can be ignored. Pass NULL
as argument.
if QSSMOOTHER_TYPE_EXPW, can be ignored. Pass NULL
as argument.
if QSSMOOTHER_TYPE_DESF, can be ignored. Pass NULL
as argument.
if QSSMOOTHER_TYPE_ALNF, An array of 2* wsize elements when momentum is set to zero, otherwise an array of 3* wsize elements.
[in] | wsize | If used, the number of elements in window, otherwise pass 0uL as argument. |