stateObservation::UnidimLipmDcmEstimator Class Reference

1D version of the estimation of a bias betweeen the divergent component of motion and the corresponding zero moment point for a linearized inverted pendulum model. More...

#include <state-observation/dynamics-estimators/unidim-lipm-dcm-estimator.hpp>

Public Member Functions

 UnidimLipmDcmEstimator (double dt=defaultDt_, double omega_0=defaultOmega_, double biasDriftPerSecondStd=defaultBiasDriftSecond, double initDcm=0, double initZMP=0, double initBias=0, double dcmMeasureErrorStd=defaultDcmErrorStd, double zmpMeasureErrorStd=defaultZmpErrorStd, double initDcmUncertainty=defaultDCMUncertainty, double initBiasUncertainty=defaultBiasUncertainty)
 Construct a new Unidimensional Lipm Dcm Estimator. More...
 
void resetWithInputs (double measuredDcm, double measuredZMP, bool measurementIsWithBias=true, double biasDriftPerSecondStd=defaultBiasDriftSecond, double dcmMeasureErrorStd=defaultDcmErrorStd, double zmpMeasureErrorStd=defaultZmpErrorStd, double initBias=0, double initBiasuncertainty=defaultBiasUncertainty)
 Construct a new Lipm Dcm Bias Estimator object. More...
 
 ~UnidimLipmDcmEstimator ()
 Destroy the Lipm Dcm Bias Estimator object. More...
 
void setLipmNaturalFrequency (double omega_0)
 Set the Lipm Natural Frequency. More...
 
void setSamplingTime (double dt)
 Set the Sampling Time. More...
 
void setBias (double bias)
 Set the Bias object from a guess. More...
 
void setBias (double bias, double uncertainty)
 Set the Bias object from a guess. More...
 
void setBiasDriftPerSecond (double driftPerSecond)
 Set the Bias Drift Per Second. More...
 
void setUnbiasedDCM (double dcm)
 set the real DCM position from a guess More...
 
void setUnbiasedDCM (double dcm, double uncertainty)
 set the real DCM position from a guess More...
 
void setZmpMeasureErrorStd (double)
 Set the Zmp Measurement Error Stamdard devbiation. More...
 
void setDcmMeasureErrorStd (double)
 Set the Dcm Measurement Error Standard. More...
 
void setInputs (double dcm, double zmp)
 Set the Inputs of the estimator. More...
 
Vector2 update ()
 Runs the estimation. Needs to be called every timestep. More...
 
double getUnbiasedDCM () const
 Get the Unbiased DCM filtered by the estimator. More...
 
double getBias () const
 Get the estimated Bias. More...
 
LinearKalmanFiltergetFilter ()
 Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions. More...
 
const LinearKalmanFiltergetFilter () const
 Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions. More...
 

Static Public Attributes

constexpr static double defaultBiasDriftSecond = 0.002
 default expected drift of the bias every second More...
 
constexpr static double defaultZmpErrorStd = 0.005
 default error in the estimation of the sensors More...
 
constexpr static double defaultDcmErrorStd = 0.01
 
constexpr static double defaultDCMUncertainty = 0.01
 default uncertainty in the initial values of DCM and Bias More...
 
constexpr static double defaultBiasUncertainty = 0.01
 

Detailed Description

1D version of the estimation of a bias betweeen the divergent component of motion and the corresponding zero moment point for a linearized inverted pendulum model.

A humanoid robot can be modeled as an inverted pendulum. The dynamics can be linearized to obtain a dynamics with a convergent and a divergent component of motion (DCN). The dynamics of the DCM depends on the Zero Moment Point. The DCM can be measured using the CoM and its velocity, but the CoM position can be biased. This estimator uses Kalman Filtering to estimate this bias in one axis.

Constructor & Destructor Documentation

◆ UnidimLipmDcmEstimator()

stateObservation::UnidimLipmDcmEstimator::UnidimLipmDcmEstimator ( double  dt = defaultDt_,
double  omega_0 = defaultOmega_,
double  biasDriftPerSecondStd = defaultBiasDriftSecond,
double  initDcm = 0,
double  initZMP = 0,
double  initBias = 0,
double  dcmMeasureErrorStd = defaultDcmErrorStd,
double  zmpMeasureErrorStd = defaultZmpErrorStd,
double  initDcmUncertainty = defaultDCMUncertainty,
double  initBiasUncertainty = defaultBiasUncertainty 
)

Construct a new Unidimensional Lipm Dcm Estimator.

Parameters
dtthe sampling time in seconds
omega_0the natural frequency of the DCM (rad/s)
biasDriftPerSecondStdthe standard deviation of the drift (m/s)
initDcmthe initial value of the DCM
initZMPthe initial value of the ZMP
initBiasthe initial value of the bias
dcmMeasureErrorStdthe standard deviation of the dcm estimation error, NOT including the bias (m)
zmpMeasureErrorStdthe standard deviaiton of the zmp estimation error (m)
initDcmUncertaintythe uncertainty in the DCM initial value in meters
initBiasUncertaintythe uncertainty in the bias initial value in meters

◆ ~UnidimLipmDcmEstimator()

stateObservation::UnidimLipmDcmEstimator::~UnidimLipmDcmEstimator ( )
inline

Destroy the Lipm Dcm Bias Estimator object.

Member Function Documentation

◆ getBias()

