RCAC C++
RCAC Class Referenceabstract

#include <RCAC.hpp>

Inheritance diagram for RCAC:
Collaboration diagram for RCAC:

Public Member Functions

void oneStep (Eigen::VectorXd &uIn, Eigen::VectorXd &zIn, Eigen::VectorXd &yIn)
 
Eigen::VectorXd getControl ()
 
Eigen::VectorXd getCoeff ()
 
int getlu ()
 
int getly ()
 
int getlz ()
 
int getNc ()
 
int getkk ()
 

Static Public Member Functions

template<typename T >
static RCACinit (T &FLAGS, rcacFilt &FILT, std::string &whichRCAC)
 

Protected Member Functions

virtual void coeffUpdate (Eigen::VectorXd &zIn)=0
 
void initRegressor ()
 
void initFiltered ()
 
void computeFiltered ()
 

Protected Attributes

int lz
 
int ly
 
int lu
 
int Nc
 
int k_0
 
Eigen::VectorXd theta_0
 
int filtorder
 
rcacFilt FILT
 
std::deque< Eigen::VectorXd > uBar
 
std::deque< Eigen::VectorXd > ufBar
 
std::deque< Eigen::VectorXd > zBar
 
std::deque< Eigen::VectorXd > zfBar
 
std::deque< Eigen::MatrixXd > PhiBar
 
std::deque< Eigen::MatrixXd > PhifBar
 
Eigen::MatrixXd P
 
Eigen::VectorXd theta
 
Eigen::VectorXd uOut
 
Eigen::VectorXd uIn
 
Eigen::MatrixXd Phi
 
Eigen::VectorXd uphi
 
Eigen::VectorXd yphi
 
bool rcacRLS
 
bool rcacGrad
 
int kk = 1
 

Detailed Description

The parent RCAC class. This class handles all the low level computation of RCAC such as the filtering, coefficient updates, and keeping track of the regressors.

Almost all the methods are polymorphic and can be modified by child classes to create RCAC algorithms with more complex filtering.

Member Function Documentation

◆ coeffUpdate()

virtual void RCAC::coeffUpdate ( Eigen::VectorXd &  zIn)
protectedpure virtual

Abstract function for the ceofficient update implementation (e.g. RLS, Gradient). Child classes must implement this function for RCAC to work

Parameters
zInperformance measurement

◆ computeFiltered()

void RCAC::computeFiltered ( )
protected

Compute the filtered variables given current regressors and filter values

◆ getCoeff()

Eigen::VectorXd RCAC::getCoeff ( )
inline

Returns a vector of the current RCAC coefficients.

◆ getControl()

Eigen::VectorXd RCAC::getControl ( )
inline

Returns RCAC's computed value for the control. Must run oneStep at least once.

◆ getkk()

int RCAC::getkk ( )
inline

Returns the timestep of RCAC

◆ getlu()

int RCAC::getlu ( )
inline

Returns the number of control inputs that RCAC is using.

◆ getly()

int RCAC::getly ( )
inline

Returns the number of sensor measurements that RCAC is using.

◆ getlz()

int RCAC::getlz ( )
inline

Returns the number of performance measurements that RCAC is using.

◆ getNc()

int RCAC::getNc ( )
inline

Returns the controller order of RCAC.

◆ init()

template<typename T >
RCAC * RCAC::init ( T &  FLAGS,
rcacFilt FILT,
std::string &  rcacType 
)
static

Factory method for initializing RCAC types. This method is defined in the file RCACCreator.hpp

Parameters
FLAGStemplate for a struct containing the required flags for the type of RCAC to be used.
FILTstruct containing the filter coefficients for ( $G_f$).
whichRCACstring containing the type of RCAC to be used, defined in RCACCreator.hpp.

A factory method that creates a pointer to the specific type of RCAC you want to use.

Parameters
FLAGStemplate for a struct containing the required flags for the type of RCAC to be used.
FILTstruct containing the filter coefficients for ( $G_f$).
whichRCACstring containing the type of RCAC to be used.

◆ initFiltered()

void RCAC::initFiltered ( )
protected

Initialize the variables required for filtering to zero

◆ initRegressor()

void RCAC::initRegressor ( )
protected

Initialize the regressor variables uphi and yphi to zero vectors

◆ oneStep()

void RCAC::oneStep ( Eigen::VectorXd &  uIn,
Eigen::VectorXd &  zIn,
Eigen::VectorXd &  yIn 
)

This function allows the user to compute one step of the RCAC update.

Parameters
uInprevious control input
zIncurrent performance measurement
yIncurrent sensor measurement

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