11 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
size_t OUTPUT_DIM,
typename SCALAR>
18 size_t maxDAREIterations)
19 :
Base(f, h, x0), Q_(Q), R_(R), maxDAREIterations_(maxDAREIterations)
24 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
size_t OUTPUT_DIM,
typename SCALAR>
29 :
Base(f, h, sskf_settings.
x0),
32 maxDAREIterations_(sskf_settings.maxDAREIterations)
36 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
size_t OUTPUT_DIM,
typename SCALAR>
41 A_ = this->
f_->computeDerivativeState(this->
x_est_,
u,
t);
46 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
size_t OUTPUT_DIM,
typename SCALAR>
52 Eigen::Matrix<SCALAR, OUTPUT_DIM, STATE_DIM> K;
58 Q_, R_, A_.transpose(), dHdx.transpose(), P_, K,
false, 1e-6, maxDAREIterations_);
64 this->
x_est_ -= K.transpose() * (y - this->
h_->computeMeasurement(this->
x_est_,
t));
68 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
size_t OUTPUT_DIM,
typename SCALAR>
71 maxDAREIterations_ = maxDAREIterations;
std::shared_ptr< SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR > > f_
System model for propagating the system.
Definition: EstimatorBase.h:64
ct::core::ControlVector< control_dim > u
Definition: LoadFromFileTest.cpp:21
std::shared_ptr< LinearMeasurementModel< OUTPUT_DIM, STATE_DIM, SCALAR > > h_
Observation model used to calculate the output error.
Definition: EstimatorBase.h:67
clear all close all load ct GNMSLog0 mat reformat t
Definition: gnmsPlot.m:6
const double dt
Definition: LQOCSolverTiming.cpp:18
Linear Measurement Model is an interface for linear measurement models most commonly used in practice...
Definition: LinearMeasurementModel.h:23
state_vector_t x_est_
State estimate.
Definition: EstimatorBase.h:70
System model is an interface that encapsulates the integrator to be able to propagate the system...
Definition: SystemModelBase.h:21
Discrete-Time Algebraic Riccati Equation.
Definition: DARE.hpp:24
Estimator base.
Definition: EstimatorBase.h:21
void setMaxDAREIterations(size_t maxDAREIterations)
Limit number of iterations of the DARE solver.
Definition: SteadyStateKalmanFilter-impl.h:69
StateVector< state_dim > x0
Definition: ConstrainedNLOCTest.cpp:14
SteadyStateKalmanFilter(std::shared_ptr< SystemModelBase< STATE_DIM, CONTROL_DIM, SCALAR >> f, std::shared_ptr< LinearMeasurementModel< OUTPUT_DIM, STATE_DIM, SCALAR >> h, const state_matrix_t &Q, const output_matrix_t &R, const state_vector_t &x0=state_vector_t::Zero(), size_t maxDAREIterations=1000)
Constructor.
Definition: SteadyStateKalmanFilter-impl.h:12
const state_vector_t & predict(const control_vector_t &u, const ct::core::Time &dt, const ct::core::Time &t) override
Estimator predict method.
Definition: SteadyStateKalmanFilter-impl.h:37
state_matrix_t computeSteadyStateRiccatiMatrix(const state_matrix_t &Q, const control_matrix_t &R, const state_matrix_t &A, const control_gain_matrix_t &B, control_feedback_t &K, bool verbose=false, const SCALAR eps=1e-6, size_t maxIter=1000)
Definition: DARE-impl.hpp:18
Settings for setting up a SteadyStateKF.
Definition: FilterSettings.h:88
const state_vector_t & update(const output_vector_t &y, const ct::core::Time &dt, const ct::core::Time &t) override
Estimator update method.
Definition: SteadyStateKalmanFilter-impl.h:47