## Introduction

In this post, the relation between the noise of signal amplitude and phase on one hand and the noise of in-phase and quadrature components of the signal on the other hand is investigated. We try to respond to the wrong intuition stating that the standard deviation of signal amplitude is higher than the standard deviation of each signal components by a factor of $$\sqrt{2}$$. Besides an informative mathematical analysis of the problem, several measurements using the MFLI Lock-in Amplifier are also carried out to verify the theoretical results and claims. Before moving to the noise analysis, we need to define several terms. Suppose the following complex signal,

$s(t)=r(t) e^{j\phi(t)}=x(t)+jy(t)$

where $$r(t)$$ and $$\phi(t)$$ are the amplitude and phase (polar coordinates) of the signal while $$x(t)$$ and $$y(t)$$ are the in-phase and quadrature components (Cartesian coordinates) of the signal, respectively. Because of noise, the signal and its components are modeled as random signals using the theory of random processes. The mean and standard deviation of each component are given by $$\mu$$ and $$\sigma$$ sub-scripted by the component’s name. By calculating the second moment of the amplitude (mean of $$r^2(t)$$), we have

$E[r^2(t)]=E[x^2(t)+y^2(t)]=E[x^2(t)]+E[y^2(t)]$

Expressing the second moment in terms of mean and variance, we obtain the following general equation governing the mean and standard deviation of signal amplitude and components.

$\mu_r^2 + \sigma_r^2 =\mu_x^2 + \sigma_x^2+\mu_y^2 + \sigma_y^2$

The above equation expresses the conservation of energy and it always holds regardless of the nature of random processes whether they are independent or correlated. Therefore, it can be used to verify any measurement of signal components. The above equation results in the following expression for the variance of signal amplitude:

$\sigma_r^2 = (\sigma_x^2+ \sigma_y^2) + (\mu_x^2 +\mu_y^2 – \mu_r^2 )$

It is important to note that the amplitude variance is not simply the summation of in-phase and quadrature variances, i.e. $$\sigma_r^2 \ne\sigma_x^2 +\sigma_y^2$$ because $$\mu_r^2 \ne\mu_x^2 +\mu_y^2$$, even though $$r^2 = x^2 + y^2$$. Tab. 1 shows the average and standard deviation of amplitude (blue), in-phase (green) and quadrature (red) components of a signal in a simple lock-in measurement. We can simply verify that the above expression gives exactly the measured standard deviation $$0.206\ \mu V$$; while the expression $$\sigma_r^2 = \sigma_x^2+ \sigma_y^2$$ gives a wrong standard deviation of $$0.327\ \mu V$$. It is also worth noticing that the amplitude standard deviation is less than that of in-phase and quadrature components. Tab. 1. Average and standard deviation of signal components: R (blue), X (green) and Y (red).

It should be noted that the mean and standard deviation of signal amplitude cannot be explicitly expressed in terms of signal components using the above expression. To do so, it is necessary to know the probability distribution of the signal amplitude which will be investigated in the next section.

## Probabilistic Analysis

Before moving forward with the statistics of signal amplitude, phase, in-phase and quadrature components it should be noted that the following assumptions about the noise characteristics are necessary and they can be justified based on experimental reasons.

1. The input noise is a zero-mean Gaussian random process.
2. In-phase and quadrature noise components are uncorrelated and thus in the case of Gaussian signals, independent.
3. Both noise components contain identical energy and thus, they have equal variance or standard deviation, i.e. $$\sigma_x=\sigma_y=\sigma$$.

Without these assumptions the probability distributions of signal amplitude and phase are extremely complicated and not useful in our measurement; Ref  provides probability distributions in the case of correlated noise components. Considering the above-mentioned conditions, the in-phase and quadrature components of the signal are two independent Gaussian random processes with the following normal distributions .

$f(x)=\frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(x-\mu_x)^2}{2\sigma^2}} \quad\quad\quad\quad\quad\quad\quad\quad f(y)=\frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(y-\mu_y)^2}{2\sigma^2}}$

Depending on the mean of signal components, the distribution of signal amplitude $$r(t)$$ can be a Rayleigh  or a Rice  distribution.

### Rayleigh Distribution