double stateObservation::UnidimLipmDcmEstimator::getBias ( ) const

Get the estimated Bias.

Returns
double

◆ getFilter() [1/2]

LinearKalmanFilter& stateObservation::UnidimLipmDcmEstimator::getFilter ( )
inline

Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions.

Returns
LinearKalmanFilter&

◆ getFilter() [2/2]

const LinearKalmanFilter& stateObservation::UnidimLipmDcmEstimator::getFilter ( ) const
inline

Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions.

Returns
LinearKalmanFilter& const version

◆ getUnbiasedDCM()

double stateObservation::UnidimLipmDcmEstimator::getUnbiasedDCM ( ) const

Get the Unbiased DCM filtered by the estimator.

@detailt This is the recommended output to take

Returns
double

◆ resetWithInputs()

void stateObservation::UnidimLipmDcmEstimator::resetWithInputs ( double  measuredDcm,
double  measuredZMP,
bool  measurementIsWithBias = true,
double  biasDriftPerSecondStd = defaultBiasDriftSecond,
double  dcmMeasureErrorStd = defaultDcmErrorStd,
double  zmpMeasureErrorStd = defaultZmpErrorStd,
double  initBias = 0,
double  initBiasuncertainty = defaultBiasUncertainty 
)

Construct a new Lipm Dcm Bias Estimator object.

Use this when initializing with an available DCM (biased) measurement

Parameters
measurementIsWithBiassets if yes or no the measurement is with the bias. It is better set to true than trying to remove it beforehand
measuredDcmthe the measured position of the DCM
omega_0the natural frequency of the DCM (rad/s)
dtthe sampling time in seconds
biasDriftPerSecondStdthe standard deviation of the drift (m/s)
zmpMeasureErrorStdthe standard deviaiton of the zmp estimation error (m)
scmMeasureErrorStdthe standard deviation of the dcm estimation error, NOT including the bias (m)
initBiasthe initial value of the drift
initBiasUncertaintythe uncertainty in the bias initial value in meters

◆ setBias() [1/2]

void stateObservation::UnidimLipmDcmEstimator::setBias ( double  bias)

Set the Bias object from a guess.

Parameters
biasguess

◆ setBias() [2/2]

void stateObservation::UnidimLipmDcmEstimator::setBias ( double  bias,
double  uncertainty 
)

Set the Bias object from a guess.

Parameters
biasguess
theuncertainty you have in this guess in meters

◆ setBiasDriftPerSecond()

void stateObservation::UnidimLipmDcmEstimator::setBiasDriftPerSecond ( double  driftPerSecond)

Set the Bias Drift Per Second.

Parameters
driftPerSecondthe standard deviation of the drift (m/s)

◆ setDcmMeasureErrorStd()

void stateObservation::UnidimLipmDcmEstimator::setDcmMeasureErrorStd ( double  )

Set the Dcm Measurement Error Standard.

◆ setInputs()

void stateObservation::UnidimLipmDcmEstimator::setInputs ( double  dcm,
double  zmp 
)

Set the Inputs of the estimator.

Parameters
dcm
zmp

◆ setLipmNaturalFrequency()

void stateObservation::UnidimLipmDcmEstimator::setLipmNaturalFrequency ( double  omega_0)

Set the Lipm Natural Frequency.

Parameters
omega_0is the sampling time in seconds

◆ setSamplingTime()

void stateObservation::UnidimLipmDcmEstimator::setSamplingTime ( double  dt)

Set the Sampling Time.

Parameters
dtsampling time

◆ setUnbiasedDCM() [1/2]

void stateObservation::UnidimLipmDcmEstimator::setUnbiasedDCM ( double  dcm)

set the real DCM position from a guess

Parameters
dcmguess

◆ setUnbiasedDCM() [2/2]

void stateObservation::UnidimLipmDcmEstimator::setUnbiasedDCM ( double  dcm,
double  uncertainty 
)

set the real DCM position from a guess

Parameters
dcmguess
dcm
uncertaintythe uncertainty in this guess

◆ setZmpMeasureErrorStd()

void stateObservation::UnidimLipmDcmEstimator::setZmpMeasureErrorStd ( double  )

Set the Zmp Measurement Error Stamdard devbiation.

◆ update()

Vector2 stateObservation::UnidimLipmDcmEstimator::update ( )
inline

Runs the estimation. Needs to be called every timestep.

Returns
Vector2

Member Data Documentation

◆ defaultBiasDriftSecond

constexpr static double stateObservation::UnidimLipmDcmEstimator::defaultBiasDriftSecond = 0.002
staticconstexpr

default expected drift of the bias every second

◆ defaultBiasUncertainty

constexpr static double stateObservation::UnidimLipmDcmEstimator::defaultBiasUncertainty = 0.01
staticconstexpr

◆ defaultDcmErrorStd

constexpr static double stateObservation::UnidimLipmDcmEstimator::defaultDcmErrorStd = 0.01
staticconstexpr

◆ defaultDCMUncertainty

constexpr static double stateObservation::UnidimLipmDcmEstimator::defaultDCMUncertainty = 0.01
staticconstexpr

default uncertainty in the initial values of DCM and Bias

◆ defaultZmpErrorStd

constexpr static double stateObservation::UnidimLipmDcmEstimator::defaultZmpErrorStd = 0.005
staticconstexpr

default error in the estimation of the sensors


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