DSPRelated.com
Forums

HELP!!!!!! effect of additive white noise

Started by THE_KILLER November 17, 2006
Hello
i need to investigate the effect of additive white noise on the
transmitted data using based-band simulation under different value of
signal-to-noise (SNR) ratio.
here are the 2 programs

Both files allow you to calculate the bite error rate (BER) depending
on:


i=2E      the noise amplitude Pn &
ii.     the signal amplitude Ps


i;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
clear all;


%Initialisation
N =3D 2500;
Pn =3D 0.25   % Noise Amplitude


% Generating Noise Sequence
AWGN =3D Pn*randn(N,1);


% Generating data Sequence
TX_data =3D randsrc(N,1);
%TX_dat =3D (2*round(rand(B))-1);


% Noise on data - received data with noise
RX_data =3D TX_data + AWGN;


%figure, plot(AWGN);
%figure, plot(data);
%stairs(data);


%figure, plot(RX_data);
%stairs(RX_data);


% To demodulate and recover data in noisy condition
recover_data =3D sign(RX_data);


% To Calculate the Bit Error Rate (BER)
Err_symbol =3D abs(recover_data-TX_data);
Total_err =3D length(find(Err_symbol));
BER =3D Total_err/N


ii;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=
=AD;;;;;;;;;;;;;;;;;;;;;;;;;



clear all;


N =3D 2500;
Ps =3D 1.5    % Signal Amplitude


% Generating Noise Sequence
AWGN =3D randn(N,1);


% Generating data Sequence
TX_data =3D Ps*randsrc(N,1);
%TX_dat =3D Ps*(2*round(rand(B))-1);


% Noise on data - received data with noise
RX_data =3D TX_data + AWGN;


%figure, plot(AWGN);
%figure, plot(data);
%stairs(data);


%*figure, plot(RX_data);
%stairs(RX_data);


% To demodulate and recover data in noisy condition
recover_data =3D Ps*sign(RX_data);


% To Calculate the Bit Error Rate (BER)
Err_symbol =3D abs(recover_data-TX_data);
Total_err =3D length(find(Err_symbol));
BER =3D Total_err/N


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


As im at vary Basic level so..i need ur help to understand these prog.
Can anyone ans these questions


Q1. According to the programs, how is signal recovery obtained in each
case? the difference.


Q2. According to both programs how is BER obtained?
Q3.In your opinion which method is better for simulation? reasons.


Q4 programs have been written for BPSK case, What  modification
required them tocater for QPSK case where real and imaginary numbers
are used?

THE_KILLER skrev:
> Hello > i need to investigate the effect of additive white noise on the > transmitted data using based-band simulation under different value of > signal-to-noise (SNR) ratio. > here are the 2 programs > > Both files allow you to calculate the bite error rate (BER) depending > on: > > > i. the noise amplitude Pn & > ii. the signal amplitude Ps
....
> As im at vary Basic level so..i need ur help to understand these prog. > Can anyone ans these questions > > > Q1. According to the programs, how is signal recovery obtained in each > case? the difference. > > > Q2. According to both programs how is BER obtained? > Q3.In your opinion which method is better for simulation? reasons. > > > Q4 programs have been written for BPSK case, What modification > required them tocater for QPSK case where real and imaginary numbers > are used?
What on earth is the context of these questions? How often does one have "trivial" matlab code one has not implemented oneself and need to understand? How often does one get those sorts of questions? The only answer I can come up with that covers all the bases is "this is homework for some course or class". Unless you can come up with a VERY convincing answer why I might be wrong, my only response is: - Learn matlab well enough to read and understand the code - Learn the communications theory well enough to recognize the algorithms implemented - Learn the algorithmic details well enough to suggest the required modifications Rune