LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // 6 user -> 232000 * 6 = 139200 < 2196000 -> throughput = 232000 byte/sec | 87 // 6 user -> 232000 * 6 = 139200 < 2196000 -> throughput = 232000 byte/sec |
88 // 12 user -> 232000 * 12 = 2784000 > 2196000 -> throughput = 2196000 / 12 = 1
83000 byte/sec | 88 // 12 user -> 232000 * 12 = 2784000 > 2196000 -> throughput = 2196000 / 12 = 1
83000 byte/sec |
89 // UPLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2
13) | 89 // UPLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2
13) |
90 // 1 user -> 25 PRB at Itbs 26 -> 2292 -> 2292000 > 232000 -> throughput = 232
000 bytes/sec | 90 // 1 user -> 25 PRB at Itbs 26 -> 2292 -> 2292000 > 232000 -> throughput = 232
000 bytes/sec |
91 // 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000 > 232000 -> throughput = 23200
0 bytes/sec· | 91 // 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000 > 232000 -> throughput = 23200
0 bytes/sec· |
92 // 6 users -> 4 PRB at Itbs 26 -> 373 -> 373000 > 232000 -> throughput = 23200
0 bytes/sec | 92 // 6 users -> 4 PRB at Itbs 26 -> 373 -> 373000 > 232000 -> throughput = 23200
0 bytes/sec |
93 // 12 users -> 2 PRB at Itbs 26 -> 185 -> 185000 < 232000 -> throughput = 1850
00 bytes/sec | 93 // 12 users -> 2 PRB at Itbs 26 -> 185 -> 185000 < 232000 -> throughput = 1850
00 bytes/sec |
94 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,0,232000,232000,200,1,err
orModel), TestCase::EXTENSIVE); | 94 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,0,232000,232000,200,1,err
orModel), TestCase::EXTENSIVE); |
95 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,0,232000,232000,200,1,err
orModel), TestCase::EXTENSIVE); | 95 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,0,232000,232000,200,1,err
orModel), TestCase::EXTENSIVE); |
96 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,0,232000,232000,200,1,err
orModel), TestCase::EXTENSIVE); | 96 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,0,232000,232000,200,1,err
orModel), TestCase::EXTENSIVE); |
| 97 |
97 //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,0,183000,185000,200,1,
errorModel));// simulation time = 1.5, otherwise, ul test will fail | 98 //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,0,183000,185000,200,1,
errorModel));// simulation time = 1.5, otherwise, ul test will fail |
98 | 99 |
99 // DOWNLINK - DISTANCE 4800 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36
.213) | 100 // DOWNLINK - DISTANCE 4800 -> MCS 22 -> Itbs 20 (from table 7.1.7.2.1-1 of 36
.213) |
100 // Traffic info | 101 // Traffic info |
101 // UDP traffic: payload size = 200 bytes, interval = 1 ms | 102 // UDP traffic: payload size = 200 bytes, interval = 1 ms |
102 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> 232000 byte/rate· | 103 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> 232000 byte/rate· |
103 // Totol bandwidth: 24 PRB at Itbs 15 -> 1383 -> 903000 byte/sec | 104 // Totol bandwidth: 24 PRB at Itbs 20 -> 1383 -> 1383000 byte/sec |
104 // 1 user -> 903000 * 1 = 232000 < 903000 -> throughput = 232000 byte/sec | 105 // 1 user -> 903000 * 1 = 232000 < 1383000 -> throughput = 232000 byte/sec |
105 // 3 user -> 232000 * 3 = 696000 < 903000 -> througphut = 232000 byte/sec | 106 // 3 user -> 232000 * 3 = 696000 < 1383000 -> througphut = 232000 byte/sec |
106 // 6 user -> 232000 * 6 = 139200 > 903000 -> throughput = 903000 / 6 = 150500
byte/sec | 107 // 6 user -> 232000 * 6 = 139200 > 1383000 -> throughput = 1383000 / 6 = 23050
0 byte/sec |
107 // 12 user -> 232000 * 12 = 2784000 > 903000 -> throughput = 903000 / 12 = 75
250 byte/sec | 108 // 12 user -> 232000 * 12 = 2784000 > 1383000 -> throughput = 1383000 / 12 =
115250 byte/sec |
108 // UPLINK - DISTANCE 4800 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.2
13) | 109 // UPLINK - DISTANCE 4800 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.2
13) |
109 // 1 user -> 25 PRB at Itbs 13 -> 807 -> 807000 > 232000 -> throughput = 23200
0 bytes/sec | 110 // 1 user -> 25 PRB at Itbs 13 -> 807 -> 807000 > 232000 -> throughput = 23200
0 bytes/sec |
110 // 3 users -> 8 PRB at Itbs 13 -> 253 -> 253000 > 232000 -> throughput = 23200
0 bytes/sec | 111 // 3 users -> 8 PRB at Itbs 13 -> 253 -> 253000 > 232000 -> throughput = 23200
0 bytes/sec |
111 // 6 users -> 4 PRB at Itbs 13 -> 125 -> 125000 < 232000 -> throughput = 12500
0 bytes/sec | 112 // 6 users -> 4 PRB at Itbs 13 -> 125 -> 125000 < 232000 -> throughput = 12500
0 bytes/sec |
112 // after the patch enforcing min 3 PRBs per UE: | 113 // after the patch enforcing min 3 PRBs per UE: |
113 // 12 users -> 3 PRB at Itbs 13 -> 93 bytes * 8/12 UE/TTI -> 62000 < 232000
-> throughput = 62000 bytes/sec | 114 // 12 users -> 3 PRB at Itbs 13 -> 93 bytes * 8/12 UE/TTI -> 62000 < 232000
-> throughput = 62000 bytes/sec |
114 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,4800,232000,232000,200,1,
errorModel), TestCase::EXTENSIVE); | 115 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,4800,232000,232000,200,1,
errorModel), TestCase::EXTENSIVE); |
115 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,4800,232000,232000,200,1,
errorModel), TestCase::EXTENSIVE); | 116 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,4800,232000,232000,200,1,
errorModel), TestCase::EXTENSIVE); |
116 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,4800,150500,125000,200,1,
errorModel), TestCase::EXTENSIVE); | 117 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,4800,230500,125000,200,1,
errorModel), TestCase::EXTENSIVE); |
117 //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,4800,75250,62000,200,1
,errorModel)); // simulation time = 1.5, otherwise, ul test will fail | 118 //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,4800,115250,62000,200,
1,errorModel)); // simulation time = 1.5, otherwise, ul test will fail |
118 | 119 |
119 // DOWNLINK - DISTANCE 6000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36
.213) | 120 // DOWNLINK - DISTANCE 6000 -> MCS 20 -> Itbs 18 (from table 7.1.7.2.1-1 of 36
.213) |
120 // Traffic info | 121 // Traffic info |
121 // UDP traffic: payload size = 200 bytes, interval = 1 ms | 122 // UDP traffic: payload size = 200 bytes, interval = 1 ms |
122 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> 232000 byte/rate· | 123 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> 232000 byte/rate· |
123 // Totol bandwidth: 24 PRB at Itbs 13 -> 775 -> 775000 byte/sec | 124 // Totol bandwidth: 24 PRB at Itbs 18 -> 1191 -> 1191000 byte/sec |
124 // 1 user -> 903000 * 1 = 232000 < 775000 -> throughput = 232000 byte/sec | 125 // 1 user -> 903000 * 1 = 232000 < 1191000 -> throughput = 232000 byte/sec |
125 // 3 user -> 232000 * 3 = 696000 < 775000 -> througphut = 232000 byte/sec | 126 // 3 user -> 232000 * 3 = 696000 < 1191000 -> througphut = 232000 byte/sec |
126 // 6 user -> 232000 * 6 = 139200 > 775000 -> throughput = 775000 / 6 = 129167
byte/sec | 127 // 6 user -> 232000 * 6 = 1392000 > 1191000 -> throughput = 1191000 / 6 = 1985
00 byte/sec |
127 // 12 user -> 232000 * 12 = 2784000 > 775000 -> throughput = 775000 / 12 = 64
583 byte/sec | 128 // 12 user -> 232000 * 12 = 2784000 > 1191000 -> throughput = 1191000 / 12 =
99250 byte/sec |
128 | 129 |
129 // UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.2
13) | 130 // UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.2
13) |
130 // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 23200
0 bytes/sec | 131 // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 23200
0 bytes/sec |
131 // 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 < 232000 -> throughput = 20100
0 bytes/sec | 132 // 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 < 232000 -> throughput = 20100
0 bytes/sec |
132 // 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 < 232000 -> throughput = 97000 b
ytes/sec | 133 // 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 < 232000 -> throughput = 97000 b
ytes/sec |
133 // after the patch enforcing min 3 PRBs per UE: | 134 // after the patch enforcing min 3 PRBs per UE: |
134 // 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 < 232000 ->
throughput = 48667 bytes/sec | 135 // 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 < 232000 ->
throughput = 48667 bytes/sec |
135 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,6000,232000,232000,200,1,
errorModel), TestCase::EXTENSIVE); | 136 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,6000,232000,232000,200,1,
errorModel), TestCase::EXTENSIVE); |
136 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,6000,232000,201000,200,1,
errorModel), TestCase::EXTENSIVE); | 137 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,6000,232000,201000,200,1,
errorModel), TestCase::EXTENSIVE); |
137 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,6000,129167,97000,200,1,e
rrorModel), TestCase::EXTENSIVE); | 138 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,6000,198500,97000,200,1,e
rrorModel), TestCase::EXTENSIVE); |
138 //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,6000,64583,48667,200,1
, errorModel)); // simulation time = 1.5, otherwise, ul test will fail | 139 //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,6000,99250,48667,200,1
, errorModel)); // simulation time = 1.5, otherwise, ul test will fail |
139 | 140 |
140 // DOWNLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.
213) | 141 // DOWNLINK - DISTANCE 10000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 3
6.213) |
141 // Traffic info | 142 // Traffic info |
142 // UDP traffic: payload size = 200 bytes, interval = 1 ms | 143 // UDP traffic: payload size = 200 bytes, interval = 1 ms |
143 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> 232000 byte/rate· | 144 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> 232000 byte/rate· |
144 // Totol bandwidth: 24 PRB at Itbs 8 -> 421 -> 421000 byte/sec | 145 // Totol bandwidth: 24 PRB at Itbs 13 -> 775 -> 775000 byte/sec |
145 // 1 user -> 903000 * 1 = 232000 < 421000 -> throughput = 232000 byte/sec | 146 // 1 user -> 903000 * 1 = 232000 < 775000 -> throughput = 232000 byte/sec |
146 // 3 user -> 232000 * 3 = 696000 > 421000 -> througphut = 421000 / 3 = 140333
byte/sec | 147 // 3 user -> 232000 * 3 = 696000 > 775000 -> througphut = 232000 byte/sec |
147 // 6 user -> 232000 * 6 = 139200 > 421000 -> throughput = 421000 / 6 = 70166 b
yte/sec | 148 // 6 user -> 232000 * 6 = 139200 > 775000 -> throughput = 775000 / 6 = 129166
byte/sec |
148 // 12 user -> 232000 * 12 = 2784000 > 421000 -> throughput = 421000 / 12 = 35
083 byte/sec | 149 // 12 user -> 232000 * 12 = 2784000 > 775000 -> throughput = 775000 / 12 = 64
583 byte/sec |
149 // UPLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.21
3) | 150 // UPLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.21
3) |
150 // 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 > 232000 -> throughput = 232000
bytes/sec | 151 // 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 > 232000 -> throughput = 232000
bytes/sec |
151 // 3 users -> 8 PRB at Itbs 8 -> 137 -> 137000 < 232000 -> throughput = 137000
bytes/sec | 152 // 3 users -> 8 PRB at Itbs 8 -> 137 -> 137000 < 232000 -> throughput = 137000
bytes/sec |
152 // 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 < 232000 -> throughput = 67000 by
tes/sec | 153 // 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 < 232000 -> throughput = 67000 by
tes/sec |
153 // after the patch enforcing min 3 PRBs per UE: | 154 // after the patch enforcing min 3 PRBs per UE: |
154 // 12 users -> 3 PRB at Itbs 8 -> 49 bytes * 8/12 UE/TTI -> 32667 < 232000 ->
throughput = 32667 bytes/sec | 155 // 12 users -> 3 PRB at Itbs 8 -> 49 bytes * 8/12 UE/TTI -> 32667 < 232000 ->
throughput = 32667 bytes/sec |
155 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,10000,232000,232000,200,1
,errorModel), TestCase::EXTENSIVE); | 156 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,10000,232000,232000,200,1
,errorModel), TestCase::EXTENSIVE); |
156 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,10000,140333,137000,200,1
,errorModel), TestCase::EXTENSIVE); | 157 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,10000,232000,137000,200,1
,errorModel), TestCase::EXTENSIVE); |
157 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,10000,70166,67000,200,1,e
rrorModel), TestCase::EXTENSIVE); | 158 AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,10000,129166,67000,200,1,
errorModel), TestCase::EXTENSIVE); |
158 //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,10000,35083,32667,200,
1,errorModel));// simulation time = 1.5, otherwise, ul test will fail | 159 //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,10000,64583,32667,200,
1,errorModel));// simulation time = 1.5, otherwise, ul test will fail |
159 | 160 |
160 // Test Case 2: homogeneous flow test in PSS (different distance) | 161 // Test Case 2: homogeneous flow test in PSS (different distance) |
161 // Traffic1 info | 162 // Traffic1 info |
162 // UDP traffic: payload size = 100 bytes, interval = 1 ms | 163 // UDP traffic: payload size = 100 bytes, interval = 1 ms |
163 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> 132000 byte/rate· | 164 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> 132000 byte/rate· |
164 // Maximum throughput = 4 / ( 1/2196000 + 1/903000 + 1/621000 + 1/421000 ) = 7
20930 byte/s | 165 // Maximum throughput = 4 / ( 1/2196000 + 1/1191000 + 1/1383000 + 1/775000 ) =
1209046 byte/s |
165 // 132000 * 4 = 528000 < 720930 -> estimated throughput in downlink = 132000 b
yte/sec | 166 // 132000 * 4 = 528000 < 1209046 -> estimated throughput in downlink = 132000
byte/sec |
166 std::vector<uint16_t> dist1; | 167 std::vector<uint16_t> dist1; |
167 dist1.push_back (0); // User 0 distance --> MCS 28 | 168 dist1.push_back (0); // User 0 distance --> MCS 28 |
168 dist1.push_back (4800); // User 1 distance --> MCS 16 | 169 dist1.push_back (4800); // User 1 distance --> MCS 22 |
169 dist1.push_back (6000); // User 2 distance --> MCS 14 | 170 dist1.push_back (6000); // User 2 distance --> MCS 20 |
170 dist1.push_back (10000); // User 3 distance --> MCS 8 | 171 dist1.push_back (10000); // User 3 distance --> MCS 14 |
171 std::vector<uint16_t> packetSize1; | 172 std::vector<uint16_t> packetSize1; |
172 packetSize1.push_back (100); | 173 packetSize1.push_back (100); |
173 packetSize1.push_back (100); | 174 packetSize1.push_back (100); |
174 packetSize1.push_back (100); | 175 packetSize1.push_back (100); |
175 packetSize1.push_back (100); | 176 packetSize1.push_back (100); |
176 std::vector<uint32_t> estThrPssDl1; | 177 std::vector<uint32_t> estThrPssDl1; |
177 estThrPssDl1.push_back (132000); // User 0 estimated TTI throughput from PSS | 178 estThrPssDl1.push_back (132000); // User 0 estimated TTI throughput from PSS |
178 estThrPssDl1.push_back (132000); // User 1 estimated TTI throughput from PSS | 179 estThrPssDl1.push_back (132000); // User 1 estimated TTI throughput from PSS |
179 estThrPssDl1.push_back (132000); // User 2 estimated TTI throughput from PSS | 180 estThrPssDl1.push_back (132000); // User 2 estimated TTI throughput from PSS |
180 estThrPssDl1.push_back (132000); // User 3 estimated TTI throughput from PSS | 181 estThrPssDl1.push_back (132000); // User 3 estimated TTI throughput from PSS |
181 AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist1,estThrPssDl1,packetSize
1,1,errorModel), TestCase::EXTENSIVE); | 182 AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist1,estThrPssDl1,packetSize
1,1,errorModel), TestCase::QUICK); |
182 | 183 |
183 // Traffic2 info | 184 // Traffic2 info |
184 // UDP traffic: payload size = 200 bytes, interval = 1 ms | 185 // UDP traffic: payload size = 200 bytes, interval = 1 ms |
185 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> 232000 byte/rate· | 186 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> 232000 byte/rate· |
186 // Maximum throughput = 4 / ( 1/2196000 + 1/903000 + 1/621000 + 1/421000 ) = 7
20930 byte/s | 187 // Maximum throughput = 4 / ( 1/2196000 + 1/1191000 + 1/1383000 + 1/775000 ) =
1209046 byte/s |
187 // 232000 * 4 = 928000 > 720930 -> estimated throughput in downlink = 720930 /
4 = 180232 byte/sec | 188 // 232000 * 4 = 928000 < 1209046 -> estimated throughput in downlink = 928000
/ 4 = 230000 byte/sec |
188 std::vector<uint16_t> dist2; | 189 std::vector<uint16_t> dist2; |
189 dist2.push_back (0); // User 0 distance --> MCS 28 | 190 dist2.push_back (0); // User 0 distance --> MCS 28 |
190 dist2.push_back (4800); // User 1 distance --> MCS 16 | 191 dist2.push_back (4800); // User 1 distance --> MCS 22 |
191 dist2.push_back (6000); // User 2 distance --> MCS 14 | 192 dist2.push_back (6000); // User 2 distance --> MCS 20 |
192 dist2.push_back (10000); // User 3 distance --> MCS 8 | 193 dist2.push_back (10000); // User 3 distance --> MCS 14 |
193 std::vector<uint16_t> packetSize2; | 194 std::vector<uint16_t> packetSize2; |
194 packetSize2.push_back (200); | 195 packetSize2.push_back (200); |
195 packetSize2.push_back (200); | 196 packetSize2.push_back (200); |
196 packetSize2.push_back (200); | 197 packetSize2.push_back (200); |
197 packetSize2.push_back (200); | 198 packetSize2.push_back (200); |
198 std::vector<uint32_t> estThrPssDl2; | 199 std::vector<uint32_t> estThrPssDl2; |
199 estThrPssDl2.push_back (180232); // User 0 estimated TTI throughput from PSS | 200 estThrPssDl2.push_back (230000); // User 0 estimated TTI throughput from PSS |
200 estThrPssDl2.push_back (180232); // User 1 estimated TTI throughput from PSS | 201 estThrPssDl2.push_back (230000); // User 1 estimated TTI throughput from PSS |
201 estThrPssDl2.push_back (180232); // User 2 estimated TTI throughput from PSS | 202 estThrPssDl2.push_back (230000); // User 2 estimated TTI throughput from PSS |
202 estThrPssDl2.push_back (180232); // User 3 estimated TTI throughput from PSS | 203 estThrPssDl2.push_back (230000); // User 3 estimated TTI throughput from PSS |
203 AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist2,estThrPssDl2,packetSize
2,1,errorModel), TestCase::EXTENSIVE); | 204 AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist2,estThrPssDl2,packetSize
2,1,errorModel), TestCase::QUICK); |
204 | 205 |
205 // Test Case 3: heterogeneous flow test in PSS | 206 // Test Case 3: heterogeneous flow test in PSS |
206 // UDP traffic: payload size = [100,200,300] bytes, interval = 1 ms | 207 // UDP traffic: payload size = [100,200,300] bytes, interval = 1 ms |
207 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> [132000, 232000, 332000] byte/rate | 208 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header +
UDP header) * 1000 byte/sec -> [132000, 232000, 332000] byte/rate |
208 // Maximum throughput = 3 / ( 1/2196000 + 1/903000 + 1/621000 ) = 945450 byte
/s | 209 // Maximum throughput = 3 / ( 1/2196000 + 1/1191000 + 1/1383000) = 1486569 byt
e/s |
209 // 132000 + 232000 + 332000 = 696000 < 945450 -> estimated throughput in downl
ink = [132000, 232000, 332000] byte/sec | 210 // 132000 + 232000 + 332000 = 696000 < 1486569 -> estimated throughput in down
link = [132000, 232000, 332000] byte/sec |
210 std::vector<uint16_t> dist3; | 211 std::vector<uint16_t> dist3; |
211 dist3.push_back (0); // User 0 distance --> MCS 28 | 212 dist3.push_back (0); // User 0 distance --> MCS 28 |
212 dist3.push_back (4800); // User 1 distance --> MCS 16 | 213 dist3.push_back (4800); // User 1 distance --> MCS 22 |
213 dist3.push_back (6000); // User 2 distance --> MCS 14 | 214 dist3.push_back (6000); // User 2 distance --> MCS 20 |
214 std::vector<uint16_t> packetSize3; | 215 std::vector<uint16_t> packetSize3; |
215 packetSize3.push_back (100); | 216 packetSize3.push_back (100); |
216 packetSize3.push_back (200); | 217 packetSize3.push_back (200); |
217 packetSize3.push_back (300); | 218 packetSize3.push_back (300); |
218 std::vector<uint32_t> estThrPssDl3; | 219 std::vector<uint32_t> estThrPssDl3; |
219 estThrPssDl3.push_back (132000); // User 0 estimated TTI throughput from PSS | 220 estThrPssDl3.push_back (132000); // User 0 estimated TTI throughput from PSS |
220 estThrPssDl3.push_back (232000); // User 1 estimated TTI throughput from PSS | 221 estThrPssDl3.push_back (232000); // User 1 estimated TTI throughput from PSS |
221 estThrPssDl3.push_back (332000); // User 2 estimated TTI throughput from PSS | 222 estThrPssDl3.push_back (332000); // User 2 estimated TTI throughput from PSS |
222 AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist3,estThrPssDl3,packetSize
3,1,errorModel), TestCase::QUICK); | 223 AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist3,estThrPssDl3,packetSize
3,1,errorModel), TestCase::QUICK); |
223 | 224 |
224 } | 225 } |
225 | 226 |
226 static LenaTestPssFfMacSchedulerSuite lenaTestPssFfMacSchedulerSuite; | 227 static LenaTestPssFfMacSchedulerSuite lenaTestPssFfMacSchedulerSuite; |
227 | 228 |
228 // --------------- T E S T - C A S E # 1 ------------------------------ | 229 // --------------- T E S T - C A S E # 1 ------------------------------ |
229 | 230 |
230 | 231 |
231 std::string· | 232 std::string· |
232 LenaPssFfMacSchedulerTestCase1::BuildNameString (uint16_t nUser, uint16_t dist) | 233 LenaPssFfMacSchedulerTestCase1::BuildNameString (uint16_t nUser, uint16_t dist) |
233 { | 234 { |
234 std::ostringstream oss; | 235 std::ostringstream oss; |
235 oss << nUser << " UEs, distance " << dist << " m"; | 236 oss << nUser << " UEs, distance " << dist << " m"; |
236 return oss.str (); | 237 return oss.str (); |
237 } | 238 } |
238 | 239 |
239 | 240 |
240 LenaPssFfMacSchedulerTestCase1::LenaPssFfMacSchedulerTestCase1 (uint16_t nUser,
uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSi
ze, uint16_t interval,bool errorModelEnabled) | 241 LenaPssFfMacSchedulerTestCase1::LenaPssFfMacSchedulerTestCase1 (uint16_t nUser,
uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSi
ze, uint16_t interval,bool errorModelEnabled) |
241 : TestCase (BuildNameString (nUser, dist)), | 242 : TestCase (BuildNameString (nUser, dist)), |
242 m_nUser (nUser), | 243 m_nUser (nUser), |
| 244 m_nLc (nLc), |
243 m_dist (dist), | 245 m_dist (dist), |
244 m_packetSize (packetSize), | 246 m_packetSize (packetSize), |
245 m_interval (interval), | 247 m_interval (interval), |
246 m_thrRefDl (thrRefDl), | 248 m_thrRefDl (thrRefDl), |
247 m_thrRefUl (thrRefUl), | 249 m_thrRefUl (thrRefUl), |
248 m_errorModelEnabled (errorModelEnabled) | 250 m_errorModelEnabled (errorModelEnabled) |
249 { | 251 { |
| 252 NS_UNUSED (m_nLc); |
250 } | 253 } |
251 | 254 |
252 LenaPssFfMacSchedulerTestCase1::~LenaPssFfMacSchedulerTestCase1 () | 255 LenaPssFfMacSchedulerTestCase1::~LenaPssFfMacSchedulerTestCase1 () |
253 { | 256 { |
254 } | 257 } |
255 | 258 |
256 void | 259 void |
257 LenaPssFfMacSchedulerTestCase1::DoRun (void) | 260 LenaPssFfMacSchedulerTestCase1::DoRun (void) |
258 { | 261 { |
259 NS_LOG_FUNCTION (this << GetName ()); | 262 NS_LOG_FUNCTION (this << GetName ()); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRo
uting (remoteHost->GetObject<Ipv4> ()); | 300 Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRo
uting (remoteHost->GetObject<Ipv4> ()); |
298 remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask
("255.0.0.0"), 1); | 301 remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask
("255.0.0.0"), 1); |
299 | 302 |
300 //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010))
; | 303 //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010))
; |
301 //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005)); | 304 //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005)); |
302 //Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanVal
ue (false)); | 305 //Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanVal
ue (false)); |
303 //Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanVal
ue (false)); | 306 //Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanVal
ue (false)); |
304 | 307 |
305 //Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteH
elper::RLC_UM_ALWAYS)); | 308 //Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteH
elper::RLC_UM_ALWAYS)); |
306 | 309 |
307 LogComponentDisableAll (LOG_LEVEL_ALL); | 310 // LogComponentDisableAll (LOG_LEVEL_ALL); |
308 //LogComponentEnable ("LenaTestPssFfMacCheduler", LOG_LEVEL_ALL); | 311 //LogComponentEnable ("LenaTestPssFfMacCheduler", LOG_LEVEL_ALL); |
309 ··· | 312 ··· |
310 lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumProp
agationLossModel")); | 313 lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumProp
agationLossModel")); |
311 | 314 |
312 // Create Nodes: eNodeB and UE | 315 // Create Nodes: eNodeB and UE |
313 NodeContainer enbNodes; | 316 NodeContainer enbNodes; |
314 NodeContainer ueNodes; | 317 NodeContainer ueNodes; |
315 enbNodes.Create (1); | 318 enbNodes.Create (1); |
316 ueNodes.Create (m_nUser); | 319 ueNodes.Create (m_nUser); |
317 | 320 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 | 401 |
399 UdpClientHelper ulClient (remoteHostAddr, ulPort); // downlink p
ackets generator | 402 UdpClientHelper ulClient (remoteHostAddr, ulPort); // downlink p
ackets generator |
400 ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval))); | 403 ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval))); |
401 ulClient.SetAttribute ("MaxPackets", UintegerValue (1000000)); | 404 ulClient.SetAttribute ("MaxPackets", UintegerValue (1000000)); |
402 ulClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize)); | 405 ulClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize)); |
403 | 406 |
404 clientApps.Add (dlClient.Install (remoteHost)); | 407 clientApps.Add (dlClient.Install (remoteHost)); |
405 clientApps.Add (ulClient.Install (ueNodes.Get (u))); | 408 clientApps.Add (ulClient.Install (ueNodes.Get (u))); |
406 } | 409 } |
407 | 410 |
408 serverApps.Start (Seconds (0.001)); | 411 serverApps.Start (Seconds (0.030)); |
409 clientApps.Start (Seconds (0.001)); | 412 clientApps.Start (Seconds (0.030)); |
410 | 413 |
411 double statsStartTime = 0.001; // need to allow for RRC connection establishme
nt + SRS | 414 double statsStartTime = 0.04; // need to allow for RRC connection establishmen
t + SRS |
412 double statsDuration = 1; | 415 double statsDuration = 0.5; |
413 double tolerance = 0.1; | 416 double tolerance = 0.1; |
414 Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001)); | 417 Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001)); |
415 | 418 |
416 lteHelper->EnableRlcTraces (); | 419 lteHelper->EnableRlcTraces (); |
417 lteHelper->EnableMacTraces (); | 420 lteHelper->EnableMacTraces (); |
418 Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats (); | 421 Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats (); |
419 rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime))); | 422 rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime))); |
420 rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration))); | 423 rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration))); |
421 | 424 |
422 Simulator::Run (); | 425 Simulator::Run (); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 ipv4h.SetBase ("1.0.0.0", "255.0.0.0"); | 540 ipv4h.SetBase ("1.0.0.0", "255.0.0.0"); |
538 Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices); | 541 Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices); |
539 // interface 0 is localhost, 1 is the p2p device | 542 // interface 0 is localhost, 1 is the p2p device |
540 Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1); | 543 Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1); |
541 | 544 |
542 Ipv4StaticRoutingHelper ipv4RoutingHelper; | 545 Ipv4StaticRoutingHelper ipv4RoutingHelper; |
543 Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRo
uting (remoteHost->GetObject<Ipv4> ()); | 546 Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRo
uting (remoteHost->GetObject<Ipv4> ()); |
544 remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask
("255.0.0.0"), 1); | 547 remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask
("255.0.0.0"), 1); |
545 | 548 |
546 | 549 |
547 LogComponentDisableAll (LOG_LEVEL_ALL); | 550 // LogComponentDisableAll (LOG_LEVEL_ALL); |
548 //LogComponentEnable ("LenaTestPssFfMacCheduler", LOG_LEVEL_ALL); | 551 //LogComponentEnable ("LenaTestPssFfMacCheduler", LOG_LEVEL_ALL); |
549 ··· | 552 ··· |
550 lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumProp
agationLossModel")); | 553 lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumProp
agationLossModel")); |
551 | 554 |
552 // Create Nodes: eNodeB and UE | 555 // Create Nodes: eNodeB and UE |
553 NodeContainer enbNodes; | 556 NodeContainer enbNodes; |
554 NodeContainer ueNodes; | 557 NodeContainer ueNodes; |
555 enbNodes.Create (1); | 558 enbNodes.Create (1); |
556 ueNodes.Create (m_nUser); | 559 ueNodes.Create (m_nUser); |
557 | 560 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 | 642 |
640 UdpClientHelper ulClient (remoteHostAddr, ulPort); // downlink p
ackets generator | 643 UdpClientHelper ulClient (remoteHostAddr, ulPort); // downlink p
ackets generator |
641 ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval))); | 644 ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval))); |
642 ulClient.SetAttribute ("MaxPackets", UintegerValue (1000000)); | 645 ulClient.SetAttribute ("MaxPackets", UintegerValue (1000000)); |
643 ulClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize.at (u))); | 646 ulClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize.at (u))); |
644 | 647 |
645 clientApps.Add (dlClient.Install (remoteHost)); | 648 clientApps.Add (dlClient.Install (remoteHost)); |
646 clientApps.Add (ulClient.Install (ueNodes.Get (u))); | 649 clientApps.Add (ulClient.Install (ueNodes.Get (u))); |
647 } | 650 } |
648 | 651 |
649 serverApps.Start (Seconds (0.001)); | 652 serverApps.Start (Seconds (0.030)); |
650 clientApps.Start (Seconds (0.001)); | 653 clientApps.Start (Seconds (0.030)); |
651 | 654 |
652 double statsStartTime = 0.001; // need to allow for RRC connection establishme
nt + SRS | 655 double statsStartTime = 0.04; // need to allow for RRC connection establishmen
t + SRS |
653 double statsDuration = 1.0; | 656 double statsDuration = 0.5; |
654 double tolerance = 0.1; | 657 double tolerance = 0.1; |
655 Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001)); | 658 Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001)); |
656 | 659 |
657 lteHelper->EnableRlcTraces (); | 660 lteHelper->EnableRlcTraces (); |
658 Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats (); | 661 Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats (); |
659 rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime))); | 662 rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime))); |
660 rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration))); | 663 rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration))); |
661 | 664 |
662 | 665 |
663 Simulator::Run (); | 666 Simulator::Run (); |
664 | 667 |
665 /** | 668 /** |
666 * Check that the downlink assignation is done in a "token bank fair queue" ma
nner | 669 * Check that the downlink assignation is done in a "token bank fair queue" ma
nner |
667 */ | 670 */ |
668 | 671 |
669 NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s)"); | 672 NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s)"); |
670 std::vector <uint64_t> dlDataRxed; | 673 std::vector <uint64_t> dlDataRxed; |
671 for (int i = 0; i < m_nUser; i++) | 674 for (int i = 0; i < m_nUser; i++) |
672 { | 675 { |
673 // get the imsi | 676 // get the imsi |
674 uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi (); | 677 uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi (); |
675 // get the lcId | 678 // get the lcId |
676 uint8_t lcId = 4; | 679 uint8_t lcId = 4; |
677 dlDataRxed.push_back (rlcStats->GetDlRxData (imsi, lcId)); | 680 dlDataRxed.push_back (rlcStats->GetDlRxData (imsi, lcId)); |
678 NS_LOG_INFO ("\tUser " << i << " dist " << m_dist.at (i) << " imsi " << im
si << " bytes rxed " << (double)dlDataRxed.at (i) << " thr " << (double)dlDataR
xed.at (i) / statsDuration << " ref " << m_nUser); | 681 NS_LOG_INFO ("\tUser " << i << " dist " << m_dist.at (i) << " imsi " << im
si << " bytes rxed " << (double)dlDataRxed.at (i) << " thr " << (double)dlDataR
xed.at (i) / statsDuration << " ref " << m_estThrPssDl.at (i)); |
679 } | 682 } |
680 | 683 |
681 for (int i = 0; i < m_nUser; i++) | 684 for (int i = 0; i < m_nUser; i++) |
682 { | 685 { |
683 NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / statsDuration, m_es
tThrPssDl.at (i), m_estThrPssDl.at (i) * tolerance, " Unfair Throughput!"); | 686 NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / statsDuration, m_es
tThrPssDl.at (i), m_estThrPssDl.at (i) * tolerance, " Unfair Throughput!"); |
684 } | 687 } |
685 | 688 |
686 Simulator::Destroy (); | 689 Simulator::Destroy (); |
687 | 690 |
688 } | 691 } |
689 | 692 |
690 | 693 |
691 } // namespace ns3 | 694 } // namespace ns3 |
692 | 695 |
693 | 696 |
694 | 697 |
695 | 698 |
LEFT | RIGHT |