-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcase1_plot2.m
More file actions
85 lines (71 loc) · 2.84 KB
/
case1_plot2.m
File metadata and controls
85 lines (71 loc) · 2.84 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
clc; clear; close all;
% Constants
line_rate = 25e9; % Fixed Line Rate: 25 Gbps
Bm_values = linspace(100e6, 1e9, 20); % Vary Bm from 100 Mbps to 1 Gbps
PON = 1;
PT = 0.9;
violation = 0.10; % 10% violation allowed
NT = 128; % Max users in the system (fixed)
max_split_ratio = 128;
% XG-PON or similar parameters changed to TWDM
Pport = 20; % Power per OLT port (W)
DS = 25e9; % Downstream rate (bps)
US = 25e9; % Upstream rate (bps) TWDM
uplink_power = 121; % Uplink power per rack (W)
Nport_per_rack = 60; % Number of ports per rack
eta_dc = 0.8; % DC/DC conversion efficiency
CO_site_factor = 1.6; % Site power factor
% Poisson function
poisson_prob = @(NA, r) (NA.^r .* exp(-NA)) ./ factorial(r);
% Storage for power values
P_CO_values = zeros(size(Bm_values));
S_values = zeros(size(Bm_values));
% Loop through each Bm value
for i = 1:length(Bm_values)
Bm = Bm_values(i);
if Bm >= 200e6
% Find optimal S satisfying the 10% violation condition
selected_S = NaN;
for S = linspace(max_split_ratio, 2, 500)
NA = PON * S;
r_max = ceil(line_rate / Bm);
r_max = max(r_max, 1); % avoid empty sum
prob = sum(poisson_prob(NA, 1:r_max));
if prob >= (PT - violation)
selected_S = S;
S_values(i) = selected_S;
break;
end
end
if isnan(selected_S)
warning('No valid S found for Bm = %.0f Mbps', Bm / 1e6);
P_CO_values(i) = NaN;
continue;
end
% Compute P_CO using Equation (6)
Nport = ceil(NT / selected_S);
Nrack = ceil(Nport / Nport_per_rack);
P_CO = CO_site_factor * (1 / eta_dc) * ...
(Nport * (Pport + (DS + US) * 1e-9) + Nrack * uplink_power);
P_CO_values(i) = P_CO/NT + 8.45;
else
selected_S = 128;
S_values(i) = selected_S;
Nport = ceil(NT / selected_S);
Nrack = ceil(Nport / Nport_per_rack);
P_CO = CO_site_factor * (1 / eta_dc) * ...
(Nport * (Pport + (DS + US) * 1e-9) + Nrack * uplink_power);
P_CO_values(i) = P_CO/NT + 8.45;
end
end
% Plot the result
figure; grid on; hold on;
plot(Bm_values / 1e6, P_CO_values, 'b-o', 'LineWidth', 2);
xlabel('Average Offered Bandwidth per User, B_m (Mbps)');
ylabel('Central Office Power Consumption (W)');
title('P_{CO} vs B_m at 10% Availability Violation (Line Rate = 25 Gbps)');
figure; grid on; hold on;
plot(Bm_values / 1e6, S_values, 'b-o', 'LineWidth', 2);
xlabel('Average Offered Bandwidth per User, B_m (Mbps)');
ylabel('Optimal Split Ratio (S)');
title('S vs B_m at 10% Availability Violation (Line Rate = 25 Gbps)');