Home Intro Basic Concept Comm-Link System Design Satellite Orbit Cost References

 sat_term_link.m
%probe-term calculations
%MARNET 6390 design project
clear
clc
close all
format compact
display('running sat_term.m')
%these scripts perform calculations required for these links
run distances;
run modulation;

c = 299792458; %m/s
k = 1.39e-23; %J/K Boltzmann's constant

freq = 1.1e9; %hz
freqlimit = (freq + BW/2)/1e9
freqlimt = (freq -BW/2)/1e9
%frquency for uplink must be lower or equal, cannot be higher
lambda = c/freq;

% Downlink calcs-------------------------------------------------------
% down is from the sat to the probe, up is from the probe to satellite
display('These are the downlink calcs from Sat to Terminal')

Pt_sat = [1:200];
%since the gain of the sat will be defined by the 3dB beamwidth which is
%calculated in distances.m
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)

%Average monopole antenna has 2dBi of gain
G_ant_term = 2;

%calculate EIRP for sat
EIRP_sat = 10*log10(Pt_sat) +  G_ant_sat;

%downlink calc (from sat to term)
Q = 50;
Tmars = 210; %K got from mars fact sheet, using black body temperature values

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;

%using QPSK:
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');

%for terminal -------------
Pt_term =[1:200];
EIRP_term = 10*log10(Pt_term) + G_ant_term;

%since the antenna is omnidirectional, will encounter a lot of noise from
%everywhere.  assume it will be a little less than looking directly at mars
Tsys = 175; %K

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;

%using QPSK:
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
Creative Commons License