COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutraWrap.ControllerLS_FF Class Reference
Inheritance diagram for sutraWrap.ControllerLS_FF:
Collaboration diagram for sutraWrap.ControllerLS_FF:

Public Member Functions

int build_cmat (self, int nfilt)
 Computes the command matrix after imat SVD. More...
 
int init_modalOpti (self, int nmodes, int nrec, numpy.ndarray[numpy.float32] M2V, float gmin, float gmax, int ngain, float Fs)
 Initialize modal optimization control. More...
 
int loadopen_loopSlp (self, numpy.ndarray[numpy.float32] slopes)
 Load recorded open loop slopes for modal optimization initialization. More...
 
int modalControlOptimization (self)
 TODO docstring. More...
 
int set_cmat (self, numpy.ndarray[numpy.float32] cmat)
 Set the command matrix. More...
 
int set_imat (self, numpy.ndarray[numpy.float32] imat)
 Set the interaction matrix. More...
 
int set_modal_gains (self, numpy.ndarray[numpy.float32] mgain)
 Set the controller modal gains. More...
 
int svdec_imat (self)
 Performs interaction matrix SVD. More...
 
- Public Member Functions inherited from sutraWrap.Controller_FF
int add_perturb (self)
 Add the perturbation voltage to the command. More...
 
int add_perturb_voltage (self, str name, numpy.ndarray[numpy.float32] perturb, int N)
 Add a new perturbation voltage buffer. More...
 
int clip_commands (self)
 Clip the commands between volt_min and volt_max (values set in the controller) More...
 
int command_delay (self)
 Delay the command. More...
 
int comp_voltage (self)
 Computes the final voltage to send to the DM. More...
 
int disable_perturb_voltage (self, str name)
 Disable a perturbation voltage buffer. More...
 
int enable_perturb_voltage (self, str name)
 Enable a perturbation voltage buffer. More...
 
int remove_perturb_voltage (self, str name)
 Remove a perturbation voltage buffer. More...
 
int reset_coms (self)
 Reset the commands circular buffer. More...
 
int reset_perturb_voltage (self)
 Remove all perturbation voltage buffers. More...
 
int set_com (self, numpy.ndarray[numpy.float32] com, int nElem)
 Set the command vector of the controller. More...
 
None set_comRange (self, float volt_min, float volt_max)
 Set the volt_min and volt_max value for command clipping. More...
 
int set_delay (self, float delay)
 Set the delay. More...
 
int set_gain (self, float gain)
 Set the gain. More...
 
int set_open_loop (self, int status, bool rst=True)
 Open (1) or close (0) the loop. More...
 
int set_perturb_voltage (self, str name, numpy.ndarray[numpy.float32] perturb, int N)
 Set an existing perturbation voltage buffer. More...
 
int set_val_max (self, float val_max)
 Set the val_max value for command conversion. More...
 
int set_volt_max (self, float volt_max)
 Set the volt_max value for command clipping. More...
 

Properties

 Fs = property
 Sampling frequency for modal optimization. More...
 
 cpt_rec = property
 Counter for modal gains refresh. More...
 
 d_Hcor = property
 Transfer function for modal optimization. More...
 
 d_M2V = property
 Modes to volt matrix for modal optimization. More...
 
 d_S2M = property
 Slopes to modes matrix for modal optimization. More...
 
 d_U = property
 Eigen modes of the imat. More...
 
 d_cenbuff = property
 Centroids circular buffer. More...
 
 d_cmat = property
 Control matrix. More...
 
 d_compbuff = property
 Buffer for POLC computation. More...
 
 d_compbuff2 = property
 Buffer for POLC computation. More...
 
 d_eigenvals = property
 Eigen values of the imat. More...
 
 d_err = property
 Current increment on the command. More...
 
 d_gain = property
 vector of modal gains More...
 
 d_imat = property
 Interaction matrix. More...
 
 d_slpol = property
 Open loop slopes for modal optimization. More...
 
 gmax = property
 Maximal gain for modal optimization. More...
 
 gmin = property
 Minimal gain for modal optimization. More...
 
 is_modopti = property
 Falg for modal optimization. More...
 
 ngain = property
 Number of gain values to test between gmin and gmax for modal optimization. More...
 
 nmodes = property
 Number of modes for modal optimization. More...
 
 nrec = property
 Number of open loop slopes to take for modal optimization. More...
 
- Properties inherited from sutraWrap.Controller_FF
 centro_idx = property
 Indices of the handled centroiders. More...
 
 comRange = property
 
type of : typing.Tuple[float, float] More...
 
 context = property
 GPU context. More...
 
 d_centroids = property
 Slopes vector. More...
 
 d_circularComs0 = property
 Oldest command vector in the circular buffer. More...
 
 d_circularComs1 = property
 Second oldest Command vector in the circular buffer. More...
 
 d_com = property
 Current command vector. More...
 
 d_com1 = property
 Command vector at iteration k-1. More...
 
 d_com_clipped = property
 Delayed commands. More...
 
 d_dmseen = property
 Vector of SutraDm commanded. More...
 
 d_perturb_map = property
 Perturbation voltage buffers. More...
 
 d_voltage = property
 Total voltage to apply on the DMs. More...
 
 delay = property
 Loop delay. More...
 
 device = property
 GPU device index. More...
 
 gain = property
 Controller gain. More...
 
 nactu = property
 Number of actuators to control. More...
 
 nslope = property
 Number of slopes. More...
 
 open_loop = property
 Open loop flag. More...
 
 type = property
 Controller type. More...
 
 val_max = property
 Maximum value for d_voltage (ADU). More...
 

Detailed Description

Definition at line 3384 of file sutraWrap.py.

Member Function Documentation

◆ build_cmat()

int sutraWrap.ControllerLS_FF.build_cmat (   self,
int  nfilt 
)

Computes the command matrix after imat SVD.

Parameters
nfilt(int): number of modes to filter

Definition at line 3391 of file sutraWrap.py.

◆ init_modalOpti()

int sutraWrap.ControllerLS_FF.init_modalOpti (   self,
int  nmodes,
int  nrec,
numpy.ndarray[numpy.float32]  M2V,
float  gmin,
float  gmax,
int  ngain,
float  Fs 
)

Initialize modal optimization control.

Parameters
nmodes(int): number of modes to control
nrec(int): number of open loop slopes to consider
M2V(np.array[ndim=2,dtype=np.float32]): Modes to Volt matrix
gmin(float): Minimal gain
gmax(float): Maximal gain
ngain(int): Number of gain values to test between gmin and gmax
Fs(float): Sampling frequency [Hz]

Definition at line 3410 of file sutraWrap.py.

◆ loadopen_loopSlp()

int sutraWrap.ControllerLS_FF.loadopen_loopSlp (   self,
numpy.ndarray[numpy.float32]  slopes 
)

Load recorded open loop slopes for modal optimization initialization.

Parameters
slopes(np.array[ndim=2,dtype=np.float32]): Open loop slopes

Definition at line 3417 of file sutraWrap.py.

◆ modalControlOptimization()

int sutraWrap.ControllerLS_FF.modalControlOptimization (   self)

TODO docstring.

Definition at line 3421 of file sutraWrap.py.

◆ set_cmat()

int sutraWrap.ControllerLS_FF.set_cmat (   self,
numpy.ndarray[numpy.float32]  cmat 
)

Set the command matrix.

Parameters
cmat(np.array[ndim=2,dtype=np.float32]): command matrix to set

Definition at line 3428 of file sutraWrap.py.

◆ set_imat()

int sutraWrap.ControllerLS_FF.set_imat (   self,
numpy.ndarray[numpy.float32]  imat 
)

Set the interaction matrix.

Parameters
imat(np.array[ndim=2,dtype=np.float32]): interaction matrix to set

Definition at line 3435 of file sutraWrap.py.

◆ set_modal_gains()

int sutraWrap.ControllerLS_FF.set_modal_gains (   self,
numpy.ndarray[numpy.float32]  mgain 
)

Set the controller modal gains.

Parameters
mgain(np.array[ndim1,dtype=np.float32]): modal gains to set

Definition at line 3442 of file sutraWrap.py.

◆ svdec_imat()

int sutraWrap.ControllerLS_FF.svdec_imat (   self)

Performs interaction matrix SVD.

Definition at line 3446 of file sutraWrap.py.

Property Documentation

◆ cpt_rec

sutraWrap.ControllerLS_FF.cpt_rec = property
static

Counter for modal gains refresh.

   @n type of :  int

Definition at line 3462 of file sutraWrap.py.

◆ d_cenbuff

sutraWrap.ControllerLS_FF.d_cenbuff = property
static

Centroids circular buffer.

   @n type of :  carmaWrap.obj_float

Definition at line 3507 of file sutraWrap.py.

◆ d_cmat

sutraWrap.ControllerLS_FF.d_cmat = property
static

Control matrix.

   @n type of :  carmaWrap.obj_float

Definition at line 3516 of file sutraWrap.py.

◆ d_compbuff

sutraWrap.ControllerLS_FF.d_compbuff = property
static

Buffer for POLC computation.

   @n type of :  carmaWrap.obj_float

Definition at line 3525 of file sutraWrap.py.

◆ d_compbuff2

sutraWrap.ControllerLS_FF.d_compbuff2 = property
static

Buffer for POLC computation.

   @n type of :  carmaWrap.obj_float

Definition at line 3534 of file sutraWrap.py.

◆ d_eigenvals

sutraWrap.ControllerLS_FF.d_eigenvals = property
static

Eigen values of the imat.

   @n type of :  carmaWrap.obj_float

Definition at line 3543 of file sutraWrap.py.

◆ d_err

sutraWrap.ControllerLS_FF.d_err = property
static

Current increment on the command.

   @n type of :  carmaWrap.obj_float

Definition at line 3552 of file sutraWrap.py.

◆ d_gain

sutraWrap.ControllerLS_FF.d_gain = property
static

vector of modal gains

   @n type of :  carmaWrap.obj_float

Definition at line 3561 of file sutraWrap.py.

◆ d_Hcor

sutraWrap.ControllerLS_FF.d_Hcor = property
static

Transfer function for modal optimization.

   @n type of :  carmaWrap.obj_float

Definition at line 3471 of file sutraWrap.py.

◆ d_imat

sutraWrap.ControllerLS_FF.d_imat = property
static

Interaction matrix.

   @n type of :  carmaWrap.obj_float

Definition at line 3570 of file sutraWrap.py.

◆ d_M2V

sutraWrap.ControllerLS_FF.d_M2V = property
static

Modes to volt matrix for modal optimization.

   @n type of :  carmaWrap.obj_float

Definition at line 3480 of file sutraWrap.py.

◆ d_S2M

sutraWrap.ControllerLS_FF.d_S2M = property
static

Slopes to modes matrix for modal optimization.

   @n type of :  carmaWrap.obj_float

Definition at line 3489 of file sutraWrap.py.

◆ d_slpol

sutraWrap.ControllerLS_FF.d_slpol = property
static

Open loop slopes for modal optimization.

   @n type of :  carmaWrap.obj_float

Definition at line 3579 of file sutraWrap.py.

◆ d_U

sutraWrap.ControllerLS_FF.d_U = property
static

Eigen modes of the imat.

   @n type of :  carmaWrap.obj_float

Definition at line 3498 of file sutraWrap.py.

◆ Fs

sutraWrap.ControllerLS_FF.Fs = property
static

Sampling frequency for modal optimization.

   @n type of :  float

Definition at line 3453 of file sutraWrap.py.

◆ gmax

sutraWrap.ControllerLS_FF.gmax = property
static

Maximal gain for modal optimization.

   @n type of :  float

Definition at line 3588 of file sutraWrap.py.

◆ gmin

sutraWrap.ControllerLS_FF.gmin = property
static

Minimal gain for modal optimization.

   @n type of :  float

Definition at line 3597 of file sutraWrap.py.

◆ is_modopti

sutraWrap.ControllerLS_FF.is_modopti = property
static

Falg for modal optimization.

   @n type of :  int

Definition at line 3606 of file sutraWrap.py.

◆ ngain

sutraWrap.ControllerLS_FF.ngain = property
static

Number of gain values to test between gmin and gmax for modal optimization.

   @n type of :  int

Definition at line 3615 of file sutraWrap.py.

◆ nmodes

sutraWrap.ControllerLS_FF.nmodes = property
static

Number of modes for modal optimization.

   @n type of :  int

Definition at line 3624 of file sutraWrap.py.

◆ nrec

sutraWrap.ControllerLS_FF.nrec = property
static

Number of open loop slopes to take for modal optimization.

   @n type of :  int

Definition at line 3633 of file sutraWrap.py.


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