Advertisement
makispaiktis

Friis

Nov 18th, 2021 (edited)
1,449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.63 KB | None | 0 0
  1. clear all
  2. clc
  3.  
  4. % MAIN FUNCTION
  5. Gr_dB = 15;
  6. Pr_dBm = -50;
  7. Fc = 626 * 10^6;
  8. EIRP_dB_list = [42, 38, 22];
  9. for i = 1:length(EIRP_dB_list)
  10.     EIRP_dB = EIRP_dB_list(i);
  11.     disp('EIRP_dB = ');
  12.     disp(EIRP_dB);
  13.     dmax = calculate_dmax(EIRP_dB, Gr_dB, Pr_dBm, Fc);
  14. end
  15.  
  16. % Calculation
  17. function dmax = calculate_dmax(EIRP_dB, Gr_dB, Pr_dBm, Fc)
  18.     EIRP = 10^(EIRP_dB / 10);
  19.     Gr = 10^(Gr_dB / 10);
  20.     Pr_dB = Pr_dBm - 30;
  21.     Pr = 10^(Pr_dB / 10);
  22.     % Pr = (Pt*Gt) * Gr * (λ/4πd)^2
  23.     c = 3 * 10^8;
  24.     lamda = c / Fc;
  25.     % Apply to the formula solving for d_max
  26.     dmax = (lamda/4/pi) * sqrt(EIRP*Gr / Pr)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement