Forums

Interpolation and the additive white gaussian noise

Started by Prasanna July 19, 2006
Dear all,

The following problem recently came up in one of my simulations. I have
a PSK modulated RRC filtered signal that I have to transmit over the
AWGN channel. Before RRC filtering, I interpolate the IQ signal to
twice the Nyquist rate. Now consider the two setups: The first one
transmits the RRC filtered signal at twice the Nyquist rate, and adds
white Gaussian noise to it. The second setup takes the RRC filtered
signal, interpolates it by some N, and then adds white Gaussian noise
to it.

In matlab:
% Code can be copied and run in matlab
% May be you will need the communication toolbox
dataQ = randint(100,1);
dataI = randint(100,1);
symb = pskmod(bi2de([dataI,dataQ]),4);
Ichan = real(symb); Qchan = imag(symb);
Ichan2 = interp(Ichan, 2); Qchan2 = interp(Qchan, 2);
rrc_coef =
[0.0027,0.0127,-0.0149,-0.0191,0.0386,0.0248,-0.0896,-0.0287,0.3126,0.5301,...
0.3126,-0.0287,-0.0896,0.0248,0.0386,-0.0191,-0.0149,0.0127,0.0027];
I_filt = filter(rrc_coef, 1, Ichan2);
Q_filt = filter(rrc_coef, 1, Qchan2);
tx_signal = I_filt + i*Q_filt;
tx_signal = tx_signal ./ sqrt(mean(abs(tx_signal).^2));
SNR = 1;
rx_signal = awgn(tx_signal, SNR);
% Plot the spectrum of received signal
figure; psd(rx_signal)
rx_signal2 = awgn(interp(tx_signal,2), SNR);
% Look at the change in spectrum
figure; psd(rx_signal2)
rx_signal4 = awgn(interp(tx_signal,4), SNR);
% A drastic improvement, even though SNR is the same
figure; psd(rx_signal4)
% Equivalently, plot the FFT
figure; plot(20*log10(abs(fftshift(fft(rx_signal)))))
figure; plot(20*log10(abs(fftshift(fft(rx_signal2)))))
figure; plot(20*log10(abs(fftshift(fft(rx_signal4)))))

The only reason I could come up for this behaviour is that in the case
of interpolation, the signal is spread over a smaller fraction of the
overall bandwidth, while the noise is equally spread over the entire
bandwidth... but that does not sound right because the SNR is same in
all the cases, and since the signal is normalized to 1, SNR translates
into the power spectral density of noise and is same in all the cases.

And processing the rx_signal4 gives me a much lower BER than processing
the rx_signal at the receiver.

Could someone point out to me what exactly is it that I am missing? And
how exactly should I be adding noise? Any inputs would be appreciated.
Thanks.

Regards,
Prasanna

With a few minor modifications to the above matlab code:
%%-------------------------------
dataQ = randint(2048,1);
dataI = randint(2048,1);
symb = pskmod(bi2de([dataI, dataQ]),4);
Ichan = real(symb); Qchan = imag(symb);
Ichan2 = interp(Ichan, 2); Qchan2 = interp(Qchan, 2);
rrc_coef = [0.0027,0.0127,-0.0149,-0.0191,...
0.0386,0.0248,-0.0896,-0.0287,0.3126,0.5301,...
0.3126,-0.0287,-0.0896,0.0248,0.0386,...
-0.0191,-0.0149,0.0127,0.0027];
I_filt = filter(rrc_coef, 1, Ichan2);
Q_filt = filter(rrc_coef, 1, Qchan2);
tx_signal = I_filt + i*Q_filt;
tx_signal = tx_signal ./ sqrt(mean(abs(tx_signal).^2));
SNR = 1;
rx_signal = awgn(tx_signal, SNR);
% Plot the spectrum of received signal
figure; psd(rx_signal)
rx_signal2 = awgn(interp(tx_signal,2), SNR);
% Look at the change in spectrum
figure; psd(rx_signal2)
rx_signal4 = awgn(interp(tx_signal,4), SNR);
% A drastic improvement, even though SNR is the same
figure; psd(rx_signal4)
% Equivalently, plot the FFT
figure; plot(20*log10(abs(fftshift(fft(rx_signal)))))
figure; plot(20*log10(abs(fftshift(fft(rx_signal2)))))
figure; plot(20*log10(abs(fftshift(fft(rx_signal4)))))
%%--------------------------------

Thanks.

Prasanna wrote:
> Dear all, > > The following problem recently came up in one of my simulations. I have > a PSK modulated RRC filtered signal that I have to transmit over the > AWGN channel. Before RRC filtering, I interpolate the IQ signal to > twice the Nyquist rate. Now consider the two setups: The first one > transmits the RRC filtered signal at twice the Nyquist rate, and adds > white Gaussian noise to it. The second setup takes the RRC filtered > signal, interpolates it by some N, and then adds white Gaussian noise > to it. > > In matlab: > % Code can be copied and run in matlab > % May be you will need the communication toolbox > dataQ = randint(100,1); > dataI = randint(100,1); > symb = pskmod(bi2de([dataI,dataQ]),4); > Ichan = real(symb); Qchan = imag(symb); > Ichan2 = interp(Ichan, 2); Qchan2 = interp(Qchan, 2); > rrc_coef = > [0.0027,0.0127,-0.0149,-0.0191,0.0386,0.0248,-0.0896,-0.0287,0.3126,0.5301,... > 0.3126,-0.0287,-0.0896,0.0248,0.0386,-0.0191,-0.0149,0.0127,0.0027]; > I_filt = filter(rrc_coef, 1, Ichan2); > Q_filt = filter(rrc_coef, 1, Qchan2); > tx_signal = I_filt + i*Q_filt; > tx_signal = tx_signal ./ sqrt(mean(abs(tx_signal).^2)); > SNR = 1; > rx_signal = awgn(tx_signal, SNR); > % Plot the spectrum of received signal > figure; psd(rx_signal) > rx_signal2 = awgn(interp(tx_signal,2), SNR); > % Look at the change in spectrum > figure; psd(rx_signal2) > rx_signal4 = awgn(interp(tx_signal,4), SNR); > % A drastic improvement, even though SNR is the same > figure; psd(rx_signal4) > % Equivalently, plot the FFT > figure; plot(20*log10(abs(fftshift(fft(rx_signal))))) > figure; plot(20*log10(abs(fftshift(fft(rx_signal2))))) > figure; plot(20*log10(abs(fftshift(fft(rx_signal4))))) > > The only reason I could come up for this behaviour is that in the case > of interpolation, the signal is spread over a smaller fraction of the > overall bandwidth, while the noise is equally spread over the entire > bandwidth... but that does not sound right because the SNR is same in > all the cases, and since the signal is normalized to 1, SNR translates > into the power spectral density of noise and is same in all the cases. > > And processing the rx_signal4 gives me a much lower BER than processing > the rx_signal at the receiver. > > Could someone point out to me what exactly is it that I am missing? And > how exactly should I be adding noise? Any inputs would be appreciated. > Thanks. > > Regards, > Prasanna
Prasanna wrote:

