Attachment # 00006129 - 1970011__Solution.docx
1970011__Solution.docx (539.82 KB)
Raw Preview of Attachment:
(refer to the detailed question and attachment below)
Question 1SolutionRandom variable R is Rayleigh distributed if R  X 2  Y 2 , where X~N(0, σ2 ) andY ~N(0, σ2 ) are independent normal random variables. Derive theoretically the probability density function (PDF) and cumulative density function (CDF) of the Rayleigh distribution as well as its amplitude, and plot the figures inMATLAB.Probability Density Function for random variable X is1x2X ~  (0, 2)=f X(x) e 2 22And PDF for random variableY is1 y 2Y ~  (0, 2)=fY( y) e 2 22As the random variables X & Y are independent to each other there joint PDF is to be given by1x21 y 2fXY(x, y) e 2 2 .e 2 22 211x2 y 22fXY(x, y) e 222Joint probability that the RV X lies in between x and x  dx and RV Y lies in between y and y  dy is given by11x 2  y 2 e22P(x  X  x  dx, y  Y  y  dy) dxdy22Substitutingr x2 y2x  r.Cos y   tan1& y  r.Sin x As we know that area dx.dy  r.dr.d (Conversion from Cartesian Coordinate System to Polar Coordinate) which implies that we can haveP(x  X  x  dx, y  Y  y  dy) = P(r  R  r  dr,   d)So now we haverr 2P(r  R  r  dr,    d ) e 2 2drd22The equivalent joint PDF can be given asrr 2fR,(r, ) e 2 222And as random variables R and  are independent to each other their independent PDFs can be given asf() 12rr 2f R (r) e 2 2, r  02Cumulative Density Function (CDF) of random variable is given byF (r)  P(R  r)  P( X 2 Y 2r)Rr 2rF (r) e 22 drdR22Circler2rr 2F (r) e 2 2 drd0R220rrr 221F (r) e 2 2 dr.dR2200r 2F (r)  1  e 2 2, r  0RMATLAB code for generating Rayleigh PDFx=0:0.1:6; y=raylpdf (x,1); plot (x,y);title ('RAYLEIGH PDF'),xlabel('Random Values'),ylabel('f(r)'); text(3,0.66,'Scale Parameter=1');grid on;Output:Figure-1MATLAB code for generating Rayleigh CDFx=0:0.1:10; y=raylcdf (x,1); plot (x,y);title ('RAYLEIGH CDF'),xlabel('Random Values'),ylabel('F(r)'); text(6.3,0.66,'Scale Parameter=1');grid on;Output:Figure-2Question 2 If a channel is not changing with time, it does not fade and instead remains at some particular level. Separate instances of the channel in this case will be uncorrelated with one another, owing to the assumption that each of the scattered components fades independently. Once relative motion is introduced between any of the transmitter, receiver, and scatterers , the fading becomes correlated and varying in time. The normalised autocorrelation function of a Rayleigh faded channel with motion at a constant velocity is a zeroth-order Bessel function of the first kind:R( )  J0 (2fd )at delay  when the maximum doppler shift is f d .The Jakes model is a well-known and popularly used channel model in simulating a Rayleigh fading channel. The Jakes model has the following characteristics:approximates the Rayleigh fading process by summing a set of complex sinusoids the sinusoids are weighted so as to produce an accurate approximation of desired channel Doppler spectrum Jakes shows that the theoretical Doppler spectrum for the isotropic scattering mobile radio channel can be well approximated by a summation of relatively small number of sinusoids with frequencies and relative phases of the sinusoids set according to a specific formulation. Write a MATLAB program to simulate a wireless channel based upon the Jakes model with Doppler shifts of 10 Hz, 100 Hz, and 1000 Hz. You should plot the amplitude of the wireless fading and compare with the theoretical results in Question 1. Comment on the comparison.SolutionMATLAB programfd1=10;fd2=100;fd3=1000% Specify Doppler Shifts%c1= rayleighchan(1/10000,fd1); %CreateChannels%c2= rayleighchan(1/10000,fd2); %CreateChannels%c3= rayleighchan(1/10000,fd3); %CreateChannels%sig = 1i*ones(2000,1); %Generate Signalto be transmitted%c1%Display Channel Properties%c2%Display Channel Properties%c3%Display Channel Properties%y = filter(c1,sig); %Signal at the receiver end% z = filter(d,sig); %Signal at the receiver end% x= filter(e,sig); %Signal at the receiver end% plot(20*log10(abs(y)),'h'),hold on; plot(20*log10(abs(z)),'+g');hold on; plot(20*log10(abs(x)),'r');title ('Strength of the Receieved Signal (Prior to any filtering)'), xlabel('No. of Samples'),ylabel('Signal Strength (dB)'),grid on; legend('fd=10 Hz','fd=100 Hz','fd=1000 Hz');text (1000,-36,'RAYLEIGH FADING CHANNEL');Output1.Channel Propertiesc1 =ChannelType: 'Rayleigh'InputSamplePeriod: 1.0000e-004DopplerSpectrum: [1x1 doppler.jakes]MaxDopplerShift: 10PathDelays: 0AvgPathGaindB: 0NormalizePathGains: 1StoreHistory: 0StorePathGains: 0PathGains: -0.0198 - 0.0309iChannelFilterDelay: 0ResetBeforeFiltering: 1NumSamplesProcessed: 0c2 =ChannelType: 'Rayleigh'InputSamplePeriod: 1.0000e-004DopplerSpectrum: [1x1 doppler.jakes]MaxDopplerShift: 100PathDelays: 0AvgPathGaindB: 0NormalizePathGains: 1StoreHistory: 0StorePathGains: 0PathGains: -0.4897 + 0.3055iChannelFilterDelay: 0ResetBeforeFiltering: 1NumSamplesProcessed: 0c3 =ChannelType: 'Rayleigh'InputSamplePeriod: 1.0000e-004DopplerSpectrum: [1x1 doppler.jakes]MaxDopplerShift: 1000PathDelays: 0AvgPathGaindB: 0NormalizePathGains: 1StoreHistory: 0StorePathGains: 0PathGains: -1.0070 - 0.6144iChannelFilterDelay: 0ResetBeforeFiltering: 1NumSamplesProcessed: 02. Fading EffectFigure-3Comparing Empirical Results to Theoretical Results MATLAB CodeCreate Rayleigh fading channel object. fd1=10;fd2=100;fd3=1000; c1 = rayleighchan(1/10000,fd1); c2 = rayleighchan(1/10000,fd2); c3 = rayleighchan(1/10000,fd3); Generate data and apply fading channel. M = 2; % DBPSK modulation order hMod = modem.dpskmod('M', M); hDemod = modem.dpskdemod(hMod);tx = randi([0 M-1],50000,1); dpskSig = modulate(hMod, tx); fadedSig1 = filter(c1,dpskSig); fadedSig2 = filter(c2,dpskSig); fadedSig3 = filter(c3,dpskSig);Create a DPSK modulator Create a DPSK demodulator using the modulator Generate a random bit stream DPSK modulate the signal Apply the channel effects Apply the channel effects Apply the channel effects % Compute error rate for different values of SNR. SNR = 0:2:20; % Range of SNR values, in dB. numSNR = length(SNR);BER1= zeros(1, numSNR);BER2= zeros(1, numSNR);BER3= zeros(1, numSNR); for n = 1:numSNRrxSig1 = awgn(fadedSig1,SNR(n));%Add Gaussian noiserx1 = demodulate(hDemod, rxSig1);%Demodulatereset(hDemod);% Compute error rate.[nErrors, BER1(n)] = biterr(tx,rx1);endfor n = 1:numSNRrxSig2 = awgn(fadedSig2,SNR(n));%Add Gaussian noiserx2= demodulate(hDemod, rxSig2);% Demodulatereset(hDemod);% Compute error rate.[nErrors, BER2(n)] = biterr(tx,rx2);endfor n = 1:numSNRrxSig3 = awgn(fadedSig3,SNR(n));%Add Gaussian noiserx3 = demodulate(hDemod, rxSig3);%Demodulatereset(hDemod);% Compute error rate.[nErrors, BER3(n)] = biterr(tx,rx3);endCompute theoretical performance results, for comparison. BERtheory = berfading(SNR,'dpsk',M,1); Plot BER results. semilogy(SNR,BERtheory,'+b');hold on;semilogy(SNR,BER1,'b');hold on;semilogy(SNR,BER2,'r*');hold on;semilogy(SNR,BER3,'r-');grid on; legend('Theoretical BER','Empirical BER1 for fd=10Hz','Empirical BER2 for fd=100Hz','Empirical BER3 for fd=1000Hz');xlabel('SNR (dB)'); ylabel('BER');Output of the above program is depicted on the next page.Comment:From the plot it is deduced that as the Doppler spread increases the Bit Error Rate (BER) increases which is well in accordance to theoretical concepts.Figure-4END OF ASSIGNMENT

