# bdm::LQG Class Reference

`#include <ctrlbase.h>`

List of all members.

## Public Member Functions
void | set_system_parameters (const mat &A, const mat &B, const mat &C)
| set system parameters from given matrices
void | set_control_parameters (const mat &Qy0, const mat &Qu0, const vec y_req0, int horizon0)
| set penalization matrices and control horizon
void | prepare_qr ()
| set system parameters from Kalman filter
virtual void | update_state ()
| function for future use which is called at each time td; Should call prepare_qr()!
void | ricatti_step ()
| redesign one step of the
void | redesign ()
| Redesign control strategy.
vec | apply (const vec &state, const vec &ukm)
virtual vec | apply (const vec &cond)
| apply control strategy to obtain control input
virtual string | to_string ()
| This method returns a basic info about the current instance.
virtual void | from_setting (const Setting &set)
| This method arrange instance properties according the data stored in the Setting structure.
virtual void | to_setting (Setting &set) const
| This method save all the instance properties into the Setting structure.
virtual void | validate ()
| This method TODO.
## Protected Attributes
int | dimx
| dimension of state
int | dimu
| dimension of inputs
int | dimy
| dimension of output
mat | A
| matrix A of the linear system
mat | B
| matrix B of the linear system
mat | C
| matrix C of the linear system
vec | y_req
| required value of the output y at time t (assumed constant)
int | horizon
| Control horizon, set to maxint for infinite horizons.
mat | Qy
| penalization matrix Qy
mat | Qu
| penalization matrix Qu
int | td
| time of the design step - from horizon->0
mat | L
| controller parameters
temporary storage for ricatti
parameters
mat | pr
mat | qux
| penalization
mat | qyx
| penalization
mat | s
| internal quadratic form
mat | qy
| penalization
mat | hqy
| pre_qr part
mat | pre_qr
| pre qr matrix
mat | post_qr
| post qr matrix

## Detailed Description

Linear Quadratic Gaussian designer for constant penalizations and constant target Its internals are very close to Kalman estimator

## Member Function Documentation

void bdm::LQG::prepare_qr | ( |  | ) |

set system parameters from Kalman filter

refresh temporary storage - inefficient can be improved

References A, B, C, dimu, dimx, dimy, hqy, post_qr, pre_qr, Qu, qux, Qy, qyx, and s.

Referenced by set_control_parameters().

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

- ctrlbase.h
- ctrlbase.cpp