Suppose that $$x(t)$$ and $$y(t)$$ are pure noise, i.e. there is no signal in the input of the instrument. Therefore, $$\mu_x=\mu_y=0$$ and in this case the signal amplitude has a Rayleigh distribution with the following probability density function (PDF) .

$f(r)=\frac{r}{\sigma^2} e^{-\frac{r^2}{2\sigma^2}} , \quad\quad\quad r\ge 0$

Fig. 1 depicts the histogram of signal amplitude, in-phase and quadrature components  when there is no input signal and the lock-in amplifier measures the input noise. The histogram of X and Y components are Gaussian and thus have a symmetric shape; while the histogram of the noise amplitude is asymmetric and follows a Rayleigh distribution which has a skewness. Fig. 1. Histogram of the signal amplitude R, in-phase X and quadrature Y. The X and Y components follow a Gaussian distribution while R has a Rayleigh distribution.

The mean and the standard deviation of the signal amplitude with the above Rayleigh distribution are calculated as .

$\mu_r=\sigma\sqrt{\frac{\pi}{2}}\approx 1.253\sigma\quad\quad\quad\quad\quad\quad\quad \sigma_r=\sigma\sqrt{\frac{4-\pi}{2}}\approx 0.655\sigma$

Based on these expressions for the mean and standard deviation of the signal amplitude, two important results can be deduced.

1. Although the average of in-phase and quadrature components of the signal are zero (pure noise), the average of noise amplitude is nonzero and it is proportional to the noise standard deviation.
2. The standard deviation of the signal amplitude is less than the standard deviation of signal components ($$\sigma_r<\sigma$$). Sometimes people intuitively think that there should be a factor of $$\sqrt{2}$$ as $$\sigma_r=\sigma\sqrt{2}$$ which is obviously wrong.

It should be noted that based on the equation $$\sigma_r^2+\mu_r^2=2\sigma^2$$, the conservation of energy holds for the amplitude and signal components. Tab. 2 shows the measured average and standard deviation of signal amplitude as well as the standard deviation of in-phase and quadrature components. As it is clear from the table, the in-phase and quadrature components have almost the same standard deviation $$\sigma=8.69\ nV$$. Using the above expressions for the average and standard deviation of signal amplitude we obtain  $$\mu_r=1.253\sigma=10.89\ nV$$ and $$\sigma_r=0.655\sigma=5.69\ nV$$ which are almost the same as the measured values in Tab. 2. Tab. 2. Avg. and Std. of R (blue), and Std. of X (green) and Y (red).

### Rice Distribution

When a signal is applied to the input of instrument, the mean value of the in-phase and quadrature components are no longer zero. In this case the signal amplitude follows the Rice or Rician distribution which is a generalization of the Rayleigh distribution. Consider the parameter $$\mu$$ so that $$\mu^2=\mu_x^2+\mu_y^2$$; then, the Rice distribution of the signal amplitude is given by .

$f(r)=\frac{r}{\sigma^2} e^{-\frac{r^2+\mu^2}{2\sigma^2}}I_0\bigg(\frac{r\mu}{\sigma^2}\bigg) , \quad\quad\quad r\ge 0$

where $$I_0$$ is the modified Bessel function of the first kind with order zero. Since $$I_0(0)=1$$, when there is no input signal and thus $$\mu=0$$, the Rice distribution collapses to the Rayleigh distribution. The mean and the variance of the signal amplitude with the Rice distribution are as follows [4,5].

$\mu_r=\sigma\sqrt{\frac{\pi}{2}}L_\frac{1}{2}\bigg(-\frac{\mu^2}{2\sigma^2}\bigg)\quad\quad\quad\quad\quad\quad\quad \sigma_r^2=\mu^2+2\sigma^2-\sigma^2\frac{\pi}{2}L_\frac{1}{2}^2\bigg(-\frac{\mu^2}{2\sigma^2}\bigg)$

where the Laguerre function $$L_\frac{1}{2}$$ is defined as .

$L_\frac{1}{2}(u)=e^\frac{u}{2}[(1-u)I_0\big(-\frac{u}{2}\big)-uI_1\big(-\frac{u}{2}\big)]$

Since $$L_\frac{1}{2}(0)=1$$, when $$\mu$$ is zero, the amplitude mean and variance reduce to the Rayleigh ones.

