# Estimation of the Amplitude of a Sine / Cosine Wave and Its Independence of the SNR / Amplitude of the Wave

Consider a sinusoid in AWGN:

$$Y = A \cos(\omega t+\phi)+n$$

Assume the frequency and phase are known. To estimate $$A$$ we can use least squares (which in this case is equivalent to the DFT):

$$\hat{A} = (H’H)^{-1}H’Y$$

where $$H$$ is the design matrix constructed from sines and cosines. We know that least squares is unbiased, thus the Mean Squared Error (MSE) in estimating the amplitude is due to the variance alone, which is given by:

$$\operatorname{var}(\hat{A})= \sigma^2 (H’H)^{-1}$$

Where $$\sigma^2$$ is the AWGN variance. Thus it appears that the estimate does not depend on the signal’s strength. Is this correct? Is this result widely known/used?

One may have a look at the CRLB of estimating the parameters of a sine wave.
The model for signal is given by:

$$x \left[ n \right] = A \cos \left( \omega n + \phi \right) + w \left[ n \right], \; n = 0, 1, 2, \ldots, N - 1$$

The parameters vector is given by $$\boldsymbol{\theta} = {\left[ A, \omega, \phi \right]}^{T}$$.

If we model the added noise as AWGN with standard deviation of $$\sigma$$ the Fisher Information Matrix is straight forward:

$$I \left[ \boldsymbol{\theta} \right]_{i, j} = \frac{1}{ {\sigma}^{2} } \left[ \frac{\partial \boldsymbol{x}_{\boldsymbol{\theta}} }{\partial \boldsymbol{\theta}_{i}} \right] {\left[ \frac{\partial \boldsymbol{x}_{\boldsymbol{\theta}} }{\partial \boldsymbol{\theta}_{j}} \right]}^{T} = \frac{1}{ {\sigma}^{2} } \sum_{n = 0}^{N - 1} \frac{\partial x \left[ n ; \boldsymbol{\theta} \right] }{\partial \boldsymbol{\theta}_{i}} \frac{\partial x \left[ n ; \boldsymbol{\theta} \right] }{\partial \boldsymbol{\theta}_{j}}$$

I won't go through the whole process (See references for such derivation) but the Information Matrix is given by:

$$I \left[ \boldsymbol{\theta} \right] \approx \begin{bmatrix} \frac{N}{2 {\sigma}^{2}} & 0 & 0 \\ 0 & \frac{ {A}^{2} }{2 {\sigma}^{2}} \sum_{n = 0}^{N - 1} {n}^{2} & \frac{ {A}^{2} }{2 {\sigma}^{2}} \sum_{n = 0}^{N - 1} n \\ 0 & \frac{ {A}^{2} }{2 {\sigma}^{2}} \sum_{n = 0}^{N - 1} n & \frac{N {A}^{2} }{2 {\sigma}^{2}} \end{bmatrix}$$

The interesting thing is that the performance of estimating the amplitude has no correlation with estimating the frequency or the phase of the sine wave. Namely, knowing them or not won't improve the estimation (Or at least not an optimal estimator).

It means the variance of the estimator of the amplitude is $$var \left( \hat{A} \right) \geq \frac{2 {\sigma}^{2} }{N}$$.

Namely it only depends on the variance of the noise and the number of samples. So if you define the SNR as $$SNR = \frac{ {A}^{2} }{2 {\sigma}^{2}}$$ then indeed it doesn't dpened on the SNR.

Yet usually, for coherent signals we know the pseudo SNR for estimation is in some ways related to the number of samples.

### References

• Thanks, can you provide any more details on 'pseudo SNR? I know this may be slightly off topic... Oct 10, 2022 at 14:13
• Whenever the noise model is AWGN you'd see that performance are better with $N$. So when you come to think about it, it makes sense since the larger $N$ the more information you have.
– Royi
Oct 10, 2022 at 17:13

To be clear, the estimate of the noise is in no way affected by the amplitude, but the estimate of the amplitude is of course affected by the noise. The standard deviation for the result of our amplitude estimate is directly given by the level of the noise on that signal (it is the noise measure).

