ADCS.satellite_hardware.errors.bias_with_instability module

class ADCS.satellite_hardware.errors.bias_with_instability.BiasWithInstability(bias=array([0.]), std_bias=array([0.]), bounds=(array([-inf]), array([inf])), *, instability_std, instability_time)[source]

Bases: Bias

A bias that is a constant offset, a random walk and a bias instability.

Bias models the bias as a starting value plus a random walk of rate std_bias. Real gyros and magnetometers also show bias instability: a slow wander around the current value that an Allan-variance plot shows as its floor (the “bias instability” line of a data sheet, in deg/h or nT). It is neither constant nor a random walk: it stays bounded, with a characteristic time over which it decorrelates.

This subclass adds that term as a first-order Gauss-Markov process with standard deviation \(\sigma_g\) (instability_std) and correlation time \(\tau\) (instability_time), the standard stand-in for the flicker floor:

\[g_{k+1} = e^{-\Delta t/\tau} g_k + w_k, \qquad w_k \sim \mathcal{N}\!\left(0,\ \sigma_g^2 (1 - e^{-2\Delta t/\tau})\right),\]

exact for any step \(\Delta t\), so the process stays stationary with standard deviation \(\sigma_g\). The reported bias is the base class’s random walk plus \(g\). Everything the base class does (offset, random walk, bounds, estimator write-back through bias) is unchanged; only the step and the process PSD differ.

For a filter with a random-walk bias state, the instability is covered by adding the density of the white noise that drives it, \(2\sigma_g^2/\tau\), to the walk rate squared in process_psd(). That is the rate at which the instability’s variance grows from a known value over steps short compared with \(\tau\), the regime a random-walk filter state has to cover: the step above has variance \(\sigma_g^2(1 - e^{-2\Delta t/\tau}) \approx (2\sigma_g^2/\tau)\,\Delta t\). It has the units of std_bias squared (bias² per second), so the two terms can be summed. The value \(2\sigma_g^2\tau\) is the power density of the instability itself at zero frequency (bias² × seconds), a different quantity that does not belong in a rate PSD.

Parameters:
  • bias (ndarray | float) – As for Bias.

  • std_bias (ndarray | float) – As for Bias.

  • bounds (Sequence[ndarray | float]) – As for Bias.

  • instability_std (float or array) – Standard deviation \(\sigma_g\) of the bias instability.

  • instability_time (float) – Correlation time \(\tau\) in seconds.

broadcast_to(length, *, owner='sensor')[source]

Size this model for a length-output sensor (see Bias.broadcast_to()).

Parameters:
  • length (int)

  • owner (str)

Return type:

BiasWithInstability

copy()[source]
Return type:

BiasWithInstability

process_psd(*, form='full')[source]

Random-walk PSD plus the density \(2\sigma_g^2/\tau\) of the noise driving the instability.

Both terms are rates (bias² per second). Over a step \(\Delta t \ll \tau\) the instability’s variance grows by \((2\sigma_g^2/\tau)\,\Delta t\), which is what a random-walk bias state in the filter has to absorb.

Parameters:

form (str)

Return type:

Covariance