25 nA = np.linspace(5, 50, 10)
35 T_SYMBOL_DATA = 12.8e-6 + T_GI
47 Aggregation_Type =
'A_MPDU'
51 L_MSDU_HEADER = 14 * 8
53 Aggregation_Type =
'NONE'
55 N_DBPS = data_rate * T_SYMBOL_DATA
57 if (Aggregation_Type ==
'NONE'):
58 N_SYMBOLS = math.ceil((L_SERVICE + (L_MAC + L_DATA + L_APP_HDR) + L_TAIL)/N_DBPS)
59 T_DATA = T_PHY_DATA + (T_SYMBOL_DATA * N_SYMBOLS)
63 if (Aggregation_Type ==
'A_MSDU'):
64 N_SYMBOLS = math.ceil((L_SERVICE + K_MPDU*(L_MAC + L_MPDU_HEADER + K_MSDU*(L_MSDU_HEADER + L_DATA + L_APP_HDR)) + L_TAIL)/N_DBPS)
65 T_DATA = T_PHY_DATA + (T_SYMBOL_DATA * N_SYMBOLS)
67 if (Aggregation_Type ==
'A_MPDU'):
68 N_SYMBOLS = math.ceil((L_SERVICE + K_MPDU*(L_MAC + L_MPDU_HEADER + L_DATA + L_APP_HDR) + L_TAIL)/N_DBPS)
69 T_DATA = T_PHY_DATA + (T_SYMBOL_DATA * N_SYMBOLS)
72 N_DBPS = ack_rate * T_SYMBOL_ACK
73 N_SYMBOLS = math.ceil((L_SERVICE + L_ACK + L_TAIL)/N_DBPS)
74 T_ACK = T_PHY_ACK + (T_SYMBOL_ACK * N_SYMBOLS)
76 T_s = T_DATA + T_SIFS + T_ACK + T_DIFS
80 T_s = T_DATA + T_SIFS + T_ACK + T_DIFS + delta
81 T_C = T_DATA + T_DIFS + T_SIFS + T_ACK + delta
83 T_S = T_s/(1-B) + T_SLOT
85 S_bianchi = np.zeros(len(nA))
86 for j
in range(len(nA)):
89 m = math.log2((CWmax + 1)/(CWmin + 1))
90 tau1 = np.linspace(0, 0.1, 100000)
91 p = 1 - np.power((1 - tau1),(n - 1))
94 for i
in range(int(m)):
95 ps = ps + np.power(2*p, i)
97 taup = 2./(1 + W + p*W*ps)
98 b = np.argmin(np.abs(tau1 - taup))
101 Ptr = 1 - math.pow((1 - tau), int(n))
102 Ps = n*tau*math.pow((1 - tau), int(n-1))/Ptr
104 S_bianchi[j] = K_MSDU*K_MPDU*Ps*Ptr*EP/((1-Ptr)*T_SLOT+Ptr*Ps*T_S+Ptr*(1-Ps)*T_C)/1e6
106 bianchi_result = S_bianchi
107 return bianchi_result
110 str_bianchi =
' {' +
'\"HeMcs{:d}'.format(mcs) +
'_{:d}MHz\"'.format(bw) +
', {\n'
111 for i
in range (len(bianchi_result)):
112 str_tmp =
' {' +
'{:d}, {:.4f}'.format(5*(i+1), bianchi_result[i]) +
'},\n'
113 str_bianchi = str_bianchi + str_tmp
114 str_bianchi = str_bianchi +
" }},\n"
119 data_rates_20MHz = [8.603e6, 17.206e6, 25.8e6, 34.4e6, 51.5e6, 68.8e6, 77.4e6, 86e6, 103.2e6, 114.7e6, 129e6, 143.4e6]
120 ack_rates_20MHz = [6e6, 12e6, 12e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6]
121 data_rates_40MHz = [17.2e6, 34.4e6, 51.5e6, 68.8e6, 103.2e6, 137.6e6, 154.9e6, 172.1e6, 206.5e6, 229.4e6, 258.1e6, 286.8e6]
122 ack_rates_40MHz = [6e6, 12e6, 12e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6]
123 data_rates_80MHz = [36e6, 72.1e6, 108.1e6, 144.1e6, 216.2e6, 288.2e6, 324.3e6, 360.3e6, 432.4e6, 480.4e6, 540.4e6, 600.5e6]
124 ack_rates_80MHz = [6e6, 12e6, 12e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6]
125 data_rates_160MHz = [72.1e6, 144.1e6, 216.2e6, 288.2e6, 432.4e6, 576.5e6, 648.5e6, 720.6e6, 864.7e6, 960.8e6, 1080.9e6, 1201e6]
126 ack_rates_160MHz = [6e6, 12e6, 12e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6, 24e6]
132 fo = open(
"bianchi_11ax_difs.txt",
"w")
133 for i
in range(len(data_rates_20MHz)):
134 bianchi_result =
bianchi_ax(data_rates_20MHz[i], ack_rates_20MHz[i], k, difs)
137 for i
in range(len(data_rates_40MHz)):
138 bianchi_result =
bianchi_ax(data_rates_40MHz[i], ack_rates_40MHz[i], k, difs)
141 for i
in range(len(data_rates_80MHz)):
142 bianchi_result =
bianchi_ax(data_rates_80MHz[i], ack_rates_80MHz[i], k, difs)
145 for i
in range(len(data_rates_160MHz)):
146 bianchi_result =
bianchi_ax(data_rates_160MHz[i], ack_rates_160MHz[i], k, difs)
152 fo = open(
"bianchi_11ax_eifs.txt",
"w")
153 for i
in range(len(data_rates_20MHz)):
154 bianchi_result =
bianchi_ax(data_rates_20MHz[i], ack_rates_20MHz[i], k, difs)
157 for i
in range(len(data_rates_40MHz)):
158 bianchi_result =
bianchi_ax(data_rates_40MHz[i], ack_rates_40MHz[i], k, difs)
161 for i
in range(len(data_rates_80MHz)):
162 bianchi_result =
bianchi_ax(data_rates_80MHz[i], ack_rates_80MHz[i], k, difs)
165 for i
in range(len(data_rates_160MHz)):
166 bianchi_result =
bianchi_ax(data_rates_160MHz[i], ack_rates_160MHz[i], k, difs)
def bianchi_ax(data_rate, ack_rate, k, difs)
def str_result(bianchi_result, mcs, bw)