API
 
Loading...
Searching...
No Matches
DDSPC::PredictiveController Class Reference

#include <ar_controller.hpp>

Collaboration diagram for DDSPC::PredictiveController:
Collaboration graph

Public Member Functions

 PredictiveController (int num_actuators, int num_history, int num_future, realT gain, realT gamma, realT initial_regularization, realT initial_covariance)
 
 ~PredictiveController ()
 
void set_regularization (realT new_regularization)
 
Matrix get_prediction_matrix ()
 
void reset ()
 
Matrix get_measurement_future ()
 
Matrix get_measurement_past ()
 
Matrix get_command_future (int skip_cmds)
 
Matrix get_command_past ()
 
Matrix get_current_command_past (int num_steps)
 
Matrix get_current_measurement_past (int num_steps)
 
void get_current_past ()
 
Matrix calculate_command (Matrix new_measurement, Matrix exploration_noise)
 
void update_system ()
 
void update_controller ()
 

Private Attributes

RecursiveLeastSquaresrls
 
uint buffer_size
 
uint measurement_head {0}
 
uint command_head {0}
 
Matrix measurement_buffer
 
Matrix command_buffer
 
Matrixregularization_matrix
 
bool use_regularization_matrix_01 {true}
 
bool do_switch_regularization_matrix {false}
 
Matrix regularization_matrix_01
 
Matrix regularization_matrix_02
 
Matrix controller
 
Matrix integrator
 
int _num_modes
 
int _num_future
 
int _num_history
 
realT _gain
 
realT _delta_max
 
realT _regularization
 
int num_predictors
 
int num_features
 
int num_correlations
 

Detailed Description

Definition at line 15 of file ar_controller.hpp.

Constructor & Destructor Documentation

◆ PredictiveController()

DDSPC::PredictiveController::PredictiveController ( int  num_actuators,
int  num_history,
int  num_future,
realT  gain = 0.25,
realT  gamma = 1.0,
realT  initial_regularization = 0.015,
realT  initial_covariance = 1e5 
)

Definition at line 6 of file ar_controller.cpp.

◆ ~PredictiveController()

DDSPC::PredictiveController::~PredictiveController ( )

Definition at line 62 of file ar_controller.cpp.

Member Function Documentation

◆ calculate_command()

Matrix DDSPC::PredictiveController::calculate_command ( Matrix  new_measurement,
Matrix  exploration_noise 
)

Definition at line 218 of file ar_controller.cpp.

Referenced by main(), and MagAOX::app::loPredCtrl::processImage().

◆ get_command_future()

Matrix DDSPC::PredictiveController::get_command_future ( int  skip_cmds = 0)

Definition at line 118 of file ar_controller.cpp.

Referenced by update_system().

◆ get_command_past()

Matrix DDSPC::PredictiveController::get_command_past ( )

Definition at line 144 of file ar_controller.cpp.

Referenced by update_system().

◆ get_current_command_past()

Matrix DDSPC::PredictiveController::get_current_command_past ( int  num_steps)

Definition at line 172 of file ar_controller.cpp.

Referenced by calculate_command().

◆ get_current_measurement_past()

Matrix DDSPC::PredictiveController::get_current_measurement_past ( int  num_steps)

Definition at line 158 of file ar_controller.cpp.

Referenced by calculate_command().

◆ get_current_past()

void DDSPC::PredictiveController::get_current_past ( )

◆ get_measurement_future()

Matrix DDSPC::PredictiveController::get_measurement_future ( )

Definition at line 88 of file ar_controller.cpp.

Referenced by update_system().

◆ get_measurement_past()

Matrix DDSPC::PredictiveController::get_measurement_past ( )

Definition at line 102 of file ar_controller.cpp.

Referenced by update_system().

◆ get_prediction_matrix()

Matrix DDSPC::PredictiveController::get_prediction_matrix ( )
inline

Definition at line 52 of file ar_controller.hpp.

◆ reset()

void DDSPC::PredictiveController::reset ( )

Definition at line 66 of file ar_controller.cpp.

◆ set_regularization()

void DDSPC::PredictiveController::set_regularization ( realT  new_regularization)

Definition at line 73 of file ar_controller.cpp.

Referenced by main(), and MagAOX::app::loPredCtrl::processImage().

◆ update_controller()

void DDSPC::PredictiveController::update_controller ( )

◆ update_system()

void DDSPC::PredictiveController::update_system ( )

Definition at line 186 of file ar_controller.cpp.

Referenced by main(), and MagAOX::app::loPredCtrl::processImage().

Member Data Documentation

◆ _delta_max

realT DDSPC::PredictiveController::_delta_max
private

Definition at line 40 of file ar_controller.hpp.

Referenced by PredictiveController(), and calculate_command().

◆ _gain

realT DDSPC::PredictiveController::_gain
private

◆ _num_future

int DDSPC::PredictiveController::_num_future
private

◆ _num_history

int DDSPC::PredictiveController::_num_history
private

◆ _num_modes

◆ _regularization

realT DDSPC::PredictiveController::_regularization
private

Definition at line 41 of file ar_controller.hpp.

Referenced by PredictiveController().

◆ buffer_size

◆ command_buffer

Matrix DDSPC::PredictiveController::command_buffer
private

◆ command_head

uint DDSPC::PredictiveController::command_head {0}
private

◆ controller

Matrix DDSPC::PredictiveController::controller
private

◆ do_switch_regularization_matrix

bool DDSPC::PredictiveController::do_switch_regularization_matrix {false}
private

Definition at line 28 of file ar_controller.hpp.

Referenced by set_regularization(), and update_controller().

◆ integrator

Matrix DDSPC::PredictiveController::integrator
private

Definition at line 34 of file ar_controller.hpp.

Referenced by PredictiveController(), and calculate_command().

◆ measurement_buffer

Matrix DDSPC::PredictiveController::measurement_buffer
private

◆ measurement_head

uint DDSPC::PredictiveController::measurement_head {0}
private

◆ num_correlations

int DDSPC::PredictiveController::num_correlations
private

Definition at line 45 of file ar_controller.hpp.

Referenced by PredictiveController(), set_regularization(), and update_controller().

◆ num_features

int DDSPC::PredictiveController::num_features
private

Definition at line 44 of file ar_controller.hpp.

Referenced by PredictiveController().

◆ num_predictors

int DDSPC::PredictiveController::num_predictors
private

Definition at line 43 of file ar_controller.hpp.

Referenced by PredictiveController().

◆ regularization_matrix

Matrix* DDSPC::PredictiveController::regularization_matrix
private

Definition at line 26 of file ar_controller.hpp.

Referenced by PredictiveController(), and update_controller().

◆ regularization_matrix_01

Matrix DDSPC::PredictiveController::regularization_matrix_01
private

Definition at line 29 of file ar_controller.hpp.

Referenced by PredictiveController(), set_regularization(), and update_controller().

◆ regularization_matrix_02

Matrix DDSPC::PredictiveController::regularization_matrix_02
private

Definition at line 30 of file ar_controller.hpp.

Referenced by PredictiveController(), set_regularization(), and update_controller().

◆ rls

RecursiveLeastSquares* DDSPC::PredictiveController::rls
private

◆ use_regularization_matrix_01

bool DDSPC::PredictiveController::use_regularization_matrix_01 {true}
private

Definition at line 27 of file ar_controller.hpp.

Referenced by set_regularization(), and update_controller().


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