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_psdapplies 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 matchquaternion_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\).
dynJacCorestores 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^+ Bfor a reduced chart,N Bforfull_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
Noiseobjects draw one command error \(w\sim N(0,Q_u)\) per step and hold it overdt; 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()withnoise_input=Bandcontinuous_psd=Q_u dtdiffers from this by \(O(|F|\Delta t)\), 33% atdt=10s 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_modecoordinates (falling back toquaternion_mode), then mapped intotarget_quaternion_modecoordinates atfinal_state. This supports all source/target combinations between reduced attitude charts and the additive full-quaternion chart.include_control_noiseadds the zero-order-hold actuator command-noise covariancediscretize_control_noise()built fromsatellite.control_covariance(). Linearized filters (EKF/MEKF) must keep the defaultTrue; sigma-point filters that already propagate control-noise sigma points (UKF/SRUKF) must passFalseso the term is not counted twice. Satellites withoutcontrol_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_modeandtarget_quaternion_modemay 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 atstate.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 familiarG^\dagger(A G - \dot G).EstimatedSatellite.dynJacCorestores 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 throughEstimatorState.tangent_mapandtangent_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 wwith Van Loan’s matrix exponential.continuous_psdisQ_cin noise coordinates; omittingnoise_inputusesL=Iand therefore accepts state-space PSDs assembled byassemble_continuous_process_psd().- Parameters:
transfer (Any)
continuous_psd (Any)
dt (float)
noise_input (Any | None)
- Return type:
tuple[ndarray, ndarray]