The noise is simply additive so there is no reason we would expect it to be scaled or changed by the amplitude. Similarly, the mean of a random process does not effect the standard deviation or variance. We see this directly in the computation of the variance:

$$\sigma^2 = \frac{x_i - \mu}{N}$$

Where $$\mu$$ represents the mean of the population of samples $$x_i$$.

This applies to the mean of a DC signal as well as the magnitude of a sinusoid in AWGN.

The DFT is a good example for simplicity in explanation as we can describe the result for a single complex tone at any bin as that bin translated to DC and the resulting samples summed. For example at bin k=2 the tone at bin center would be:

$$x[n] = Ae^{j 2 \pi n 2/N}+ \mathscr{N}[n]$$

Where $$A$$ is the amplitude and $$\mathscr{N}[n]$$ represents independent and identically distributed complex samples of Gaussian noise with a variance of $$\sigma^2$$ and a standard deviation of $$\sigma$$.

(Note that a sinusoid is two complex tones as given by Euler's formula: $$2\cos(\omega t + \phi) = e^{j(\omega t + \phi)} + e^{-j(\omega t + \phi)}$$)

The DFT result for that specific bin is given by:

$$X[k=2] = \sum_{n=o}^{N-1}x[n]e^{-j2\pi n 2/N}$$

$$=\sum_{n=o}^{N-1}(Ae^{j 2 \pi n 2/N}+ \mathscr{N}[n])e^{-j2\pi n 2/N}$$

$$=\sum_{n=o}^{N-1}(A+ \mathscr{N}[n]e^{-j4\pi n /N} )$$

$$= NA + \sum_{n=o}^{N-1}\mathscr{N}[n]e^{-j4\pi n /N}$$

Since each sample of the noise term $$\mathscr{N}[n]$$ is independent with a uniform phase distribution, we can drop the continuous phase rotation $$e^{-j4\pi n /N}$$ without changing the result for the variance and standard deviation; the noise term would have the same variance and standard deviation as the following:

$$\sum_{n=o}^{N-1}\mathscr{N}[n]$$

As is well known and further detailed here and here, the variance of the sum of independent random variables will add, so the result with have a variance that is $$\sigma^2/N$$ and a standard deviation of $$\sigma/\sqrt{N}$$.

Basically there is a summation of N samples in the result where the magnitude that is correlated from sample to sample would grow by N but the noise which is uncorrelated from sample to sample would grow by the square root of N. Thus we would get a processing gain in SNR of $$10\log_{10}(N)$$.

So the estimate of the amplitude (which is the mean) would have a standard deviation of error that is reduced by $$\sqrt{N}$$ where $$N$$ is the total number of samples as long as the noise in those samples is indeed independent and identically distributed from sample to sample (and the noise process is stationary over the duration of those samples!). While the total number of samples used to compute the estimate results in a lower noise, that result for the noise is not affected in any way by the amplitude $$A$$; For any given amplitude $$A$$, if the noise were to get stronger (which means lower SNR), our estimate of that amplitude would of course get worst. But if our amplitude were to get lower (which also means lower SNR), our estimate of that amplitude would be unchanged in terms of an absolute standard deviation metric. We see that in both cases we are ultimately affected by the noise alone.

• I don’t think your result is correct. For instance see Statistical Signal Processing, Vol 1, page 90, where the covariance matrix of the amplitude estimate is found to be $C=2\sigma^2/N I$, so a diagonal matrix with diagonal elements being $2\sigma^2/N$ which is independent of amplitude. Oct 10, 2022 at 2:09
• Something is wrong with your equation. Your equation implies that the noise only adds to the value while it can add or remove. I think you mixed variance with the actual value.
– Royi
Oct 10, 2022 at 9:39
• @Royi I see yes, the equation for the final result is misconstructed. Thanks I will fix that Oct 10, 2022 at 12:46
• @student1 to get the variance you can square my result (I showed the standard deviation)—- both lead to the same result: your variance is going down by N relative to the amplitude and the square root of that would be the standard deviation. Oct 10, 2022 at 12:49
• @Royi thank you! Oct 10, 2022 at 14:58