Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Notes: This code is to generate a maximal length PN sequence (m-sequence) for any length and any shift registers

using the following mythodology example: Polynomial [X^3+X^1+1] is given as [3 1 0] Polynomial [X^6+X^1+1] is given as [6 1 0] Generates the PN sequence chip Index and the length of the Sequence N

Regarding Correlation : M sequence codes experience V.Good Auto correlation and very bad cross correlation The Processing gain and the orthogonality check and processing gain are in the pictures taken.

We made a shifting in the resuted code so that we can use that shifted code later in the cross correlation and orthogonality and mis-matched codes examples
%Shifted Code (Another Code to be used later) for i=0:1:10 %10 Shifts for exanple tr=transpose(pnSequence); sh=circshift(tr,i); trtr=transpose(sh); end

The Figure illustrates 1. Rect-pulse output 2. Autocorrelation 3. Matched code output from Matched filter 4. Mis-Matched code output from Matched filter

Notes: This code is to generate a Barker code for the standard lengths Regarding Correlation : Like M sequence codes they experience V.Good Auto correlation and very bad cross correlation. The Processing gain and the orthogonality check and processing gain are in the pictures taken.

We made a shifting in the resuted code so that we can use that shifted code later in the cross correlation and orthogonality and mis-matched codes examples
%Shifted Code (Another Code to be used later) for i=0:1:10 %10 Shifts for exanple tr=transpose(pnSequence); sh=circshift(tr,i); trtr=transpose(sh); end

The Figures illustrates 1. Rect-pulse output 2. Autocorrelation 3. Matched code output from Matched filter 4. Mis-Matched code output from Matched filter

Notes: This code is to generate a Walsh code code for the selected length by the user. Regarding Correlation : Un-Like M sequence codes they experience V.Bad Auto correlation and very good cross correlation. The Processing gain and the orthogonality check and processing gain are in the pictures taken. We made a shifting in the resuted code so that we can use that shifted code later in the cross correlation and orthogonality and mis-matched codes examples
%Shifted Code (Another Code to be used later) for i=0:1:10 %10 Shifts for exanple tr=transpose(pnSequence); sh=circshift(tr,i); trtr=transpose(sh); end

General notes: The user is allowed to choose which code to generate with his own parameters. For the given codes there is an M-File attached named "givencodes" with all the needed operations For the Gold codes generation we used different methodology to generate the Msequence and the preferred pairs to generate the Gold codes included in the file "goldcodesgenerator_new_style"

You might also like