#include <ar_controller.hpp>
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 | |
RecursiveLeastSquares * | rls |
uint | buffer_size |
uint | measurement_head {0} |
uint | command_head {0} |
Matrix | measurement_buffer |
Matrix | command_buffer |
Matrix * | regularization_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 |
Definition at line 15 of file ar_controller.hpp.
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.
DDSPC::PredictiveController::~PredictiveController | ( | ) |
Definition at line 62 of file ar_controller.cpp.
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().
Matrix DDSPC::PredictiveController::get_command_future | ( | int | skip_cmds = 0 | ) |
Definition at line 118 of file ar_controller.cpp.
Referenced by update_system().
Matrix DDSPC::PredictiveController::get_command_past | ( | ) |
Definition at line 144 of file ar_controller.cpp.
Referenced by update_system().
Matrix DDSPC::PredictiveController::get_current_command_past | ( | int | num_steps | ) |
Definition at line 172 of file ar_controller.cpp.
Referenced by calculate_command().
Matrix DDSPC::PredictiveController::get_current_measurement_past | ( | int | num_steps | ) |
Definition at line 158 of file ar_controller.cpp.
Referenced by calculate_command().
void DDSPC::PredictiveController::get_current_past | ( | ) |
Matrix DDSPC::PredictiveController::get_measurement_future | ( | ) |
Definition at line 88 of file ar_controller.cpp.
Referenced by update_system().
Matrix DDSPC::PredictiveController::get_measurement_past | ( | ) |
Definition at line 102 of file ar_controller.cpp.
Referenced by update_system().
|
inline |
Definition at line 52 of file ar_controller.hpp.
void DDSPC::PredictiveController::reset | ( | ) |
Definition at line 66 of file ar_controller.cpp.
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().
void DDSPC::PredictiveController::update_controller | ( | ) |
Definition at line 199 of file ar_controller.cpp.
Referenced by main(), MagAOX::app::hoPredCtrl::processImage(), and MagAOX::app::loPredCtrl::processImage().
void DDSPC::PredictiveController::update_system | ( | ) |
Definition at line 186 of file ar_controller.cpp.
Referenced by main(), and MagAOX::app::loPredCtrl::processImage().
|
private |
Definition at line 40 of file ar_controller.hpp.
Referenced by PredictiveController(), and calculate_command().
|
private |
Definition at line 39 of file ar_controller.hpp.
Referenced by PredictiveController(), visxCtrl.qhyccd.QHYCCDCamera::gain(), adcCtrl.adcCtrl::handle_gain(), and adcCtrl.adcCtrl::loop().
|
private |
Definition at line 37 of file ar_controller.hpp.
Referenced by PredictiveController(), get_command_future(), get_command_past(), get_measurement_future(), and get_measurement_past().
|
private |
Definition at line 38 of file ar_controller.hpp.
Referenced by PredictiveController(), calculate_command(), get_command_past(), get_measurement_past(), and reset().
|
private |
Definition at line 36 of file ar_controller.hpp.
Referenced by PredictiveController(), calculate_command(), get_command_future(), get_command_past(), get_current_command_past(), get_current_measurement_past(), get_measurement_future(), get_measurement_past(), reset(), and update_controller().
|
private |
Definition at line 41 of file ar_controller.hpp.
Referenced by PredictiveController().
|
private |
Definition at line 20 of file ar_controller.hpp.
Referenced by PredictiveController(), calculate_command(), get_command_future(), get_command_past(), get_current_command_past(), get_current_measurement_past(), get_measurement_future(), and get_measurement_past().
|
private |
Definition at line 24 of file ar_controller.hpp.
Referenced by PredictiveController(), calculate_command(), get_command_future(), get_command_past(), and get_current_command_past().
|
private |
Definition at line 22 of file ar_controller.hpp.
Referenced by PredictiveController(), calculate_command(), get_command_future(), get_command_past(), and get_current_command_past().
|
private |
Definition at line 33 of file ar_controller.hpp.
Referenced by PredictiveController(), MagAOX::app::hoPredCtrl::allocate(), calculate_command(), reset(), and update_controller().
|
private |
Definition at line 28 of file ar_controller.hpp.
Referenced by set_regularization(), and update_controller().
|
private |
Definition at line 34 of file ar_controller.hpp.
Referenced by PredictiveController(), and calculate_command().
|
private |
Definition at line 23 of file ar_controller.hpp.
Referenced by PredictiveController(), calculate_command(), get_current_measurement_past(), get_measurement_future(), and get_measurement_past().
|
private |
Definition at line 21 of file ar_controller.hpp.
Referenced by PredictiveController(), calculate_command(), get_current_measurement_past(), get_measurement_future(), and get_measurement_past().
|
private |
Definition at line 45 of file ar_controller.hpp.
Referenced by PredictiveController(), set_regularization(), and update_controller().
|
private |
Definition at line 44 of file ar_controller.hpp.
Referenced by PredictiveController().
|
private |
Definition at line 43 of file ar_controller.hpp.
Referenced by PredictiveController().
|
private |
Definition at line 26 of file ar_controller.hpp.
Referenced by PredictiveController(), and update_controller().
|
private |
Definition at line 29 of file ar_controller.hpp.
Referenced by PredictiveController(), set_regularization(), and update_controller().
|
private |
Definition at line 30 of file ar_controller.hpp.
Referenced by PredictiveController(), set_regularization(), and update_controller().
|
private |
Definition at line 18 of file ar_controller.hpp.
Referenced by PredictiveController(), ~PredictiveController(), get_prediction_matrix(), reset(), update_controller(), and update_system().
|
private |
Definition at line 27 of file ar_controller.hpp.
Referenced by set_regularization(), and update_controller().