digital-brain/content/zettels/sensor_noise_estimation.md

121 lines
5.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

+++
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](#org7fe766e)) and well explained in ([Poel 2010](#org964c18e)) (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](#org53e9426) where two identical sensors are measuring the same motion \\(x(t)\\).
<a id="org53e9426"></a>
{{< figure src="/ox-hugo/huddle_test_setup.png" caption="Figure 1: Schematic representation of the setup for measuring the noise of inertial sensors." >}}
<div class="definition">
<div></div>
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);
```
</div>
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](#org0e1cf4a), 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}
<a id="org0e1cf4a"></a>
{{< figure src="/ox-hugo/huddle_test_block_diagram.png" caption="Figure 2: Huddle test block diagram" >}}
Rearranging the equations, we obtain the PSD of \\(n\_1(t)\\) and \\(n\_2(t)\\):
\begin{align}
P\_{n1}(\omega) = \frac{P\_{y\_1}(\omega)}{|H\_1(j\omega)|^2} \left( 1 - \gamma\_{y\_1y\_2}(\omega) \frac{|H\_1(j\omega)|}{|H\_2(j\omega)|} \sqrt{\frac{P\_{y\_2}(\omega)}{P\_{y\_1}(\omega)}} \right) \\\\\\
P\_{n2}(\omega) = \frac{P\_{y\_2}(\omega)}{|H\_2(j\omega)|^2} \left( 1 - \gamma\_{y\_1y\_2}(\omega) \frac{|H\_2(j\omega)|}{|H\_1(j\omega)|} \sqrt{\frac{P\_{y\_1}(\omega)}{P\_{y\_2}(\omega)}} \right)
\end{align}
If we assume the two sensor dynamics to be the same \\(H\_1(s) \approx H\_2(s)\\) and the PSD of \\(n\_1(t)\\) and \\(n\_2(t)\\) to be the same (\\(P\_{n\_1}(\omega) \approx P\_{n\_2}(\omega)\\)) which is most of the time the case when using two identical sensors, we obtain this approximate equation:
<div class="important">
<div></div>
\begin{equation}
|P\_{n\_1}(\omega)| \approx \frac{P\_{y\_1}}{|H\_1(j\omega)|^2} \big( 1 - \gamma\_{y\_1y\_2}(\omega) \big)
\end{equation}
</div>
## Bibliography {#bibliography}
<a id="org7fe766e"></a>Barzilai, Aaron, Tom VanZandt, and Tom Kenny. 1998. “Technique for Measurement of the Noise of a Sensor in the Presence of Large Background Signals.” _Review of Scientific Instruments_ 69 (7):276772. <https://doi.org/10.1063/1.1149013>.
<a id="org964c18e"></a>Poel, Gerrit Wijnand van der. 2010. “An Exploration of Active Hard Mount Vibration Isolation for Precision Equipment.” University of Twente. <https://doi.org/10.3990/1.9789036530163>.