> Dear all, > > The following problem recently came up in one of my simulations. I have > a PSK modulated RRC filtered signal that I have to transmit over the > AWGN channel. Before RRC filtering, I interpolate the IQ signal to > twice the Nyquist rate. Now consider the two setups: The first one > transmits the RRC filtered signal at twice the Nyquist rate, and adds > white Gaussian noise to it. The second setup takes the RRC filtered > signal, interpolates it by some N, and then adds white Gaussian noise > to it. >
-- lots of code snipped --
> > Could someone point out to me what exactly is it that I am missing? And > how exactly should I be adding noise? Any inputs would be appreciated. > Thanks. >
Perhaps you should tell us what results Matlab is giving you, instead of expecting us to go to a lot of work making it run and interpreting results? I generally pass over posts that expect me to examine more than two lines of code, and it seems that other's feel the same way. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Tim Wescott wrote:
> Prasanna wrote: > > > Dear all, > > > > The following problem recently came up in one of my simulations. I have > > a PSK modulated RRC filtered signal that I have to transmit over the > > AWGN channel. Before RRC filtering, I interpolate the IQ signal to > > twice the Nyquist rate. Now consider the two setups: The first one > > transmits the RRC filtered signal at twice the Nyquist rate, and adds > > white Gaussian noise to it. The second setup takes the RRC filtered > > signal, interpolates it by some N, and then adds white Gaussian noise > > to it. > > > -- lots of code snipped -- > > > > Could someone point out to me what exactly is it that I am missing? And > > how exactly should I be adding noise? Any inputs would be appreciated. > > Thanks. > > > Perhaps you should tell us what results Matlab is giving you, instead of > expecting us to go to a lot of work making it run and interpreting > results? I generally pass over posts that expect me to examine more > than two lines of code, and it seems that other's feel the same way.
Hi Tim, The spectrum of the rx_signal = awgn(tx_signal, SNR) for SNR=1 shows that the signal is almost submerged in noise. But the spectrum of rx_signal4 = awgn(interp(tx_signal,4),SNR) for SNR = 1 looks better, in the sense that the signal spectrum is still visible above the noise level. I put the matlab code there because it is easy to explain the results when they are plotted. What I am wondering is, why am I getting better results when I just add noise after interpolating the transmitter signal. The SNR is same with or without interpolation. I hope it is clear what I am trying to ask. Thanks. --Prasanna
> > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > Posting from Google? See http://cfaj.freeshell.org/google/ > > "Applied Control Theory for Embedded Systems" came out in April. > See details at http://www.wescottdesign.com/actfes/actfes.html
> > Dear all, > > > > The following problem recently came up in one of my simulations. I have > > a PSK modulated RRC filtered signal that I have to transmit over the > > AWGN channel. Before RRC filtering, I interpolate the IQ signal to > > twice the Nyquist rate. Now consider the two setups: The first one > > transmits the RRC filtered signal at twice the Nyquist rate, and adds > > white Gaussian noise to it. The second setup takes the RRC filtered > > signal, interpolates it by some N, and then adds white Gaussian noise > > to it.
The N in SNR is the noise ONLY in the channel BW. If you interpolate and the noise BW is in excess of the channel bandwidth, then only the noise that is within the channel BW counts in the SNR calculation. Think about what happens in the receiver when the PSK signal passes through the channel filter... Mark
Mark wrote:
> > > Dear all, > > > > > > The following problem recently came up in one of my simulations. I have > > > a PSK modulated RRC filtered signal that I have to transmit over the > > > AWGN channel. Before RRC filtering, I interpolate the IQ signal to > > > twice the Nyquist rate. Now consider the two setups: The first one > > > transmits the RRC filtered signal at twice the Nyquist rate, and adds > > > white Gaussian noise to it. The second setup takes the RRC filtered > > > signal, interpolates it by some N, and then adds white Gaussian noise > > > to it. > > The N in SNR is the noise ONLY in the channel BW. If you interpolate > and the noise BW is in excess of the channel bandwidth, then only the > noise that is within the channel BW counts in the SNR calculation.
I was thinking along the same lines Mark. But how do I explain that in the time domain? All the channel sees is the output of the RRC filter, and the channel adds white gaussian noise to each of those samples. No?
> Think about what happens in the receiver when the PSK signal passes > through the channel filter... > > Mark
Prasanna wrote:
> Dear all, > > The following problem recently came up in one of my simulations. I have > a PSK modulated RRC filtered signal that I have to transmit over the > AWGN channel. Before RRC filtering, I interpolate the IQ signal to > twice the Nyquist rate.
Do you mean that there are components of the signal up to and including half the sample rate? that can't work. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Prasanna wrote:

