iCub-main
Loading...
Searching...
No Matches
Riccati Class Reference

#include <optimalControl.h>

Public Member Functions

 Riccati (const yarp::sig::Matrix &_A, const yarp::sig::Matrix &_B, const yarp::sig::Matrix &_V, const yarp::sig::Matrix &_P, const yarp::sig::Matrix &_VN, bool verb=false)
 Constructor, with initialization of algebraic Riccati equation.
yarp::sig::Matrix L (int step)
 Get stored L_i matrix; call this function only after solveRiccati().
yarp::sig::Matrix T (int step)
 Get stored T_i matrix; call this function only after solveRiccati().
void setProblemData (const yarp::sig::Matrix &_A, const yarp::sig::Matrix &_B, const yarp::sig::Matrix &_V, const yarp::sig::Matrix &_P, const yarp::sig::Matrix &_VN)
 Initialization of algebraic Riccati equation.
void solveRiccati (int steps)
 Solve recursively discrete algebraic Riccati equation (DARE) and stores matrices Ti and Li, where i=0:N-1 is the time index.
yarp::sig::Vector doLQcontrol (int step, const yarp::sig::Vector &x)
 Compute the LQ feedback control, in the form: ret= - L(i) * x.
void doLQcontrol (int step, const yarp::sig::Vector &x, yarp::sig::Vector &ret)
 Compute the LQ feedback control, in the form: u= - L(i) * x.
void setVerbose (bool verb=true)
 Enable or disable verbose feedback (that is, printing additional information).

Protected Attributes

yarp::sig::Matrix A
yarp::sig::Matrix At
yarp::sig::Matrix B
yarp::sig::Matrix Bt
yarp::sig::Matrix V
yarp::sig::Matrix VN
yarp::sig::Matrix P
yarp::sig::Matrix TN
yarp::sig::Matrix lastT
yarp::sig::Matrix * Ti
yarp::sig::Matrix * Li
yarp::sig::Vector x
size_t n
size_t m
int N
bool verbose

Detailed Description

Definition at line 79 of file optimalControl.h.

Constructor & Destructor Documentation

◆ Riccati()

Riccati::Riccati ( const yarp::sig::Matrix & _A,
const yarp::sig::Matrix & _B,
const yarp::sig::Matrix & _V,
const yarp::sig::Matrix & _P,
const yarp::sig::Matrix & _VN,
bool verb = false )

Constructor, with initialization of algebraic Riccati equation.

Parameters
_AState transition matrix
_BControl matrix
_VState cost matrix
_PControl cost matrix
_VNFinal state cost matrix

Definition at line 26 of file optimalControl.cpp.

Member Function Documentation

◆ doLQcontrol() [1/2]

yarp::sig::Vector Riccati::doLQcontrol ( int step,
const yarp::sig::Vector & x )

Compute the LQ feedback control, in the form: ret= - L(i) * x.

Parameters
stepThe time index i
xThe state vector

◆ doLQcontrol() [2/2]

void Riccati::doLQcontrol ( int step,
const yarp::sig::Vector & x,
yarp::sig::Vector & ret )

Compute the LQ feedback control, in the form: u= - L(i) * x.

Parameters
stepThe time index i
xThe state vector
retThe control vector

◆ L()

Matrix Riccati::L ( int step)

Get stored L_i matrix; call this function only after solveRiccati().

Parameters
stepThe time index of the i-th matrix

Definition at line 56 of file optimalControl.cpp.

◆ setProblemData()

void Riccati::setProblemData ( const yarp::sig::Matrix & _A,
const yarp::sig::Matrix & _B,
const yarp::sig::Matrix & _V,
const yarp::sig::Matrix & _P,
const yarp::sig::Matrix & _VN )

Initialization of algebraic Riccati equation.

Parameters
_AState transition matrix
_BControl matrix
_VState cost matrix
_PControl cost matrix
_VNFinal state cost matrix

Definition at line 94 of file optimalControl.cpp.

◆ setVerbose()

void Riccati::setVerbose ( bool verb = true)

Enable or disable verbose feedback (that is, printing additional information).

Parameters
verbFlag for verbose mode

Definition at line 49 of file optimalControl.cpp.

◆ solveRiccati()

void Riccati::solveRiccati ( int steps)

Solve recursively discrete algebraic Riccati equation (DARE) and stores matrices Ti and Li, where i=0:N-1 is the time index.

Parameters
stepsThe number N of steps of the finite horizon controller

Definition at line 113 of file optimalControl.cpp.

◆ T()

Matrix Riccati::T ( int step)

Get stored T_i matrix; call this function only after solveRiccati().

Parameters
stepThe time index of the i-th matrix

Definition at line 75 of file optimalControl.cpp.

Member Data Documentation

◆ A

yarp::sig::Matrix Riccati::A
protected

Definition at line 82 of file optimalControl.h.

◆ At

yarp::sig::Matrix Riccati::At
protected

Definition at line 82 of file optimalControl.h.

◆ B

yarp::sig::Matrix Riccati::B
protected

Definition at line 83 of file optimalControl.h.

◆ Bt

yarp::sig::Matrix Riccati::Bt
protected

Definition at line 83 of file optimalControl.h.

◆ lastT

yarp::sig::Matrix Riccati::lastT
protected

Definition at line 87 of file optimalControl.h.

◆ Li

yarp::sig::Matrix* Riccati::Li
protected

Definition at line 89 of file optimalControl.h.

◆ m

size_t Riccati::m
protected

Definition at line 94 of file optimalControl.h.

◆ N

int Riccati::N
protected

Definition at line 95 of file optimalControl.h.

◆ n

size_t Riccati::n
protected

Definition at line 93 of file optimalControl.h.

◆ P

yarp::sig::Matrix Riccati::P
protected

Definition at line 85 of file optimalControl.h.

◆ Ti

yarp::sig::Matrix* Riccati::Ti
protected

Definition at line 88 of file optimalControl.h.

◆ TN

yarp::sig::Matrix Riccati::TN
protected

Definition at line 87 of file optimalControl.h.

◆ V

yarp::sig::Matrix Riccati::V
protected

Definition at line 84 of file optimalControl.h.

◆ verbose

bool Riccati::verbose
protected

Definition at line 97 of file optimalControl.h.

◆ VN

yarp::sig::Matrix Riccati::VN
protected

Definition at line 84 of file optimalControl.h.

◆ x

yarp::sig::Vector Riccati::x
protected

Definition at line 91 of file optimalControl.h.


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