Pseudo Random Interleaver

October 12, 2017 | Author: Manoj Shukla | Category: Forward Error Correction, Algorithms, Mathematics, Physics & Mathematics, Applied Mathematics
Share Embed Donate


Short Description

A mechanism for scrambling the user data during communication process....

Description

PSEUDO RANDOM INTERLEAVER BY SHUBHAM SRIVASTAVA

CHAPTER 1 PSEUDO RANDOM INTERLEAVER Interleaving is a process of rearranging the ordering of a data sequence in a one to one deterministic format.Interleaving is a practical technique to enhance the error correcting capability of coding.

BASIC PROCESS OF INTERLEAVING

Random interleavers scramble the data of different users with different pattern. Patterns of scrambling the data of users are generated arbitrarily. Because of the scrambling of data, burst error of the channel is randomized at the receiver side.

a pseudo random interleaver also scramble the data of different users with different pattern but patterns of scrambling the data of users are deterministic using certain mathematical expressions. That’s why I named this interleaver as pseudo random interleaver…because it is not truly random interleaver..the sequence is being generated using some mathematical formulas..

ALGORITHM OF SCRAMBLING DATA IN PSEUDO RANDOM INTERLEAVER.. Suppose there are N users and M chips to be transferred by each User.. We take X0=1 (can be any value.it is just for initialization) Let p is a vector containing sequence of chips before interleaving for each user… p[]=[1 2 3 4 5 6 . . . . . .M] now for each chip we calculate Xn=AXn-1+Cm Where A and C are interleaver constants..we can choose their values..every different value results in different pattern…..for same values of A and C pattern of interleaving remains same And ‘m’ is chip number of the user .. Here, try not to use even values for A and C as they will result each time value of X n even,which is not advisable….we should use prime values for A and C…however odd values can also be taken…but odd values are not good in more randomness as done by prime values… Then We take remainder of Xn when divided by M (chip length or number of chips).let that remainder is ‘r’.if r=0,then we set r=M. We then swap values of p(m) and p(r).. We repeat this for every chip of each user… In the end we will get new vector p containing new sequence of chips.. While moving to user number 2 from user 1 we will have value of XM , then we will calculate XM+1 I from this XM .it means we donot initialize every time we jump from one user to another.However, we may need to initialize this Xn if value of Xn is going out of capacity of programming language…we fix an upper limit for Xn. I have used upper limit for Xn as 10000000000000000000000000 in MATLAB. However any one can use any upper limit value.but receiver should be aware of this upper cut value…we can standardize any particular value as upper value..so we donot need to transfer this value..if value of Xn goes greater than this value,then we again initialize value of Xn as m+n, where m is chip number and n is user number……we can initialize it to any value…I have used m+n to have more randomness… Examples 1.Taking A=17,C=13.no of users=7 and chip length per user= 6, then sequence before interleaving is

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

Each row tells sequence for each user..for example row number 4 tells chip sequence to be transferred for user number 4…there are 7 users and chip length is 6… Now sequence after interleaving using pseudo random interleaver is 1

5

4

6

2

3

3

1

4

6

2

5

5

1

6

2

3

4

3

1

6

5

4

2

4

2

6

3

1

5

3

5

1

6

2

4

1

6

3

5

2

4

Let us see what happens if receiver also use this algorithm 1

5

4

6

2

3

3

1

4

6

2

5

5

1

6

2

3

4

3

1

6

5

4

2

4

2

6

3

1

5

3

5

1

6

2

4

1

6

3

5

2

4

The same sequence is generated at receiver provided receiver should know the value of A and C… Therefore,we just need to transfer values of A,C and chip length to receiver…instead of above whole matrix..

MATLAB CODING OF PSEUDO RANDOM INTERLEAVER clear; clc n=15; %NUMBER OF USERS chiplen=12; %NUMBER OF CHIPS PER USER a=19; %VALUE OF PSEUDO RANDOM INTERLEAVER CONSTANT 'A' c=7; %VALUE OF PSEUDO RANDOM INTERLEAVER CONSTANT 'C' k1=1; % INITIAL VALUE X0 for i=1:n for j=1:chiplen pi1(j)=j; scrambrule1(i,j)=j; % INPUT PATTERN end for j=1:chiplen k1=a*k1+c*j; % calculating Xn if (k1>=10000000000000000000000000) % that is just a UPPER LIMIT i % have taken for k1 or you can say Xn k1=i+j; end k=rem(k1,chiplen); if (k==0) k=chiplen; end tmp=pi1(j); pi1(j)=pi1(k); pi1(k)=tmp; end for j=1:chiplen scrambrule(i,j)=pi1(j); end end scrambrule1 scrambrule

