Drake
Collaboration diagram for Control Systems:

Classes

class  InverseDynamicsController< T >
 A state feedback controller that uses a PidController to generate desired accelerations, which are then converted into torques using InverseDynamics. More...
 
class  LinearModelPredictiveController< T >
 Implements a basic Model Predictive Controller that linearizes the system about an equilibrium condition and regulates to the same point by solving an optimal control problem over a finite time horizon. More...
 
class  PidControlledSystem< T >
 A system that encapsulates a PidController and a controlled System (a.k.a the "plant"). More...
 
class  PidController< T >
 Implements the PID controller. More...
 

Functions

LinearQuadraticRegulatorResult LinearQuadraticRegulator (const Eigen::Ref< const Eigen::MatrixXd > &A, const Eigen::Ref< const Eigen::MatrixXd > &B, const Eigen::Ref< const Eigen::MatrixXd > &Q, const Eigen::Ref< const Eigen::MatrixXd > &R, const Eigen::Ref< const Eigen::MatrixXd > &N=Eigen::Matrix< double, 0, 0 >::Zero())
 Computes the optimal feedback controller, u=-Kx. More...
 
std::unique_ptr< systems::LinearSystem< double > > LinearQuadraticRegulator (const LinearSystem< double > &system, const Eigen::Ref< const Eigen::MatrixXd > &Q, const Eigen::Ref< const Eigen::MatrixXd > &R, const Eigen::Ref< const Eigen::MatrixXd > &N=Eigen::Matrix< double, 0, 0 >::Zero())
 Creates a system that implements the optimal time-invariant linear quadratic regulator (LQR): More...
 
std::unique_ptr< systems::AffineSystem< double > > LinearQuadraticRegulator (const System< double > &system, const Context< double > &context, const Eigen::Ref< const Eigen::MatrixXd > &Q, const Eigen::Ref< const Eigen::MatrixXd > &R, const Eigen::Ref< const Eigen::MatrixXd > &N=Eigen::Matrix< double, 0, 0 >::Zero())
 Linearizes the System around the specified Context, computes the optimal time-invariant linear quadratic regulator (LQR), and returns a System which implements that regulator in the original System's coordinates. More...
 
Eigen::MatrixXd ControllabilityMatrix (const LinearSystem< double > &sys)
 Returns the controllability matrix: R = [B, AB, ..., A^{n-1}B]. More...
 
bool IsControllable (const LinearSystem< double > &sys, double threshold)
 Returns true iff the controllability matrix is full row rank. More...
 

Detailed Description

Function Documentation

Eigen::MatrixXd ControllabilityMatrix ( const LinearSystem< double > &  sys)

Returns the controllability matrix: R = [B, AB, ..., A^{n-1}B].

Here is the call graph for this function:

Here is the caller graph for this function:

bool IsControllable ( const LinearSystem< double > &  sys,
double  threshold 
)

Returns true iff the controllability matrix is full row rank.

Here is the call graph for this function:

Here is the caller graph for this function:

LinearQuadraticRegulatorResult LinearQuadraticRegulator ( const Eigen::Ref< const Eigen::MatrixXd > &  A,
const Eigen::Ref< const Eigen::MatrixXd > &  B,
const Eigen::Ref< const Eigen::MatrixXd > &  Q,
const Eigen::Ref< const Eigen::MatrixXd > &  R,
const Eigen::Ref< const Eigen::MatrixXd > &  N = Eigen::Matrix< double, 0, 0 >::Zero() 
)

Computes the optimal feedback controller, u=-Kx.

\[ \dot{x} = Ax + Bu \]

\[ \min_u \int_0^T x'Qx + u'Ru + 2x'Nu dt \]

Parameters
AThe state-space dynamics matrix of size num_states x num_states.
BThe state-space input matrix of size num_states x num_inupts.
QA symmetric positive semi-definite cost matrix of size num_states x num_states.
RA symmetric positive definite cost matrix of size num_inputs x num_inputs.
NA cost matrix of size num_states x num_inputs.
Returns
A structure that contains the optimal feedback gain K and the quadratic cost term S. The optimal feedback control is u = -Kx;
Exceptions
std::runtime_errorif R is not positive definite.

Here is the call graph for this function:

Here is the caller graph for this function:

std::unique_ptr< LinearSystem< double > > LinearQuadraticRegulator ( const LinearSystem< double > &  system,
const Eigen::Ref< const Eigen::MatrixXd > &  Q,
const Eigen::Ref< const Eigen::MatrixXd > &  R,
const Eigen::Ref< const Eigen::MatrixXd > &  N = Eigen::Matrix< double, 0, 0 >::Zero() 
)

Creates a system that implements the optimal time-invariant linear quadratic regulator (LQR):

\[ \min_u \int_0^T x'Qx + u'Ru dt \]

Parameters
systemThe System to be controlled.
QA symmetric positive semi-definite cost matrix of size num_states x num_states.
RA symmetric positive definite cost matrix of size num_inputs x num_inputs.
NA cost matrix of size num_states x num_inputs.
Returns
A system implementing the optimal controller in the original system coordinates.
Exceptions
std::runtime_errorif R is not positive definite.

Here is the call graph for this function:

std::unique_ptr< AffineSystem< double > > LinearQuadraticRegulator ( const System< double > &  system,
const Context< double > &  context,
const Eigen::Ref< const Eigen::MatrixXd > &  Q,
const Eigen::Ref< const Eigen::MatrixXd > &  R,
const Eigen::Ref< const Eigen::MatrixXd > &  N = Eigen::Matrix< double, 0, 0 >::Zero() 
)

Linearizes the System around the specified Context, computes the optimal time-invariant linear quadratic regulator (LQR), and returns a System which implements that regulator in the original System's coordinates.

\[ \min_u \int_0^T (x-x_0)'Q(x-x_0) + (u-u_0)'R(u-u_0) dt \]

where \( x_0 \) is the nominal state and \( u_0 \) is the nominal input.

Parameters
systemThe System to be controlled.
contextDefines the desired state and control input to regulate the system to. Note that this state/input must be an equilibrium point of the system. See drake::systems::Linearize for more details.
QA symmetric positive semi-definite cost matrix of size num_states x num_states.
RA symmetric positive definite cost matrix of size num_inputs x num_inputs.
NA cost matrix of size num_states x num_inputs.
Returns
A system implementing the optimal controller in the original system coordinates.
Exceptions
std::runtime_errorif R is not positive definite.

Here is the call graph for this function: