MockControlLoop¶
- class lsst.ts.m2com.MockControlLoop(gain_prefilter_axial: float, params_prefilter_axial: ndarray[Any, dtype[float64]], gain_prefilter_tangent: float, params_prefilter_tangent: ndarray[Any, dtype[float64]], params_cmd_delay_axial: list[float], params_cmd_delay_tangent: list[float], gain_control_filter_axial: float, params_control_filter_axial: ndarray[Any, dtype[float64]], gain_control_filter_tangent: float, params_control_filter_tangent: ndarray[Any, dtype[float64]], kdc: ndarray[Any, dtype[float64]], kinfl: ndarray[Any, dtype[float64]], hd_comp: ndarray[Any, dtype[float64]], thresholds_deadzone_axial: list[float], thresholds_deadzone_tangent: list[float], min_gain_schedular_axial: float, min_gain_schedular_tangent: float, num_sample_ramp_up: int, num_sample_ramp_down: int, max_sample_settle: int, step_limit_axial: int, step_limit_tangent: int, in_position_window_size: int, in_position_control_frequency: float, in_position_threshold_axial: float, in_position_threshold_tangent: float, is_feedforward: bool = True, is_feedback: bool = True)¶
Bases:
object
Mock control loop that implements the force control algorithm.
Notes¶
This class is translated from vendor’s original LabVIEW code: “Control Loop (FIFO).vi” in ts_mtm2_cell.
Parameters¶
- gain_prefilter_axial
float
Gain of the prefilter for the axial actuators.
- params_prefilter_axial
numpy.ndarray
Parameters of the prefilter for the axial actuators: [a11 a21 b11 b21 a12 a22 b12 b22 … a1N a2N b1N b2N].
- gain_prefilter_tangent
float
Gain of the prefilter for the tangent actuators.
- params_prefilter_tangent
numpy.ndarray
Parameters of the prefilter for the tangent actuators: [a11 a21 b11 b21 a12 a22 b12 b22 … a1N a2N b1N b2N].
- params_cmd_delay_axial
list
Parameters of the command delay filter for the axial actuators: [b0, b1, b2, …, bN].
- params_cmd_delay_tangent
list
Parameters of the command delay filter for the tangent actuators: [b0, b1, b2, …, bN].
- gain_control_filter_axial
float
Gain of the control filter for the axial actuators.
- params_control_filter_axial
numpy.ndarray
Parameters of the control filter for the axial actuators: [a11 a21 b11 b21 a12 a22 b12 b22 … a1N a2N b1N b2N].
- gain_control_filter_tangent
float
Gain of the control filter for the tangent actuators.
- params_control_filter_tangent
numpy.ndarray
Parameters of the control filter for the tangent actuators: [a11 a21 b11 b21 a12 a22 b12 b22 … a1N a2N b1N b2N].
- kdc
numpy.ndarray
Decoupling matrix.
- kinfl
numpy.ndarray
Influence matrix.
- hd_comp
numpy.ndarray
Hardpoint compensation matrix.
- thresholds_deadzone_axial
list
The [lower, upper] thresholds of the axial hardpoint error in deadzone. The unit is Newton.
- thresholds_deadzone_tangent
list
The [lower, upper] thresholds of the tangent hardpoint error in deadzone. The unit is Newton.
- min_gain_schedular_axial
float
Minimum gain for the axial actuators in the gain schedular. The value should be in (0.0, 1.0).
- min_gain_schedular_tangent
float
Minimum gain for the tangent actuators in the gain schedular. The value should be in (0.0, 1.0).
- num_sample_ramp_up
int
Number of samples in the ramping up process in the gain schedular. This value can not be 0.
- num_sample_ramp_down
int
Number of samples in the ramping down process in the gain schedular. This value can not be 0.
- max_sample_settle
int
Maximum number of samples in the settling process in the gain schedular. This value can not be 0.
- step_limit_axial
int
Step limit of the axial actuator in each control cycle.
- step_limit_tangent
int
Step limit of the tangent actuator in each control cycle.
- in_position_window_size
int
Window size in second to judge the mirror is in position or not.
- in_position_control_frequency
float
Control frequency in Hz to judge the mirror is in position or not.
- in_position_threshold_axial
float
Threshold of the force error of axial actuator in Newton to judge the mirror is in position or not.
- in_position_threshold_tangent
float
Threshold of the force error of tangent actuator in Newton to judge the mirror is in position or not.
- is_feedforward
bool
, optional The feedforward is on or not. (the default is True)
- is_feedback
bool
, optional The feedback is on or not. (the default is True)
Attributes¶
- is_feedforward
bool
The feedforward is on or not.
- is_feedback
bool
The feedback is on or not.
- kdc
numpy.ndarray
Decoupling matrix.
- kinfl
numpy.ndarray
Influence matrix.
- hd_comp
numpy.ndarray
Hardpoint compensation matrix.
Methods Summary
calc_actuator_steps
(force_demanded, ...[, ...])Calculate the actuator steps to move in the next control cycle.
reset
([reset_all])"Reset the history.
Methods Documentation
- calc_actuator_steps(force_demanded: ndarray[Any, dtype[float64]], force_measured: ndarray[Any, dtype[float64]], hardpoints: list[int], is_in_position: bool, is_deadzone_enabled_axial: bool = True, is_deadzone_enabled_tangent: bool = True) tuple[numpy.ndarray[Any, numpy.dtype[numpy.int64]], numpy.ndarray[Any, numpy.dtype[numpy.float64]], bool] ¶
Calculate the actuator steps to move in the next control cycle.
Parameters¶
- force_demanded
numpy.ndarray
Demanded force in Newton.
- force_measured
numpy.ndarray
Measured force in Newton.
- hardpoints
list
Six 0-based hardpoints. The order is from low to high.
- is_in_position
bool
Mirror is in position or not.
- is_deadzone_enabled_axial
bool
, optional Deadzone is enabled or not for the axial hardpoints. (the default is True)
- is_deadzone_enabled_tangent
bool
, optional Deadzone is enabled or not for the tangent hardpoints. (the default is True)
Returns¶
numpy.ndarray
[int
]78 actuator steps to move in the next control cycle.
numpy.ndarray
78 hardpoint correction in Newton.
bool
True if the mirror is in position. Otherwise, False.
- force_demanded
- gain_prefilter_axial