The Documentation of
Polar Codes in MATLAB
A MATLAB package in the field of Error Control Codes
by
Harish Vangala
harishvictory@gmail.com
Under the supervision of
Prof. Emanuele Viterbo and Dr. Yi Hong,
Software Defined Telecommunications Lab,
Dept. of Electrical and Computer Systems Eng.,
Monash University, Clayton, VIC – 3800,
Australia.
If you find any sort of bugs in code/documentation, please report to: harishvictory@gmail.com
i
Contents
Contents ii
1 A Quick Reference 1
1.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Quick basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Illustrations and Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 The More Detailed Reference 7
2.1 Channel Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 The Plotting Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Encoding/Decoding/Code-Construction Functions (Basic Modules) . . . . . . . . . . . . . 9
2.4 Micro-scale Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 A Discussi on on the Algorithms Used 13
3.1 The Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 The Decoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 The Code Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4 The Use of Log-domain calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Bibliography 15
ii
Preface
This is the full documentation of a MATLAB package dedicated to help simulating the polar codes in
various channel models such as a binary symmetric channel (BSC), a binary erasure channel (BEC), and
an additive white Gaussian noise channel (AWGN).
The package focuses to provide the most fundamental blocks related to polar codes, to aid researchers
start working with polar codes right away. The package is expected to save a significant amount of
valuable time required to develop modules related to polar codes such as encoding, decoding, code-
construction, and performance analysis such as plotting FER/BER curves.
More importantly, the package provides an implementation of greater efficiency to the users which
is tested, benchmarked, and improved over a long period of time. As we find, the only way to see any
significant improvement in the speed of the routines in this package is to rewrite them in a lower level
programming language such as C/C++, with a similar logic.
Due care has been taken to provide the users a code with detailed comments and help written all over
so that they can easily build over the modules. During the writing of this code, a significant importance
has been given to be concise and user-friendly. The result is a very small, portable package of fully
readable matlab files that you can easily download from the below link.
www.polarcodes.com
iii
Chapter 1
A Quick Reference
1.1 Installation
The MATLAB package is openly available at below link:
www.polarcodes.com
It is the enhanced online resource of our earlier site at: http://www.ecse.monash.edu.au/staff/
eviterbo/polarcodes.html, hosting the code along side of the other tutorial videos and many other
useful resources related to polar codes.
The installation of the package is achieved by probably the simplest way possible: Just copy the few
source files (extracted from the zip file) to a your local directory.
More preferrably, adding the location of the extracted files to the matlab’s path (File → Set Path →
Add folder) will allow the user to use the modules from any working directory.
1.2 Quick basics
Here is a matlab package, that you can start using right away to work with polar codes, by simply
copying them on to your hard drive (see Section 1.1).
More specifically, the packages allows you the following fundamental operations.
1. Choice of the three popular channels: BEC, BSC, and AWGN
2. Polar encoding
3. Polar decoding
4. Polar code construction
5. Plot the performance curves
Finally, it is made sure such that all the above will only empower the users to upgrade the package and
build more advanced simulation environments for their research with polar codes.
For a quick illustration of what this package is capable of doing, we will simply show some pictures,
tabular forms, and cheat sheets in this chapter. An impatient user should be able to start right away by
simply reading a couple of diagrams in this chapter.
In the next chapters, we will provide a traditional and complete documentation of the package, which
will unleash the full features of the package for a more advanced use.
1