forked from brian09088/NB-IoT-support-for-NTN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HelperGetNoiseTemperature.m
61 lines (53 loc) · 1.83 KB
/
HelperGetNoiseTemperature.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
function T = HelperGetNoiseTemperature(f,rx)
%HelperGetNoiseTemperature Obtain the receiver antenna noise temperature
% T = HelperGetNoiseTemperature(FREQ,RX) returns the antenna noise
% temperature of the receiver RX, corresponding to the frequency FREQ.
%
% Example:
% % Obtain the noise temperature of a receiver.
%
% % Create a satelliteScenario object.
% startTime = datetime(2024,4,18,22,0,0);
% stopTime = startTime + days(1);
% sampleTime = 60;
% sc = satelliteScenario(startTime,stopTime,sampleTime);
%
% % Add a satellite to the scenario.
% semiMajorAxis = 6500000; % m
% eccentricity = 0;
% inclination = 10; % degrees
% rightAscensionOfAscendingNode = 0; % degrees
% argumentOfPeriapsis = 0; % degrees
% trueAnomaly = 0; % degrees
% sat = satellite(sc,semiMajorAxis, ...
% eccentricity, ...
% inclination, ...
% rightAscensionOfAscendingNode, ...
% argumentOfPeriapsis, ...
% trueAnomaly);
%
% % Add a receiver to the scenario.
% rx = receiver(sat);
%
% % Obtain the noise temperature of the receiver antenna corresponding to
% % a frequency of 30 GHz.
% f = 30e9;
% T = HelperGetNoiseTemperature(f,rx)
% Copyright 2021 The MathWorks, Inc.
% Retrieve the receiver antenna object
rxAntenna = rx.Antenna;
% Calculate the maximum gain of the antenna
if isa(rxAntenna, 'satcom.satellitescenario.GaussianAntenna')
g = pattern(rxAntenna, f, 0, 90); % dB
else
gPattern = pattern(rxAntenna, f); % dB
g = max(max(gPattern));
end
% Retrieve the receiver antenna gain to noise temperature ratio
% corresponding to the z-axis of the receiver
gByT = rx.GainToNoiseTemperatureRatio;
% Calculate the noise temperature in dBK
T_dB = g - gByT; % dBK
% Calculate the noise temperature in K
T = 10^(T_dB/10); % K
end