|
RCAC C++
|
#include <RCAC.hpp>


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 RCAC * | init (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 |
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.
|
protectedpure virtual |
Abstract function for the ceofficient update implementation (e.g. RLS, Gradient). Child classes must implement this function for RCAC to work
| zIn | performance measurement |
|
protected |
Compute the filtered variables given current regressors and filter values
|
inline |
Returns a vector of the current RCAC coefficients.
|
inline |
Returns RCAC's computed value for the control. Must run oneStep at least once.
|
inline |
Returns the timestep of RCAC
|
inline |
Returns the number of control inputs that RCAC is using.
|
inline |
Returns the number of sensor measurements that RCAC is using.
|
inline |
Returns the number of performance measurements that RCAC is using.
|
inline |
Returns the controller order of RCAC.
|
static |
Factory method for initializing RCAC types. This method is defined in the file RCACCreator.hpp
| FLAGS | template for a struct containing the required flags for the type of RCAC to be used. |
| FILT | struct containing the filter coefficients for ( ). |
| whichRCAC | string 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.
|
protected |
Initialize the variables required for filtering to zero
|
protected |
Initialize the regressor variables uphi and yphi to zero vectors
| 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.
| uIn | previous control input |
| zIn | current performance measurement |
| yIn | current sensor measurement |