As an example, consider the measured values in Tab. 1. The in-phase and quadrature components have almost the same standard deviation $$\sigma=0.230\ \mu V$$. Using the above expressions for the average and standard deviation of signal amplitude we obtain $$\mu_r=0.487\ \mu V$$ and $$\sigma_r=0.206\ \mu V$$ which are almost the same as the measured values in Tab. 1. The following MATLAB code demonstrates how to call the Laguerre function in the mean and variance expressions.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Measured parameters

muX = 0.333288717; muY = 0.250784543; sigma = 0.230;

%%% Calculating avg and std of R

mu = sqrt(muX^2 + muY^2); muR = sqrt(pi/2)*sigma*mfun('L',0.5,-mu^2/(2*sigma^2)); sigmaR = sqrt(2*sigma^2 + mu^2 - pi/2*sigma^2*mfun('L',0.5,... -mu^2/(2*sigma^2))^2);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

## Power Spectral Density

In this section, we look at the the noise power spectral density (PSD) when no signal is applied to the instrument input. As mentioned before, the in-phase and quadrature components are zero-mean independent Gaussian processes with variance $$\sigma^2$$. The power spectral density of the in-phase and quadrature components of input noise expressed in $$\frac{V^2}{Hz}$$ with 1-Hz bandwidth is given by:

$S_x(f)=S_y(f)=\sigma^2$

It should be noted that the variance $$\sigma^2$$ can be different at each frequency $$f$$, especially at low frequencies where the pink noise ($$1/f$$-noise) is dominant. Since the noise amplitude has a nonzero average, its PSD is represented by:

$S_r(f)=\mu_r^2\delta(f)+\sigma_r^2$

where $$\delta(f)$$ is the Dirac delta function. As it is clear from this expression, the PSD of noise amplitude has a sharp component at $$f=0$$. Since $$\sigma_r=0.655\sigma$$, the plot of noise amplitude PSD is always below the plot of noise components PSD by a factor of $$\sqrt{\frac{4-\pi}{2}}\approx 0.655$$ as shown in Fig. 2. Fig. 2. Power spectral density (PSD) of the signal amplitude R (blue), in-phase X (green) and quadrature Y (red) components.

This figure plots the power spectral density of the MFLI input noise for in-phase (green) and quadrature (red) components as well as the noise amplitude PSD (blue). As it is evident from the measured area in the figure, the noise components have the same spectral density equal to $$2.48\ \frac{nV}{\sqrt{Hz}}$$; while the PSD of noise amplitude is almost $$2.48\times 0.655 = 1.62\ \frac{nV}{\sqrt{Hz}}$$.

## Phase Distribution

In the case of pure noise (Rayleigh distribution of amplitude), the phase distribution is a uniform distribution over $$[-\pi,\pi]$$ or $$[-180°,180°]$$ with the following probability density function .

$f(\phi)=\frac{1}{2\pi}\ , \quad\quad\quad -\pi< \phi\le \pi$

For such a uniform distribution, the average is $$\mu_\phi=0$$ and the standard deviation is $$\sigma_\phi=\pi/\sqrt{3}=180°/\sqrt{3}\approx 103.9°$$. Fig. 3 shows the histogram (gray) of the phase in a pure noise measurement. As it is evident from the figure, the phase distribution is uniform and the average and standard deviation match the expected theoretical ones. Fig. 3. Phase histogram in a pure noise measurement demonstrating a uniform distribution as well as the expected mean and standard deviation.

In the case of signal and noise mixture (Rice distribution for amplitude), the phase is no longer distributed uniformly, instead it has a rather complicated distribution. Considering the parameters of the Rice distribution, $$\sigma=\sigma_x=\sigma_y$$ and $$\mu = \sqrt{\mu_x^2+\mu_y^2}$$, we obtain the following phase distribution:

$f(\phi)=\frac{e^{-\frac{\mu^2}{2\sigma^2}}}{2\pi}\Bigg(1+\frac{\mu}{\sigma}\sqrt{\frac{\pi}{2}}\text{erfcx}\bigg(-\frac{\mu}{\sigma\sqrt{2}}\cos(\phi-\theta)\bigg)\Bigg), \quad\quad\quad -\pi< \phi\le \pi$

