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_axialfloat

Gain of the prefilter for the axial actuators.

params_prefilter_axialnumpy.ndarray

Parameters of the prefilter for the axial actuators: [a11 a21 b11 b21 a12 a22 b12 b22 … a1N a2N b1N b2N].

gain_prefilter_tangentfloat

Gain of the prefilter for the tangent actuators.

params_prefilter_tangentnumpy.ndarray

Parameters of the prefilter for the tangent actuators: [a11 a21 b11 b21 a12 a22 b12 b22 … a1N a2N b1N b2N].

params_cmd_delay_axiallist

Parameters of the command delay filter for the axial actuators: [b0, b1, b2, …, bN].

params_cmd_delay_tangentlist

Parameters of the command delay filter for the tangent actuators: [b0, b1, b2, …, bN].

gain_control_filter_axialfloat

Gain of the control filter for the axial actuators.

params_control_filter_axialnumpy.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_tangentfloat

Gain of the control filter for the tangent actuators.

params_control_filter_tangentnumpy.ndarray

Parameters of the control filter for the tangent actuators: [a11 a21 b11 b21 a12 a22 b12 b22 … a1N a2N b1N b2N].

kdcnumpy.ndarray

Decoupling matrix.

kinflnumpy.ndarray

Influence matrix.

hd_compnumpy.ndarray

Hardpoint compensation matrix.

thresholds_deadzone_axiallist

The [lower, upper] thresholds of the axial hardpoint error in deadzone. The unit is Newton.

thresholds_deadzone_tangentlist

The [lower, upper] thresholds of the tangent hardpoint error in deadzone. The unit is Newton.

min_gain_schedular_axialfloat

Minimum gain for the axial actuators in the gain schedular. The value should be in (0.0, 1.0).

min_gain_schedular_tangentfloat

Minimum gain for the tangent actuators in the gain schedular. The value should be in (0.0, 1.0).

num_sample_ramp_upint

Number of samples in the ramping up process in the gain schedular. This value can not be 0.

num_sample_ramp_downint

Number of samples in the ramping down process in the gain schedular. This value can not be 0.

max_sample_settleint

Maximum number of samples in the settling process in the gain schedular. This value can not be 0.

step_limit_axialint

Step limit of the axial actuator in each control cycle.

step_limit_tangentint

Step limit of the tangent actuator in each control cycle.

in_position_window_sizeint

Window size in second to judge the mirror is in position or not.

in_position_control_frequencyfloat

Control frequency in Hz to judge the mirror is in position or not.

in_position_threshold_axialfloat

Threshold of the force error of axial actuator in Newton to judge the mirror is in position or not.

in_position_threshold_tangentfloat

Threshold of the force error of tangent actuator in Newton to judge the mirror is in position or not.

is_feedforwardbool, optional

The feedforward is on or not. (the default is True)

is_feedbackbool, optional

The feedback is on or not. (the default is True)

Attributes

is_feedforwardbool

The feedforward is on or not.

is_feedbackbool

The feedback is on or not.

kdcnumpy.ndarray

Decoupling matrix.

kinflnumpy.ndarray

Influence matrix.

hd_compnumpy.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_demandednumpy.ndarray

Demanded force in Newton.

force_measurednumpy.ndarray

Measured force in Newton.

hardpointslist

Six 0-based hardpoints. The order is from low to high.

is_in_positionbool

Mirror is in position or not.

is_deadzone_enabled_axialbool, optional

Deadzone is enabled or not for the axial hardpoints. (the default is True)

is_deadzone_enabled_tangentbool, 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.

reset(reset_all: bool = False) None

“Reset the history.

Parameters

reset_allbool, optional

Reset all of the internal data or not. (the default is False)