├── COPYING
├── Code
├── HetNet_5GNR_simulation_launcher.m
├── LinkGeometry.m
├── UE_spectral_efficiencies.m
├── functionChannelEstimates_MMSE.m
├── functionComputeSE_DGOB.m
├── functionComputeSE_DL_SC.m
├── functionComputeSE_OMP.m
├── functionComputeSE_UL.m
├── functionComputeSE_UL_SC.m
└── functionNetworkSetup_Quadriga.m
├── HybridPrecodingExample
├── HybridPrecodingExample.m
├── helperComputeSpectralEfficiency.m
├── helperOMPHybridPrecodingWeights.m
├── helperOMPHybridWeights.m
└── helperOptimalHybridWeights.m
├── README.md
└── _plots
├── Area throughput (statistics) (1).fig
├── Area throughput (statistics).fig
├── DL throughput per macrocell UE (CDF).fig
├── DL throughput per small cell UE (CDF).fig
├── Macro cell tier - Cell throughput (CDF) (1).fig
├── Macro cell tier - Cell throughput (CDF).fig
├── Median, Average Cell throughput (statistics).fig
├── Median, Average, Percentile UE throughput (statistics).fig
├── NW layout.fig
├── Other KPIs (statistics).fig
├── Small cell tier - Cell throughput (CDF).fig
├── UL throughput per macrocell UE (CDF).fig
└── UL throughput per small cell UE (CDF).fig
/COPYING:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/Code/HetNet_5GNR_simulation_launcher.m:
--------------------------------------------------------------------------------
1 | %This Matlab script is the launcher script for 5GNR heterogeneous model
2 | %simulation including sub-6 layer of macro cells and above-6(mmW) layer
3 | %of small cells with CSI acquisition design.
4 | %
5 | %License: This code is licensed under the GPLv3 license.
6 | %
7 | %Script is based on the reference code from the following monograph:
8 | %Emil Bjornson, Jakob Hoydis and Luca Sanguinetti (2017),
9 | %"Massive MIMO Networks: Spectral, Energy, and Hardware Efficiency",
10 | %Foundations and Trends in Signal Processing: Vol. 11, No. 3-4,
11 | %pp. 154-655. DOI: 10.1561/2000000093.
12 | %
13 | %Note: This script require additional software packages to be used, which
14 | %need to be downloaded and installed separately. These packages are
15 | %developed independently and are delivered with separate licenses.
16 | %
17 | %The channels are generated using QuaDRiGa from the Fraunhofer Heinrich
18 | %Hertz Institute (http://www.quadriga-channel-model.de). This script has
19 | %been tested with QuaDRiGa version 2.0.0-664.
20 | %
21 | %Downling channel matrix quantization is performed using CVX optimization
22 | %from CVX Research, Inc. (http://cvxr.com/cvx/). This script has been
23 | %tested with CVX 2.1, using the solver Mosek, version 8.0.0.60.
24 | %
25 |
26 | %Empty workspace and close figures
27 | close all;
28 | clear;
29 |
30 | %Number of BSs
31 | L = 7; %For small hexagonal grid
32 | %L = 19; %For full hexagonal grid
33 |
34 | %Number of UEs in macro cell to represent backhaul of small cells
35 | SCdrop = 2;
36 | %Thus total number of SCs
37 | L_SC = SCdrop * L;
38 |
39 | %Number of UEs to drop within macro cell
40 | Kdrop = 10;
41 | %Number of UEs to drop within small cell
42 | Kdrop_SC = 2;
43 |
44 | %Maximum number of UEs to be served per BS
45 | Kmax = 15;
46 | %Maximum number of UEs to be served per SC
47 | Kmax_SC = 3;
48 |
49 | %Pilot reuse factor for macro cells; small cells don't reuse pilots
50 | f = 2;
51 |
52 | %Select the number of setups with random UE locations
53 | nbrOfSetups = 1;
54 |
55 | %Select the number of channel realizations (means number of subcarriers)
56 | nbrOfSubcarriers = 1200; %3240;
57 | nbrOfSubcarriers_SC = 1560;
58 |
59 | %Fractions of UL and DL data for TDD (SC only)
60 | ULfraction_SC = 5/14;
61 | DLfraction_SC = 8/14;
62 |
63 |
64 | %% Propagation parameters
65 |
66 | %Communication bandwidth
67 | B = 20e6; %50e6; %Macro cell tier, FDD
68 | B_SC = 100e6; %Small cell tier, TDD
69 |
70 | %Effective bandwidth after removing guardbands
71 | B_effective = 19.1e6; %48.6e6;
72 | B_effective_SC = 95e6;
73 |
74 | %Noise figure at the BS and UE (in dB)
75 | noiseFigure = 7;
76 |
77 | %Compute noise power
78 | noiseVariancedBm = -174 + 10*log10(B_effective) + noiseFigure;
79 | noiseVariancedBm_SC = -174 + 10*log10(B_effective_SC) + noiseFigure;
80 |
81 | %Define total uplink transmit power per UE (mW)
82 | p = 100;
83 | p_SC = 200;
84 |
85 | %Maximum downlink transmit power per BS (mW)
86 | Pmax = 1000;
87 | Pmax_SC = 400;
88 |
89 | %Select length of coherence block
90 | tau_c = 169;
91 | tau_c_SC = 169;
92 |
93 | %Compute pilot length
94 | tau_p = Kmax*f;
95 | tau_p_SC = Kmax_SC;
96 |
97 |
98 | %Prepare to save simulation results
99 |
100 | %Downlink spectral efficiencies - macro and small cells
101 | SE_DL = zeros(tau_p,L,nbrOfSetups);
102 | SE_DL_SC = zeros(tau_p_SC,L_SC,nbrOfSetups);
103 | %Uplink spectral efficiencies
104 | SE_UL = zeros(tau_p,L,nbrOfSetups);
105 | SE_UL_SC = zeros(tau_p_SC,L_SC,nbrOfSetups);
106 |
107 | %Downlink user throughputs - macro and small cells
108 | TP_DL = zeros(size(SE_DL));
109 | TP_DL_SC = zeros(size(SE_DL_SC));
110 | %Uplink user throughputs - macro and small cells
111 | TP_UL = zeros(size(SE_UL));
112 | TP_UL_SC = zeros(size(SE_UL_SC));
113 |
114 | %Downlink cell throughputs - macro and small cells
115 | TP_DL_total = zeros(L,nbrOfSetups);
116 | TP_DL_SC_total = zeros(L_SC,nbrOfSetups);
117 | TP_DL_SC_total_scaled = zeros(L_SC,nbrOfSetups);
118 | %Uplink cell throughputs - macro and small cells
119 | TP_UL_total = zeros(L,nbrOfSetups);
120 | TP_UL_SC_total = zeros(L_SC,nbrOfSetups);
121 | TP_UL_SC_total_scaled = zeros(L_SC,nbrOfSetups);
122 |
123 | %Scaled throughputs for small cells
124 | TP_DL_SC_scaled = zeros(size(TP_DL_SC));
125 | TP_UL_SC_scaled = zeros(size(TP_UL_SC));
126 | %Scaled spectral efficiencies for small cells
127 | SE_DL_SC_scaled = zeros(size(SE_DL_SC));
128 | SE_UL_SC_scaled = zeros(size(SE_UL_SC));
129 |
130 | %Macro cell UEs spectral efficiencies, split between backhaul and
131 | %non-backhaul UEs - downlink and uplink
132 | SE_DL_nonbh = zeros(size(SE_DL));
133 | SE_DL_bh = zeros(size(SE_DL));
134 | SE_UL_nonbh = zeros(size(SE_UL));
135 | SE_UL_bh = zeros(size(SE_UL));
136 |
137 |
138 | %Number of UEs total
139 | nbrOfUEs = zeros(nbrOfSetups,3);
140 | nbrOfUEs_SC = zeros(nbrOfSetups,3);
141 |
142 | %Select range of BS antennas
143 | M = 100;
144 | M_SC = 128;
145 |
146 | %Select number of polarizations
147 | polarizations = 1;
148 | polarizations_SC = 1;
149 |
150 | %Set center frequencies
151 | center_frequency = 2.6e9;
152 | center_frequency_SC = 28e9;
153 |
154 | %prepare to store SC UE's demand and their backhaul capacity
155 | store_TP_DL = zeros(L_SC,nbrOfSetups); %backhaul capacity DL
156 | store_TP_UL = zeros(L_SC,nbrOfSetups); %backhaul capacity UL
157 | store_TP_DL_SC_total = zeros(L_SC,nbrOfSetups); %SC UE's demand DL
158 | store_TP_UL_SC_total = zeros(L_SC,nbrOfSetups); %SC UE's demand UL
159 |
160 | %prepare to store ratios of SC UE's demand and their backhaul capacity
161 | store_f_d = zeros(L_SC,nbrOfSetups);
162 | store_f_u = zeros(L_SC,nbrOfSetups);
163 |
164 |
165 | %% Go through all setups
166 |
167 | for n = 1:nbrOfSetups
168 |
169 | %Output simulation progress
170 | disp([num2str(n) ' setups out of ' num2str(nbrOfSetups)]);
171 |
172 | %Generate channel realizations for current setup
173 | [H,Rest,activeUEs,pilotPattern,H_SC,Rest_SC,activeUEs_SC,...
174 | pilotPattern_SC,SCpositions,SCindex,Hbuilder_SC,SCindex_rnd,size_hex] = ...
175 | functionNetworkSetup_Quadriga(L,SCdrop,Kdrop,Kdrop_SC,B_effective,...
176 | B_effective_SC,noiseVariancedBm,noiseVariancedBm_SC,Kmax,Kmax_SC,f,...
177 | M,M_SC,polarizations,polarizations_SC,center_frequency,center_frequency_SC,...
178 | nbrOfSubcarriers, nbrOfSubcarriers_SC);
179 |
180 | %Update how many UEs that have been scheduled
181 | nbrOfUEs(n) = sum(activeUEs(:));
182 | %Update how many SC UEs that have been scheduled
183 | nbrOfUEs_SC(n) = sum(activeUEs_SC(:));
184 |
185 | %% Compute DL results
186 |
187 | %Compute the prelog factor for the DL TDD (SC only)
188 | prelogFactorDL_SC = DLfraction_SC*(1-tau_p_SC/tau_c_SC);
189 |
190 | %Compute MMSE channel estimates for SCs
191 | [Hhat_MMSE_SC,C_MMSE_SC,~] = functionChannelEstimates_MMSE(H_SC, ...
192 | Rest_SC,nbrOfSubcarriers_SC,M_SC,tau_p_SC,L_SC,p_SC);
193 |
194 | %Output simulation progress
195 | disp('Computing DL spectral efficiencies');
196 |
197 | %Compute DL spectral efficiencies
198 | [SE_DL(:,:,n)] = functionComputeSE_DGOB(L,M,H,tau_p,nbrOfSubcarriers,Pmax);
199 | [SE_DL_SC(:,:,n)] = functionComputeSE_DL_SC(H_SC,Hhat_MMSE_SC, ...
200 | nbrOfSubcarriers_SC,M_SC,tau_p_SC,L_SC,Hbuilder_SC,Pmax_SC,...
201 | center_frequency_SC);
202 |
203 | %Adjust for TDD ratio
204 | SE_DL_SC(:,:,n) = prelogFactorDL_SC*SE_DL_SC(:,:,n);
205 |
206 | %Delete large matrices
207 | clear Hhat_MMSE_SC C_MMSE_SC;
208 |
209 |
210 | %% Compute UL results
211 |
212 | %20 dB power control
213 | powerDiffdB = 20;
214 |
215 | Hscaled = H;
216 | RestScaled = Rest;
217 | Hscaled_SC = H_SC;
218 | RestScaled_SC = Rest_SC;
219 |
220 | %Compute the prelog factor for the UL TDD (SC only)
221 | prelogFactorUL_SC = ULfraction_SC*(1-tau_p_SC/tau_c_SC);
222 |
223 | %Apply the power control policy in (7.11) - macro cells
224 | for j = 1:L
225 |
226 | betaValues = ...
227 | 10*log10(squeeze(sum(sum(Rest(:,:,activeUEs(:,j)==1,j,j),1),2)/M));
228 | betaMin = min(betaValues);
229 |
230 | differenceSNR = betaValues-betaMin;
231 | backoff = differenceSNR-powerDiffdB;
232 | backoff(backoff<0) = 0;
233 |
234 | activeIndices = find(activeUEs(:,j));
235 |
236 | for k = 1:length(activeIndices)
237 |
238 | Hscaled(:,:,activeIndices(k),j,:) = ...
239 | H(:,:,activeIndices(k),j,:)/10^(backoff(k)/20);
240 | RestScaled(:,:,activeIndices(k),j,:) = ...
241 | Rest(:,:,activeIndices(k),j,:)/10^(backoff(k)/10);
242 |
243 | end
244 |
245 | end
246 |
247 | %Apply the power control policy in (7.11) - small cells
248 | for j = 1:L_SC
249 |
250 | betaValues_SC = 10*log10(squeeze(sum(sum(Rest_SC(:,:,...
251 | activeUEs_SC(:,j)==1,j,j),1),2)/M_SC));
252 | betaMin_SC = min(betaValues_SC);
253 |
254 | differenceSNR_SC = betaValues_SC-betaMin_SC;
255 | backoff_SC = differenceSNR_SC-powerDiffdB;
256 | backoff_SC(backoff_SC<0) = 0;
257 |
258 | activeIndices_SC = find(activeUEs_SC(:,j));
259 |
260 | for k = 1:length(activeIndices_SC)
261 |
262 | Hscaled_SC(:,:,activeIndices_SC(k),j,:) = ...
263 | H_SC(:,:,activeIndices_SC(k),j,:)/10^(backoff_SC(k)/20);
264 | RestScaled_SC(:,:,activeIndices_SC(k),j,:) = ...
265 | Rest_SC(:,:,activeIndices_SC(k),j,:)/10^(backoff_SC(k)/10);
266 |
267 | end
268 |
269 | end
270 |
271 | %Compute MMSE channel estimates
272 | [Hhat_MMSE,C_MMSE,~] = functionChannelEstimates_MMSE(Hscaled,...
273 | RestScaled,nbrOfSubcarriers,M,tau_p,L,p);
274 | [Hhat_MMSE_SC,C_MMSE_SC,~] = functionChannelEstimates_MMSE(Hscaled_SC,...
275 | RestScaled_SC,nbrOfSubcarriers_SC,M_SC,tau_p_SC,L_SC,p_SC);
276 |
277 | %Output simulation progress
278 | disp('Computing UL spectral efficiencies');
279 |
280 | %Compute UL SEs using the hardening bound / from MMSE channel estimation
281 | [SE_UL(:,:,n)] = functionComputeSE_UL(Hscaled,Hhat_MMSE,...
282 | C_MMSE,tau_c,tau_p,nbrOfSubcarriers,M,tau_p,L,p,1,1);
283 | [SE_UL_SC(:,:,n)] = functionComputeSE_UL_SC(Hscaled_SC,Hhat_MMSE_SC,...
284 | nbrOfSubcarriers_SC,M_SC,tau_p_SC,L_SC,Hbuilder_SC,Pmax_SC,...
285 | center_frequency_SC);
286 |
287 | %Adjust for TDD ratio
288 | SE_UL_SC(:,:,n) = prelogFactorUL_SC*SE_UL_SC(:,:,n);
289 |
290 | %Delete large matrices
291 | clear C_MMSE Hhat_MMSE_SC C_MMSE_SC; %Hhat_MMSE
292 |
293 | %Delete large matrices
294 | clear H Rest RestScaled; %Hscaled
295 | clear H_SC Rest_SC Hscaled_SC RestScaled_SC;
296 |
297 |
298 | %Convert spectral efficiencies to tputs, [Mbit/s]
299 | TP_DL(:,:,n) = (B_effective/1e6)*SE_DL(:,:,n);
300 | TP_DL_SC(:,:,n) = (B_effective_SC/1e6)*SE_DL_SC(:,:,n);
301 | TP_UL(:,:,n) = (B_effective/1e6)*SE_UL(:,:,n);
302 | TP_UL_SC(:,:,n) = (B_effective_SC/1e6)*SE_UL_SC(:,:,n);
303 |
304 | %Store cell throughputs
305 | TP_DL_total(:,n) = sum(TP_DL(:,:,n),1); %DL cell throughputs of
306 | %macro layer
307 | TP_UL_total(:,n) = sum(TP_UL(:,:,n),1); %UL cell throughputs of
308 | %macro layer
309 |
310 | %Adjust SC spectral efficiencies and throughputs depending on backhaul
311 | %throughput (i.e. throughput of corresponding macro UEs)
312 |
313 | TP_DL_SC_total(:,n) = sum(TP_DL_SC(:,:,n),1); %DL cell throughputs of
314 | %SC layer
315 | TP_UL_SC_total(:,n) = sum(TP_UL_SC(:,:,n),1); %UL cell throughputs of
316 | %SC layer
317 |
318 | [k_ind,l_ind] = find(SCindex_rnd);
319 |
320 |
321 |
322 | for i = 1:L_SC
323 |
324 | %ratios of SC UE's demand and their backhaul capacity
325 | f_d = 1;
326 | f_u = 1;
327 |
328 | store_TP_DL(i,n) = TP_DL(k_ind(i),l_ind(i),n);
329 | store_TP_UL(i,n) = TP_UL(k_ind(i),l_ind(i),n);
330 | store_TP_DL_SC_total(i,n) = TP_DL_SC_total(SCindex_rnd(k_ind(i),l_ind(i)),n);
331 | store_TP_UL_SC_total(i,n) = TP_UL_SC_total(SCindex_rnd(k_ind(i),l_ind(i)),n);
332 |
333 | %Check if small cell total DL tput exceeds its backhaul DL tput
334 | if TP_DL(k_ind(i),l_ind(i),n) < ...
335 | TP_DL_SC_total(SCindex_rnd(k_ind(i),l_ind(i)),n)
336 | %Calculate ratio of small cell total DL tput and its backhaul
337 | %DL tput
338 | f_d = TP_DL_SC_total(SCindex_rnd(k_ind(i),l_ind(i)),n) / ...
339 | TP_DL(k_ind(i),l_ind(i),n);
340 | end
341 |
342 | %Check UL as well
343 | if TP_UL(k_ind(i),l_ind(i),n) < ...
344 | TP_UL_SC_total(SCindex_rnd(k_ind(i),l_ind(i)),n)
345 | %Calculate ratio of small cell total DL tput and its backhaul
346 | %UL tput
347 | f_u = TP_UL_SC_total(SCindex_rnd(k_ind(i),l_ind(i)),n) / ...
348 | TP_UL(k_ind(i),l_ind(i),n);
349 | end
350 |
351 | TP_DL_SC_scaled(:,i,n) = TP_DL_SC(:,i,n) / f_d;
352 | SE_DL_SC_scaled(:,i,n) = SE_DL_SC(:,i,n) / f_d;
353 |
354 | TP_UL_SC_scaled(:,i,n) = TP_UL_SC(:,i,n) / f_u;
355 | SE_UL_SC_scaled(:,i,n) = SE_UL_SC(:,i,n) / f_u;
356 |
357 | store_f_d(i,n) = f_d;
358 | store_f_u(i,n) = f_u;
359 |
360 | end
361 |
362 | %alternative way to calculate ratio of demand and backhaul capacity
363 | % store_f_d_a = zeros(L_SC,1);
364 | % store_f_u_a = zeros(L_SC,1);
365 | % store_TP_DL = sort(store_TP_DL);
366 | % store_TP_DL_SC_total = sort(store_TP_DL_SC_total);
367 | % store_TP_UL = sort(store_TP_UL);
368 | % store_TP_UL_SC_total = sort(store_TP_UL_SC_total);
369 | % for i = 1:L_SC
370 | %
371 | % f_d_a = 1;
372 | % f_u_a = 1;
373 | %
374 | % %Check if small cell total DL tput exceeds its backhaul DL tput
375 | % if store_TP_DL(i) < store_TP_DL_SC_total(i)
376 | % %Calculate ratio of small cell total DL tput and its backhaul
377 | % %DL tput
378 | % f_d_a = store_TP_DL_SC_total(i) / store_TP_DL(i);
379 | % end
380 | %
381 | % %Check UL as well
382 | % if store_TP_UL(i) < store_TP_UL_SC_total(i)
383 | % %Calculate ratio of small cell total DL tput and its backhaul
384 | % %UL tput
385 | % f_u_a = store_TP_UL_SC_total(i) / store_TP_UL(i);
386 | % end
387 | %
388 | % TP_DL_SC_scaled(:,i,n) = TP_DL_SC(:,i,n) / f_d_a;
389 | % SE_DL_SC_scaled(:,i,n) = SE_DL_SC(:,i,n) / f_d_a;
390 | %
391 | % TP_UL_SC_scaled(:,i,n) = TP_UL_SC(:,i,n) / f_u_a;
392 | % SE_UL_SC_scaled(:,i,n) = SE_UL_SC(:,i,n) / f_u_a;
393 | %
394 | % store_f_d_a(i) = f_d_a;
395 | % store_f_u_a(i) = f_u_a;
396 | %
397 | % end
398 |
399 | %remove too small values
400 | % for i = 1:L_SC
401 | % if TP_DL(k_ind(i),l_ind(i)) < 50 || TP_UL(k_ind(i),l_ind(i)) < 50
402 | % k_ind(i) = [];
403 | % l_ind(i) = [];
404 | % store_TP_DL(i) = [];
405 | % store_TP_UL(i) = [];
406 | % store_TP_DL_SC_total(i) = [];
407 | % store_TP_UL_SC_total(i) = [];
408 | % store_f_d(i) = [];
409 | % store_f_u(i) = [];
410 | % end
411 |
412 | %Calculate scaled metrics for DL and UL cell throughputs of small cell
413 | %layer
414 | TP_DL_SC_total_scaled(:,n) = sum(TP_DL_SC_scaled(:,:,n),1);
415 | TP_UL_SC_total_scaled(:,n) = sum(TP_UL_SC_scaled(:,:,n),1);
416 |
417 | %Create separate results for non-backhaul macro UEs and backhaul (SC)
418 | %macro UEs
419 |
420 | %Initialize non-backhaul arrays with full array of spectral
421 | %efficiencies of all macro UEs
422 | SE_DL_nonbh(:,:,n) = SE_DL(:,:,n);
423 | SE_UL_nonbh(:,:,n) = SE_UL(:,:,n);
424 |
425 | for i = 1:L_SC
426 |
427 | %Fill backhaul array with spectral efficiencies of macro UEs
428 | %representing small cell backhaul
429 | SE_DL_bh(k_ind(i),l_ind(i),n) = SE_DL(k_ind(i),l_ind(i),n);
430 | SE_UL_bh(k_ind(i),l_ind(i),n) = SE_UL(k_ind(i),l_ind(i),n);
431 |
432 | %Clear spectral efficiencies of macro UEs representing small cell
433 | %backhaul from non-backhaul array
434 | SE_DL_nonbh(k_ind(i),l_ind(i),n) = 0;
435 | SE_UL_nonbh(k_ind(i),l_ind(i),n) = 0;
436 |
437 | end
438 |
439 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
440 | %MSE for the estimate of H
441 | for i = 1:L
442 | for k = 1:tau_p
443 | MSE_H(k,i) = sum(abs(Hscaled(:,:,k,i,i) - Hhat_MMSE(:,:,k,i,i)).^2,'all');
444 | end
445 | end
446 | MSE_H_bh(n) = mean(MSE_H(SCindex_rnd==0));
447 | MSE_H_nonbh(n) = mean(MSE_H(SCindex_rnd>0));
448 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
449 |
450 | end
451 |
452 |
453 | %% Plot the simulation results
454 |
455 | %DL macro tier
456 | SE_DL_active = SE_DL(:,:,:);
457 | SE_DL_active = sort(SE_DL_active(find(SE_DL_active>0)));
458 | %DL macro tier - non-backhaul UEs only
459 | SE_DL_nonbh_active = SE_DL_nonbh(:,:,:);
460 | SE_DL_nonbh_active = sort(SE_DL_nonbh_active(find(SE_DL_nonbh_active>0)));
461 | %DL macro tier - backhaul UEs only
462 | SE_DL_bh_active = SE_DL_bh(:,:,:);
463 | SE_DL_bh_active = sort(SE_DL_bh_active(find(SE_DL_bh_active>0)));
464 | %DL micro tier
465 | SE_DL_SC_active = SE_DL_SC(:,:,:);
466 | SE_DL_SC_active = sort(SE_DL_SC_active(find(SE_DL_SC_active>0)));
467 | %DL micro tier - scaled
468 | SE_DL_SC_scaled_active = prelogFactorDL_SC*SE_DL_SC_scaled(:,:,:);
469 | SE_DL_SC_scaled_active = ...
470 | sort(SE_DL_SC_scaled_active(find(SE_DL_SC_scaled_active>0)));
471 |
472 | %UL macro tier
473 | SE_UL_active = SE_UL(:,:,:);
474 | SE_UL_active = sort(SE_UL_active(find(SE_UL_active>0)));
475 | %UL macro tier - non-backhaul UEs only
476 | SE_UL_nonbh_active = SE_UL_nonbh(:,:,:);
477 | SE_UL_nonbh_active = sort(SE_UL_nonbh_active(find(SE_UL_nonbh_active>0)));
478 | %UL macro tier - backhaul UEs only
479 | SE_UL_bh_active = SE_UL_bh(:,:,:);
480 | SE_UL_bh_active = sort(SE_UL_bh_active(find(SE_UL_bh_active>0)));
481 | %UL micro tier
482 | SE_UL_SC_active = SE_UL_SC(:,:,:);
483 | SE_UL_SC_active = sort(SE_UL_SC_active(find(SE_UL_SC_active>0)));
484 | %UL micro tier - scaled
485 | SE_UL_SC_scaled_active = SE_UL_SC_scaled(:,:,:);
486 | SE_UL_SC_scaled_active = ...
487 | sort(SE_UL_SC_scaled_active(find(SE_UL_SC_scaled_active>0)));
488 |
489 | %Extract total number of UEs
490 | Ktotal = sum(nbrOfUEs(:));
491 | Ktotal_SC = sum(nbrOfUEs_SC(:));
492 |
493 | %Set line styles
494 | %Macro - DL and UL plots
495 | Macro_all = 'r--'; %MMSE_DGOB for DL, MMSE_RZF for UL
496 | Macro_nonbh = 'm--';
497 | Macro_bh = 'b--';
498 | %Micro - DL and UL plots
499 | Micro_initial = 'g--'; %MMSE_OMP for DL and UL
500 | Micro_scaled = 'c--';
501 | %Cell throughputs
502 | Macro_cell_tput_DL = 'r-o';
503 | Macro_cell_tput_UL = 'b-o';
504 | Micro_cell_tput_DL = 'r-o';
505 | Micro_cell_tput_UL = 'b-o';
506 | Micro_cell_tput_DL_scaled = 'r-*';
507 | Micro_cell_tput_UL_scaled = 'b-*';
508 |
509 | %Plot DL user throughput per macrocell UE
510 | figure(11);
511 | hold on; box on; grid on;
512 | plot((B_effective/1e6)*SE_DL_active,...
513 | linspace(0,1,Ktotal),Macro_all,'LineWidth',1);
514 | plot((B_effective/1e6)*SE_DL_nonbh_active,...
515 | linspace(0,1,length(SE_DL_nonbh_active)),Macro_nonbh,'LineWidth',1);
516 | plot((B_effective/1e6)*SE_DL_bh_active,...
517 | linspace(0,1,length(SE_DL_bh_active)),Macro_bh,'LineWidth',1);
518 | legend('All macro UEs','Mobile macro UEs','Backhaul macro UEs',...
519 | 'Location','SouthEast','AutoUpdate','off');
520 | xlabel('DL throughput per macrocell UE [Mbit/s]');
521 | ylabel('CDF');
522 | xlim([0 200]);
523 |
524 | %Plot DL user throughput per small cell UE
525 | figure(21);
526 | hold on; box on; grid on;
527 | plot((B_effective_SC/1e6)*SE_DL_SC_active,...
528 | linspace(0,1,Ktotal_SC),Micro_initial,'LineWidth',1);
529 | plot((B_effective_SC/1e6)*SE_DL_SC_scaled_active,...
530 | linspace(0,1,Ktotal_SC),Micro_scaled,'LineWidth',1);
531 | legend('Small cell UEs','Small cell UEs - scaled',...
532 | 'Location','SouthEast','AutoUpdate','off');
533 | xlabel('DL throughput per small cell UE [Mbit/s]');
534 | ylabel('CDF');
535 | xlim([0 200]);
536 |
537 | %Plot UL user throughput per macrocell UE
538 | figure(12);
539 | hold on; box on; grid on;
540 | plot((B_effective/1e6)*SE_UL_active,...
541 | linspace(0,1,Ktotal),Macro_all,'LineWidth',1);
542 | plot((B_effective/1e6)*SE_UL_nonbh_active,...
543 | linspace(0,1,length(SE_UL_nonbh_active)),Macro_nonbh,'LineWidth',1);
544 | plot((B_effective/1e6)*SE_UL_bh_active,...
545 | linspace(0,1,length(SE_UL_bh_active)),Macro_bh,'LineWidth',1);
546 | legend('All macro UEs','Mobile macro UEs','Backhaul macro UEs',...
547 | 'Location','SouthEast','AutoUpdate','off');
548 | xlabel('UL throughput per macrocell UE [Mbit/s]');
549 | ylabel('CDF');
550 | xlim([0 150]);
551 |
552 | %Plot UL user throughput per small cell UE
553 | figure(22);
554 | hold on; box on; grid on;
555 | plot((B_effective_SC/1e6)*SE_UL_SC_active,...
556 | linspace(0,1,Ktotal_SC),Micro_initial,'LineWidth',1);
557 | plot((B_effective_SC/1e6)*SE_UL_SC_scaled_active,...
558 | linspace(0,1,Ktotal_SC),Micro_scaled,'LineWidth',1);
559 | legend('Small cell UEs','Small cell UEs - scaled',...
560 | 'Location','SouthEast','AutoUpdate','off');
561 | xlabel('UL throughput per small cell UE [Mbit/s]');
562 | ylabel('CDF');
563 | xlim([0 150]);
564 |
565 | %Plot statistics: user throughputs, both tiers
566 | f = figure(67);
567 | set(f,'Position', [200 200 1200 400]);
568 | uit = uitable(f);
569 | uit.ColumnName = {'Type of UEs','Median DL tput','Median UL tput',...
570 | 'Average DL tput','Average UL tput',...
571 | 'p5 DL tput', 'p5 UL tput',...
572 | 'p95 DL tput', 'p95 UL tput'};
573 | uit.Data = {'Macro: all UEs',...
574 | median((B_effective/1e6)*SE_DL_active),...
575 | median((B_effective/1e6)*SE_UL_active),...
576 | mean((B_effective/1e6)*SE_DL_active),...
577 | mean((B_effective/1e6)*SE_UL_active),...
578 | prctile((B_effective/1e6)*SE_DL_active,5),...
579 | prctile((B_effective/1e6)*SE_UL_active,5),...
580 | prctile((B_effective/1e6)*SE_DL_active,95),...
581 | prctile((B_effective/1e6)*SE_UL_active,95);...
582 | 'Macro: non-backhaul UEs',...
583 | median((B_effective/1e6)*SE_DL_nonbh_active),...
584 | median((B_effective/1e6)*SE_UL_nonbh_active),...
585 | mean((B_effective/1e6)*SE_DL_nonbh_active),...
586 | mean((B_effective/1e6)*SE_UL_nonbh_active),...
587 | prctile((B_effective/1e6)*SE_DL_nonbh_active,5),...
588 | prctile((B_effective/1e6)*SE_UL_nonbh_active,5),...
589 | prctile((B_effective/1e6)*SE_DL_nonbh_active,95),...
590 | prctile((B_effective/1e6)*SE_UL_nonbh_active,95);...
591 | 'Macro: backhaul UEs',...
592 | median((B_effective/1e6)*SE_DL_bh_active),...
593 | median((B_effective/1e6)*SE_UL_bh_active),...
594 | mean((B_effective/1e6)*SE_DL_bh_active),...
595 | mean((B_effective/1e6)*SE_UL_bh_active),...
596 | prctile((B_effective/1e6)*SE_DL_bh_active,5),...
597 | prctile((B_effective/1e6)*SE_UL_bh_active,5),...
598 | prctile((B_effective/1e6)*SE_DL_bh_active,95),...
599 | prctile((B_effective/1e6)*SE_UL_bh_active,95);...
600 | 'Small cell UEs',...
601 | median((B_effective_SC/1e6)*SE_DL_SC_active),...
602 | median((B_effective_SC/1e6)*SE_UL_SC_active),...
603 | mean((B_effective_SC/1e6)*SE_DL_SC_active),...
604 | mean((B_effective_SC/1e6)*SE_UL_SC_active),...
605 | prctile((B_effective_SC/1e6)*SE_DL_SC_active,5),...
606 | prctile((B_effective_SC/1e6)*SE_UL_SC_active,5),...
607 | prctile((B_effective_SC/1e6)*SE_DL_SC_active,95),...
608 | prctile((B_effective_SC/1e6)*SE_UL_SC_active,95);...
609 | 'Small cell UEs: scaled',...
610 | median((B_effective_SC/1e6)*SE_DL_SC_scaled_active),...
611 | median((B_effective_SC/1e6)*SE_UL_SC_scaled_active),...
612 | mean((B_effective_SC/1e6)*SE_DL_SC_scaled_active),...
613 | mean((B_effective_SC/1e6)*SE_UL_SC_scaled_active),...
614 | prctile((B_effective_SC/1e6)*SE_DL_SC_scaled_active,5),...
615 | prctile((B_effective_SC/1e6)*SE_UL_SC_scaled_active,5),...
616 | prctile((B_effective_SC/1e6)*SE_DL_SC_scaled_active,95),...
617 | prctile((B_effective_SC/1e6)*SE_UL_SC_scaled_active,95);...
618 | };
619 | uit.Position = [20 20 1160 360];
620 | uit.ColumnWidth = {150,100,100,100,100,100,100,100,100};
621 |
622 | %Plot cell throughput CDFs
623 |
624 | %Plot DL and UL cell throughput per macrocell
625 | figure(13);
626 | hold on; box on; grid on;
627 | plot(sort(TP_DL_total(:)),...
628 | linspace(0,1,length(TP_DL_total(:))),Macro_cell_tput_DL,'LineWidth',1);
629 | plot(sort(TP_UL_total(:)),...
630 | linspace(0,1,length(TP_UL_total(:))),Macro_cell_tput_UL,'LineWidth',1);
631 | legend('Macro cell DL throughput','Macro cell UL throughput',...
632 | 'Location','SouthEast','AutoUpdate','off');
633 | xlabel('Macro cell tier: cell throughput [Mbit/s]');
634 | ylabel('CDF');
635 | xlim([0 1200]);
636 |
637 | %Plot DL and UL cell throughput per small cell (+ scaled)
638 | figure(23);
639 | hold on; box on; grid on;
640 | plot(sort(TP_DL_SC_total(:)),...
641 | linspace(0,1,length(TP_DL_SC_total(:))),...
642 | Micro_cell_tput_DL,'LineWidth',1);
643 | plot(sort(TP_UL_SC_total(:)),...
644 | linspace(0,1,length(TP_UL_SC_total(:))),...
645 | Micro_cell_tput_UL,'LineWidth',1);
646 | plot(sort(TP_DL_SC_total_scaled(:)),...
647 | linspace(0,1,length(TP_DL_SC_total_scaled(:))),...
648 | Micro_cell_tput_DL_scaled,'LineWidth',1);
649 | plot(sort(TP_UL_SC_total_scaled(:)),...
650 | linspace(0,1,length(TP_UL_SC_total_scaled(:))),...
651 | Micro_cell_tput_UL_scaled,'LineWidth',1);
652 | legend('Small cell DL throughput','Small cell UL throughput',...
653 | 'Small cell DL throughput (scaled)','Small cell UL throughput (scaled)',...
654 | 'Location','SouthEast','AutoUpdate','off');
655 | xlabel('Small cell tier: cell throughput [Mbit/s]');
656 | ylabel('CDF');
657 | xlim([0 600]);
658 |
659 | %Plot statistics: cell throughputs, both tiers
660 | f = figure(68);
661 | set(f,'Position', [200 200 900 400]);
662 | uit = uitable(f);
663 | uit.ColumnName = {'Type of cells','Median DL cell throughput',...
664 | 'Median UL cell throughput','Average DL cell throughput',...
665 | 'Average UL cell throughput'};
666 | uit.Data = {'Macro cells',...
667 | median(TP_DL_total(:)),...
668 | median(TP_UL_total(:)),...
669 | mean(TP_DL_total(:)),...
670 | mean(TP_UL_total(:));...
671 | 'Small cells',...
672 | median(TP_DL_SC_total(:)),...
673 | median(TP_UL_SC_total(:)),...
674 | mean(TP_DL_SC_total(:)),...
675 | mean(TP_UL_SC_total(:));...
676 | 'Small cells (scaled)',...
677 | median(TP_DL_SC_total_scaled(:)),...
678 | median(TP_UL_SC_total_scaled(:)),...
679 | mean(TP_DL_SC_total_scaled(:)),...
680 | mean(TP_UL_SC_total_scaled(:));...
681 | 'SCs: capacity loss due to scaling, %',...
682 | (1 - median(TP_DL_SC_total_scaled(:))/median(TP_DL_SC_total(:)))*100,...
683 | (1 - median(TP_UL_SC_total_scaled(:))/median(TP_UL_SC_total(:)))*100,...
684 | (1 - mean(TP_DL_SC_total_scaled(:))/mean(TP_DL_SC_total(:)))*100,...
685 | (1 - mean(TP_UL_SC_total_scaled(:))/mean(TP_UL_SC_total(:)))*100;...
686 | };
687 | uit.Position = [20 20 860 360];
688 | uit.ColumnWidth = {200,150,150,150,150};
689 |
690 |
691 | %Plot statistics: area throughputs, 2-layer system
692 | f = figure(69);
693 | set(f,'Position', [200 200 900 400]);
694 | total_area_km2 = 3 * sqrt(3) * size_hex^2 / 2 * 7 / 1e6;
695 | DL_area_tput = (sum(TP_DL_total(:))+...
696 | sum(TP_DL_SC_total(:))) / (total_area_km2*n) * 10e-3;
697 | DL_area_tput_scaled = (sum(TP_DL_total(:))+...
698 | sum(TP_DL_SC_total_scaled(:))) / (total_area_km2*n) * 10e-3;
699 | UL_area_tput = (sum(TP_UL_total(:))+...
700 | sum(TP_UL_SC_total(:))) / (total_area_km2*n) * 10e-3;
701 | UL_area_tput_scaled = (sum(TP_UL_total(:))+...
702 | sum(TP_UL_SC_total_scaled(:))) / (total_area_km2*n) * 10e-3;
703 | uit = uitable(f);
704 | uit.ColumnName = {'DL/UL','Total area throughput non-scaled, Gbit/s/km2',...
705 | 'Total area throughput scaled, Gbit/s/km2','Capacity loss due to scaling, %'};
706 | uit.Data = {'DL',...
707 | DL_area_tput,...
708 | DL_area_tput_scaled,...
709 | (1 - DL_area_tput_scaled/DL_area_tput)*100;...
710 | 'UL',...
711 | UL_area_tput,...
712 | UL_area_tput_scaled,...
713 | (1 - UL_area_tput_scaled/UL_area_tput)*100;...
714 | };
715 | uit.Position = [20 20 860 360];
716 | uit.ColumnWidth = {50,250,250,250};
717 |
718 |
719 | %Plot various additional statistics
720 | f = figure(70);
721 | set(f,'Position', [200 200 900 400]);
722 |
723 | %Share of small cells with enough backhaul throughput to cover demand
724 | %without scaling (without any backhaul loss due to scaling)
725 | enough_backhaul_tput_share_DL = length(store_f_d(store_f_d==1)) / ...
726 | length(store_f_d(:))*100; %by DL
727 | enough_backhaul_tput_share_UL = length(store_f_u(store_f_u==1)) / ...
728 | length(store_f_u(:))*100; %by UL
729 | store_f_all(:) = store_f_d(:) + store_f_u(:);
730 | enough_backhaul_tput_share_all = length(store_f_all(store_f_all==2)) / ...
731 | length(store_f_all(:))*100; %by all
732 | %another way to calculate total capacity loss - by dividing total
733 | %demand in small cells layer by total backhaul capacity
734 | backhaul_loss_total_DL = (1 - sum(store_TP_DL(:))/sum(store_TP_DL_SC_total(:)))*100;
735 | backhaul_loss_total_UL = (1 - sum(store_TP_UL(:))/sum(store_TP_UL_SC_total(:)))*100;
736 |
737 | uit = uitable(f);
738 | uit.ColumnName = {'KPI','Value','Unit'};
739 | uit.Data = {'Share of SCs with sufficient backhaul without scaling, by DL',...
740 | enough_backhaul_tput_share_DL,...
741 | '%';...
742 | 'Share of SCs with sufficient backhaul without scaling, by UL',...
743 | enough_backhaul_tput_share_UL,...
744 | '%';...
745 | 'Share of SCs with sufficient backhaul without scaling, by DL & UL',...
746 | enough_backhaul_tput_share_all,...
747 | '%';...
748 | 'Total capacity loss in DL (1 - sum demand in SCs / sum backhaul capacity)',...
749 | backhaul_loss_total_DL,...
750 | '%';...
751 | 'Total capacity loss in UL (1 - sum demand in SCs / sum backhaul capacity)',...
752 | backhaul_loss_total_UL,...
753 | '%';...
754 | 'MSE of channel estimation, backhaul UEs',...
755 | mean(MSE_H_bh),...
756 | '';...
757 | 'MSE of channel estimation, non-backhaul UEs',...
758 | mean(MSE_H_nonbh),...
759 | '';...
760 | };
761 | uit.Position = [20 20 860 360];
762 | uit.ColumnWidth = {500,100,100};
763 |
--------------------------------------------------------------------------------
/Code/LinkGeometry.m:
--------------------------------------------------------------------------------
1 | classdef LinkGeometry
2 | %User-defined class used to store geometrical parameters of the
3 | %particular Tx-UE link
4 | properties
5 | tx_array qd_arrayant;
6 | rx_array qd_arrayant;
7 | NumClusters int16;
8 | AoD(1,:) double;
9 | EoD(1,:) double;
10 | AoA(1,:) double;
11 | EoA(1,:) double;
12 | end
13 | methods
14 | function obj = LinkGeometry(tx_array,rx_array,NumClusters,AoD,EoD,AoA,EoA)
15 | % class constructor
16 | if(nargin > 0)
17 | obj.tx_array = tx_array;
18 | obj.rx_array = rx_array;
19 | obj.NumClusters = NumClusters;
20 | obj.AoD = AoD;
21 | obj.EoD = EoD;
22 | obj.AoA = AoA;
23 | obj.EoA = EoA;
24 | end
25 | end
26 | end
27 | end
--------------------------------------------------------------------------------
/Code/UE_spectral_efficiencies.m:
--------------------------------------------------------------------------------
1 | %Set line styles
2 | Macro_all_DL = 'r--';
3 | Micro_all_DL = 'b--';
4 | Macro_all_UL = 'r-*';
5 | Micro_all_UL = 'b-*';
6 |
7 | %Plot DL spectral efficiency for macrocell vs small cell UEs
8 | figure(100);
9 | hold on; box on; grid on;
10 | plot(SE_DL_active,...
11 | linspace(0,1,Ktotal),Macro_all_DL,'LineWidth',1);
12 | plot(SE_DL_SC_active,...
13 | linspace(0,1,Ktotal_SC),Micro_all_DL,'LineWidth',1);
14 | plot(SE_UL_active,...
15 | linspace(0,1,Ktotal),Macro_all_UL,'LineWidth',1);
16 | plot(SE_UL_SC_active,...
17 | linspace(0,1,Ktotal_SC),Micro_all_UL,'LineWidth',1);
18 | legend('Macro UE, DL','Micro UE, DL','Macro UE, UL','Micro UE, UL',...
19 | 'Location','SouthEast','AutoUpdate','off');
20 | xlabel('UE spectral efficiencies [bits/s/Hz]');
21 | ylabel('CDF');
22 | xlim([0 20]);
--------------------------------------------------------------------------------
/Code/functionChannelEstimates_MMSE.m:
--------------------------------------------------------------------------------
1 | function [Hhat_MMSE,C_MMSE,tau_p] = functionChannelEstimates_MMSE(H,R,...
2 | nbrOfSubcarriers,M,K,L,p)
3 | %This function is used to generate the channel realizations and estimates
4 | %of these channels for all UEs in the entire network. The channels are
5 | %assumed to be correlated Rayleigh fading. The MMSE estimator is used.
6 | %
7 | %INPUT:
8 | %
9 | %H = M x nbrOfSubcarriers x K x L x L matrix with the
10 | % channel realizations.
11 | %R = M x M x K x L x L matrix with spatial correlation
12 | % matrices for all UEs in the network. R(:,:,k,j,l) is
13 | % the correlation matrix for the channel between UE k
14 | % in cell j and the BS in cell l. This such matrix can
15 | % either include the average channel gain or can be
16 | % normalized arbitrarily.
17 | %nbrOfSubcarriers = Number of channel realizations (subcarriers)
18 | %M = Number of antennas per BS
19 | %K = Number of UEs per cell
20 | %L = Number of BSs and cells
21 | %p = Uplink transmit power per UE (same for everyone)
22 | %
23 | %OUTPUT:
24 | %
25 | %Hhat_MMSE = M x nbrOfSubcarriers x K x L x L matrix with the MMSE
26 | % channel estimates. The matrix Hhat_MMSE(:,n,k,j,l) is the
27 | % n:th channel estimate of the channel between UE k in cell j
28 | % and the BS in cell l.
29 | %C_MMSE = M x M x K x L x L matrix with estimation error correlation
30 | % matrices when using MMSE estimation. The matrix is
31 | % organized in the same way as R.
32 | %tau_p = Length of pilot sequences
33 | %
34 |
35 |
36 | %% Perform channel estimation
37 |
38 |
39 | %Length of pilot sequences
40 | tau_p = K;
41 |
42 | %Store identity matrix of size M x M
43 | eyeM = eye(M);
44 |
45 | %Generate realizations of normalized noise
46 | Np = sqrt(0.5)*(randn(M,nbrOfSubcarriers,K,L) + 1i*randn(M,nbrOfSubcarriers,K,L));
47 |
48 |
49 |
50 | %Prepare for MMSE estimation
51 |
52 | %Prepare to store MMSE channel estimates
53 | Hhat_MMSE = zeros(M,nbrOfSubcarriers,K,L,L);
54 |
55 | %Prepare to store estimation error correlation matrices
56 | C_MMSE = zeros(M,M,K,L,L);
57 |
58 |
59 | %% Go through all cells
60 | for j = 1:L
61 |
62 | %Compute processed pilot signal for all UEs that use these pilots, according to (3.5)
63 | yp = sqrt(p)*tau_p*sum(H(:,:,:,:,j),4) + sqrt(tau_p)*Np(:,:,:,j);
64 |
65 | %Go through all UEs
66 | for k = 1:K
67 |
68 | %Compute the matrix that is inverted in the MMSE estimator
69 | PsiInv = (p*tau_p*sum(R(:,:,k,:,j),4) + eyeM);
70 |
71 | %Go through all cells
72 | for l = 1:L
73 |
74 | %Check if the UE is active (inactive UEs have zero matrices)
75 | if trace(R(:,:,k,l,j))>0
76 |
77 | %Compute MMSE estimate of channel between BS l and UE k in
78 | %cell j using (3.9) in Theorem 3.1
79 | RPsi = R(:,:,k,l,j) / PsiInv;
80 | Hhat_MMSE(:,:,k,l,j) = sqrt(p)*RPsi*yp(:,:,k);
81 |
82 | %Compute corresponding estimation error correlation matrix, using (3.11)
83 | C_MMSE(:,:,k,l,j) = R(:,:,k,l,j) - p*tau_p*RPsi*R(:,:,k,l,j);
84 |
85 | end
86 |
87 | end
88 |
89 | end
90 |
91 | end
92 |
93 |
--------------------------------------------------------------------------------
/Code/functionComputeSE_DGOB.m:
--------------------------------------------------------------------------------
1 | function [SE_DGOB] = functionComputeSE_DGOB(L,M,H,K,nbrOfSubcarriers,Pmax)
2 | %This function is used to compute SE of FDD MIMO system using Digital Grid
3 | %Of Beams approach as described in [1]
4 | %
5 | %References:
6 | %[1] Jose Flordelis et al. Massive MIMO Performance - TDD Versus FDD:
7 | %What Do Measurements Say? IEEE Transactions on Wireless Communications,
8 | %Vol. 17, No. 4, April 2018
9 | %
10 | %INPUT:
11 | %
12 | %L = Number of BSs
13 | %M = Number of BS array antennas
14 | %H = M x nbrOfSubcarriers x K x L x L matrix with the exact channel
15 | %realizations
16 | %K = number of BS UEs
17 | %nbrOfSubcarriers = Number of channel realizations (subcarriers)
18 | %Pmax = Maximum downlink transmit power per BS
19 | %
20 | %OUTPUT:
21 | %
22 | %SE_DGOB = K x L matrix of spectral efficiencies [b/s/Hz] calculated using
23 | %Digital Grid Of Beams approach (DGOB)
24 | %
25 |
26 | %Number of BS array beams
27 | Mb = M;
28 |
29 | %Codebook matrix
30 | C = dftmtx(Mb);
31 |
32 | %Number of beams for UE to select and report
33 | N = 30;
34 |
35 |
36 |
37 | %Output simulation progress
38 | disp('Iterating throught D-GOB algorithm');
39 |
40 | %% Go through all channel realizations
41 | nbrOfSubcarriers = 5; %FIXME to speed up debugging
42 | %Prepare to store DGOB spectral efficiencies
43 | SE_DGOB = zeros(K,L);
44 | SEn = zeros(K,L,nbrOfSubcarriers); %per-subcarrier
45 | for n = 1:nbrOfSubcarriers
46 |
47 | %Output simulation progress
48 | disp([num2str(n) ' channel realizations out of ' num2str(nbrOfSubcarriers)]);
49 |
50 | %Go through all cells
51 | for j = 1:L
52 |
53 | %Extract channel realizations from all UEs of BS j to BS j
54 | Hnj = reshape(H(:,n,:,j,j),[M K]);
55 | Hhatnj = zeros(M,K);
56 | w = zeros(M,K);
57 |
58 | %Go through all UEs
59 | for k = 1:K
60 |
61 | g = C'*Hnj(:,k); %formula (8) from [1]
62 |
63 | [~, gs_index] = sort(g,'descend');
64 | Q = find(gs_index<=N); %select N strongest entries in g
65 |
66 | B = C(:,Q); %extracting relevant beams from C
67 |
68 | gu = B'*g; %formula (9) from [1] %#ok
69 |
70 | %Channel matrix quantization
71 | %Solve using CVX
72 | cvx_begin quiet
73 |
74 | variable v(M,1) complex;
75 |
76 | minimize norm(B'*v-gu) %formula (10) from [1]
77 |
78 | cvx_end
79 |
80 | %Use obtained v as Hhat (estimates) matrix
81 | Hhatnj(:,k) = v;
82 |
83 | end
84 |
85 | Z = pinv(Hhatnj'); %columns of the Moore-Penrose pseudoinverse
86 |
87 | %Prepare to store SINR and achievable sum-rate values
88 | SINR = zeros(1,K);
89 | Cdgob = zeros(1,K);
90 |
91 | for k = 1:K
92 |
93 | if norm(Z(:,k))>1e-10
94 |
95 | %ZF precoding
96 | w(:,k) = Z(:,k)/norm(Z(:,k));
97 |
98 | %Calculate interference term of (12) in [1]
99 | interf = 0;
100 | for i = 1:K
101 | if i~=k
102 | interf = interf + Hnj(:,i)'*w(:,i);
103 | end
104 | end
105 |
106 | K_active = size(find(H(1,n,:,j,j)),1);
107 |
108 | SINR(k) = (Pmax/K_active*abs(Hnj(:,k)'*w(:,k)))^2 / ...
109 | (1+Pmax/K_active*abs(interf)^2); %formula (12) in [1]
110 |
111 | Cdgob(k) = log2(1+SINR(k)); %formula (13) in [1]
112 |
113 | SEn(k,j,n) = Cdgob(k);
114 |
115 | end
116 |
117 | end
118 |
119 | end
120 | end
121 |
122 | %Go through all cells
123 | for j = 1:L
124 | %Go through all UEs in cell j
125 | for k = 1:K
126 | SE_DGOB(k,j) = sum(SEn(k,j,:))/nbrOfSubcarriers; %average over
127 | %subcarriers
128 | end
129 | end
130 |
131 |
132 | end
133 |
134 |
135 |
136 |
137 |
138 |
--------------------------------------------------------------------------------
/Code/functionComputeSE_DL_SC.m:
--------------------------------------------------------------------------------
1 | function [SE_DL_SC] = functionComputeSE_DL_SC(H,Hhat,nbrOfSubcarriers,...
2 | M,K,L,Hbuilder_SC,Pmax_SC,center_frequency_SC)
3 | %
4 | %This function is used to compute DL spectral efficiency for small cells
5 | %
6 | %INPUT:
7 | %
8 | %H = M x nbrOfSubcarriers x K x L x L matrix with the
9 | % exact channel realizations
10 | %Hhat = M x nbrOfSubcarriers x K x L x L matrix with the MMSE
11 | % channel estimates
12 | %nbrOfSubcarriers = Number of channel realizations (subcarriers)
13 | %M = Number of antennas per BS
14 | %K = Number of UEs per cell
15 | %L = Number of BSs and cells
16 | %Hbuilder_SC = Kmax_SC x L_SC x L_SC matrix, with elements of custom
17 | %LinkGeometry class, which contains information about arrays, clusters and
18 | %angles/elevations of arrival/departure for the links
19 | %Pmax_SC = SC transmit power
20 | %center_frequency_SC = center frequency of small cell layer
21 | %
22 | %OUTPUT:
23 | %
24 | %SE_DL_SC = K x L matrix of spectral efficiencies [b/s/Hz] calculated using
25 | %OMP approach
26 | %
27 |
28 | %Prepare to store simulation results for spectral efficiencies
29 | SE_DL_SC = zeros(K,L);
30 |
31 |
32 | %% Go through all channel realizations
33 | for n = 1:nbrOfSubcarriers
34 |
35 | %Go through all cells
36 | for j = 1:L
37 |
38 | %Extract channel realizations from all UEs to BS j
39 | Hhatallj = reshape(Hhat(:,n,:,:,j),[M K*L]);
40 |
41 | %Compute MR combining in (4.11)
42 | V_MR = Hhatallj(:,K*(j-1)+1:K*j);
43 |
44 | %Go through all UEs in cell j
45 | for k = 1:K
46 |
47 | if norm(V_MR(:,k))>0
48 |
49 | SE_DL_SC(k,j) = SE_DL_SC(k,j) + ...
50 | functionComputeSE_OMP(Hbuilder_SC(k,j,j), ...
51 | H(:,n,k,j,j), Pmax_SC/2, center_frequency_SC);
52 |
53 | end
54 |
55 | end
56 |
57 | end
58 |
59 | end
60 |
61 | SE_DL_SC = SE_DL_SC / nbrOfSubcarriers; %average over subcarriers
62 |
--------------------------------------------------------------------------------
/Code/functionComputeSE_OMP.m:
--------------------------------------------------------------------------------
1 | function [SE_OMP] = functionComputeSE_OMP(Hbuilder_SC, Hh, ...
2 | Pmax_SC, center_frequency_SC)
3 | %
4 | %This function is used to compute spectral efficiency of TDD MIMO system
5 | %with hybrid or analog beamforming in place. It uses the approach proposed
6 | %in [1] which decouples the optimizations for the precoding and combining
7 | %weights. It first uses the orthogonal matching pursuit algorithm to derive
8 | %the precoding weights. Once the precoding weights are computed,
9 | %the result is then used to obtain the corresponding combining weights.
10 | %
11 | %References:
12 | %[1] Oma El Ayach, et al. Spatially Sparse Precoding in Millimeter wave
13 | %MIMO Systems, IEEE Transactions on Wireless Communications, Vol. 13,
14 | %No. 3, March 2014.
15 | %[2] https://www.mathworks.com/help/phased/examples/introduction-to-hybrid-
16 | %beamforming.html
17 | %
18 | %INPUT:
19 | %
20 | %Hbuilder_SC = Kmax_SC x L_SC x L_SC matrix, with elements of custom
21 | %LinkGeometry class, which contains information about arrays, clusters and
22 | %angles/elevations of arrival/departure for the links
23 | %Hh = channel realization for the particular channel between UE k in cell j
24 | %and the BS in cell j for subcarrier n (H(:,n,k,j,j))
25 | %Pmax_SC = SC transmit power
26 | %center_frequency_SC = center frequency of small cell layer
27 | %
28 | %OUTPUT:
29 | %
30 | %SE_OMP = spectral efficiency for particular link, calculated using
31 | %Orthogonal Matching Pursuit approach (OMP)
32 | %
33 |
34 | Nt = max(size(Hh));
35 | NtRF = 1;
36 |
37 | Nr = min(size(Hh));
38 | NrRF = 1;
39 |
40 | Ns = 1;
41 |
42 | fc = center_frequency_SC;
43 |
44 | At = steervec(Hbuilder_SC.tx_array.element_position,rad2deg([Hbuilder_SC.AoD;...
45 | Hbuilder_SC.EoD]));
46 | Ar = steervec(Hbuilder_SC.rx_array.element_position,rad2deg([Hbuilder_SC.AoA;...
47 | Hbuilder_SC.EoA]));
48 |
49 | [Fbb,Frf] = helperOMPHybridPrecodingWeights(Hh,NtRF,Ns,At);
50 | [Fbb,Frf,Wbb,Wrf] = helperOMPHybridWeights(Hh,NtRF,NrRF,Ns,At,Ar,1/(db2pow(sqrt(Pmax_SC))/2));
51 |
52 | SE_OMP = helperComputeSpectralEfficiency(Hh,Fbb*Frf,Wrf*Wbb,Ns,db2pow(sqrt(Pmax_SC))/2);
53 |
54 | %%Plot array patterns
55 |
56 | % txarray1 = phased.ConformalArray(...
57 | % 'ElementPosition',Hbuilder_SC.tx_array.element_position,...
58 | % 'ElementNormal',ones(2,Nt));
59 | %
60 | % txarray2 = phased.PartitionedArray(...
61 | % 'Array',txarray1,...
62 | % 'SubarraySelection',ones(NtRF,Nt),...
63 | % 'SubarraySteering','Custom');
64 |
65 | %(Conformal array) The beam pattern of the hybrid weights is shown below
66 | % figure(72);
67 | % pattern(txarray1,fc,-180:180,-90:90,...
68 | % 'Type','powerdb',...
69 | % 'Weights',Frf'*Fbb');
70 |
71 | %(PartitionedArray) The beam pattern of the hybrid weights is shown below
72 | % figure(73);
73 | % pattern(txarray2,fc,-180:180,-90:90,...
74 | % 'Type','efield',...
75 | % 'ElementWeights',Frf'*Fbb');
--------------------------------------------------------------------------------
/Code/functionComputeSE_UL.m:
--------------------------------------------------------------------------------
1 | function [SE_RZF] = functionComputeSE_UL(H,Hhat,C,tau_c,tau_p,...
2 | nbrOfRealizations,M,K,L,p,kappatUE,kapparBS)
3 | %This function is used to compute UL SE for RZF receive combining scheme
4 | %based on Theorem 6.2.
5 | %
6 | %INPUT:
7 | %
8 | %H = M x nbrOfRealizations x K x L x L matrix with the
9 | % exact channel realizations
10 | %Hhat = M x nbrOfRealizations x K x L x L matrix with the
11 | % channel estimates
12 | %C = M x M x K x L x L matrix with estimation error
13 | % correlation matrices
14 | %tau_c = Length of coherence block
15 | %tau_p = Length of pilot sequences
16 | %nbrOfRealizations = Number of channel realizations
17 | %M = Number of antennas per BS
18 | %K = Number of UEs per cell
19 | %L = Number of BSs and cells
20 | %p = Uplink transmit power per UE (same for everyone)
21 | %kappatUE = Hardware quality of the UEs' transmitters
22 | %kapparBS = Hardware quality of the BSs' receivers
23 | %
24 | %OUTPUT:
25 | %
26 | %SE_RZF = K x L matrix, where element (k,l) is the uplink SE of UE k in
27 | %cell l achieved with RZF combining
28 | %
29 |
30 |
31 | %Store identity matrices of different sizes
32 | eyeK = eye(K);
33 | eyeM = eye(M);
34 |
35 | %Compute sum of all estimation error correlation matrices at every BS
36 | C_totM = reshape(p*sum(sum(C,3),4),[M M L]);
37 |
38 | %Compute the pre-log factor assuming only uplink transmission
39 | prelogFactor = (tau_c-tau_p)/(tau_c);
40 |
41 | %Prepare to store simulation results for signal gains
42 | signal_MR = zeros(K,L);
43 | signal_RZF = zeros(K,L);
44 | signal_MMMSE = zeros(K,L);
45 |
46 | %Prepare to store simulation results for norms of combining vectors
47 | combiningNorm_MR = zeros(K,L);
48 | combiningNorm_RZF = zeros(K,L);
49 | combiningNorm_MMMSE = zeros(K,L);
50 |
51 | %Prepare to store simulation results for sum interference powers
52 | interf_MR = zeros(K,L);
53 | interf_RZF = zeros(K,L);
54 | interf_MMMSE = zeros(K,L);
55 |
56 | %Prepare to store simulation results for sum impairment-caused interference
57 | impair_MR = zeros(K,L);
58 | impair_RZF = zeros(K,L);
59 | impair_MMMSE = zeros(K,L);
60 |
61 |
62 | %% Go through all channel realizations
63 | for n = 1:nbrOfRealizations
64 |
65 | %Go through all cells
66 | for j = 1:L
67 |
68 | %Extract channel realizations from all users to BS j
69 | Hallj = reshape(H(:,n,:,:,j),[M K*L]);
70 |
71 | %Extract channel estimate realizations from all UEs to BS j
72 | Hhatallj = reshape(Hhat(:,n,:,:,j),[M K*L]);
73 |
74 | %Compute MR combining in (4.11)
75 | V_MR = Hhatallj(:,K*(j-1)+1:K*j);
76 |
77 | %Compute RZF combining in (4.9)
78 | V_RZF = p*V_MR/(p*(V_MR'*V_MR)+eyeK);
79 |
80 | %Compute M-MMSE combining in (4.7)
81 | V_MMMSE = p*(p*(Hhatallj*Hhatallj')+C_totM(:,:,j)+eyeM)\V_MR;
82 |
83 | %Go through all users in cell j
84 | for k = 1:K
85 |
86 | %Check if the UE is active
87 | if norm(V_MR(:,k))>0
88 |
89 | %%MR combining
90 | w = V_MR(:,k)/norm(V_MR(:,k))^2; %Extract combining vector
91 | wrep = repmat(w,[1 K*L]);
92 |
93 | %Compute realizations of the expectations in signal and
94 | %interference terms in (6.32)
95 | signal_MR(k,j) = signal_MR(k,j) + ...
96 | (w'*H(:,n,k,j,j))/nbrOfRealizations;
97 | combiningNorm_MR(k,j) = combiningNorm_MR(k,j) + ...
98 | norm(w).^2/nbrOfRealizations;
99 | interf_MR(k,j) = interf_MR(k,j) + ...
100 | p*sum(abs(w'*Hallj).^2)/nbrOfRealizations;
101 | impair_MR(k,j) = impair_MR(k,j) + ...
102 | p*sum(sum(abs(wrep.*Hallj).^2,1))/nbrOfRealizations;
103 |
104 | %%RZF combining
105 | w = V_RZF(:,k); %Extract combining vector
106 | wrep = repmat(w,[1 K*L]);
107 |
108 | %Compute realizations of the expectations in signal and
109 | %interference terms in (6.32)
110 | signal_RZF(k,j) = signal_RZF(k,j) + ...
111 | (w'*H(:,n,k,j,j))/nbrOfRealizations;
112 | combiningNorm_RZF(k,j) = combiningNorm_RZF(k,j) + ...
113 | norm(w).^2/nbrOfRealizations;
114 | interf_RZF(k,j) = interf_RZF(k,j) + ...
115 | p*sum(abs(w'*Hallj).^2)/nbrOfRealizations;
116 | impair_RZF(k,j) = impair_RZF(k,j) + ...
117 | p*sum(sum(abs(wrep.*Hallj).^2,1))/nbrOfRealizations;
118 |
119 | %%M-MMSE combining
120 | w = V_MMMSE(:,k); %Extract combining vector
121 | wrep = repmat(w,[1 K*L]);
122 |
123 | %Compute realizations of the expectations in signal and
124 | %interference terms in (6.32)
125 | signal_MMMSE(k,j) = signal_MMMSE(k,j) + ...
126 | (w'*H(:,n,k,j,j))/nbrOfRealizations;
127 | combiningNorm_MMMSE(k,j) = combiningNorm_MMMSE(k,j) + ...
128 | norm(w).^2/nbrOfRealizations;
129 | interf_MMMSE(k,j) = interf_MMMSE(k,j) + ...
130 | p*sum(abs(w'*Hallj).^2)/nbrOfRealizations;
131 | impair_MMMSE(k,j) = impair_MMMSE(k,j) + ...
132 | p*sum(sum(abs(wrep.*Hallj).^2,1))/nbrOfRealizations;
133 |
134 | %Take care of special cases when the UE is not active
135 | else
136 |
137 |
138 | %%MR combining
139 | combiningNorm_MR(k,j) = 1;
140 |
141 | %%RZF combining
142 | combiningNorm_RZF(k,j) = 1;
143 |
144 | %%MMMSE combining
145 | combiningNorm_MMMSE(k,j) = 1;
146 |
147 | end
148 |
149 | end
150 |
151 | end
152 |
153 | end
154 |
155 | %Precompute terms that appear multiple times
156 | sigma2 = 1/(kappatUE*kapparBS);
157 | factor1 = 1/kappatUE;
158 | factor2 = (1-kapparBS)/(kappatUE*kapparBS);
159 |
160 | %Compute SEs according to Theorem 6.2 and (6.32)
161 | % SE_MR = real(log2(1+(p*abs(signal_MR).^2) ./ (factor1*interf_MR + ...
162 | % factor2*impair_MR - p*abs(signal_MR).^2 + sigma2*combiningNorm_MR)));
163 | SE_RZF = real(log2(1+(p*abs(signal_RZF).^2) ./ (factor1*interf_RZF + ...
164 | factor2*impair_RZF - p*abs(signal_RZF).^2 + sigma2*combiningNorm_RZF)));
165 | % SE_MMMSE = real(log2(1+(p*abs(signal_MMMSE).^2) ./ (factor1*interf_MMMSE + ...
166 | % factor2*impair_MMMSE - p*abs(signal_MMMSE).^2 +sigma2*combiningNorm_MMMSE)));
--------------------------------------------------------------------------------
/Code/functionComputeSE_UL_SC.m:
--------------------------------------------------------------------------------
1 | function [SE_UL_SC] = functionComputeSE_UL_SC(H,Hhat,nbrOfSubcarriers,...
2 | M,K,L,Hbuilder_SC,Pmax_SC,center_frequency_SC)
3 | %
4 | %This function is used to compute UL spectral efficiency for small cells
5 | %
6 | %INPUT:
7 | %
8 | %H = M x nbrOfSubcarriers x K x L x L matrix with the
9 | % exact channel realizations
10 | %Hhat = M x nbrOfSubcarriers x K x L x L matrix with the MMSE
11 | % channel estimates
12 | %nbrOfSubcarriers = Number of channel realizations (subcarriers)
13 | %M = Number of antennas per BS
14 | %K = Number of UEs per cell
15 | %L = Number of BSs and cells
16 | %Hbuilder_SC = Kmax_SC x L_SC x L_SC matrix, with elements of custom
17 | %LinkGeometry class, which contains information about arrays, clusters and
18 | %angles/elevations of arrival/departure for the links
19 | %Pmax_SC = SC transmit power
20 | %center_frequency_SC = center frequency of small cell layer
21 | %
22 | %OUTPUT:
23 | %
24 | %SE_UL_SC = K x L matrix with spectral efficiencies [b/s/Hz] calculated
25 | %using OMP approach
26 | %
27 |
28 |
29 | %Prepare to store spectral efficiencies
30 | SE_UL_SC = zeros(K,L);
31 |
32 | %% Go through all channel realizations
33 | for n = 1:nbrOfSubcarriers
34 |
35 | %Go through all cells
36 | for j = 1:L
37 |
38 | %Extract channel realizations from all UEs to BS j
39 | Hhatallj = reshape(Hhat(:,n,:,:,j),[M K*L]);
40 |
41 | %Compute MR combining in (4.11)
42 | V_MR = Hhatallj(:,K*(j-1)+1:K*j);
43 |
44 | %Go through all UEs in cell j
45 | for k = 1:K
46 |
47 | if norm(V_MR(:,k))>0
48 |
49 | SE_UL_SC(k,j) = SE_UL_SC(k,j) + ...
50 | functionComputeSE_OMP(Hbuilder_SC(k,j,j),...
51 | H(:,n,k,j,j), Pmax_SC/2, center_frequency_SC);
52 |
53 | end
54 |
55 | end
56 |
57 | end
58 |
59 | end
60 |
61 |
62 |
63 | SE_UL_SC = SE_UL_SC / nbrOfSubcarriers; %average over subcarriers
64 |
--------------------------------------------------------------------------------
/Code/functionNetworkSetup_Quadriga.m:
--------------------------------------------------------------------------------
1 | function [H,Rest,activeUEs,pilotPattern,H_SC,Rest_SC,activeUEs_SC,...
2 | pilotPattern_SC,SCpositions,SCindex,Hbuilder_SC,SCindex_rnd,size_hex] = ...
3 | functionNetworkSetup_Quadriga(L,SCdrop,Kdrop,Kdrop_SC,B,B_SC,...
4 | noiseVariancedBm,noiseVariancedBm_SC,Kmax,Kmax_SC,f,M,M_SC,...
5 | polarizations,polarizations_SC,center_frequency,center_frequency_SC,...
6 | nbrOfSubs, nbrOfSubs_SC)
7 | %This function generates the channel realizations between UEs at random
8 | %locations and the BSs/SCs. BSs and SCs with cylindrical arrays and channel
9 | %are generated using QuaDRiGa from the Fraunhofer Heinrich Hertz Institute.
10 | %
11 | %The 38.901 Urban Macrocell NLOS scenario is used for channel modeling of
12 | %macro cells.
13 | %The 38.901 Urban Microcell LOS scenario is used for channel modeling of
14 | %small cells.
15 | %
16 | %QuaDRiGa needs to be installed separately (http://www.quadriga-channel-
17 | %model.de)
18 | %and is delivered with a separate license. This function has been tested
19 | %using QuaDRiGa version 2.0.0-664.
20 | %
21 | %INPUT:
22 | %L = Number of BSs / macro cells
23 | %SCdrop = Number of SCs to be dropped within radius around BS
24 | %Kdrop = Number of UEs (including SCs) to be dropped within
25 | % radius around BS
26 | %Kdrop_SC = Number of UEs to be dropped within radius around SC
27 | %B = Bandwidth in Hz of macro layer
28 | %B_SC = Bandwidth in Hz of small cell layer
29 | %noiseVariancedBm = Noise variance in dBm of macro layer
30 | %noiseVariancedBm_SC = Noise variance in dBm of small cell layer
31 | %Kmax = Maximum number of UEs served by a BS
32 | %Kmax_SC = Maximum number of UEs served by a SC
33 | %f = Pilot reuse factor (macro cells), giving pilot
34 | % length Kmax*f
35 | %M = Number of BS antennas
36 | %M_SC = Number of SC antennas
37 | %polarizations = Select number of antenna polarizations (1 or 2) for
38 | % macro layer
39 | %polarizations_SC = Select number of antenna polarizations (1 or 2) for
40 | % small cell layer
41 | %center_frequency = Center frequency for macro layer
42 | %center_frequency_SC = Center frequency for small cell layer
43 | %nbrOfSubs = number of subcarriers, macro layer
44 | %nbrOfSubs_SC = number of subcarriers, small cell layer
45 | %
46 | %OUTPUT:
47 | %H = M x nSubcarriers x K x L x L matrix with the channel
48 | % realizations over nSubcarriers subcarriers at one time instance
49 | %Rest = M x M x K x L x L matrix with estimates of the spatial
50 | % correlation matrices for all UEs in the network.
51 | % Rest(:,:,k,j,l) is the correlation matrix for the channel
52 | % between UE k in cell j and the BS in cell l.
53 | %activeUEs = Kmax x L with zeros and ones. activeUEs(k,l)==1 means that
54 | % pilot k is used by a UE in cell l
55 | %pilotPattern = pilot pattern for BSs
56 | %H_SC = M_SC x nSubcarriers_SC x K_SC x L_SC x L_SC matrix with the channel
57 | % realizations over nSubcarriers subcarriers at one time
58 | % instance for small cell layer
59 | %Rest_SC = M_SC x M_SC x K_SC x L_SC x L_SC matrix with estimates of the
60 | % spatial correlation matrices for all UEs in small cell layer
61 | %activeUEs_SC = Kmax_SC x L_SC with zeros and ones. activeUEs_SC(k,l)==1
62 | % means that pilot k is used by a UE in small cell l
63 | %pilotPattern_SC = pilot pattern for SCs
64 | %SCpositions = Positions of small cells (macrocell UEs)
65 | %SCindex = Indexes of UEs in macro cell to be 'backhauls' for small cells
66 | %Hbuilder_SC = Kmax_SC x L_SC x L_SC matrix, with elements of custom
67 | %LinkGeometry class, which contains information about arrays, clusters and
68 | %angles/elevations of arrival/departure for the links
69 | %SCindex_rnd = array of SC indexes corresponding to BS UEs which are SC
70 | % backhauls
71 | %size_hex = lenght in [m] of macro hexagon's side
72 | %
73 |
74 | %% Create two new Quadriga layouts: one for macro layer (lay), one for
75 | %small cells (lay_SC)
76 |
77 | %Output simulation progress
78 | disp('Creating network layout with Quadriga');
79 |
80 | %Set irrelevant parameters
81 | s = qd_simulation_parameters;
82 | s.sample_density = 1;
83 | s.use_absolute_delays = 1;
84 |
85 | %Set irrelevant parameters for SC
86 | s_SC = qd_simulation_parameters;
87 | s_SC.sample_density = 1;
88 | s_SC.use_absolute_delays = 1;
89 |
90 | %Set center frequency
91 | %center_frequency = 4e9;
92 | s.center_frequency = center_frequency;
93 |
94 | %Set center frequency for SC
95 | %center_frequency_SC = 28e9;
96 | s_SC.center_frequency = center_frequency_SC;
97 |
98 | %Number of subcarriers
99 | nbrOfSubcarriers = nbrOfSubs;
100 |
101 | %Number of subcarriers for SC
102 | nbrOfSubcarriers_SC = nbrOfSubs_SC;
103 |
104 | %Create new layout from general parameters
105 | lay = qd_layout(s);
106 |
107 | %Create new layout from general parameters for SC
108 | lay_SC = qd_layout(s_SC);
109 |
110 | %Generate BSs
111 | lay.no_tx = L;
112 |
113 | %Generate SCs
114 | L_SC = SCdrop * L; % Total count of small cells in core macro cells
115 | lay_SC.no_tx = L_SC;
116 |
117 | %Set BS and SC height
118 | BS_height = 25;
119 | SC_height = 10;
120 |
121 | %Set BS heights
122 | lay.tx_position(3,:) = BS_height;
123 |
124 | %Set SC heights
125 | lay_SC.tx_position(3,:) = SC_height;
126 |
127 |
128 | %% Deploy BSs
129 |
130 | %Minimum distance between BSs and its UEs
131 | minDistance = 35;
132 |
133 | %Max and min distances between SC and its UE
134 | maxDistance_SC = 50;
135 | minDistance_SC = 10;
136 |
137 | %Set the distance between BSs, in [m]
138 | interSiteDistance = 200;
139 |
140 | %Get the size of each cell hexagon (distance between the center and each
141 | %corner)
142 | size_hex = interSiteDistance / sqrt(3);
143 |
144 | %Horizontal and vertical spacing of hexagonal grid (between hexagon
145 | %centers, i.e. base stations)
146 | hs = sqrt(3) * size_hex;
147 | vs = 3/2 * size_hex;
148 |
149 | %Deploy BSs on hexagonal grid
150 | % BSpositions = [...
151 | % 3/2*hs + 1i*size_hex;... %1
152 | % 5/2*hs + 1i*size_hex;... %2
153 | % 7/2*hs + 1i*size_hex;... %3
154 | % hs + 1i*(size_hex+vs);... %4
155 | % 2*hs + 1i*(size_hex+vs);... %5
156 | % 3*hs + 1i*(size_hex+vs);... %6
157 | % 4*hs + 1i*(size_hex+vs);... %7
158 | % 1/2*hs + 1i*(size_hex+2*vs) ;... %8
159 | % 3/2*hs + 1i*(size_hex+2*vs);... %9
160 | % 5/2*hs + 1i*(size_hex+2*vs);... %10
161 | % 7/2*hs + 1i*(size_hex+2*vs);... %11
162 | % 9/2*hs + 1i*(size_hex+2*vs);... %12
163 | % hs + 1i*(size_hex+3*vs);... %13
164 | % 2*hs + 1i*(size_hex+3*vs);... %14
165 | % 3*hs + 1i*(size_hex+3*vs);... %15
166 | % 4*hs + 1i*(size_hex+3*vs);... %16
167 | % 3/2*hs + 1i*(size_hex+4*vs);... %17
168 | % 5/2*hs + 1i*(size_hex+4*vs);... %18
169 | % 7/2*hs + 1i*(size_hex+4*vs)]; %19
170 |
171 | %Small grid - for faster debugging
172 | BSpositions = [...
173 | 3/2*hs + 1i*size_hex;... %1
174 | 5/2*hs + 1i*size_hex;... %2
175 | hs + 1i*(size_hex+vs);... %4
176 | 2*hs + 1i*(size_hex+vs);... %5
177 | 3*hs + 1i*(size_hex+vs);... %6
178 | 3/2*hs + 1i*(size_hex+2*vs);... %9
179 | 5/2*hs + 1i*(size_hex+2*vs)]; %10
180 |
181 | for j = 1:length(BSpositions)
182 |
183 | lay.tx_position(1:2,j) = [real(BSpositions(j)); imag(BSpositions(j))];
184 |
185 | end
186 |
187 |
188 | %% Create a circular antenna array for each BS
189 | M_V = 5; %Number of vertical antennas
190 | M_H = M/M_V; %Number of antennas on each horizontal circle
191 |
192 | %Define the antenna spacing (in number of wavelengths)
193 | antennaSpacing = 1/2; %Half wavelength distance
194 |
195 | if polarizations == 1
196 | PolarizationIndicator = 1; %Single polarization (vertical) antennas
197 | elseif polarizations == 2
198 | PolarizationIndicator = 3; %Dual +/-45deg polarized antennas
199 | end
200 |
201 | %Compute height of array
202 | arrayHeight = (M_V-1)*antennaSpacing*3e8/center_frequency;
203 |
204 | circumference = M_H*antennaSpacing*3e8/center_frequency;
205 | radius = circumference/(2*pi);
206 | delta_angle = 2*pi/M_H;
207 |
208 | %Output simulation progress
209 | disp('Creating macro cell arrays with Quadriga');
210 |
211 | %Go through all BSs
212 | for b = 1:L
213 |
214 | %Create rectangular array of size M_V x M_H
215 | lay.tx_array(b) = qd_arrayant('3gpp-3d', M_V, M_H, center_frequency,...
216 | PolarizationIndicator);
217 |
218 | %Place antennas on a circle and rotate radiation patters
219 | for i = 1:M_V
220 | for j = 1:M_H
221 | indices = (i-1)*M_H + j;
222 | angle = (j-1)*delta_angle;
223 | lay.tx_array(b).rotate_pattern(rad2deg(angle), 'z', indices, 0);
224 | lay.tx_array(b).element_position(1, indices) = radius*cos(angle);
225 | lay.tx_array(b).element_position(2, indices) = radius*sin(angle);
226 | lay.tx_array(b).element_position(3, indices) = ...
227 | (i-1)*antennaSpacing*3e8/center_frequency - arrayHeight/2;
228 | end
229 | end
230 | end
231 |
232 | %Plot BS cylindrical array
233 | figure(41);
234 | BS_txarray = phased.ConformalArray(...
235 | 'ElementPosition',lay.tx_array(1).element_position,...
236 | 'ElementNormal',zeros(2,M));
237 | viewArray(BS_txarray)
238 |
239 |
240 | %% Compute wrapping positions
241 |
242 | %Compute seven (six + core) alternatives of the BS locations when using
243 | %wrap around for hexagonal grid
244 | % wrapLocations = [...
245 | % 0 + 1i*0 ...
246 | % 7/2*hs - 1i*3*vs ...
247 | % 4*hs + 1i*2*vs ...
248 | % 1/2*hs + 1i*5*vs ...
249 | % -7/2*hs + 1i*3*vs ...
250 | % -4*hs - 1i*2*vs ...
251 | % -1/2*hs - 1i*5*vs];
252 |
253 | %wrapping for small hex grid
254 | wrapLocations = [...
255 | 0 + 1i*0 ...
256 | 2*hs - 1i*2*vs ...
257 | 5/2*hs + 1i*1*vs ...
258 | 1/2*hs + 1i*3*vs ...
259 | -2*hs + 1i*2*vs ...
260 | -5/2*hs - 1i*1*vs ...
261 | -1/2*hs - 1i*3*vs];
262 |
263 |
264 | %Compute the exact dimension of the square/hexagon where the users are located
265 | maxDistance = vs; %could be interSiteDistance
266 |
267 | %Calculate BSpositionsWrapped
268 | BSpositionsWrapped = zeros(L,length(wrapLocations));
269 | for l = 1:L
270 | BSpositionsWrapped(l,:) = BSpositions(l) + wrapLocations;
271 | end
272 |
273 | %% Distribution UEs and SCs in macro cells
274 |
275 | %Prepare to put out UEs in the cells
276 | UEpositions = zeros(Kdrop,L);
277 | UEpositionsWrapped = zeros(Kdrop,L,length(wrapLocations));
278 | perBS = zeros(L,1);
279 |
280 | %Select UEs which would be small cells
281 | SCindex = zeros(SCdrop, L); % Indexes of UEs in macro cell to be
282 | %'backhauls' for small cells
283 | SCpositions = zeros(SCdrop, L); % Positions of small cells (macrocell UEs)
284 | SCpositionsWrapped = zeros(SCdrop,L,length(wrapLocations));
285 |
286 | %Go through all the cells
287 | for l = 1:L
288 |
289 | %Put out K UEs in the cell, uniformly at random. The procedure is
290 | %iterative since UEs that do not satisfy the minimum distance are
291 | %replaced with new UEs
292 | while perBS(l)=minDistance);
302 |
303 | %Store new UEs
304 | UEpositions(perBS(l)+1:perBS(l)+length(posXY),l) = posXY + ...
305 | BSpositions(l);
306 | perBS(l) = perBS(l)+length(posXY);
307 |
308 | end
309 |
310 | min_dist_btw_SC = 50;
311 | dist_btw_SC = zeros(SCdrop-1,1);
312 | while min(dist_btw_SC) < min_dist_btw_SC
313 | SCindex(:,l) = randperm(Kdrop,SCdrop);
314 | SCpositions(:,l) = UEpositions(SCindex(:,l),l);
315 | for i = 1:length(SCpositions(:,l))-1
316 | dist_btw_SC(i) = norm(SCpositions(i+1,l) - SCpositions(i,l));
317 | end
318 | end
319 | if SCdrop==1 %case of only one SC per macro and empty dist_btw_SC
320 | SCindex(:,l) = randperm(Kdrop,SCdrop);
321 | SCpositions(:,l) = UEpositions(SCindex(:,l),l);
322 | end
323 |
324 | %Create alternative UE positions using wrap around
325 | for k = 1:Kdrop
326 |
327 | UEpositionsWrapped(k,l,:) = UEpositions(k,l) + wrapLocations;
328 |
329 | end
330 |
331 | for sc = 1:SCdrop
332 |
333 | SCpositionsWrapped(sc,l,:) = SCpositions(sc,l) + wrapLocations;
334 |
335 | end
336 |
337 | end
338 |
339 | %generate tx_positions for Quadriga's small cell layer layout
340 | for l = 1:L_SC
341 |
342 | l_sc = mod((l-1),SCdrop) + 1; %index of SC under BS (1..Kdrop_SC)
343 | l_bs = floor((l-1)/SCdrop) + 1; %index of BS (1..L)
344 |
345 | lay_SC.tx_position(1:2,l) = [real(SCpositions(l_sc,l_bs)); ...
346 | imag(SCpositions(l_sc,l_bs))];
347 |
348 | end
349 |
350 | %% Create a circular antenna array for each SC
351 |
352 | M_V_SC = 8; %Number of vertical antennas of SC
353 | M_H_SC = M_SC/M_V_SC; %Number of antennas on each horizontal circle of SC
354 | P_V_SC = 1; %Number of vertical panels of SC
355 | P_H_SC = 1; %Number of horizontal panels of SC
356 |
357 | %Define the antenna and panel spacing (in number of wavelengths)
358 | antennaSpacing_SC = 1/2; %Half wavelength distance
359 | panelSpacing_SC = 2; %Double wavelength distance
360 |
361 | if polarizations_SC == 1
362 | PolarizationIndicator_SC = 1; %Single polarization (vertical) antennas
363 | elseif polarizations_SC == 2
364 | PolarizationIndicator_SC = 3; %Dual +/-45deg polarized antennas
365 | end
366 |
367 | %Compute height of array
368 | arrayHeight_SC = (M_V_SC-1)*antennaSpacing_SC*3e8/center_frequency_SC;
369 |
370 | circumference_SC = M_H_SC*antennaSpacing_SC*3e8/center_frequency_SC;
371 | radius_SC = circumference_SC/(2*pi);
372 | delta_angle_SC = 2*pi/M_H_SC;
373 |
374 | %Output simulation progress
375 | disp('Creating small cell arrays with Quadriga');
376 |
377 | %Go through all SCs
378 | for b = 1:L_SC %loop over SCs
379 |
380 | %Create rectangular array of size M_V x M_H
381 | lay_SC.tx_array(b) = qd_arrayant('3gpp-mmw', M_V_SC, M_H_SC, ...
382 | center_frequency_SC, PolarizationIndicator_SC, 0, ...
383 | antennaSpacing_SC, P_V_SC, P_H_SC, panelSpacing_SC, panelSpacing_SC);
384 |
385 | %Place antennas on a circle and rotate radiation patters
386 | for i = 1:M_V_SC
387 | for j = 1:M_H_SC
388 | indices_SC = (i-1)*M_H_SC + j;
389 | angle_SC = (j-1)*delta_angle_SC;
390 | lay_SC.tx_array(b).rotate_pattern(rad2deg(angle_SC), 'z', ...
391 | indices_SC, 0);
392 | lay_SC.tx_array(b).element_position(1, indices_SC) = ...
393 | radius_SC*cos(angle_SC);
394 | lay_SC.tx_array(b).element_position(2, indices_SC) = ...
395 | radius_SC*sin(angle_SC);
396 | lay_SC.tx_array(b).element_position(3, indices_SC) = ...
397 | (i-1)*antennaSpacing_SC*3e8/center_frequency_SC - ...
398 | arrayHeight_SC/2;
399 | end
400 | end
401 | end
402 |
403 | %Plot SC cylindrical array
404 | figure(42);
405 | SC_txarray = phased.ConformalArray(...
406 | 'ElementPosition',lay_SC.tx_array(1).element_position,...
407 | 'ElementNormal',zeros(2,M_SC));
408 | viewArray(SC_txarray)
409 |
410 |
411 | %% Distributing users in small cells
412 | %Prepare to put out UEs in small cells
413 | UEpositions_SC = zeros(Kdrop_SC,L_SC);
414 | UEpositionsWrapped_SC = zeros(Kdrop_SC,L_SC,length(wrapLocations));
415 | perSC = zeros(L_SC);
416 |
417 | %Go through all small cells
418 | %for sc = 1:SCdrop %loop over small cells of one macro cell
419 | %for l = 1:L %loop over macro cells
420 | for l = 1:L_SC % global index of SC (1..L_SC)
421 | l_sc = mod((l-1),SCdrop) + 1; % index of SC under BS (1..Kdrop_SC)
422 | l_bs = floor((l-1)/SCdrop) + 1; % index of BS (1..L)
423 |
424 | %Put out K_SC UEs in every small cell, uniformly at random. The procedure
425 | %is iterative since UEs that do not satisfy the minimum distance are
426 | %replaced with new UEs
427 | while perSC(l)=minDistance_SC);
437 |
438 | %Store new UEs
439 | UEpositions_SC(perSC(l)+1:perSC(l)+length(posXY_SC),l) = ...
440 | posXY_SC + SCpositions(l_sc,l_bs);
441 | perSC(l) = perSC(l)+length(posXY_SC);
442 |
443 | end
444 |
445 | %Create alternative UE positions using wrap around
446 | for k_sc = 1:Kdrop_SC
447 |
448 | UEpositionsWrapped_SC(k_sc,l,:) = UEpositions_SC(k_sc,l) + ...
449 | wrapLocations;
450 |
451 | end
452 | end
453 |
454 |
455 |
456 | %% Plot network layout (all cells + all users)
457 |
458 | figure(31);
459 |
460 | aH = axes;
461 | scatter(aH,real(BSpositions), imag(BSpositions),15,'green');
462 | hold on;
463 |
464 | scatter(aH,real(BSpositionsWrapped(:)), imag(BSpositionsWrapped(:)));
465 | aH.YDir = 'reverse';
466 | %aH.XLim = [0 1800];
467 | %aH.YLim = [0 1600];
468 |
469 | voronoi(real([BSpositions' BSpositionsWrapped(:)']'), ...
470 | imag([BSpositions' BSpositionsWrapped(:)']'));
471 | scatter(aH,real(UEpositions(:)), imag(UEpositions(:)),15,'green');
472 | scatter(aH,real(UEpositionsWrapped(:)), imag(UEpositionsWrapped(:)));
473 |
474 | scatter(aH,real(SCpositionsWrapped(:)), ...
475 | imag(SCpositionsWrapped(:)),15,'red');
476 | scatter(aH,real(SCpositionsWrapped(:)), ...
477 | imag(SCpositionsWrapped(:)),800,'red');
478 |
479 | scatter(aH,real(UEpositionsWrapped_SC(:)), ...
480 | imag(UEpositionsWrapped_SC(:)),15,'black');
481 | hold off;
482 |
483 |
484 | %% Configure macro UEs
485 |
486 | Ktotal = Kdrop*L*length(wrapLocations); %Total number of macro UEs,
487 | %including SCs.
488 |
489 | %Define macro UEs heights
490 | UE_heights = 1.5*ones(Kdrop,L);
491 | for i=1:L
492 | UE_heights(SCindex(:,i),i) = SC_height;
493 | end
494 | UE_heightsWrapped = repmat(UE_heights,[1 1 length(wrapLocations)]);
495 |
496 | %Figure out indicies of Quadriga's macro layer layout receivers, which are
497 | %backhauls of small cells
498 | K_backhaul = [];
499 | for k = 1:SCdrop
500 | for l = 1:L
501 | for w = 1:length(wrapLocations)
502 | add = (Kdrop*(l-1)+SCindex(k,l))+Kdrop*L*(w-1);
503 | K_backhaul = [K_backhaul add];
504 | end
505 | end
506 | end
507 |
508 | %Generate macro UEs
509 | lay.no_rx = Ktotal;
510 |
511 | %Define macro UE antennas
512 | lay.rx_array = qd_arrayant('omni');
513 | %if we want to change backhaul antennas for SCs
514 | % for k=1:Ktotal
515 | % if ~ismember(k,K_backhaul) %mobile subscribers
516 | % lay.rx_array(1,k) = qd_arrayant('omni');
517 | % else %fixed subscribers
518 | % lay.rx_array(1,k) = qd_arrayant('ula8');
519 | % end
520 | % end
521 |
522 |
523 | %% Simulate channels between macro BSs and their UEs (including SCs)
524 |
525 | % Randomly distribute UEs
526 | lay.rx_position = [real(UEpositionsWrapped(:))'; ...
527 | imag(UEpositionsWrapped(:))'; UE_heightsWrapped(:)'];
528 |
529 | %Define tracks for each UE, assuming a fixed UE location
530 | for k=1:Ktotal
531 | %alternative way
532 | if ~ismember(k,K_backhaul) %mobile subscribers
533 | %lay.track(1,k) = qd_track('linear',50);
534 | lay.track(1,k).generate('linear',50);
535 | lay.track(1,k).name = ['Rx' num2str(k)];
536 | lay.track(1,k).scenario = '3GPP_38.901_UMa_NLOS';
537 | %lay.track(1,k).initial_position = lay.rx_position(:,k);
538 | %lay.track(1,k).positions = t.positions + t.initial_position;
539 | if mod(k,5)==0
540 | lay.track(1,k).set_speed(8.33); % 20% users 30km/h
541 | end
542 | else %fixed/'backhaul' subscribers
543 | %lay.track(1,k) = qd_track('linear',0,0);
544 | lay.track(1,k).generate('linear',0,0);
545 | lay.track(1,k).name = ['Rx' num2str(k)];
546 | lay.track(1,k).scenario = '3GPP_38.901_UMa_NLOS';
547 | %lay.track(1,k).initial_position = lay.rx_position(:,k);
548 | %lay.track(1,k).positions = t.positions + t.initial_position;
549 | lay.track(1,k).no_snapshots = 1;
550 | end
551 | end
552 |
553 | %Generate pilot patterns
554 | if f == 1
555 |
556 | pilotPattern = ones(L,1);
557 |
558 | elseif f == 2
559 |
560 | pilotPattern = kron(ones(2,1),[1; 2; 1; 2; 2; 1; 2; 1]); %Only works
561 | %for 16 BSs
562 |
563 | %for L other than 16 do a simple alternation
564 | if L ~= 16
565 | pilotPattern = repmat([1; 2],floor(L/2),1);
566 | if mod(L,2)~=0
567 | pilotPattern = [pilotPattern; 1];
568 | end
569 | end
570 |
571 | end
572 |
573 |
574 | %Randomize pilot allocation in each cell
575 | randOrder = zeros(Kmax*f,L);
576 |
577 | for j = 1:L
578 |
579 | randOrder(1+(pilotPattern(j)-1)*Kmax:pilotPattern(j)*Kmax,j) = ...
580 | randperm(Kmax)+(pilotPattern(j)-1)*Kmax;
581 |
582 | end
583 |
584 |
585 | %Compute variance and standard deviation of the noise
586 | noiseVar = 10^(noiseVariancedBm/10);
587 | noiseStd = sqrt(noiseVar);
588 |
589 | %Output simulation progress
590 | disp('Generating channel realizations with Quadriga');
591 |
592 | %Prepare to store channel realizations
593 | H = zeros(M,nbrOfSubcarriers,Kmax,L,L);
594 | Rest = zeros(M,M,Kmax,L,L);
595 | perBS = zeros(L,1);
596 | activeUEs = zeros(Kmax,L);
597 |
598 | UEindex_rnd = zeros(Kdrop,L);
599 | UEbestBS_rnd = zeros(Kdrop,L);
600 |
601 | %% Go through all macro cells
602 | for j = 1:L
603 |
604 | %Output simulation progress
605 | disp([num2str(j) ' cells generated out of ' num2str(L)]);
606 |
607 | %Go through all UEs of macro cell j
608 | for k = 1:Kdrop
609 |
610 | Huser = zeros(M,nbrOfSubcarriers,1,1,L);
611 | Ruser = zeros(M,M,1,1,L);
612 |
613 | %Extract the channels from UE k of macro cell j to *all* BSs
614 | for l = 1:L
615 |
616 | [~,minr] = min(abs(UEpositionsWrapped(k,j,:)-BSpositions(l)));
617 |
618 | userind = k+(j-1)*Kdrop+(minr-1)*Kdrop*L;
619 |
620 | [ h_channel, ~ ] = lay.get_channels_seg(l, userind);
621 | Hextract = h_channel.fr(B, nbrOfSubcarriers);
622 |
623 | % indicies of Hextract are [Rx-Antenna , Tx-Antenna ,
624 | %Carrier-Index]
625 | Huser(:,:,1,1,l) = reshape(mean(Hextract(:,:,:,1),1),...
626 | [M nbrOfSubcarriers])/noiseStd;
627 | Ruser(:,:,1,1,l) = diag(mean(abs(Huser(:,:,1,1,l)).^2,2) / ...
628 | noiseVar);
629 |
630 | end
631 |
632 | %Determine which BS should serve the UE
633 | [~,bestBS] = max(mean(sum(abs(Huser(:,:,1,1,:)).^2,1),2));
634 |
635 | %Check if the selected BS has pilots available
636 | if perBS(bestBS) example. In the system diagram
16 | % shown below, each antenna is connected to a unique transmit and receive
17 | % (TR) module.
18 | %
19 | % <<../MIMOAllDigitalBF.png>>
20 | %
21 | % The ever growing demand for high data rate and more user capacity
22 | % increases the need to use the spectrum more efficiently. As a result, the
23 | % next generation, 5G, wireless systems will use millimeter wave (mmWave)
24 | % band to take advantage of its wider bandwidth. In addition, 5G systems
25 | % deploy large scale antenna arrays to mitigate severe propagation loss in
26 | % the mmWave band. However, these configurations bring their unique
27 | % technical challenges.
28 | %
29 | % Compared to current wireless systems, the wavelength in the mmWave band
30 | % is much smaller. Although this allows an array to contain more elements
31 | % with the same physical dimension, it becomes much more expensive to
32 | % provide one TR module for each antenna element. Hence, as a compromise, a
33 | % TR switch is often used to supply multiple antenna elements. This is the
34 | % same concept as the subarray configuration used in the radar community.
35 | % One such configuration is shown in the following figure.
36 | %
37 | % <<../MIMOHybridBF.png>>
38 | %
39 | % The figure above shows that on the transmit side, the number of TR
40 | % switches, $N_{TRF}$, is smaller than the number of antenna elements,
41 | % $N_T$. To provide more flexibility, each antenna element can be connected
42 | % to one or more TR modules. In addition, analog phase shifters can be
43 | % inserted between each TR module and antenna to provide some limited
44 | % steering capability.
45 | %
46 | % The configuration on the receiver side is similar, as shown in the
47 | % figure. The maximum number of data streams, $N_s$, that can be supported
48 | % by this system is the smaller of $N_{TRF}$ and $N_{RRF}$.
49 | %
50 | % In this configuration, it is no longer possible to apply digital weights
51 | % on each antenna element. Instead, the digital weights can only be applied
52 | % at each RF chain. At the element level, the signal is adjusted by analog
53 | % phase shifters, which only changes the phase of the signal. Thus, the
54 | % precoding or combining are actually done in two stages. Because this
55 | % approach performs beamforming in both digital and analog domains, it is
56 | % referred to as hybrid beamforming.
57 | %
58 | %% System Setup
59 | % This section simulates a 64 x 16 MIMO hybrid beamforming system, with a
60 | % 64-element square array with 4 RF chains on the transmitter side and a
61 | % 16-element square array with 4 RF chains on the receiver side.
62 |
63 | Nt = 64;
64 | NtRF = 1;
65 |
66 | Nr = 4;
67 | NrRF = 1;
68 |
69 |
70 | %%
71 | % In this simulation, it is assumed that each antenna is connected to all
72 | % RF chains. Thus, each antenna is connected to 4 phase shifters. Such an
73 | % array can be modeled by partitioning the array aperture into 4 completely
74 | % connected subarrays.
75 |
76 | rng(4096);
77 | c = 3e8;
78 | fc = 28e9;
79 | lambda = c/fc;
80 | txarray = phased.PartitionedArray(...
81 | 'Array',phased.URA([sqrt(Nt) sqrt(Nt)],lambda/2),...
82 | 'SubarraySelection',ones(NtRF,Nt),'SubarraySteering','Custom');
83 | rxarray = phased.PartitionedArray(...
84 | 'Array',phased.URA([sqrt(Nr) sqrt(Nr)],lambda/2),...
85 | 'SubarraySelection',ones(NrRF,Nr),'SubarraySteering','Custom');
86 |
87 | %%
88 | % To maximize the spectral efficiency, each RF chain can be used to send an
89 | % independent data stream. In this case, the system can
90 | % support up to 4 streams.
91 |
92 | %%
93 | % Next, assume a scattering environment with 6 scattering clusters randomly
94 | % distributed in space. Within each cluster, there are 8 closely located
95 | % scatterers with a angle spread of 5 degrees, for a total of 48
96 | % scatterers. The path gain for each scatterer is obtained from a complex
97 | % circular symmetric Gaussian distribution.
98 |
99 | Ncl = 6;
100 | Nray = 8;
101 | Nscatter = Nray*Ncl;
102 | angspread = 5;
103 | % compute randomly placed scatterer clusters
104 | txclang = [rand(1,Ncl)*120-60;rand(1,Ncl)*60-30];
105 | rxclang = [rand(1,Ncl)*120-60;rand(1,Ncl)*60-30];
106 | txang = zeros(2,Nscatter);
107 | rxang = zeros(2,Nscatter);
108 | % compute the rays within each cluster
109 | for m = 1:Ncl
110 | txang(:,(m-1)*Nray+(1:Nray)) = randn(2,Nray)*sqrt(angspread)+txclang(:,m);
111 | rxang(:,(m-1)*Nray+(1:Nray)) = randn(2,Nray)*sqrt(angspread)+rxclang(:,m);
112 | end
113 |
114 | g = (randn(1,Nscatter)+1i*randn(1,Nscatter))/sqrt(Nscatter);
115 |
116 |
117 | %%
118 | % The channel matrix can be formed as
119 |
120 | txpos = getElementPosition(txarray)/lambda;
121 | rxpos = getElementPosition(rxarray)/lambda;
122 | H = scatteringchanmtx(txpos,rxpos,txang,rxang,g);
123 |
124 | %% Hybrid Weights Computation
125 | % In a spatial multiplexing system with all digital beamforming, the signal
126 | % is modulated by a set of precoding weights, propagated through the
127 | % channel, and recovered by a set of combining weights. Mathematically,
128 | % this process can be described by |Y = (X*F*H+N)*W| where |X| is an
129 | % |Ns|-column matrix whose columns are data streams, |F| is an |Ns|
130 | % $\times$ |Nt| matrix representing the precoding weights, |W| is an |Nr|
131 | % $\times$ |Ns| matrix representing the combining weights, |N| is an
132 | % |Nr|-column matrix whose columns are the receiver noise at each element,
133 | % and |Y| is an |Ns|-column matrix whose columns are recovered data
134 | % streams. Since the goal of the system is to achieve better spectral
135 | % efficiency, obtaining the precoding and combining weights can be
136 | % considered as an optimization problem where the optimal precoding and
137 | % combining weights make the product of |F*H*W'| a diagonal matrix so each
138 | % data stream can be recovered independently.
139 | %
140 | % In a hybrid beamforming system, the signal flow is similar. Both the
141 | % precoding weights and the combining weights are combinations of baseband
142 | % digital weights and RF band analog weights. The baseband digital weights
143 | % convert the incoming data streams to input signals at each RF chain and
144 | % the analog weights then convert the signal at each RF chain to the signal
145 | % radiated or collected at each antenna element. Note that the analog
146 | % weights can only contain phase shifts.
147 | %
148 | % Mathematically, it can be written as |F=Fbb*Frf| and |W=Wbb*Wrf|, where
149 | % |Fbb| is an |Ns| $\times$ |NtRF| matrix, |Frf| an |NtRF| $\times$ |Nt|
150 | % matrix, |Wbb| an |NrRF| $\times$ |Ns| matrix, and |Wrf| an |Nr| $\times$
151 | % |NrRF| matrix. Since both |Frf| and |Wrf| can only be used to modify the
152 | % signal phase, there are extra constraints in the optimization process to
153 | % identify the optimal precoding and combining weights. Ideally, the
154 | % resulting combination of |Fbb*Frf| and |Wrf*Wbb| are close approximations
155 | % of |F| and |W| that are obtained without those constraints.
156 | %
157 | % Unfortunately, optimizing all four matrix variables simultaneously is
158 | % quite difficult. Therefore, many algorithms are proposed to arrive at
159 | % suboptimal weights with a reasonable computational load. This example
160 | % uses the approach proposed in [1] which decouples the optimizations for
161 | % the precoding and combining weights. It first uses the orthogonal
162 | % matching pursuit algorithm to derive the precoding weights. Once the
163 | % precoding weights are computed, the result is then used to obtain the
164 | % corresponding combining weights.
165 | %
166 | % Assuming the channel is known, the unconstrained optimal precoding
167 | % weights can be obtained by diagonalizing the channel matrix and
168 | % extracting the first |NtRF| dominating modes. The transmit beam pattern
169 | % can be plotted as.
170 |
171 | F = diagbfweights(H);
172 | F = F(1:NtRF,:);
173 | pattern(txarray,fc,-90:90,-90:90,'Type','efield',...
174 | 'ElementWeights',F','PropagationSpeed',c);
175 |
176 | %%
177 | % The response pattern above shows that even in a multipath environment,
178 | % there are limited number of dominant directions.
179 | %
180 | % The hybrid weights, on the other hand, can be computed as
181 |
182 | At = steervec(txpos,txang);
183 | Ar = steervec(rxpos,rxang);
184 |
185 | Ns = NtRF;
186 | [Fbb,Frf] = helperOMPHybridPrecodingWeights(H,NtRF,Ns,At);
187 |
188 | %%
189 | % The beam pattern of the hybrid weights is shown below
190 |
191 | pattern(txarray,fc,-90:90,-90:90,'Type','efield',...
192 | 'ElementWeights',Frf'*Fbb','PropagationSpeed',c);
193 | %%
194 | % Compared to the beam pattern obtained using the optimal weights, the
195 | % beam pattern using the hybrid weights is similar, especially for dominant
196 | % beams. This means that the data streams can be successfully transmitted
197 | % through those beams using hybrid weights.
198 |
199 | %% Spectral Efficiency Comparison
200 | % One of the system level performance metrics of a 5G system is the
201 | % spectral efficiency. The next section compares the spectral efficiency
202 | % achieved using the optimal weights with that of the proposed hybrid
203 | % beamforming weights. The simulation assumes 1 or 2 data streams as
204 | % outlined in [1]. The transmit antenna array is assumed to be at a base
205 | % station, with a focused beamwidth of 60 degrees in azimuth and 20 degrees
206 | % in elevation. The signal can arrive at the receive array from any
207 | % direction. The resulting spectral efficiency curve is obtained from 50
208 | % Monte-Carlo trials for each SNR.
209 |
210 | snr_param = -40:5:0;
211 | Nsnr = numel(snr_param);
212 | Ns_param = [1 2];
213 | NNs = numel(Ns_param);
214 |
215 | NtRF = 1;
216 | NrRF = 1;
217 |
218 | Ropt = zeros(Nsnr,NNs);
219 | Rhyb = zeros(Nsnr,NNs);
220 | Niter = 50;
221 |
222 | for m = 1:Nsnr
223 | snr = db2pow(snr_param(m));
224 | for n = 1:Niter
225 | % Channel realization
226 | txang = [rand(1,Nscatter)*60-30;rand(1,Nscatter)*20-10];
227 | rxang = [rand(1,Nscatter)*180-90;rand(1,Nscatter)*90-45];
228 | At = steervec(txpos,txang);
229 | Ar = steervec(rxpos,rxang);
230 | g = (randn(1,Nscatter)+1i*randn(1,Nscatter))/sqrt(Nscatter);
231 | H = scatteringchanmtx(txpos,rxpos,txang,rxang,g);
232 |
233 | for k = 1:NNs
234 | Ns = Ns_param(k);
235 | % Compute optimal weights and its spectral efficiency
236 | [Fopt,Wopt] = helperOptimalHybridWeights(H,Ns,1/snr);
237 | Ropt(m,k) = Ropt(m,k)+helperComputeSpectralEfficiency(H,Fopt,Wopt,Ns,snr);
238 |
239 | % Compute hybrid weights and its spectral efficiency
240 | [Fbb,Frf,Wbb,Wrf] = helperOMPHybridWeights(H,NtRF,NrRF,Ns,At,Ar,1/snr);
241 | Rhyb(m,k) = Rhyb(m,k)+helperComputeSpectralEfficiency(H,Fbb*Frf,Wrf*Wbb,Ns,snr);
242 | end
243 | end
244 | end
245 | Ropt = Ropt/Niter;
246 | Rhyb = Rhyb/Niter;
247 |
248 | plot(snr_param,Ropt(:,1),'--sr',...
249 | snr_param,Ropt(:,2),'--b',...
250 | snr_param,Rhyb(:,1),'-sr',...
251 | snr_param,Rhyb(:,2),'-b');
252 | xlabel('SNR (dB)');
253 | ylabel('Spectral Efficiency (bits/s/Hz');
254 | legend('Ns=1 optimal','Ns=2 optimal','Ns=1 hybrid', 'Ns=2 hybrid',...
255 | 'Location','best');
256 | grid on;
257 |
258 | %%
259 | % This figure shows that the spectral efficiency improves significantly
260 | % when we increase the number of data streams. In addition, the hybrid
261 | % beamforming can perform close to what optimal weights can offer using
262 | % less hardware.
263 |
264 | %% Summary
265 | % This example introduces the basic concept of hybrid beamforming and shows
266 | % how to split the precoding and combining weights using orthogonal
267 | % matching pursuit algorithm. It shows that hybrid beamforming can closely
268 | % match the performance offered by optimal digital weights.
269 |
270 | %% References
271 | % [1] Oma El Ayach, et al. Spatially Sparse Precoding in Millimeter wave
272 | % MIMO Systems, IEEE Transactions on Wireless Communications, Vol. 13, No.
273 | % 3, March 2014.
274 |
--------------------------------------------------------------------------------
/HybridPrecodingExample/helperComputeSpectralEfficiency.m:
--------------------------------------------------------------------------------
1 | function R = helperComputeSpectralEfficiency(H,F,W,Ns,snr)
2 | % This function helperComputeSpectralEfficiency is only in support of
3 | % HybridPrecodingExample. It may change in a future release.
4 |
5 | % Copyright 2017 The MathWorks, Inc.
6 |
7 | % Heff = (F*H*W).';
8 | % Weff = W.';
9 | % R = log2(det(eye(Ns)+snr/Ns*(real(conj(Weff)*Weff.')\real(conj(Heff)*Heff.'))));
10 |
11 | temp = F(1:Ns,:)*H*W(:,1:Ns);
12 | R = log2(det(eye(Ns)+snr/Ns*(real(W(:,1:Ns)'*W(:,1:Ns))\real(temp'*temp))));
13 |
14 |
--------------------------------------------------------------------------------
/HybridPrecodingExample/helperOMPHybridPrecodingWeights.m:
--------------------------------------------------------------------------------
1 | function [Fbb,Frf] = helperOMPHybridPrecodingWeights(H,NtRF,Ns,At)
2 | % This function helperOMPHybridPrecodingWeights is only in support of
3 | % HybridPrecodingExample. It may change in a future release.
4 |
5 | % Copyright 2017 The MathWorks, Inc.
6 |
7 | % use Comms convention
8 | [~,~,v] = svd(H.');
9 | Fopt = v(:,1:Ns);
10 | Nt = size(H,1);
11 |
12 | Frf = complex(zeros(Nt,NtRF));
13 | Fres = Fopt;
14 | for m = 1:NtRF
15 | Psi = At'*Fres;
16 | [~,k] = max(diag(Psi*Psi'));
17 | Frf(:,m) = At(:,k);
18 | Fbb = (Frf(:,1:m)'*Frf(:,1:m))\(Frf(:,1:m)'*Fopt);
19 | temp = Fopt-Frf(:,1:m)*Fbb;
20 | Fres = temp/norm(temp,'fro');
21 | end
22 | Fbb = sqrt(Ns)*Fbb/norm(Frf*Fbb,'fro');
23 |
24 | % match H.'*Frf*Fbb*X.' to X*Fbb*Frf*H
25 |
26 | Fbb = Fbb.';
27 | Frf = Frf.';
28 |
29 |
--------------------------------------------------------------------------------
/HybridPrecodingExample/helperOMPHybridWeights.m:
--------------------------------------------------------------------------------
1 | function [Fbb,Frf,Wbb,Wrf] = helperOMPHybridWeights(Hin,NtRF,NrRF,Ns,At,Ar,noisevar)
2 | % This function helperOMPHybridWeights is only in support of
3 | % HybridPrecodingExample. It may change in a future release.
4 |
5 | % Copyright 2017 The MathWorks, Inc.
6 |
7 | % use paper convention, convert from Comm convention
8 | H = Hin.';
9 | [~,~,v] = svd(H);
10 | Fopt = v(:,1:Ns);
11 | [Nr,Nt] = size(H);
12 |
13 | Frf = complex(zeros(Nt,NtRF));
14 | Fres = Fopt;
15 | for m = 1:NtRF
16 | Psi = At'*Fres;
17 | [~,k] = max(diag(Psi*Psi'));
18 | Frf(:,m) = At(:,k);
19 | Fbb = (Frf(:,1:m)'*Frf(:,1:m))\Frf(:,1:m)'*Fopt;
20 | temp = Fopt-Frf(:,1:m)*Fbb;
21 | Fres = temp/norm(temp,'fro');
22 | end
23 | Fbb = sqrt(Ns)*Fbb/norm(Frf*Fbb,'fro');
24 |
25 | Wmmse = ((Fbb'*Frf'*(H'*H)*Frf*Fbb+noisevar*Ns*eye(Ns))\Fbb'*Frf'*H')';
26 | %Wmmse = (1/Ns*(Fbb'*Frf'*H')/(1/Ns*H*(Frf*(Fbb*Fbb')*Frf')*H'+noisevar*eye(Nr)))';
27 | Wrf = complex(zeros(Nr,NrRF));
28 | Wres = Wmmse;
29 | Ess = 1/Ns*eye(Ns);
30 | Eyy = H*Frf*Fbb*Ess*Fbb'*Frf'*H'+noisevar*eye(Nr);
31 | for m = 1:NrRF
32 | Psi = Ar'*Eyy*Wres;
33 | [~,k] = max(diag(Psi*Psi'));
34 | Wrf(:,m) = Ar(:,k);
35 | Wbb = (Wrf(:,1:m)'*Eyy*Wrf(:,1:m))\(Wrf(:,1:m)'*Eyy*Wmmse);
36 | temp = Wmmse-Wrf(:,1:m)*Wbb;
37 | Wres = temp/norm(temp,'fro');
38 | end
39 |
40 | % % sort based on diagonal term
41 | % ChanEff = Wbb'*Wrf'*H*Frf*Fbb;
42 | % [~,idx] = sort(diag(ChanEff),'descend');
43 | % Fbb = Fbb(:,idx);
44 | % Frf = Frf(:,idx);
45 | % Wrf = Wrf(:,idx);
46 | % Wbb = Wbb(:,idx);
47 |
48 |
49 | % convert back to comm convention
50 | % match Wbb'*Wrf'*H.'*Frf*Fbb*X.' to X*Fbb.'*Frf.'*H*conj(Wrf)*conj(Wbb) to
51 | % X*Fbb*Frf*H*Wrf*Wbb
52 |
53 | Fbb = Fbb.';
54 | Frf = Frf.';
55 | Wrf = conj(Wrf);
56 | Wbb = conj(Wbb);
57 |
58 |
--------------------------------------------------------------------------------
/HybridPrecodingExample/helperOptimalHybridWeights.m:
--------------------------------------------------------------------------------
1 | function [Fopt,Wopt] = helperOptimalHybridWeights(Hin,Ns,noisevar)
2 | % This function helperOptimalgWeights is only in support of
3 | % HybridPrecodingExample. It may change in a future release.
4 |
5 | % Copyright 2017 The MathWorks, Inc.
6 |
7 | % use paper convention, convert from Comm convention
8 | H = Hin.';
9 | [~,~,v] = svd(H);
10 | Fopt = v(:,1:Ns);
11 |
12 | Wopt = ((Fopt'*(H'*H)*Fopt+noisevar*Ns*eye(Ns))\(Fopt'*H'))';
13 |
14 | % convert back to comm convention
15 | % match Wopt'*H.'*Fopt*X.' to X*Fopt.'*H*conj(Wopt) to
16 | % X*Fopt*H*Wopt
17 |
18 | Fopt = Fopt.';
19 | Wopt = conj(Wopt);
20 |
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Description and usage:
2 | This Matlab 5GNR heterogeneous model simulation includes analysis for sub-6 layer of macro cells and above-6(mmW) layer of small cells with CSI acquisition design.
3 | The launcher script for the simulation is HetNet_5GNR_simulation_launcher.m
4 | Simulation parameters are described and defined in HetNet_5GNR_simulation_launcher.m and functionNetworkSetup_Quadriga.m
5 |
6 | ## Configuration of Matlab's search path:
7 | Should include folders added by cvx_setup script (see documentation for installation of CVX)
8 | Include paths to QuaDRiGa's "quadriga_src" and "quadriga_src\config" folders
9 | Should include path to HybridPrecodingExample folder
10 |
11 | ## License:
12 | This code is licensed under the GPLv3 license. Refer to folder name 'COPYING'.
13 |
14 | ## Software and Hardware Requirements
15 | The code was written to be used in Matlab and has been tested using Matlab 2018b on Academic License . Some of the scripts and functions might also work in Octave, but there is no guarantee of compatibility.
16 |
17 | Since the running HetNet project considers a setup with 7-19 cells, 100/128 antennas per BS tier, and 15/3 UEs per MacroCell BS or SmallCell, some of the simulations require a lot of RAM to store the channel correlation matrices and channel realizations.
18 |
19 | Moreover, this code has been tested successfully on an "HP ENVY 23-d120d TouchSmart All-in-One Desktop PC" with Windows 8.1 (64bit), with 8 GB DDR3 RAM and a 3.10 GHz Intel Core i5 processor, which should be viewed as a minimum requirement for using this code.
20 |
21 | Some of the simulations could take up to thirteen(13) hours of computation time to run, therefore we recommend that you first set nbrOfSetups = 1 to check how much time it takes for each realization of random UE location and shadow fading.
22 |
23 | ## Notes
24 | Script is based on the reference code from the following monograph: Emil Bjornson, Jakob Hoydis and Luca Sanguinetti (2017), "Massive MIMO Networks: Spectral, Energy, and Hardware Efficiency", Foundations and Trends in Signal Processing: Vol. 11, No. 3-4, pp. 154-655. DOI: 10.1561/2000000093. source: https://github.com/emilbjornson/massivemimobook
25 |
26 | Script requires additional software packages to be used, which need to be downloaded and installed separately. These packages are developed independently and are delivered with separate licenses.
27 |
28 | The channels are generated using QuaDRiGa from the Fraunhofer Heinrich Hertz Institute (http://www.quadriga-channel-model.de). This script has been tested with QuaDRiGa version 2.0.0-664.
29 |
30 | Downlink channel matrix quantization is performed using CVX optimization from CVX Research, Inc. (http://cvxr.com/cvx/). This script has been tested with CVX 2.1, using the solver Mosek, version 8.0.0.60.
31 |
--------------------------------------------------------------------------------
/_plots/Area throughput (statistics) (1).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/Area throughput (statistics) (1).fig
--------------------------------------------------------------------------------
/_plots/Area throughput (statistics).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/Area throughput (statistics).fig
--------------------------------------------------------------------------------
/_plots/DL throughput per macrocell UE (CDF).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/DL throughput per macrocell UE (CDF).fig
--------------------------------------------------------------------------------
/_plots/DL throughput per small cell UE (CDF).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/DL throughput per small cell UE (CDF).fig
--------------------------------------------------------------------------------
/_plots/Macro cell tier - Cell throughput (CDF) (1).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/Macro cell tier - Cell throughput (CDF) (1).fig
--------------------------------------------------------------------------------
/_plots/Macro cell tier - Cell throughput (CDF).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/Macro cell tier - Cell throughput (CDF).fig
--------------------------------------------------------------------------------
/_plots/Median, Average Cell throughput (statistics).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/Median, Average Cell throughput (statistics).fig
--------------------------------------------------------------------------------
/_plots/Median, Average, Percentile UE throughput (statistics).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/Median, Average, Percentile UE throughput (statistics).fig
--------------------------------------------------------------------------------
/_plots/NW layout.fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/NW layout.fig
--------------------------------------------------------------------------------
/_plots/Other KPIs (statistics).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/Other KPIs (statistics).fig
--------------------------------------------------------------------------------
/_plots/Small cell tier - Cell throughput (CDF).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/Small cell tier - Cell throughput (CDF).fig
--------------------------------------------------------------------------------
/_plots/UL throughput per macrocell UE (CDF).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/UL throughput per macrocell UE (CDF).fig
--------------------------------------------------------------------------------
/_plots/UL throughput per small cell UE (CDF).fig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ICT-Embedded/5GNR-HetNet_Model/7eeefe3412cb0b30fb68d4ec2071c72f2048b683/_plots/UL throughput per small cell UE (CDF).fig
--------------------------------------------------------------------------------