+++
title = "Sensor Noise Estimation"
author = ["Thomas Dehaeze"]
draft = false
+++
Tags
:
## Estimation of the Noise of Inertial Sensors {#estimation-of-the-noise-of-inertial-sensors}
Measuring the noise level of inertial sensors is not easy as the seismic motion is usually much larger than the sensor's noise level.
A technique to estimate the sensor noise in such case is proposed in ([Barzilai, VanZandt, and Kenny 1998](#org65ed433)) and well explained in ([Poel 2010](#org02bd600)) (Section 6.1.3).
The idea is to mount two inertial sensors closely together such that they should measure the same quantity.
This is represented in Figure [1](#orgbc58a8d) where two identical sensors are measuring the same motion \\(x(t)\\).
{{< figure src="/ox-hugo/huddle_test_setup.png" caption="Figure 1: Schematic representation of the setup for measuring the noise of inertial sensors." >}}
Few quantities that will be used to estimate the sensor noise are now defined.
This include the **Coherence**, the **Power Spectral Density** (PSD) and the **Cross Spectral Density** (CSD).
The coherence between signals \\(x\\) and \\(y\\) is defined as follow
\\[ \gamma^2\_{xy}(\omega) = \frac{|C\_{xy}(\omega)|^2}{|P\_{x}(\omega)| |P\_{y}(\omega)|} \\]
where \\(|P\_{x}(\omega)|\\) is the output PSD of signal \\(x(t)\\) and \\(|C\_{xy}(\omega)|\\) is the CSD of signals \\(x(t)\\) and \\(y(t)\\).
The PSD and CSD are defined as follow:
\begin{align}
|P\_x(\omega)| &= \frac{2}{n\_d T} \sum^{n\_d}\_{n=1} \left| x\_k(\omega, T) \right|^2 \\\\\\
|C\_{xy}(\omega)| &= \frac{2}{n\_d T} \sum^{n\_d}\_{n=1} [ x\_k^\*(\omega, T) ] [ y\_k(\omega, T) ]
\end{align}
where:
- \\(n\_d\\) is the number for records averaged
- \\(T\\) is the length of each record
- \\(x\_k(\omega, T)\\) is the finite Fourier transform of the kth record
- \\(x\_k^\*(\omega, T)\\) is its complex conjugate
The Matlab function `mscohere` can be used to compute the coherence:
```matlab
%% Parameters
Fs = 1e4; % Sampling Frequency [Hz]
win = hanning(ceil(10*Fs)); % 10 seconds Hanning Windows
%% Coherence between x and y
[pxy, f] = mscohere(x, y, win, [], [], Fs); % Coherence, frequency vector in [Hz]
```
Alternatively, it can be manually computed using the `cpsd` and `pwelch` commands:
```matlab
%% Manual Computation of the Coherence
[pxy, f] = cpsd(x, y, win, [], [], Fs); % Cross Spectral Density between x and y
[pxx, ~] = pwelch(x, win, [], [], Fs); % Power Spectral Density of x
[pyy, ~] = pwelch(y, win, [], [], Fs); % Power Spectral Density of y
pxy_manual = abs(pxy).^2./abs(pxx)./abs(pyy);
```
Now suppose that:
- both sensors are modelled as LTI systems \\(H\_1(s)\\) and \\(H\_2(s)\\)
- sensor noises are modelled as input noises \\(n\_1(t)\\) and \\(n\_2(s)\\)
- sensor noises are uncorrelated and each are uncorrelated with \\(x(t)\\)
Then, the system can be represented by the block diagram in Figure [2](#org1dabfe7), and we can write:
\begin{align}
P\_{y\_1y\_1}(\omega) &= |H\_1(\omega)|^2 ( P\_{x}(\omega) + P\_{n\_1}(\omega) ) \\\\\\
P\_{y\_2y\_2}(\omega) &= |H\_2(\omega)|^2 ( P\_{x}(\omega) + P\_{n\_2}(\omega) ) \\\\\\
C\_{y\_1y\_2}(j\omega) &= H\_2^H(j\omega) H\_1(j\omega) P\_{x}(\omega)
\end{align}
And the CSD between \\(y\_1(t)\\) and \\(y\_2(t)\\) is:
\begin{equation}
\gamma^2\_{y\_1y\_2}(\omega) = \frac{|C\_{y\_1y\_2}(j\omega)|^2}{P\_{y\_1}(\omega) P\_{y\_2}(\omega)}
\end{equation}