# Noise PSD and sampling rate relation

Let's consider generating samples of a random process like white Gaussian noise (AWGN). Let's assume I am generating $N$ samples of AWGN with variance $\sigma ^2$ in MATLAB by using randn() funtion i.e.:

\begin{equation} \tag{1}\label{Eq:n} n_1 = \sigma * \text{randn}(N,1) \\ n_2 = \sigma * \text{randn}(N,1) \end{equation}

Note that, here I am not sampling a noise signal to get these samples. I am simply generating some random numbers to consume them later.

Now I want to add these noise samples to my clean signal samples. Let's assume I have two cases of clean signal samples, namely $y$ which has a sampling frequency of $f_s$ and $z$ which has a sampling frequency of $2f_s$. So we have

\begin{equation} \tag{2}\label{Eq:y_n} y_n = y + n_1 \end{equation}

\begin{equation} \tag{3}\label{Eq:z_n} z_n = z + n_2 \end{equation}

This means that in $y_n$ I am using noise samples with the rate $f_s$ and in $z_n$ and I am using noise samples with the rate $2f_s$.

Since here we are dealing with random process, instead of frequency spectrum we have the power spectral density (PSD). Let's name the PSD of $y_n$ and $z_n$, $S_{yy}(\omega)$ and $S_{zz}(\omega)$ respectively. Also let's consider the PSD of noise in Eq. \eqref{Eq:y_n} which is read at the lower rate is $S_{nn1}(\omega)$ and the PSD of noise in Eq. \eqref{Eq:z_n} which is read at the higher rate is $S_{nn2}(\omega)$

Question 1) How are $S_{nn1}(\omega)$ and $S_{nn2}(\omega)$ different? More precisely, if you want to draw them on the frequency axis how do they look? Does $S_{nn1}(\omega)$ span from 0 to $f_s$ and $S_{nn2}(\omega)$ span from 0 to $2f_s$? And if you calculate the area underneath them (which shows the power or variance of the noise) which one is greater? Do they have the same power?

Let's consider the auto-correlation and PSD for random processes. We know that PSD is the DTFT of the auto-correlation, more specifically:

\begin{equation} \tag{4}\label{Eq:DTFT} R_{nn}(m) = \frac{\Delta t}{2 \pi}\int_{0}^{\frac{2\pi}{\Delta t}} S_{nn}(\omega) e^{j\omega m \Delta t} d \omega, \end{equation} where $R_{nn}$ is the auto-correlation and $S_{nn}(\omega)$ is the PSD.

From Eq. \eqref{Eq:DTFT} we have: \begin{equation} \tag{5}\label{Eq:Rnn} R_{nn}(0) = \frac{\Delta t}{2 \pi}\int_{0}^{\frac{2\pi}{\Delta t}} S_{nn}(\omega) d \omega, \end{equation} which means the area under PSD (which is the power of the signal) is given by the auto-correlation at zero.

Question 2) Which one gives the power of the signal, just the output of the integral (without the multiplier) in Eq. \eqref{Eq:Rnn}, or the whole Eq. \eqref{Eq:Rnn}?

Question 3) This is the continue of question 1, or maybe similar to it. I basically want to know how Eq. \eqref{Eq:Rnn} changes for noises $n_1$ and $n_2$? Cause obviously in Eq. \eqref{Eq:Rnn}, $\Delta t$ is changing for the noise when the sampling rate is changed. But how $R_{nn1}$ and $R_{nn2}$ or $S_{nn1}$ and $S_{nn2}$ change when sampling rate changes?

I appreciate if someone can mathematically explain these to me.

• I think you're mixing here two things. What is the Auto Correlation Function of the AWGN you're sampling from (Specifically ${R}_{nn} \left( 0 \right)$)? – Royi Jul 20 '18 at 6:23
• As I mentioned I am not sampling a noise signal to get these samples. I am simply generating some random numbers to consume them with a certain rate. So it is a white Gaussian noise. – shampar Jul 20 '18 at 14:37
• When you work with AWGN in Discrete while you want to analyze with using Continuous framework you need to define its properties well. For instance if we generate 100 samples of Random Numbers in MATLAB with the same STD yet we imagine they are sampled with different sampling frequency we actually say they are originated from a different (Different means different Auto Correlation Function) noise. – Royi Jul 20 '18 at 14:50

Important Information : Sampling at $$f_{s}$$ will map $$[-\frac {f_{s}}{2}, \frac {f_{s}}{2}]$$ to digital frequency $$\omega=[-\pi, \pi]$$, and similarly sampling at $$2f_{s}$$ will map $$[-f_{s}, f_{s}]$$ to digital frequency $$\omega=[-\pi, \pi]$$. Also, we need to look only at digital frequency $$\omega = [-\pi, \pi]$$ as the digital spectrum is a $$2\pi$$-periodic function.
Now, lets look at discrete White Gaussian Noise Samples which you have generated. $$n_{1} = N(0,\sigma^{2}), n_{2} = N(0, \sigma^{2})$$
This means auto-correlation function for both $$n_1$$ and $$n_2$$ will be: $$r[k] = \sigma^{2}\delta[k]$$ and hence, the PSD of $$n_1$$ and $$n_2$$ in digital domain will be : $$P(e^{j\omega}) = \sigma^2, \omega \in [-\pi, \pi]$$ and hence total Noise Power will be : $$T_{NoisePower} = 2\pi.\sigma^2$$