> Tim Wescott wrote: > >>Prasanna wrote: >> >> >>>Dear all, >>> >>>The following problem recently came up in one of my simulations. I have >>>a PSK modulated RRC filtered signal that I have to transmit over the >>>AWGN channel. Before RRC filtering, I interpolate the IQ signal to >>>twice the Nyquist rate. Now consider the two setups: The first one >>>transmits the RRC filtered signal at twice the Nyquist rate, and adds >>>white Gaussian noise to it. The second setup takes the RRC filtered >>>signal, interpolates it by some N, and then adds white Gaussian noise >>>to it. >>> >> >>-- lots of code snipped -- >> >>>Could someone point out to me what exactly is it that I am missing? And >>>how exactly should I be adding noise? Any inputs would be appreciated. >>>Thanks. >>> >> >>Perhaps you should tell us what results Matlab is giving you, instead of >>expecting us to go to a lot of work making it run and interpreting >>results? I generally pass over posts that expect me to examine more >>than two lines of code, and it seems that other's feel the same way. > > > Hi Tim, > > The spectrum of the rx_signal = awgn(tx_signal, SNR) for SNR=1 shows > that the signal is almost submerged in noise. But the spectrum of > rx_signal4 = awgn(interp(tx_signal,4),SNR) for SNR = 1 looks better, in > the sense that the signal spectrum is still visible above the noise > level. I put the matlab code there because it is easy to explain the > results when they are plotted. > > What I am wondering is, why am I getting better results when I just add > noise after interpolating the transmitter signal. The SNR is same with > or without interpolation. > > I hope it is clear what I am trying to ask. Thanks.
If you are adding your Gaussian noise in sampled time then it's spectral height will be the total power divided by the sampling rate -- so up sampling the signal by a factor of 4 and adding 'white' Gaussian noise will result in 1/4 the spectral height of the noise. Any time you do the noise injection thing with sampled data you have to normalize for sampling rate. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Jerry Avins wrote:
> Prasanna wrote: > > Dear all, > > > > The following problem recently came up in one of my simulations. I have > > a PSK modulated RRC filtered signal that I have to transmit over the > > AWGN channel. Before RRC filtering, I interpolate the IQ signal to > > twice the Nyquist rate. > > Do you mean that there are components of the signal up to and including > half the sample rate? that can't work.
It will. Because it is four times over sampling already.
> > Jerry > -- > Engineering is the art of making what you want from things you can get. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF
Tim Wescott wrote:
> Prasanna wrote: > > > Tim Wescott wrote: > > > >>Prasanna wrote: > >> > >> > >>>Dear all, > >>> > >>>The following problem recently came up in one of my simulations. I have > >>>a PSK modulated RRC filtered signal that I have to transmit over the > >>>AWGN channel. Before RRC filtering, I interpolate the IQ signal to > >>>twice the Nyquist rate. Now consider the two setups: The first one > >>>transmits the RRC filtered signal at twice the Nyquist rate, and adds > >>>white Gaussian noise to it. The second setup takes the RRC filtered > >>>signal, interpolates it by some N, and then adds white Gaussian noise > >>>to it. > >>> > >> > >>-- lots of code snipped -- > >> > >>>Could someone point out to me what exactly is it that I am missing? And > >>>how exactly should I be adding noise? Any inputs would be appreciated. > >>>Thanks. > >>> > >> > >>Perhaps you should tell us what results Matlab is giving you, instead of > >>expecting us to go to a lot of work making it run and interpreting > >>results? I generally pass over posts that expect me to examine more > >>than two lines of code, and it seems that other's feel the same way. > > > > > > Hi Tim, > > > > The spectrum of the rx_signal = awgn(tx_signal, SNR) for SNR=1 shows > > that the signal is almost submerged in noise. But the spectrum of > > rx_signal4 = awgn(interp(tx_signal,4),SNR) for SNR = 1 looks better, in > > the sense that the signal spectrum is still visible above the noise > > level. I put the matlab code there because it is easy to explain the > > results when they are plotted. > > > > What I am wondering is, why am I getting better results when I just add > > noise after interpolating the transmitter signal. The SNR is same with > > or without interpolation. > > > > I hope it is clear what I am trying to ask. Thanks. > > If you are adding your Gaussian noise in sampled time then it's spectral > height will be the total power divided by the sampling rate -- so up > sampling the signal by a factor of 4 and adding 'white' Gaussian noise > will result in 1/4 the spectral height of the noise. Any time you do > the noise injection thing with sampled data you have to normalize for > sampling rate. >
But the variance is still N_0. And the white noise has a spectrum whose amplitude is N_0 over the whole frequency range... So why should its spectral height go down?
> -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > Posting from Google? See http://cfaj.freeshell.org/google/ > > "Applied Control Theory for Embedded Systems" came out in April. > See details at http://www.wescottdesign.com/actfes/actfes.html