lds::gaussian::System

lds::gaussian::System #

Gaussian LDS Type.
#include <lds_gaussian_sys.h>

Inherits from lds::System

Public Functions #

Name
System() =default
Constructs a new System.
System(std::size_t n_u, std::size_t n_x, std::size_t n_y, data_t dt, data_t p0 =kDefaultP0, data_t q0 =kDefaultQ0, data_t r0 =kDefaultR0)
Constructs a new Gaussian System.
virtual const Vector & Simulate(const Vector & u_tm1) override
Simulate system measurement.
const Matrix & R() const
Get output noise covariance.
void set_Q(const Matrix & Q)
void set_R(const Matrix & R)
Set output noise covariance.
void set_Ke(const Matrix & Ke)
Set estimator gain.
void set_Ke_m(const Matrix & Ke_m)
Set disturbance estimator gain.
void Print()
Print system variables to stdout.

Protected Functions #

Name
virtual void h() override
System output function.
virtual void RecurseKe() override
Recursively update estimator gain.

Protected Attributes #

Name
Matrix R_
covariance of output noise
bool do_recurse_Ke_
whether to recursively calculate estimator gain

Additional inherited members #

Public Functions inherited from lds::System

Name
virtual ~System()
void Filter(const Vector & u_tm1, const Vector & z)
Filter data to produce causal state estimates.
void f(const Vector & u, bool do_add_noise =false)
system dynamics function
size_t n_u() const
Get number of inputs.
size_t n_x() const
Get number of states.
size_t n_y() const
Get number of outputs.
data_t dt() const
Get sample period.
const Vector & x() const
Get current state.
const Matrix & P() const
Get covariance of state estimate.
const Vector & m() const
Get current process disturbance/bias.
const Matrix & P_m() const
Get covariance of process disturbance estimate.
const Vector & cx() const
Get C*x.
const Vector & y() const
Get output.
const Vector & x0() const
Get initial state.
const Vector & m0() const
Get initial disturbance.
const Matrix & A() const
Get state matrix.
const Matrix & B() const
Get input matrix.
const Vector & g() const
Get input gain/conversion factor.
const Matrix & C() const
Get output matrix.
const Vector & d() const
Get output bias.
const Matrix & Ke() const
Get estimator gain.
const Matrix & Ke_m() const
Get estimator gain for process disturbance (m)
const Matrix & Q()
Get process noise covariance.
const Matrix & Q_m()
Get process noise covariance of disturbance evoluation.
const Matrix & P0()
Get covariance of initial state.
const Matrix & P0_m()
Get covariance of initial process disturbance.
void set_A(const Matrix & A)
Set state matrix.
void set_B(const Matrix & B)
Set input matrix.
void set_m(const Vector & m, bool do_force_assign =false)
Set process disturbance.
void set_g(const Vector & g)
Set input gain.
void set_Q_m(const Matrix & Q_m)
Set process noise covariance of disturbance evoluation.
void set_x0(const Vector & x0)
Set initial state.
void set_P0(const Matrix & P0)
Set covariance of initial state.
void set_P0_m(const Matrix & P0_m)
Set covariance of initial process disturbance.
void set_C(const Matrix & C)
Set output matrix.
void set_d(const Vector & d)
Set output bias.
void set_x(const Vector & x)
Set state of system.
void Reset()
Reset system variables.

Protected Functions inherited from lds::System

Name
void InitVars(data_t p0 =kDefaultP0, data_t q0 =kDefaultQ0)

Public Attributes inherited from lds::System

Name
bool do_adapt_m
whether to adaptively estimate disturbance m

Protected Attributes inherited from lds::System

Name
std::size_t n_x_
number of states
std::size_t n_u_
number of inputs
std::size_t n_y_
number of outputs
data_t dt_
sample period
Vector x_
state
Matrix P_
covariance of state estimate
Vector m_
process disturbance
Matrix P_m_
covariance of disturbance estimate
Vector cx_
C*x.
Vector y_
output
Vector z_
measurement
Vector x0_
initial state
Matrix P0_
covariance of initial state estimate
Vector m0_
initial process disturbance
Matrix P0_m_
covariance of initial disturbance est.
Matrix A_
state matrix
Matrix B_
input matrix
Vector g_
input gain
Matrix Q_
covariance of process noise
Matrix Q_m_
covariance of disturbance random walk
Matrix C_
output matrix
Vector d_
output bias
Matrix Ke_
estimator gain
Matrix Ke_m_
estimator gain for process disturbance


Public Function Details #

System #

System() =default

System #

System(
    std::size_t n_u,
    std::size_t n_x,
    std::size_t n_y,
    data_t dt,
    data_t p0 =kDefaultP0,
    data_t q0 =kDefaultQ0,
    data_t r0 =kDefaultR0
)

Parameters:

  • n_u number of inputs (u)
  • n_x number of states (x)
  • n_y number of outputs (y)
  • dt sample period
  • p0 [optional] initial diagonal elements of state estimate covariance (P)
  • q0 [optional] initial diagonal elements of process noise covariance (Q)
  • r0 [optional] initial diagonal elements of output noise covariance (R)

Simulate #

virtual const Vector & Simulate(
    const Vector & u_tm1
) override

Parameters:

  • u_tm1 input at t-1

Return: z measurement

Reimplements: lds::System::Simulate

Simulate system and produce measurement


R #

inline const Matrix & R() const

set_Q #

inline void set_Q(
    const Matrix & Q
)

set_R #

inline void set_R(
    const Matrix & R
)

set_Ke #

inline void set_Ke(
    const Matrix & Ke
)

set_Ke_m #

inline void set_Ke_m(
    const Matrix & Ke_m
)

Print #

void Print()

Protected Function Details #

h #

inline virtual void h() override

Reimplements: lds::System::h


RecurseKe #

virtual void RecurseKe() override

Reimplements: lds::System::RecurseKe


Protected Attribute Details #

**R_** #

Matrix R_;

**do_recurse_Ke_** #

bool do_recurse_Ke_ {};


Updated on 19 May 2022 at 17:16:04 Eastern Daylight Time