Noise Models#

Sensor noise models for simulation.

Noise models for sensor simulation.

Provides additive noise generators with different temporal correlation structures, suitable for Monte-Carlo simulation of measurement systems.

online_estimators.noise.models.apply_noise(x, level='none', rng=None)[source]#

Apply position/velocity noise to a 13-dimensional quadrotor state.

Parameters:
  • x (np.ndarray, shape (13,)) – State vector [r(3), q(4), v(3), omega(3)].

  • level (str) – One of "none", "low", "medium", "high".

  • rng (np.random.Generator, optional) – Random number generator. Falls back to the global NumPy RNG when None.

Returns:

Noisy state.

Return type:

np.ndarray, shape (13,)

class online_estimators.noise.models.AWGNNoise(sigma)[source]#

Bases: object

Additive White Gaussian Noise (i.i.d. per sample).

Parameters:

sigma (float) – Standard deviation.

Examples

>>> noise = AWGNNoise(sigma=0.01)
>>> sample = noise.sample(shape=(3,))
reset()[source]#

No-op (stateless noise model).

Return type:

None

sample(shape=())[source]#

Draw a noise sample.

Parameters:

shape (tuple) – Shape of the output array.

Return type:

np.ndarray

class online_estimators.noise.models.OUNoise(theta, mu, sigma, dt=0.01)[source]#

Bases: object

Ornstein-Uhlenbeck process for temporally-correlated noise.

The OU process is a mean-reverting stochastic process:

dx = theta (mu - x) dt + sigma sqrtdt * N(0,1)

Parameters:
  • theta (float) – Mean-reversion rate.

  • mu (float) – Long-run mean.

  • sigma (float) – Volatility.

  • dt (float) – Time-step.

reset()[source]#

Reset the process to its mean.

Return type:

None

sample()[source]#

Advance one step and return the new state.

Return type:

float

class online_estimators.noise.models.RandomWalkNoise(sigma, dt=0.01)[source]#

Bases: object

Random walk (Brownian motion) noise model.

b_{t+1} = b_t + sigma sqrtdt * N(0,1)

Parameters:
  • sigma (float) – Step standard deviation.

  • dt (float) – Time-step.

reset()[source]#

Reset the walk to zero.

Return type:

None

sample()[source]#

Advance one step and return the accumulated bias.

Return type:

float