ADCS.estimators.process_noise module

Shared process-noise construction for attitude estimators.

The functions operate on EstimatorState’s named layout. Linearized filters use the returned error-state model and zero-order-hold actuator-noise term; sigma-point filters propagate actuator noise through control sigma points and disable that additive term.

ADCS.estimators.process_noise.assemble_continuous_process_psd(state, satellite, *, unmodeled_dynamics_psd=0.0, quaternion_mode='quaternion_vector')[source]

Assemble chart-local continuous PSD \(Q_c\) from the state layout.

unmodeled_dynamics_psd applies to the physical local state [angular_velocity, attitude, wheel_momentum] and accepts a scalar, a diagonal vector, or a full PSD matrix. Bias and disturbance blocks are populated from their configured hardware random-walk rates. The returned coordinates match quaternion_mode.

Parameters:
  • state (EstimatorState)

  • satellite (Any)

  • unmodeled_dynamics_psd (Any)

  • quaternion_mode (str)

Return type:

ndarray

ADCS.estimators.process_noise.continuous_error_state_model(state, satellite, control, orbital_state, *, unmodeled_dynamics_psd=0.0, quaternion_mode='quaternion_vector', quaternion_order='right')[source]

Build shared continuous-time (F, Qc) for an estimator prediction.

Parameters:
  • state (EstimatorState)

  • satellite (Any)

  • control (ndarray)

  • orbital_state (Any)

  • unmodeled_dynamics_psd (Any)

  • quaternion_mode (str)

  • quaternion_order (str)

Return type:

tuple[ndarray, ndarray]

ADCS.estimators.process_noise.control_input_matrix(state, satellite, control, orbital_state, *, quaternion_mode='quaternion_vector', quaternion_order='right')[source]

Return the local control-input matrix \(B = G^\dagger\,\partial\dot x/\partial u\).

dynJacCore stores the control block with commands in rows and state derivatives in columns. This converts it to the conventional column form, pads the augmented bias/disturbance rows with zeros (commands do not drive those random walks), and maps the result into the requested attitude chart: G^+ B for a reduced chart, N B for full_quaternion.

Parameters:
  • state (EstimatorState)

  • satellite (Any)

  • control (ndarray)

  • orbital_state (Any)

  • quaternion_mode (str)

  • quaternion_order (str)

Return type:

ndarray

ADCS.estimators.process_noise.discretize_control_noise(transfer, input_matrix, control_covariance, dt)[source]

Discrete covariance injected by zero-order-hold actuator command noise.

Actuator Noise objects draw one command error \(w\sim N(0,Q_u)\) per step and hold it over dt; the UKF models exactly this with its control sigma points. For the linearized error model \(\delta\dot x = F\delta x + B w\) the held error enters through

\[\Gamma = \int_0^{\Delta t} e^{F\tau} B\,d\tau, \qquad Q_u^{d} = \Gamma Q_u \Gamma^T,\]

where \(\Gamma\) is the top-right block of \(\exp([[F, B], [0, 0]]\,\Delta t)\). (A white-noise treatment through van_loan_discretize() with noise_input=B and continuous_psd=Q_u dt differs from this by \(O(|F|\Delta t)\), 33% at dt=10 s on a CubeSat, and does not match the UKF.)

Parameters:
  • transfer (Any)

  • input_matrix (Any)

  • control_covariance (Any)

  • dt (float)

Return type:

ndarray

ADCS.estimators.process_noise.discretize_process_noise(state, satellite, control, orbital_state, dt, *, final_state=None, include_control_noise=True, **kwargs)[source]

Build and Van Loan-discretize the shared attitude process-noise model.

The dynamics are integrated in source_quaternion_mode coordinates (falling back to quaternion_mode), then mapped into target_quaternion_mode coordinates at final_state. This supports all source/target combinations between reduced attitude charts and the additive full-quaternion chart.

include_control_noise adds the zero-order-hold actuator command-noise covariance discretize_control_noise() built from satellite.control_covariance(). Linearized filters (EKF/MEKF) must keep the default True; sigma-point filters that already propagate control-noise sigma points (UKF/SRUKF) must pass False so the term is not counted twice. Satellites without control_covariance (lightweight Jacobian providers) contribute no control noise.

Parameters:
  • state (EstimatorState)

  • satellite (Any)

  • control (ndarray)

  • orbital_state (Any)

  • dt (float)

  • final_state (EstimatorState | None)

  • include_control_noise (bool)

  • kwargs (Any)

Return type:

tuple[ndarray, ndarray]

ADCS.estimators.process_noise.error_state_transfer(state, satellite, control, orbital_state, *, quaternion_mode='quaternion_vector', source_quaternion_mode=None, target_quaternion_mode=None, quaternion_order='right')[source]

Return the continuous local error-state transfer matrix F.

By default the source and target charts are both quaternion_mode. source_quaternion_mode and target_quaternion_mode may be supplied independently to build rectangular coordinate-transition Jacobians such as tangent-to-full-quaternion or full-quaternion-to-tangent. The returned matrix maps a perturbation expressed in the source chart to a perturbation rate expressed in the target chart, evaluated at state.

Because the target tangent map moves with the nominal attitude, the matrix includes the target chart-motion term G_dot. For matching source and target charts this reduces to the familiar G^\dagger(A G - \dot G).

EstimatedSatellite.dynJacCore stores derivative variables in rows and derivative outputs in columns. This function converts that historical convention to the conventional column-error matrix before augmenting it with random-walk states and reducing quaternion coordinates through EstimatorState.tangent_map and tangent_pinv.

Parameters:
  • state (EstimatorState)

  • satellite (Any)

  • control (ndarray)

  • orbital_state (Any)

  • quaternion_mode (str)

  • source_quaternion_mode (str | None)

  • target_quaternion_mode (str | None)

  • quaternion_order (str)

Return type:

ndarray

ADCS.estimators.process_noise.van_loan_discretize(transfer, continuous_psd, dt, *, noise_input=None)[source]

Discretize xdot = F x + L w with Van Loan’s matrix exponential.

continuous_psd is Q_c in noise coordinates; omitting noise_input uses L=I and therefore accepts state-space PSDs assembled by assemble_continuous_process_psd().

Parameters:
  • transfer (Any)

  • continuous_psd (Any)

  • dt (float)

  • noise_input (Any | None)

Return type:

tuple[ndarray, ndarray]