Site Loader
Rock Street, San Francisco

Q.1         Polar code is a linear block code
mainly used for the correction of error. This code is made with the help
of concatenation of multiple kernel codes. With the increase in the number of
recursions, the channels try to acquire low or high reliability like polarize. This
code was first developed in 1 and then later worked in 2. Due to lesser
complexity in encoding and decoding of this code, it is very effective in many
applications. The algorithms for construction of Polar code are theoretical
analyzed in research which showed that if fix and large code lengths are used, polar
codes acquire linear property in time and space can be constructed whose rate
should be within the capacity of channel 3. Some of the decoding algorithms
besides provide good performance but double the number of decoding paths at
each decoding step and then uses different steps to discard those ineffective
paths 4.

 

Q.2        

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

Polar encoding of binary message (u)
to get encoded x is normally done using frozen-bit with lookup vector check
either it is a location of a message bit or a frozen bit 5.

u is a binary message of size Kx1

f is a lookup vector of Nx1 size, with
elements {-1, 0, 1}


is a binary code of size Nx1

where i-th value =

x = f                                       Initialized with a lookup
vector

x (x == -1) = u                    -1’s will be
replaced by a binary message

for i=1:n

   
for j=1:2^(i-1)

       
base = (j-1)* 2^(n-i+1)

       
for l=1:2^(n-i+1);/2

            x(base+l) = mod( x(base+l)+x(base+2^(n-i+1);/2+l),
2 )

       
end

   
end

end

 

 

 

 

 

Q.3

Successive Cancellation Decoding (SCD)
is done using Log-Likelihood Ratios (LLR)

y(i) = x(i) + n;

x(i) =

n ~ Gaussian(0,1)

Where y is a decoding input

if f(i) == -1

       
if LLR(1) > 0

            x(i) = 0

       
else

            x(i) = 1

       
end

end

 

Q.4

Matlab
Code:

clear all;clc;close all;

 

%  
Initialization

N = 256;

K = 128;

n = ceil(log2(N));

N = 2^n;

State                     =
0.1;                                                                     %   dB, SNR for AWGN Channel

Fbits                      =
zeros(N-K,1);

FZlookup              = zeros(N,1);

LLR                          = zeros(1,2*N-1);

BitRevIndices      = zeros(N,1);

Range                    = sort(0.01:0.02:0.16);                                   %   SNR range with sorting

MCsize                 = 10000;                                                                %   Montecarlo size

MinErrors            = 100;

MinIters              = 500;

BER                        = zeros(1,length(Range));

FER                         = zeros(1,length(Range));

 

for i = 1:N

   
j = i-1;

   
k = zeros(length(j),1);

 
for indx  = 1:length(j)

   
k(indx) = bin2dec(wrev(dec2bin(j(indx),n)));

 
end

   
BitRevIndices(i) = k(indx);

end

 

z   
= zeros(N,1);

SNR 
= 10^(State/10);

z(1) = -(K/N)*SNR;                                                                          % In logarithm domain.
exp(-(K/N) * (Eb/N0))

 

for lev = 1:log2(N)

   
B   = 2^lev;

   
for j1 = 1:B/2

       
T  = z(j1);

       
x1 = log(2)+T;

       
y1 = 2*T;

       
z(j1) = x1 + log1p(-exp(y1-x1));                                          % log(1
– exp(y-x)) and  2z – z^2

       
z(B/2 + j1) = 2*T;                                                                      %
z^2

   
end

end

 

~,indices = sort(z,1,’ascend’);                                                  %   Ascending with sorting columns

FLookup(sort(indices(K+1:end))) =
Fbits;

 

for j2 = 1:K

   
FLookup(indices(j2)) = -1;                                                        %  locations in z containing least K values

end

   
FZlookup = FLookup;

 

for jj = 1:length(Range)

   
j3 = jj;

   
for l = 1:MCsize

       
u = randi(2,K,1)-1;                                                                    %   Bernoulli

    

