State estimation#

State slot of the VLA: a Kalman estimator for the joint that can use the library’s accelerometer models.

The joint is a linear stage of half-stroke stroke metres (the workspace [-1, 1] maps to +/- stroke). An accelerometer on the carriage is a quantum_mind.sensing.Sensor (MEMS or atom interferometer; illustrative values). The estimator state is position, velocity and the MEMS bias. Modes, from least to most informed: raw encoder; encoder-only Kalman; Kalman with the MEMS accelerometer as the motion input; the classical rival ‘kalman + motor model’ predicts with the nominal plant and the command instead of an accelerometer; the same plus the slow quantum accelerometer, whose near-bias-free samples measure the MEMS bias (a_mems - a_quantum = bias + noise). The encoder can drop out (cable fault, occlusion), which is when the difference shows.

Classes

SensedMotor

A OneMotor plus an encoder (which can drop out) and the MEMS and quantum accelerometers, all simulated.

JointEstimator

Kalman filter for (position, velocity, MEMS bias) in workspace units; mode is one of MODES.

class SensedMotor(motor=None, stroke=0.2, mems=None, quantum=None, enc_std=0.005, outage_at=None, disturbance=0.0, faults=())[source]#

Bases: object

A OneMotor plus an encoder (which can drop out) and the MEMS and quantum accelerometers, all simulated.

step(u)[source]#

Advance one control step. Faults fire when time passes their t: encoder_dropout (no reading), encoder_offset (reading shifted by mag), gain_loss (motor gain times mag), friction (Coulomb friction times mag), push (extra constant external acceleration mag).

class JointEstimator(mode, dt=0.05, stroke=0.2, mems=None, quantum=None, enc_std=0.005, vel_process=3.0)[source]#

Bases: object

Kalman filter for (position, velocity, MEMS bias) in workspace units; mode is one of MODES.