%SHOWING INPUT SEQUENCE %SHOWING OUTPUT SEQUENCE

AND OUTPUT ON COMMAND WINDOW FOR ABOVE PROGRAM scrambrule1 = 1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

1

2

3

4

5

6

7

8

9 10 11 12

scrambrule = 7

4

2

5 11 10 12

9

6

3

8

9

4 12

6

7

5

1 10

8

3

2 11

6

4 10

1 11

5

8

7 12

9

3

1

4

7

9

3

5 11 10

6

8

2 12

2

7 10

9

3

8

1

5

6 12

4 11

9

3

8 12

1

7

2

6 11

5

4 10

4 12

5 10

3

1

7

9 11

8

6

1

6

3 10

8

5

4 12

2

9 11

3

9 10

6

4

5 12

7

2 11

1

8

7

7

1

2

2

5 10

1

9

4 11

2

6 12

3

8

3

2

9 11 10 12

1

8

5

6

4

7

12

5 11

9

11

8

2

4 12

8 10

7

4

4

5 10

8

1 10

4

7

3

8

6

2

5

7

9 10

3

6

1

3

5

1 11

2

6

9 12

3

2

1

9 11

7

6 12

>>

TREE BASED INTERLEAVER VERSUS PSEUDO RANDOM INTERLEAVER if input sequence is 1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

Then output sequence using tree based interleaver I got 2

5

6

3

4

1

4

5

2

3

1

6

5

4

1

6

3

2

5

1

6

2

3

4

3

4

5

6

2

1

3

1

5

2

4

6

4

3

2

1

6

5

Not only this I have also got sequence for those users which are not present yet but system calculates their sequence too because of number of levels present…so additional sequences are 1

3

4

6

2

5

4

2

1

5

6

3

1

4

6

5

2

3

6

3

4

1

5

2

2

3

1

6

5

4

6

2

4

5

3

1

2

4

1

5

3

6

However,there are 7 users present,but system calculates sequence of 14 users out of which 7 are absent and only 7 are present…..7 are not needed to be calculated.. This increases the complexity in calculation….. Also we need to transfer first two rows of interleaving sequence in tree based interleaver as receiver donot know them…everytime we run the same program of tree based interleaver,we will get different sequence…. Here if we run the same program again for same input chip sequence given above,we will get 6

5

4

1

3

2

2

4

1

3

5

6

2

3

1

6

4

5

6

5

3

2

1

4

5

1

6

4

3

2

4

3

2

1

5

6

5

4

6

2

1

3

4

1

2

6

3

5

2

3

4

5

6

1

6

5

1

4

2

3

3

6

2

1

4

5

5

2

6

3

1

4

1

4

5

6

3

2

3

1

4

2

5

6

We will get entirely different matrix….therefore,because of mechanism of tree based interleaver,we need to transfer two entire rows…. However,in pseudo random interleaver,we just need to transfer the values of A,C and chip length…only 3 values….therfore very less bandwidth is required in the case of pseudo random interleaver in comparison to tree based interleaver ,when a large number of chips is to be transferred by each user..

PSEUDO RANDOM INTERLEAVER VERSUS PRIME INTERLEAVER If any one look at pseudo random interleaver , we need to transfer 3 values here(A,C,chip length),and in prime interleaver we just need to transfer 1 value i.e.,chip length…then how our pseudo random interleaver is better than prime interleaver?? In order to understand this,we should look at the purpose of A and C values.. By changing values of A and C,we can change the chip sequence randomness… For example,if A=17,C=13,number of users=7 and chiplength=6,then input pattern of chip sequence for each user corresponding to each row is 1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

1

2

3

4

5

6

And output pattern on first run is 1

5

4

6

2

3

3

1

4

6

2

5

5

1

6

2

3

4

3

1

6

5

4

2

4

2

6

3

1

5

