clear
clc
close all
format compact
display('running sat_term.m')
run distances;
run modulation;
c = 299792458;
k = 1.39e-23;
freq = 1.1e9;
freqlimit = (freq + BW/2)/1e9
freqlimt = (freq -BW/2)/1e9
lambda = c/freq;
display('These are the downlink calcs from Sat to Terminal')
Pt_sat = [1:200];
G_ant_sat = 10*log10(33000/beamwidth_sat^2)
eff_sat_ant = .8;
r_sat_ant = ((((10^(G_ant_sat/10))/eff_sat_ant)*(lambda^2))/(4*pi^2))^(1/2)
G_ant_term = 2;
EIRP_sat = 10*log10(Pt_sat) + G_ant_sat;
Q = 50;
Tmars = 210;
Pr_term = EIRP_sat + G_ant_term-20*log10(4*pi/lambda*d);
Pn = 10*log10((k*Tmars*BW) + (10.^(Pr_term./10)*(Q-1)));
SNR_despread = Pr_term-Pn + procgain;
SNR_uncoded = SNR_despread+coding_gain;
x = sqrt(2*10.^(SNR_uncoded./10));
BER_downlink = 1/2*erfc(x/sqrt(2));
figure(1), semilogy(Pt_sat, BER_downlink);
title('Pt of Satellite vs BER')
xlabel('Pt of Satellite(W)');
ylabel('BER');
grid on
indexBER = find(BER_downlink <1e-6, 1, 'first');
Pt_sat = Pt_sat(indexBER)
SNR_uncoded = SNR_uncoded(indexBER)
BER_downlink = BER_downlink(indexBER)
display(' ')
display('These are the uplink calcs from terminal to satellite');
Pt_term =[1:200];
EIRP_term = 10*log10(Pt_term) + G_ant_term;
Tsys = 175;
Pr_sat = EIRP_term + G_ant_sat-20*log10(4*pi/lambda*d);
Pn = 10*log10((k*Tsys*BW) + (10.^(Pr_sat./10)*(Q-1)));
SNR_despread = Pr_sat-Pn + procgain;
SNR_uncoded = SNR_despread+coding_gain;
x = sqrt(2*10.^(SNR_uncoded./10));
BER_downlink = 1/2*erfc(x/sqrt(2));
figure(2), semilogy(Pt_term, BER_downlink);
title('Pt of Ground Terminal vs BER')
xlabel('Pt of Ground Terminal(W)');
ylabel('BER');
grid on
indexBER = find(BER_downlink <1e-6, 1, 'first');
Pt_term = Pt_term(indexBER)
SNR_uncoded = SNR_uncoded(indexBER)
BER_downlink = BER_downlink(indexBER)
running sat_term.m
beamwidth_sat =
22.5609
freqlimit =
1.3430
freqlimt =
0.8570
These are the downlink calcs from Sat to Terminal
G_ant_sat =
18.1180
r_sat_ant =
0.3905
Pt_sat =
78
SNR_uncoded =
10.5723
BER_downlink =
8.9086e-07
These are the uplink calcs from terminal to satellite
Pt_term =
65
SNR_uncoded =
10.5723
BER_downlink =
8.9086e-07
|