4
$\begingroup$

Good day everyone.

So, I run in to trouble - How to add white noise to signal samples?

For now I'm working with MSK signal - quadrature modulator and quadrature demodulator + Viterbi processor. My signal samples at TX and RX side represents Q and I signals of modulator(real and complex part of the signal). Model works nice in ideal situation, without any noise and other interference.

So, I'm working with complex envelope of the MSK signal with amplitude equal to one. Currently, I would like to test my demodulator with some noise.

It looks like, I just need to add (+) samples from my noise generator to samples of transmitted signal. But I'm not sure if this is correct way,

  • Should I sum both Q and I channels to one sample of noise signal or not?
  • And I'm pretty confused how to determine signal to noise ratio after this. I would like to measure bit error ratio at some SNR points. As I read in some books changing $\sigma$ parameter of white noise generator will play a role here, but still how to determine SNR in numbers after this?
$\endgroup$

2 Answers 2

3
$\begingroup$

If you want a complex white noise sample with variance $N_0$, then you should generate two independent noise samples each with variance $\frac{N_0}{2}$. The two samples that you generate make up the real and imaginary parts of the desired complex noise sample. The resulting complex value will have the desired variance $N_0$. You should then sum this with your complex baseband signal to get the effect that you want.

$\endgroup$
2
  • $\begingroup$ Still im little confused. At first i will initialize my white noise generator with mean m=0 and sigma=10 (for example). It will lead variance of generator to value N=100. So, after this i will generate two numbers from generator and this numbers will represent me real and imaginary part of complex noise sample with variance N=100+100=200. And after this i will sum my samples with my signal samples. Still confused, what SNR i will get at this point? $\endgroup$
    – Araxnid
    May 13, 2014 at 13:39
  • $\begingroup$ Yes, in your example your complex noise samples would have variance 200. For zero-mean noise, its variance is equal to its average power. In order to calculate the SNR, you need to know the average signal power level. $\endgroup$
    – Jason R
    May 13, 2014 at 15:13
3
$\begingroup$

How do you measure the power of your signal?

You will approximate it using, $$ P_{x,av} = \frac{1}{K} \sum_{k=0}^{K-1} |x(k)|^2,\text{ right! Where}\quad x(k) = x_{I}(k) + i.x_{Q}(k) $$ and $i$ denotes the imaginary part.

In order to add a noise signal, you need to add noise to I and the Q part of $x(k)$ separately. If we assume noise for I part to be $n_{I}(k)$ and for Q part to be $n_Q(k)$, then the total noise power will be $$ P_{n,av} = \frac{1}{N}\sum_{k=0}^{K-1} |n(k)|^2,\quad\text{where}\quad n(k) = n_{I}(k) + i.n_Q(k) $$

SNR is given as $$ 10\log_{10}\left(\frac{P_{x,av}}{P_{n,av}}\right) $$ So, the total noise power, i.e., for the I and Q part combined for a given SNR value is $$ P_{n,av} = P_{x,av}10^{-SNR/10} $$ You will generate one noise vector for I, i.e., add it to I part of $x(k)$ with half of the power, and another noise vector to be added to Q part of $x(k)$.

Since $x(k)$ is complex you can add noise in one go if you make the complex noise signal $n(k)$ as mentioned above. In case of Gaussian noise you use randn() function to generate noise for both I and Q parts, but do not forget to multiply each Gaussian noise component by $\sqrt{P_{n,av/2}}$.

Hint: btw MATLAB allows this, x = 1 + 1i*2, you can do n = nI + 1i*nQ, if nI and nQ are noise vectors.

$\endgroup$
2
  • $\begingroup$ Hm, are this power values in dB? Currently i'm watching power spectrum of my noise samples to determine noise power (without signal) and get values in dB.. $\endgroup$
    – Araxnid
    May 14, 2014 at 8:18
  • $\begingroup$ The power value $P_{n,av}$ are in watts. If they are in dBs you need to change them in watts. $\endgroup$
    – learner
    May 14, 2014 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.