Application Example: Gyroscope Allan Variance

The signals of, e.g., angular rate sensors contain white noise along with colored noise resulting from a variety of sources. With the pyplnoisemodule, this noise can be generated and added on top of the deterministic sensor errors in a sensor model. Such a sensor model can be used for example for the simulation of a Kalman filter accommodating correlated noise terms.

In the code below it is outlined how you can use pyplnoise to approximate the Allan variance of a real yaw rate sensor. Familiarity with the IEEE Standard 952 is helpful.

The angular rate sensor is described by the quantities $N$ (angle random walk), $B$ (bias instability) and $K$ (rate random walk) from the IEEE Std 952. The values prescribed here approximate the properties of a Bosch SMI130 yaw rate sensor.

Define the sampling rate fs and initialize noise sources:

Now create an artifical sensor noise signal $w_{noise}$ from the individual noise sources denoted by $\xi$. The noise is additive and the coefficients $N$, $B$ and $K$ from the IEEE Std 952 enter as follows:

$$w_{noise} = N\xi_{white} + \frac{B}{\sqrt{2\pi}}\xi_{pink} + \frac{K}{2\pi}\xi_{red}$$

Now calculate the Allan variance. The module allan is not provided by pyplnoise, but many similar codes can be found on pypi.

Here's how the calculated Allan deviation looks like.

Let's extract the properties $N$, $B$ and $K$ automatically:

If you rather prefer to find these values manually, you can read off the value of the red line at $\tau = 1$ to get $N$. The value of the green line at $\tau = 3$ is equal to $K$, and multiplication of the global minimum by $\sqrt{\frac{\pi}{2\ln 2}}\approx1/0.664$ yields $B$.