17 #ifndef _SUTRA_CONTROLLER_GENERIC_LINEAR_H_
18 #define _SUTRA_CONTROLLER_GENERIC_LINEAR_H_
25 template <
typename Tcomp,
typename Tout>
35 int m_n_slope_buffers;
37 int m_n_state_buffers;
49 bool polc(){
return m_polc;}
67 std::vector<CarmaObj<Tcomp>*>
d_matA;
68 std::vector<CarmaObj<Tcomp>*>
d_matL;
69 std::unique_ptr<CarmaObj<Tcomp>>
d_matK;
70 std::unique_ptr<CarmaObj<Tcomp>>
d_matD;
71 std::unique_ptr<CarmaObj<Tcomp>>
d_matF;
85 int nstates_buffers,
int nmodes,
int niir_in,
int niir_out,
87 SutraDms *dms,
int *idx_dms,
int ndm,
int *idx_centro,
int ncentro);
113 template <
typename T>
114 void pad_cmat(T *idata,
int m,
int n, T *odata,
int m2,
int n2,
this class provides the context in which CarmaObj are created
this class provides the controller features to COMPASS
this class provides the controller_generic features to COMPASS
std::vector< CarmaObj< Tcomp > * > d_iir_b
list of iir 'b' vectors (inputs)
std::deque< CarmaObj< Tcomp > * > d_circular_s
circ buffer slopes
std::vector< CarmaObj< Tcomp > * > d_iir_a
list of iir 'a' vectors (outputs)
std::unique_ptr< CarmaObj< Tcomp > > d_s_now
vector used for slope calcs
int set_matL(float *L, int i)
std::unique_ptr< CarmaObj< Tcomp > > d_matD
D matrix (interaction matrix)
int set_matA(float *A, int i)
int set_iir_a(float *iir_a, int i)
std::unique_ptr< CarmaObj< Tcomp > > d_matK
K matrix (state to modes)
std::unique_ptr< CarmaObj< Tcomp > > d_matF
F matrix (mode to actu)
std::vector< CarmaObj< Tcomp > * > d_matL
list of L matrices (innovations)
std::vector< CarmaObj< Tcomp > * > d_matA
list of A matrices (recursions)
int set_iir_b(float *iir_b, int i)
int comp_com()
!!! YOU MUST set d_centroids before calling it!!!!
std::deque< CarmaObj< Tcomp > * > d_circular_u_out
circ buffer iir output
std::deque< CarmaObj< Tcomp > * > d_circular_u_in
circ buffer iir inputs
sutra_controller_generic_linear(CarmaContext *context, int nslope, int nslopes_buffers, int nactu, int nstates, int nstates_buffers, int nmodes, int niir_in, int niir_out, float delay, bool polc, bool is_modal, SutraDms *dms, int *idx_dms, int ndm, int *idx_centro, int ncentro)
~sutra_controller_generic_linear()
std::unique_ptr< CarmaObj< Tcomp > > d_u_now
vector used for modal calcs
std::unique_ptr< CarmaObj< Tcomp > > d_x_now
vector used for state calcs
sutra_controller_generic_linear()=delete
std::deque< CarmaObj< Tcomp > * > d_circular_x
circ buffer states
void pad_cmat(T *idata, int m, int n, T *odata, int m2, int n2, CarmaDevice *device)