Class Luenberger

Inheritance Relationships

Base Type

Class Documentation

class Luenberger : public state_observer::StateObserver

Implementation of a Luenberger observer for linear systems.

The Luenberger class extends the StateObserver base class to provide a Luenberger observer, which estimates the state of a linear system using a specified observer gain matrix L.

Public Functions

Luenberger(const Eigen::MatrixXd &A, const Eigen::MatrixXd &B, const Eigen::MatrixXd &C, const Eigen::MatrixXd &D, const Eigen::VectorXd &initial_state, const Eigen::MatrixXd &L)

Constructor with full state-space matrices, initial state, and observer gain.

Parameters:
  • A – State transition matrix (n x n).

  • B – Input matrix (n x p).

  • C – Output matrix (q x n).

  • D – Feedthrough matrix (q x p).

  • initial_state – Initial state vector (n x 1).

  • L – Observer gain matrix (n x q).

Throws:

std::invalid_argument – if dimensions are inconsistent.

Luenberger(const Eigen::MatrixXd &A, const Eigen::MatrixXd &B, const Eigen::MatrixXd &C, const Eigen::VectorXd &initial_state, const Eigen::MatrixXd &L)

Constructor without feedthrough matrix D.

Parameters:
  • A – State transition matrix (n x n).

  • B – Input matrix (n x p).

  • C – Output matrix (q x n).

  • initial_state – Initial state vector (n x 1).

  • L – Observer gain matrix (n x q).

Throws:

std::invalid_argument – if dimensions are inconsistent.

Luenberger(const Eigen::MatrixXd &A, const Eigen::MatrixXd &B, const Eigen::MatrixXd &C, const Eigen::MatrixXd &L)

Constructor without initial state and feedthrough matrix D.

Parameters:
  • A – State transition matrix (n x n).

  • B – Input matrix (n x p).

  • C – Output matrix (q x n).

  • L – Observer gain matrix (n x q).

Throws:

std::invalid_argument – if dimensions are inconsistent.

inline Luenberger()

Default constructor.

inline ~Luenberger()

Destructor.

virtual void set_parameters(const StateObserverParam::SharedPtr state_observer_params) override

Set the parameters of the Luenberger observer.

Parameters:

state_observer_params – Shared pointer to StateObserverParam.

void set_observer_gain(const Eigen::MatrixXd &L)

Set the observer gain matrix L.

Parameters:

L – New observer gain matrix (n x q).

Throws:

std::invalid_argument – if dimensions are incorrect.

virtual Eigen::MatrixXd update(const Eigen::VectorXd &measurement) override

Update the observer with a measurement.

Parameters:

measurement – Measurement vector (q x 1).

Returns:

Updated state estimate.

virtual Eigen::MatrixXd update(const Eigen::VectorXd &measurement, const Eigen::VectorXd &input) override

Update the observer with a measurement and input.

Parameters:
  • measurement – Measurement vector (q x 1).

  • input – Input vector (p x 1).

Returns:

Updated state estimate.

inline Eigen::MatrixXd get_observer_gain() const

Protected Attributes

Eigen::VectorXd L_