Understanding the H1 and H2 estimators So the $H_1$ and $H_2$ frequency response estimators for SISO systems are defined according to:
\begin{align}
H_1 &amp;= \frac{P_{yx}}{P_{xx}}\\
H_2 &amp;= \frac{P_{yy}}{P_{xy}}
\end{align}
Where $\frac{A}{B}$ is an element-wise division of vectors $A$ and $B$. The $H_1$ estimator should be used when the noise is uncorrelated with the input, and $H_2$ should be used when the noise is uncorrelated with the output. I've been trying to experiment with estimating frequency responses but I end up getting the same result regardless of which of the estimators I use. I first define the cross-spectral density according to:
\begin{align}
P_{xy} &amp;=  X\odot  \bar{Y}\\
P_{yx} &amp;=  Y\odot \bar{X}\\
P_{yy} &amp;=  Y\odot \bar{Y}\\
P_{xx} &amp;=  X\odot \bar{X}
\end{align}
Where $\bar{A}$ denotes the complex conjugate of $A$, $\odot$ denotes element-wise multiplication. Here $Y$ and $X$ are vectors of the same length and the Fourier transformation of the signals $x$ and $y$.
If the definition of cross-spectral density is inserted into the $H_1$ and $H_2$ estimator formulations as described at the beginning of this post I get:
\begin{align}
H_1 &amp;= \frac{Y\odot \bar{X}}{X\odot \bar{X}} = \frac{Y}{X}\\
H_2 &amp;= \frac{Y\odot \bar{Y}}{X\odot  \bar{Y}} = \frac{Y}{X}
\end{align}
And, therefore,
$H_1 = H_2 = \frac{Y}{X}$
The $H_1$ and $H_2$ estimators should yield different results as one is supposed to be used when the noise is uncorrelated with the input and the other with the output (as mentioned above).
However, according to my methodology, they are equivalent, at least according to my definitions and calculations. There must, therefore, be something wrong with my approach, but I can't seem to understand what.
EDIT:
I realised that if one estimates the PSD or CSD without any averaging, i.e., welch or similar the $H_1$ and $H_2$ estimators are equivalent when I implement them. However, when I use welch averaging they are not equivalent. Although the $H_1$ estimator is better than the $H_2$ estimator regardless if there's noise on the input or output.
Proving that the H1 estimator ignores noise on the output:
If we assume that the output is the input processed by the transfer function plus some output noise, we have $Y = H(f)X(f) + N$, where everything is in the freq domain.
So, $S_{xy}(f) = E[X(f)^*Y(f)] = E[X(f)^*(H(f)X(f) + N(f))]$. where E[] denotes expectation and * denotes complex conjugate.
If you multiply this out, you get
$S_{xy}(f) = H(f)E[X(f)^*X(f)] + E[X(f)^*N(f)]  = H(f)S_{xx}(f)$
Crucially, we assume that the input is uncorrelated with the noise so the expectation of the noise term cancels to zero.
Rearranging, we get the H1 estimator, which is not affected by noise on the output:
$H1 = \frac{S_{xy}}{S_{xx}}$
If you try this with noise on the input, the answer isn't as clean - this is because the H1 estimator is not immune to noise on the input. If you repeat a similar proof for the H2 estimator you will be pleasantly surprised :-)