communication system with matlab coding

Question # 00073991 Posted By: solutionshere Updated on: 06/02/2015 06:41 AM Due on: 06/02/2015
Subject General Questions Topic General General Questions Tutorials:
Question
Dot Image

16 ELE4606 – Communication systems

Problem

Cellular telephony has forever changed the way people communicate with one another, being one of those exciting technologies that has directly and significantly influenced our everyday life. The characteristics of wireless signal changes as it travels from the transmitter antenna to the receiver antenna. These characteristics depend upon the distance between the two antennas, the path(s) taken by the signal, and the environment (buildings and other objects) around the path. The profile of received signal can be obtained from that of the transmitted signal if we have a model of the medium between the two. This model of the medium is called channel modeling.

Rayleigh fading is a statistical model for the effect of a propagation environment on a radio signal, such as that used by wireless devices. Rayleigh fading is a reasonable model when there are many objects in the environment that scatter the radio signal before it arrives at the receiver.

Rayleigh fading is exhibited by the assumption that the real and imaginary parts of the response are modelled by independent and identically distributed zero-mean Gaussian processes so that the amplitude of the response is the sum of two such processes.

Question 1

Random variable R is Rayleigh distributed if R X2 Y2 , where X N (0,2 ) andY N(0,2) are independent normal random variables.

