assignment solution for problems from wireless communication by Theodore S Rappaport with matlab codes...
Description
1
Wireless Communication Assignment
ASSIGNMENT no 3 Wireless Communication Chapter 4 Question No: 31 An MATLAB program to produce an arbitrary number of samples of propagation path loss using a d^n path loss model with log normal shadowing MATLAB CODE: f=1*10^9; n=2.7; sd=28; dn=10; sn=10; % Initialize variables d = [50,250,500,750,1000]; c = 3 * 10 ^ 8; e = 2.718281828459; %Calculate P0 by the initialized variables P0 = 10 * n * log(dn) / log(10) +10 * n * log(f) / log(10) +10 * n * log(4 * pi / c) / log(10); P01 = (1 * 1 * 1 * c / f) / (4 * pi * dn)^2; % Sampling sn times for the 5 TR seperation distance for p = 1:5 if d(p) >= dn % To tell if the distance is greater than dn for m = 1:sn X = normrnd(0, sd); Pr(m) = P0 +10 * n * log(d(p) / dn) / log(10) + X; %Calculate the received signal power scatter (d(p), Pr(m), 'rx'); % Scatter-plot the signal. hold on; Pavg(p) = sum(Pr) / sn; end else break; end % Scatter plot the average, predicted received signal power for 5 distances scatter (d(p), Pavg(p), 'ro'); end %Calculate exponential variable n and stand deviation by the sampling data count_2 = 1; % MMSE for suitable loss exponential and standard deviation for nn = 0:0.01:10; count_4 = 1; for dd = d Pa(count_4) = P01*(dn / dd)^nn; count_4 = count_4 +1; end for i = 1:5 LPa(i) = log10(Pa (i)); end jn(count_2) = (Pavg(1)-LPa(1))^ 2 + (Pavg(2)-LPa(2))^ 2 + (Pavg(3)-LPa(3))^ 2 + (Pavg(4)-LPa(4))^ 2 + (Pavg(5)-LPa(5))^ 2; count_2 = count_2 +1; end [val no] = sort(jn); % Sort the candidates according to variance na = (no(1)-1) * 0.01; % Determine n Y = normrnd(0, sqrt(val(1) / 5)); % Determine normal random variable Y for p = 1:5 Pa(p) = P0 +10 * na * log(d(p) / dn) / log(10);% Calculate approximate received power scatter(d(p), Pa(p), 'b ^'); % Scatter plot the appoximate received power end xlabel('Distance 50, 100,250,500,750,1000' ); ylabel('Path loss in dB referred to P0' );
Submitted By SANKARASRINIVASAN 212ee1388
Page 1
2
Wireless Communication Assignment
title('Path loss simulator with close-in reference chosen 1m'); OUTPUT PLOT:
4.32 a) If a user specifies desired SNR and a specific TR distance. Then calculate the percentage of time SNR will be exceeded at the receiver. MATLAB CODE: Pt=input('Enter the transmitter power: '); Gt=input('Enter the transmitter antenna Gain: '); Gr=input('Enter the receiver antenna Gain: '); Br=input('Enter receiver bandwidth: '); f=input('Enter the operation frequency(in GHz): '); Desired_SNR=input('Enter the desired receiver SNR(in dB): '); Distance_TR=input('Enter the distance between T & R(in Km): '); Nr=1; % Receiver noise (in dB) n=3.2; % Path loss exponent d0=1; % Close in reference distance (in Km) PL_d0=12; % path loss at close in reference distance (in dB) rou=11.8; % Standard deviation c=3*(10)^8; wavelength=c/(f*10^9); x=Desired_SNR/10; desired_s=Nr*(10)^x; a1=10*n*log10(Distance_TR/d0); a2=PL_d0+a1; a3=Pt-a2; a4=desired_s-a3;
Submitted By SANKARASRINIVASAN 212ee1388
Page 2
3
Wireless Communication Assignment
a5=rou*sqrt(2); a6=erf(a4/a5); result=0.5-0.5*a6 RESULT: Enter the transmitter power: 1000 Enter the transmitter antenna Gain: 2 Enter the receiver antenna Gain: 3 Enter receiver bandwidth: 1000 Enter the operation frequency(in GHz): 0.9 Enter the desired receiver SNR(in dB): 12 Enter the distance between T & R(in Km): 1000 result = 1.234 4.33 b)If a user specifies desired percentage of time that SNR will be exceeded and a specific TR distance. Then calculate the maximum value of TR separation distance. MATLAB CODE: Pt=input('Enter the transmitter power: '); Gt=input('Enter the transmitter antenna Gain: '); Gr=input('Enter the receiver antenna Gain: '); Br=input('Enter receiver bandwidth: '); f=input('Enter the operation frequency(in GHz): '); Desired_SNR=input('Enter the desired receiver SNR(in dB): '); prob=input('Enter the percentage of time: '); Nr=1; % Receiver noise (in dB) n=3.2; % Path loss exponent d0=1; % Close in Reference distance (in Km) PL_d0=12; % Path loss at close in reference distance (in dB) rou=11.8; % standard deviation c=3*(10)^8; wavelength=c/(f*10^9); desired_s=Nr*10^(Desired_SNR/10); a1=erfinv((0.5-prob)/0.5); a2=(desired_s-a1*rou*sqrt(2)-PL_d0)/(10*n); display('The Calculated Distance between Transmitter and Receiver is(in Km)') r=d0*10^a2
RESULT: Enter the transmitter power: 1000 Enter the transmitter antenna Gain: 5 Enter the receiver antenna Gain: 5 Enter receiver bandwidth: 500 Enter the operation frequency(in GHz): 0.8 Enter the desired receiver SNR(in dB): 12 Enter the percentage of time: 0.7 The Calculated Distance between Transmitter and Receiver is(in Km) r= 2.0590
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.