Search for usage in LXR

GaussianProcessGuider Class Reference

#include <gaussian_process_guider.h>


struct  guide_parameters

Public Member Functions

 GaussianProcessGuider (guide_parameters parameters)
void add_one_point ()
double deduceResult (double time_step, double prediction_point=-1.0)
void DirectMoveApplied (double amt, double rate)
data_point & get_last_point () const
size_t get_number_of_measurements () const
data_point & get_second_last_point () const
bool GetBoolComputePeriod () const
double GetControlGain () const
std::vector< double > GetGPHyperparameters () const
double GetMinMove () const
int GetNumPointsForApproximation () const
double GetPeriodLengthsInference () const
double GetPeriodLengthsPeriodEstimation () const
double GetPredictionGain () const
void GuidingDithered (double amt, double rate)
void GuidingDitherSettleDone (bool success)
void inject_data_point (double timestamp, double input, double SNR, double control)
Eigen::MatrixXd regularize_dataset (const Eigen::VectorXd &timestamps, const Eigen::VectorXd &gear_error, const Eigen::VectorXd &variances)
void reset ()
double result (double input, double SNR, double time_step, double prediction_point=-1.0)
void save_gp_data () const
bool SetBoolComputePeriod (bool active)
bool SetControlGain (double control_gain)
bool SetGPHyperparameters (const std::vector< double > &hyperparameters)
void SetLearningRate (double learning_rate)
bool SetMinMove (double min_move)
bool SetNumPointsForApproximation (int num_points)
bool SetPeriodLengthsInference (double num_periods)
bool SetPeriodLengthsPeriodEstimation (double num_periods)
bool SetPredictionGain (double)
void UpdateGP (double prediction_point=std::numeric_limits< double >::quiet_NaN())
void UpdatePeriodLength (double period_length)

Detailed Description

This class provides a guiding algorithm for the right ascension axis that learns and predicts the periodic gear error with a Gaussian process.

This prediction helps reducing periodic error components in the residual tracking error. Further it is able to perform tracking without measurement to increase robustness of the overall guiding system.

Definition at line 47 of file gaussian_process_guider.h.

Member Function Documentation

◆ deduceResult()

double GaussianProcessGuider::deduceResult ( double  time_step,
double  prediction_point = -1.0 

This method provides predictive control if no measurement could be made.

A zero measurement is stored with high uncertainty, and then the GP prediction is used for control.

Definition at line 383 of file gaussian_process_guider.cpp.

◆ DirectMoveApplied()

void GaussianProcessGuider::DirectMoveApplied ( double  amt,
double  rate 

This method tells the guider that a direct move was issued.

This has the opposite effect of a dither on the dither offset.

Definition at line 462 of file gaussian_process_guider.cpp.

◆ GuidingDithered()

void GaussianProcessGuider::GuidingDithered ( double  amt,
double  rate 

This method tells the guider that a dither command was issued.

The guider will stop collecting measurements and uses predictions instead, to keep the FFT and the GP working.

Definition at line 439 of file gaussian_process_guider.cpp.

◆ GuidingDitherSettleDone()

void GaussianProcessGuider::GuidingDitherSettleDone ( bool  success)

This method tells the guider that dithering is finished.

The guider will resume normal operation.

Definition at line 451 of file gaussian_process_guider.cpp.

◆ inject_data_point()

void GaussianProcessGuider::inject_data_point ( double  timestamp,
double  input,
double  SNR,
double  control 

This method is needed for automated testing.

It can inject data points.

Definition at line 576 of file gaussian_process_guider.cpp.

◆ regularize_dataset()

Eigen::MatrixXd GaussianProcessGuider::regularize_dataset ( const Eigen::VectorXd &  timestamps,
const Eigen::VectorXd &  gear_error,
const Eigen::VectorXd &  variances 

Takes timestamps, measurements and SNRs and returns them regularized in a matrix.

Definition at line 688 of file gaussian_process_guider.cpp.

◆ reset()

void GaussianProcessGuider::reset ( )

Clears the data from the circular buffer and clears the GP data.

Definition at line 419 of file gaussian_process_guider.cpp.

◆ result()

double GaussianProcessGuider::result ( double  input,
double  SNR,
double  time_step,
double  prediction_point = -1.0 

Calculates the control value based on the current input.

  1. The input is stored, 2. the GP is updated with the new data point, 3. the prediction is calculated to compensate the gear error and 4. the controller is calculated, consisting of feedback and prediction parts.

Definition at line 266 of file gaussian_process_guider.cpp.

◆ save_gp_data()

void GaussianProcessGuider::save_gp_data ( ) const

Saves the GP data to a csv file for external analysis.


Definition at line 755 of file gaussian_process_guider.cpp.

◆ SetLearningRate()

void GaussianProcessGuider::SetLearningRate ( double  learning_rate)

Sets the learning rate.

Useful for disabling it for testing.

Definition at line 822 of file gaussian_process_guider.cpp.

◆ UpdateGP()

void GaussianProcessGuider::UpdateGP ( double  prediction_point = std::numeric_limits<double>::quiet_NaN())

Runs the inference machinery on the GP.

Gets the measurement data from the circular buffer and stores it in Eigen::Vectors. Detrends the data with linear regression. Calculates the main frequency with an FFT. Updates the GP accordingly with new data and parameter.

Definition at line 137 of file gaussian_process_guider.cpp.

◆ UpdatePeriodLength()

void GaussianProcessGuider::UpdatePeriodLength ( double  period_length)

Does filtering and sets the period length of the GPGuider.

Definition at line 669 of file gaussian_process_guider.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 18 2022 03:56:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.