Controlpp
Loading...
Searching...
No Matches
controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements > Class Template Reference

Estimates a discrete transfer function from online data points. More...

#include <controlpp/Estimators.hpp>

Public Member Functions

 DtfEstimator (DiscreteTransferFunction< T, NumOrder, DenOrder > hint, const Eigen::Vector< T, NumOrder+1 > NumeratorUncertainty, const Eigen::Vector< T, DenOrder > DenominatorUncertainty, const T &memory=0.995)
 Initialises a discrete transfer function estimator with optional hints and memory/decay parameters.
 
 DtfEstimator (DiscreteTransferFunction< T, NumOrder, DenOrder > hint, const T &uncertainty=1000, const T &memory=0.995)
 
 DtfEstimator ()
 
void input (const T &y, const T &u)
 Adds an interation step to the estimate.
 
DiscreteTransferFunction< T, NumOrder, DenOrder > estimate ()
 returns the current estimate
 
const Eigen::Matrix< T, NumOrder+1+DenOrder, NumOrder+1+DenOrder > cov ()
 
const Eigen::Vector< T, NumOrder+1+DenOrder > & gain ()
 
void set_gain_clamp (const T &g)
 
const T & gain_clamp () const
 
void set_cov_regularisation (const T &reg)
 
cov_regularisation () const
 

Detailed Description

template<class T, size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
class controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >

Estimates a discrete transfer function from online data points.

Estimates time discrete transfer functions represented with positive powers of \(z\) in the form of:

\[ ARX = \frac{B(z)}{A(z)} u_k = \frac{b_0 + b_1 z^{-1} + b_2 z^{-2} \cdots b_m z^{-m} }{a_0 + a_1 z^{-1} + a_2 z^{-2} \cdots 1 z^{-n}} u_k \]

‍Note: That \(a_n\) has been set to 1

Estimates/Identifies model parameters online using the recursive least squares algorithm


The least-squares identification of the parameter for the identification task of the ARX model is unbiased and consistent if the stochastic disturbance satisfies the Yule-Walker equations of an autoregressive signal process with zero-mean white noise corresponding to the transfer function being identified.

Constructor & Destructor Documentation

◆ DtfEstimator() [1/3]

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::DtfEstimator ( DiscreteTransferFunction< T, NumOrder, DenOrder >  hint,
const Eigen::Vector< T, NumOrder+1 >  NumeratorUncertainty,
const Eigen::Vector< T, DenOrder >  DenominatorUncertainty,
const T &  memory = 0.995 
)
inline

Initialises a discrete transfer function estimator with optional hints and memory/decay parameters.

Note that the hint needs to be a propper transfer function with a_0 != 0

This also means, that the DenominatorUncertainty starts at \(a_1\) wheras the NumeratorUncertainty starts at \(b_0\)

◆ DtfEstimator() [2/3]

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::DtfEstimator ( DiscreteTransferFunction< T, NumOrder, DenOrder >  hint,
const T &  uncertainty = 1000,
const T &  memory = 0.995 
)
inline

◆ DtfEstimator() [3/3]

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::DtfEstimator ( )
inline

Member Function Documentation

◆ cov()

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
const Eigen::Matrix< T, NumOrder+1+DenOrder, NumOrder+1+DenOrder > controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::cov ( )
inline

◆ cov_regularisation()

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
T controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::cov_regularisation ( ) const
inline

◆ estimate()

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
DiscreteTransferFunction< T, NumOrder, DenOrder > controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::estimate ( )
inline

returns the current estimate

Returns
a DiscreteTransferFunction that represents the current best estimate

◆ gain()

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
const Eigen::Vector< T, NumOrder+1+DenOrder > & controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::gain ( )
inline

◆ gain_clamp()

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
const T & controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::gain_clamp ( ) const
inline

◆ input()

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
void controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::input ( const T &  y,
const T &  u 
)
inline

Adds an interation step to the estimate.

Advances the estimation by another input output pair

Parameters
ythe systems outpout value
uthe systems input value
Returns
the

◆ set_cov_regularisation()

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
void controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::set_cov_regularisation ( const T &  reg)
inline

◆ set_gain_clamp()

template<class T , size_t NumOrder, size_t DenOrder, size_t Measurements = 1>
void controlpp::DtfEstimator< T, NumOrder, DenOrder, Measurements >::set_gain_clamp ( const T &  g)
inline

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