%  
Polar Encoding

       
x = FZlookup;                                                             %   Loads all Frozen bits

       
x (x == -1) = u;                                                                           %   Replacement of -1’s with message bits

 

     
for i1=1:n

            B 
= 2^(n-i1+1);

            nB = 2^(i1-1);

      
for j4  = 1:nB

           base = (j4-1)*B;

         for l1 = 1:B/2

            x(base+l1) = mod(
x(base+l1)+x(base+B/2+l1), 2 );

         end

      
end

   
end

 

Q.5

Matlab Code:

 

%  
Channel

sqrtEcN0 = sqrt(K/N) *
10^(Range(j3)/20);

y        = (2*x-1)*sqrtEcN0*sqrt(2) +
randn(size(x));            %   Normalized AWGN

       

%  
Successive Cancellation Decoding (SCD)

FZLookup1 = FZlookup;

EbN0           = 10^(Range(j3)/10);                                                %  
dB of SNR

initial_LLRs   = – 2 * sqrt(2*(K/N)*EbN0) * y;

 

LLR(N:2*N-1)   = initial_LLRs;

d_hat          = zeros(N,1);

 

for j5 = 1:N

   
i2 = BitRevIndices(j5) +1 ;                                                         %
1 is added as Matlab starts indexing with 1

       

   
if FZLookup1(i2) == -1

       
if LLR(1) > 0

            d_hat(i2) = 0;

       
else

            d_hat(i2) = 1;

       
end

   
else

       
d_hat(i2) = FZLookup1(i2);

   
end

end

       
uhat      = d_hat ( FZLookup1 ==
-1);

       
nfails    = sum(uhat ~= u);

       
FER(j3)   = FER(j3) + (nfails>0);

       
BER(j3)   = BER(j3) + nfails;

       

       
if mod(l,20) == 0

            for iiiii = 1:53

            end

       
end

       

       
if l >= MinIters && FER(j3) >= MinErrors                                        %    Frame errors

            break;

       
end

   
end

   

   
% Stopping Criteria

   
if(FER(j3)< MinErrors)         FER(j3)       = FER(j3)/l;         BER(j3)       = BER(j3)/(K*l);         FER(j3+1:end) = 0;         BER(j3+1:end) = 0;       else         FER(j3)       = FER(j3)/l;         BER(j3)       = BER(j3)/(K*l);     end end   %   Plotting Results  semilogy(Range,FER,'mx-','LineWidth',2);  hold on  grid on  title('Polar Encoding and Decoding');  xlabel('Eb/No')  ylabel('Frame Error Rate')    figure;  semilogy(Range,BER,'mx-','LineWidth',2);  hold on  grid on  title('Polar Encoding and Decoding');  xlabel('Eb/No')  ylabel('Bit Error Rate')                   Results: Fig.1. Bit Error Rate Fig.2. Frame Error Rate   Reference 1          Stolte, N. (January 2002). "Chapter 6.1: Optimierte Konstruktion für bitwise Mehrstufendecodierung". Rekursive codes mit der Plotkin-Konstruktion und ihre Decodierung (Ph.D. dissertation, Technische Universität Darmstadt). 2          Arikan, Erdal. "Channel polarization: A method for constructing capacity-achieving codes for symmetric binary-input memoryless channels." IEEE Transactions on Information Theory 55.7 (2009): 3051-3073. 3          Tal, Ido, and Alexander Vardy. "How to construct polar codes." IEEE Transactions on Information Theory 59.10 (2013): 6562-6582. 4          Tal, Ido, and Alexander Vardy. "List decoding of polar codes." Information Theory Proceedings (ISIT), 2011 IEEE International Symposium on. IEEE, 2011. 5          Vangala, Harish, Emanuele Viterbo, and Yi Hong. "A comparative study of polar code constructions for the AWGN channel." arXiv preprint arXiv: 1501.02473 (2015).

Post Author: admin

x

Hi!
I'm Dora!

Would you like to get a custom essay? How about receiving a customized one?

Check it out