RCAC C++
RCACRLS.hpp
1 #ifndef _RCACRLS_HPP_
2 #define _RCACRLS_HPP_
3 
4 #include "RCAC.hpp"
5 #include <iostream>
6 #include "Eigen/Core"
7 #include "Eigen/Sparse"
8 #include "unsupported/Eigen/KroneckerProduct"
9 
10 //Name: Nima Mohseni
11 //Date: 1/1/2020
12 //Purpose: This file contains the implementation of RLS RCAC as a derived class
13 //of the base RCAC class
14 
32 //Struct flags: contains the necessary flags and data for the RLS RCAC
34 {
35  //Default RCAC Flags. Required in all RCAC implementations
36  int lz;
37  int ly;
38  int lu;
39  int Nc;
40  Eigen::VectorXd theta_0;
41  int filtorder;
42  int k_0;
43  double lambda;
44 
45  //RLS RCAC Flags
46  Eigen::MatrixXd P0;
47  Eigen::MatrixXd Ru;
48  Eigen::MatrixXd Rz;
49 };
50 
55 class RCACRLS: public RCAC
56 {
57  public:
64  //Value ctor: Initializes RCAC using RLS with the given flags and
65  //filter values
66  RCACRLS(
67  rcacRlsFlags &FLAGS,
68  rcacFilt &FILT
69  );
70 
71  private:
78  //Function coeffUpdate: Compute the RCAC coefficient update for RLS
79  void coeffUpdate(
80  Eigen::VectorXd &zIn
81  );
82 
83  //RLS FLAGS
84  double lambda;
85  Eigen::MatrixXd P0;
86  Eigen::MatrixXd Ru;
87  Eigen::MatrixXd Rz;
88 };
89 
90 #endif
Definition: RCACRLS.hpp:55
Definition: RCACRLS.hpp:33
Definition: RCAC.hpp:66
Definition: RCAC.hpp:81