60 #ifndef __OPTIMALCONTROL_H__
61 #define __OPTIMALCONTROL_H__
63 #include <yarp/sig/Vector.h>
64 #include <yarp/sig/Matrix.h>
82 yarp::sig::Matrix
A,
At;
83 yarp::sig::Matrix
B,
Bt;
84 yarp::sig::Matrix
V,
VN;
88 yarp::sig::Matrix *
Ti;
89 yarp::sig::Matrix *
Li;
109 Riccati(
const yarp::sig::Matrix &_A,
const yarp::sig::Matrix &_B,
110 const yarp::sig::Matrix &_V,
const yarp::sig::Matrix &_P,
111 const yarp::sig::Matrix &_VN,
bool verb=
false);
118 yarp::sig::Matrix
L(
int step);
125 yarp::sig::Matrix
T(
int step);
136 void setProblemData(
const yarp::sig::Matrix &_A,
const yarp::sig::Matrix &_B,
137 const yarp::sig::Matrix &_V,
const yarp::sig::Matrix &_P,
138 const yarp::sig::Matrix &_VN);
164 void doLQcontrol(
int step,
const yarp::sig::Vector &
x, yarp::sig::Vector &ret);
Classic Riccati recursive formula for optimal control in a LQ problem.
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.
void setVerbose(bool verb=true)
Enable or disable verbose feedback (that is, printing additional information)
yarp::sig::Vector doLQcontrol(int step, const yarp::sig::Vector &x)
Compute the LQ feedback control, in the form: ret= - L(i) * x.
void solveRiccati(int steps)
Solve recursively discrete algebraic Riccati equation (DARE) and stores matrices Ti and Li,...
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.
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 doLQcontrol(int step, const yarp::sig::Vector &x, yarp::sig::Vector &ret)
Compute the LQ feedback control, in the form: u= - L(i) * x.
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.