where $$\theta=\tan^{-1}(\mu_y/\mu_x)$$ and erfcx is the scaled complementary error function [6,7]. Obviously when $$\mu=0$$ (pure noise), the above phase distribution collapses to a uniform probability density function. Fig. 4 demonstrates a realization of such a nonuniform distribution using the MFLI when there is a weak input signal of $$1\ \mu V$$. Fig. 4. Phase histogram in a mixed signal and noise measurement demonstrating a nonuniform distribution.

There are no available closed-form formulas for the mean and standard deviation of such a nonuniform phase distribution, However, using the plotter histogram of the LabOne user interface we can measure its mean and variance as shown in Fig. 4. It must be noted that the mean and variance in the figure are different from parameters $$\mu$$ and $$\sigma$$ in the mathematical expression.

## Measurement vs. Model

First, we obtain the probability distribution of each signal component, i.e. amplitude, phase, in-phase and quadrature from the measured data and then, we compare them with the corresponding probability models including Gaussian, Rayleigh, Rice, etc.

### Noise without Signal

When there is no signal at the input of lock-in amplifiers, we only measure the input noise which has the following distributions:

• In-phase component: Zero-mean Gaussian
• Amplitude: Rayleigh distribution
• Phase: Uniform over $$[-\pi,\pi]$$

Fig. 5 depicts the probability distribution for all the four components of noise when $$\sigma = 0.12\ \mu V$$ .    Fig. 5. Probability distributions of noise components: Zero-mean Gaussian in-phase (top left), zero-mean Gaussian quadrature (top right), Rayleigh-distributed amplitude (bottom left), and uniformly distributed phase (bottom right).

### Noise with Signal

When a signal is applied to the input of lock-in amplifiers, we measure a mixture of signal and noise resulting in the following probability distributions for the signal components:

• In-phase component: Nonzero-mean Gaussian
• Amplitude: Rice distribution
• Phase: Nonuniform over $$[-\pi,\pi]$$

Fig. 6 shows the probability distributions for all the four signal components when $$\mu_x = 0.21\ \mu V$$, $$\mu_y = 0.63\ \mu V$$, and $$\sigma = 0.15\ \mu V$$.    Fig. 6. Probability distributions of signal components: Nonzero-mean Gaussian in-phase (top left), nonzero-mean Gaussian quadrature (top right), Rice-distributed amplitude (bottom left), and non-uniformly distributed phase (bottom right).

## Conclusion

The results of this blog post can be summarized as follows:

1. When no signal is applied to the input of instrument, the measured amplitude has a Rayleigh distribution.
2. When a signal is applied to the input, the measured amplitude follows a Rice distribution.
3. The standard deviation of signal amplitude is not proportion to the standard deviation of in-phase or quadrature components by a factor of $$\sqrt{2}$$.
4. In the case of Rayleigh, the average of signal amplitude is proportional to the standard deviation of in-phase or quadrature components by a factor of $$\sqrt{\frac{\pi}{2}}$$.
5. In the case of Rayleigh, the standard deviation of signal amplitude is proportional to the standard deviation of in-phase or quadrature components by a factor of $$\sqrt{\frac{4-\pi}{2}}$$.
6. In the case of Rice, the average and standard deviation of signal amplitude depend on both average and standard deviation of signal components through transcendental expressions.
7. Only in pure noise measurement, the phase distribution is uniform.

## Acknowledgments

The author is thankful to Dr. Sadik Hafizovic and Dr. Jürg Schwizer for initiating this topic, sharing their thoughts and providing help.

## References

1. P. Dharmawansa, N. Rajatheva and C. Tellambura, “Envelope and phase distribution of two correlated Gaussian variables,” IEEE Transactions on Communications, vol. 57, no. 4, pp. 915-921, April 2009. DOI: 10.1109/TCOMM.2009.04.070065
2. Wikipedia: “Normal distribution.”
3. Wikipedia: “Rayleigh distribution.”
4. Wikipedia: “Rice distribution.”
5. Marvin K. Simon, Probability Distributions Involving Gaussian Random Variables.  Springer, 2002. ISBN: 978-1-4020-7058-7
6. Wikipedia: “Error function.”
7. MathWorks: “Scaled complementary error function.”