Derive theoretically the probability density function (PDF) and cumulative density function (CDF) of the Rayleigh distribution as well as its amplitude, and plot the figures in MATLAB.

Question 2

If a channel is not changing with time, it does not fade and instead remains at some particular level. Separate instances of the channel in this case will be uncorrelated with one another, owing to the assumption that each of the scattered components fades independently. Once relative motion is introduced between any of the transmitter, receiver, and scatterers, the fading becomes correlated and varying in time.

The normalised autocorrelation function of a Rayleigh faded channel with motion at a constant velocity is a zeroth-order Bessel function of the first kind:

R( ) Jo(2 fd )

at delay when the maximum doppler shift is fd .

The Jakes model is a well- known and popularly used channel model in simulating a Rayleigh fading channel. The Jakes model has the following characteristics:

? approximate the Rayleigh fading process by summing a set of complex sinusoids;

? the sinusoids are weighted so as to produce an accurate approximation of desired channel Doppler spectrum;

©University of Southern Queensland


ELE4606 – Communication systems

17

? Jakes shows that the theoretical Doppler spectrum for the isotropic scattering mobile radio channel can be well approximated by a summation of relatively small number of sinusoids with frequencies and relative phases of the sinusoids set according to a specific formulation.

Write a MATLAB program to simulate a wireless channel based upon the Jakes model with Doppler shifts of 10 Hz, 100 Hz, and 1000 Hz. You should plot the amplitude of the wireless fading and compare with the theoretical results in Question 1. Comment on the comparison.

Allocation of marks

Question 1

50

Question 2

150

Total

200

NB: the discussion should demonstrate that you can interpret the waveforms.

Additional resources

You may find the following references useful in completing this assignment:

[1] http://en.wikipedia.org/wiki/Rayleigh_fading#Jakes.27_model

[2] Rapport, TS 2002, Wireless Communications Principle and Practice, Prentice Hall, New Jersey.

[3] Turin, W, Rittwik, J, Martin, C & Winters, J 2001, Modeling Wireless Channel Fading, IEEE , 2001.

[4] Steele, R & Hanzo, L 1999, Mobile Radio Communications, Wiley.

[5] Patzold, M 2002, Mobile Fading Channels, John Wiley.

[6] Jakes, WC 1974, Microwave Mobile Communications, Wiley, New York.

________________

End of Assignment


© University of Southern Queensland

Dot Image
Whatsapp Lisa