3

5

1

6

2

4

1

6

3

5

2

4

Output pattern on second run is still the same 1

5

4

6

2

3

3

1

4

6

2

5

5

1

6

2

3

4

3

1

6

5

4

2

4

2

6

3

1

5

3

5

1

6

2

4

1

6

3

5

2

4

However if we change the values of A and C Taking A=11 and C=19 for the same input pattern and input condition,we get output pattern as 3

5

4

1

2

6

1

5

4

6

2

3

4

1

5

3

6

2

1

3

6

4

2

5

3

5

4

1

2

6

2

4

6

3

1

5

4

1

3

5

2

6

This pattern will remain same until we donot change the values of A and C…how many times we run the program this above matrix will remain same… So we can change the chip sequence by using different values of A and C…..we can change the randomness of chip sequences here…

But in prime interleaver For same input pattern containing number of users=7 and number of chips=6 We get output sequence as 6

5

4

3

2

1

1

6

5

4

3

2

2

1

6

5

4

3

3

2

1

6

5

4

6

1

2

3

4

5

5

4

3

2

1

6

6

5

4

3

2

1

We will get same output sequence if we run it second time for same input chip sequence 6

5

4

3

2

1

1

6

5

4

3

2

2

1

6

5

4

3

3

2

1

6

5

4

6

1

2

3

4

5

5

4

3

2

1

6

6

5

4

3

2

1

So we cannot change transmitted pattern in prime interleaver to check for more randomness….. however,we can change the transmitted pattern sequence in pseudo random interleaver by changing values of A and C……choose that value of A and C by which we are getting less BER… If any system still has problem with 3 values being transferred in pseudo random interleaver, then we can standardize values of A and C for that system,then we need to transfer only 1 value as in prime interleaver..

Now we are going to put this code in the code of idma under awgn channel and see the result…

CHAPTER 2

PSEUDO RANDOM INTERLEAVER IN AWGN CHANNEL RESULTS COMPARISON TO TREE BASED INTERLEAVER The result of pseudo random interleaver in awgn channel with a=19 and C=7 with 16 users,250 blocks and datalength 512 is below: -1

10

-2

Bit Error Rate for 12 users coded

10

-3

10

-4

10

-5

10

-6

10

-7

10

3

4

5

6 Eb/No

7

8

9

the result of tree based interleaver in AWGN channel with 16 users,250 blocks and 512 data length is given below:

-1

10

-2

10

-3

Bit Error Rate

10

-4

10

-5

10

-6

10

-7

10

3

4

5

6 Eb/No

7

8

9

So,the results look quite similar in comparison to tree based interleaver,but these results are on A=19 and C=7 in pseudo random interleaver,but it is quite possible that there may be any value of A and C for which we can get better results…….. Take a look at one more example…. With A=19 and c=7 as usual and taking 32 users with 250 block length and 512 data length..the output of pseudo random interleaver in AWGN channel is

0

10

-1

Bit Error Rate for 12 users coded

10

-2

10

-3

10

-4

10

-5

10

-6

10

-7

10

3

4

5

6

7

8

9

10

11

12

Eb/No

And in same conditions for 32 users with 250 block length and 512 data length..the output of tree based interleaver in AWGN channel is

0

10

-1

10

-2

Bit Error Rate

10

-3

10

-4

10

-5

10

-6

10

-7

10

3

4

5

6

7

8

9

10

11

12

Eb/No

LET US LOOK AT ANOTHER EXAMPLE…. IN PSEUDO RANDOM INTERVAL With A=19 and C=7 with 16 users,200 blocks and 256 datalength,the BER results are given below

-1

10

-2

Bit Error Rate for 12 users coded

10

-3

10

-4

10

-5

10

-6

10

3

4

5

6 Eb/No

7

tree based under same conditions give BER as given below

8

9

-1

10

-2

Bit Error Rate

10

-3

10

-4

10

-5

10

3

3.5

4

4.5 Eb/No

5

5.5

6

So the results of pseudo random interleaver are quite better than tree based interleaver here in this condition… So this pseudo random interleaver requires more attention because it is always possible that for some value of A and C,the results are better than that given by tree based interleaver,prime interleaver and master random interleaver……

THANKING YOU SHUBHAM SRIVASTAVA

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF