state-observation 1.7.0
General implementation of observers.
Loading...
Searching...
No Matches
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 <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.
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.
 ~UnidimLipmDcmEstimator ()
 Destroy the Lipm Dcm Bias Estimator object.
void setLipmNaturalFrequency (double omega_0)
 Set the Lipm Natural Frequency.
void setSamplingTime (double dt)
 Set the Sampling Time.
void setBias (double bias)
 Set the Bias object from a guess.
void setBias (double bias, double uncertainty)
 Set the Bias object from a guess.
void setBiasDriftPerSecond (double driftPerSecond)
 Set the Bias Drift Per Second.
void setUnbiasedDCM (double dcm)
 set the real DCM position from a guess
void setUnbiasedDCM (double dcm, double uncertainty)
 set the real DCM position from a guess
void setZmpMeasureErrorStd (double)
 Set the Zmp Measurement Error Stamdard devbiation.
void setDcmMeasureErrorStd (double)
 Set the Dcm Measurement Error Standard.
void setInputs (double dcm, double zmp)
 Set the Inputs of the estimator.
Vector2 update ()
 Runs the estimation. Needs to be called every timestep.
double getUnbiasedDCM () const
 Get the Unbiased DCM filtered by the estimator.
double getBias () const
 Get the estimated Bias.
LinearKalmanFiltergetFilter ()
 Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions.
const LinearKalmanFiltergetFilter () const
 Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions.

Static Public Attributes

static constexpr double defaultBiasDriftSecond = 0.002
 default expected drift of the bias every second
static constexpr double defaultZmpErrorStd = 0.005
 default error in the estimation of the sensors
static constexpr double defaultDcmErrorStd = 0.01
static constexpr double defaultDCMUncertainty = 0.01
 default uncertainty in the initial values of DCM and Bias
static constexpr 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.

Definition at line 34 of file unidim-lipm-dcm-estimator.hpp.

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.

Definition at line 98 of file unidim-lipm-dcm-estimator.hpp.

Member Function Documentation

◆ 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

◆ 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

◆ 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)

◆ 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

◆ setInputs()

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

Set the Inputs of the estimator.

Parameters
dcm
zmp

◆ update()

Vector2 stateObservation::UnidimLipmDcmEstimator::update ( )
inline

Runs the estimation. Needs to be called every timestep.

Returns
Vector2

Definition at line 153 of file unidim-lipm-dcm-estimator.hpp.

◆ getUnbiasedDCM()

double stateObservation::UnidimLipmDcmEstimator::getUnbiasedDCM ( ) const

Get the Unbiased DCM filtered by the estimator.

@detailt This is the recommended output to take

Returns
double

◆ 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&

Definition at line 172 of file unidim-lipm-dcm-estimator.hpp.

◆ 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

Definition at line 179 of file unidim-lipm-dcm-estimator.hpp.

Member Data Documentation

◆ defaultBiasDriftSecond

double stateObservation::UnidimLipmDcmEstimator::defaultBiasDriftSecond = 0.002
staticconstexpr

default expected drift of the bias every second

Definition at line 42 of file unidim-lipm-dcm-estimator.hpp.

◆ defaultZmpErrorStd

double stateObservation::UnidimLipmDcmEstimator::defaultZmpErrorStd = 0.005
staticconstexpr

default error in the estimation of the sensors

Definition at line 45 of file unidim-lipm-dcm-estimator.hpp.

◆ defaultDcmErrorStd

double stateObservation::UnidimLipmDcmEstimator::defaultDcmErrorStd = 0.01
staticconstexpr

Definition at line 46 of file unidim-lipm-dcm-estimator.hpp.

◆ defaultDCMUncertainty

double stateObservation::UnidimLipmDcmEstimator::defaultDCMUncertainty = 0.01
staticconstexpr

default uncertainty in the initial values of DCM and Bias

Definition at line 49 of file unidim-lipm-dcm-estimator.hpp.

◆ defaultBiasUncertainty

double stateObservation::UnidimLipmDcmEstimator::defaultBiasUncertainty = 0.01
staticconstexpr

Definition at line 50 of file unidim-lipm-dcm-estimator.hpp.


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