Mains
Mains
ROLL NO : 41
PROGRAM :
clc;
clear all;
%----------Input Section---------------
Hbts = 40; %Height measured from the base of the BTS tower to the radiation centerline
Htav = 300; %Height of the average terrain (from 3 Km to 15 km distance from the BTS)
%--------------------------------------
C = 0;
PL = A + B * log10(d) + C;
subplot(2, 1, 1)
Pr = 10 * log10(Pt * 1000) + Gt – PL
subplot(2, 1, 2)
OUTPUT:
NAME : CHINMAY KULKARNI
ROLL NO : 41
PROGRAM :-
clc;
clear all;
plot(SNRdb,BERdb_perbit,'b');
xlabel('SNR in Decibel');
ylabel('BER in Decibel');
grid on;
OUTPUT:
NAME : CHINMAY KULKARNI
ROLL NO : 41
PROGRAM: Consider,
∞
𝑚𝑜𝑚𝑒𝑛𝑡_1 = ∫ 𝜙(𝜏) 𝜏 𝑑𝜏
−∞
∞
𝑚𝑜𝑚𝑒𝑛𝑡_2 = ∫ 𝜙(𝜏)(𝜏 − 𝜏̅)2 𝑑𝜏
−∞
%FunctiontocalculatemeanDelay,RMSdelayspread,maximumsymbol
%ratethatasignalcanbetransmittedwithoutISIandthecoherence
%BWforthePDPequationspecifiedasfunctionhandle(fun)
%example:fun=@(tau)exp(-tau/0.00001);%givenPDPequation
%lowerLim-lowerlimitforintegration
%upperLim-upperlimitforintegration
moment_1=@(x)x.*fun(x);
meanDelay=integral(moment_1,lowerLim,upperLim)/integral(fun,lowerLim,upperLim);
moment_2=@(y)((y-meanDelay).ˆ2).*fun(y);
rmsDelay=sqrt(integral(moment_2,lowerLim,upperLim)/integral(fun,lowerLim,upperLim));
symbolRate=1/(10*rmsDelay);%maximumsymbolratetoavoidISI
coherenceBW=1/(50*rmsDelay);%for0.9correlation
%coherenceBW=1/(5*rmsDelay);%for0.5correlation
Endfunction
fun = @(tau)2*exp(-tau/1e-6);
[meanDelay,rmsDelay,symbolRate,coherenceBW] = meas_continuous_PDP(fun,0,10e-6);
tau = [0:0.01e-6:5e-6];
fun1 = 2*exp(-tau/1e-6);
ylabel('Power(dBm)', 'Fontsize',16);
OUTPUT:
NAME : CHINMAY KULKARNI
ROLL NO : 41
PROGRAM:
clc;
close all;
clear all;
pt=input('enter the input power in watts:');
Pt=10*log10(pt) %calculating transmitted power in db
gt=input('enter the transmitting antenna gain in db:');
gs=input('enter the receiving antenna gain in db:');
EIRP=Pt+gt %calculating EIRP
d=input('enter the distance in km:');
f=input('enter the frequency in mhz:');
fsl=32.4+20*log10(d)+20*log10(f) %calculating path loss
rfl=input('enter the receiver feeder loss in db:');
aa=input('enter the atmospheric absorption in db:');
aml=input('enter the antenna misalignment loss in db:');
pl=input('enter the polarization loss in db:');
losses=fsl+rfl+aa+aml+pl; %calculating total losses
disp(sprintf('%s %f %s','total loss',losses,'db'));
P=EIRP+gs-losses; %calculating power recieved
P_watt = 10^(P/10);
disp(sprintf('%s %f %s','Total received power =',P_watt,'W'));
OUTPUT:
NAME : CHINMAY KULKARNI
ROLL NO : 41
PROGRAM:
clear
nTx = 2;
nRx = 2;
for ii = 1:length(Eb_N0_dB)
% Transmitter
sMod = kron(s,ones(nRx,1)); %
y = squeeze(sum(h.*sMod,2)) + 10^(-Eb_N0_dB(ii)/20)*n;
% Receiver
hCof = zeros(2,2,N/nTx) ;
ipHat = real(yHat)>0;
end
EbN0Lin = 10.^(Eb_N0_dB/10);
theoryBer_nRx1 = 0.5.*(1-1*(1+1./EbN0Lin).^(-0.5));
p = 1/2 - 1/2*(1+1./EbN0Lin).^(-1/2);
theoryBerMRC_nRx2 = p.^2.*(1+2*(1-p));
close all
figure
semilogy(Eb_N0_dB,theoryBer_nRx1,'bp-','LineWidth',2);
hold on
semilogy(Eb_N0_dB,theoryBerMRC_nRx2,'kd-','LineWidth',2);
semilogy(Eb_N0_dB,simBer,'mo-','LineWidth',2);
axis([02510^-50.5])
grid on
ROLL NO: 41
PROGRAM:
No = 1; % Noise variance
%disp(H);
H = (y - noise) / s ;
disp(H);
OUTPUT:
NAME: Chinmay Kulkarni
ROLL NO : 41
PROGRAM:-
clc;
clear all;
speed = input('Enter the moving vehicle speed in miles per hour: ');
theta = input ('Enter the angle of vehicle with the line joining the base station: ');
carrier = input ('frequency over which Doppler shift is to be observed (in Hz): ');
fprintf('1. mobile user is moving towards the base station \n2. mobile user is moving
away from the base station\n');
speed_m
switch movement
case 1
fprintf ('Since the mobile user is moving towards the base station, the Doppler shift is
positive, i.e., the perceived frequency fr = %dHz + %dHz\n', carrier, fd);
case 2
fprintf ('Since the mobile user is moving away the base station, the Doppler shift is
positive, i.e., the perceived frequency fr = %dHz - %dHz\n', carrier, fd);
end
OUTPUT:
NAME : Chinmay Kulkarni
ROLL NO : 41
PROGRAM:
clc;
clear all;
A = 38.4;
%38.4, supported traffic for 48 channels and pb = 0.02, from Erlang Traffic table
cell_users = A/pb ;
plot(radius,supported_users);
plot(radius,supported_users);
xlabel('Radius in km');
ylabel('supported Users');