Code CDMA Frequency

Published:

DS-CDMA with variable code length. Simulation of the performance in AWGN channel

Mini Project

On

Mathematical Modelling

M.Eng (Electronics)

1. INTRODUCTION:

Code Division Multiple Access (C.D.M.A) is the most complex digital wireless systems in commercial use today. Rather than separating users with different frequency channels, CDMA puts all of the users on the same frequency at the same time, separating users with codes; this gives the advantage of using CDMA. All of the primary 3G formats use a form of CDMA. This means that all CDMA users occupy the same frequency at the same time Frequency and time are not used as discriminators, this use coding to discriminate users. The interference mainly comes from nearby users.

  • Basic CDMA Operation.

Code Division Multiple Access (CDMA) is a spread spectrum technique that uses neither frequency channels nor time slots. With CDMA, the narrow band message (typically digitised voice data) is multiplied by a large bandwidth signal that is a pseudo random noise code (PN code). All users in a CDMA system use the same frequency band and transmit simultaneously. The transmitted signal is recovered by correlating the received signal with the PN code used by the transmitter. Figure below shows the general use of the spectrum using CDMA

Lady using a tablet
Lady using a tablet

Professional

Essay Writers

Lady Using Tablet

Get your grade
or your money back

using our Essay Writing Service!

Essay Writing Service

Task:

Over all Task is to simulate the de-spreading of a CDMA sequence in the presence of AWGN and to investigate how by increasing the code length, it is possible for the system to operate in larger and larger noise levels.

Working Procedure:

DS CDMA:

As we are dealing with DS-CDMA we have to know how the signal is spread across the frequency spectrum. In CDMA, signals are spread on wide band on multiplying the signal with code. When the signal is spread across the frequency spectrum the over all power level decreases. Considering the input signal on the wide band over all power level decreases and when the second signal is given with same width the power level increases gradually as two signals are transmitting at the same time. So with this we got to know that over all power band increases as the incoming signals increases. This generated signals needs to be received on receiving end with enough power. Considering our system with signal to interference ratio the noise affecting one signal transmits the other signals at same frequency. SIR of our system can be classified as energy per bit divided by the noise spectral density. So the power of the signal should go at a minimum higher level when compared to noise. Lower the power of the original signal transmitted lower noise in the system and therefore signals which are transmitted from a system should transmit with optimum power level to reach the receiver with required power level. If the power of the signal increases the overall noise level also increases which in-turn increases the noise in other signals. If the power is too low then signal given will reach the receiver with too low quality where the signal may not be received properly. In Direct sequence spread spectrum the signal is spread over large frequency range where the band width will increase and information transfer rate will remain constant. A code is made up binary digit (bits) which represents a chip and whole code contains number of chips which is referred to a symbol. To calculate the chip rate we have to take the number of chips multiplied with the symbol rate which in turn tells us the chip rate is proportional to the frequencies. Higher the chip rate larger the frequencies. PN sequence is one of the codes which is used in CDMA systems. PN is named as pseudo-random noise. This is of binary sequence -1 and +1 and exhibits characteristics of random sequence. PN sequence has equal numbers of -1and +1 same like random sequence but with a difference of 1. This sequence plays an important in data transmission which is even spreading of data and signal separation.

Correlation of the CDMA Receiver:

In even spreading data the PN sequence is multiplied with data and the resulting sequence is spread across the wide band. For the users who don't know the code this will appear as white noise. In signal separation the PN sequence will don't display perfect orthogonally where they can be used to separate the signals this will represent the strong correlation at the receiver. Auto correlation is level of correlation between a signal and time shifted version of the same signal for a given time shift. For PN sequence the auto correlation is at the maximum value N when perfectly time aligned for number of bits of PN sequence. This will allow the receiver to focus on where the signal is with out synchronizing the transmitter and the receiver. In CDMA system it is useful to define how the signals interact with each other. Cross correlation is defined as the as relationship or similarity between signals.

Lady using a tablet
Lady using a tablet

Comprehensive

Writing Services

Lady Using Tablet

Plagiarism-free
Always on Time

Marked to Standard

Order Now

Autocorrelation of PN sequences:

CDMA Crosscorrelation:

Now the code is generated for the data pulse of the given CDMA correlation.

function [t,d]=tx_data(data)

i=1;

bit=0;

while(i<9)

t(i)=i;

t(i+1)=i+1;

bit=bitand(data,1);

if(bit==0)

d(i)=-1;

else

d(i)=bit;

end

d(i+1)=d(i);

i=i+2;

if(data)

data=floor(data/2);

end

end

In the above data program initialize i=1 as the counter and bit=0 is the storage. As the is code is 8-bit to make the loop work for 8 times given while loop (i<9). In this loop data will be extracted t(i) is the matrix which take the time is the pulse t(i) is incremented to t(i+1) in one loop for number of times. (i) is incremented by i+2 times because as the code is of 8 bits and given data is of 4bits so the i is incremented by i+2 times. bitand command is used because bitand command returns the bit-wise of and command in two arguments data, 1.Last bit of the data will be extracted and stored as 1 if the code is 0 this will right shifted. If the bit is 0 then the data will be represented as -1 else bit is 1 and floor is used because on data dividing by 2 it gives it wont give the round of value, to get the round value we are using floor. This program will send a data pulse.

Then on generating the code program:

function [t,d]=tx_code(code)

i=1;

bit=0;

while(i<9)

t(i)=i;

bit=bitand(code,1);

if(bit==0)

d(i)=-1;

else

d(i)=bit;

end

i=i+1;

if(code)

code=floor(code/2);

end

end

In the above program code pulse is generated in which program is initialize i=1 as the counter and bit=0 is the storage. As the is code is 8-bit to make the loop work for 8 times given while loop (i<9). In this loop data will be extracted and t (i) is the matrix which take the time pulse t(i) is taken as i in one loop for number of times. As given code is of 8 bit so it need not be incremented by the i+2 times because it is not the 4bit. bitand command is used because bitand command returns the bit-wise of and command in two arguments data, 1.Last bit of the data will be extracted and stored as 1 if the code is 0 this will right shifted. If the bit is 0 then the data will be represented as -1 else bit is 1 floor is used because on code is dividing by 2 it gives it wont give the round of value, to get the round value we are using floor. This program will send a code pulse.

Now we have to multiply the data pulse and the code pulse so the below program is written multiply code pulse and data pulse so this function is taken as the main function.

Main Program:

function txdata = tx(data)

code=150;

[tc,dc]=tx_code(code);

[td,dd]=tx_data(data);

tx_out=dc.*dd

In the above program is written because the data pulse and code pulse are multiplied where code is taken as 150 because the binary representation is 10010110 which is taken because to make the code effective. As this is the main program all the above files required for program to run. To execute the program use tx.m in the command line type tx(4).If data transmitted is 4.this is designed for 4 bit data and 8 bit code code is =10010110. When we type tx (4) in the command line the code will be generated on multiplying code*data output on the command line.

Then the output results as follows when input data is given as tx(4) and tx(8)

As we can see the generated binary bits when data and code is multiplied with each other on receiving side for given 4bit and 8 bits now we have to integrate the output which we have received at the receiver side on integration of out we can find out auto-correlation peak of the signal. Then we have to add the AWGN noise to the given output (integrated) and resulting signal with noise can be seen.

Lady using a tablet
Lady using a tablet

This Essay is

a Student's Work

Lady Using Tablet

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Examples of our work

Conclusion:

As I was able to generate the code for the given signals data and the code and could find out the code the pulse on the receiver end but I was not able to find out the wave forms for data and code and pulse on the receiver end and integrating them and adding noise to it. Over all I conclude that the I was half the way in writing the code for the program as it was the first time i have been writing the MATLAB coding.

APPENDIX:

Program to generate Line and Adding Noise on to it:

x=[0:0.01:1];

y=x;

% freq = 1;

% y=sin(2*pi*freq*x);

y_with_noise=awgn(y,15);

% fit

p = polyfit(x,y_with_noise,6);

figure(1);

plot(x,y);

hold on;

plot(x,y_with_noise);

Program to Generate the Data Pulse in the form of binary bits:

function [t,d]=tx_data(data)

i=1;

bit=0;

while(i<9)

t(i)=i;

t(i+1)=i+1;

bit=bitand(data,1);

if(bit==0)

d(i)=-1;

else

d(i)=bit;

end

d(i+1)=d(i);

i=i+2;

if(data)

data=floor(data/2);

end

end

Program to generate Code Pulse in the form of binary bits:

function [t,d]=tx_code(code)

i=1;

bit=0;

while(i<9)

t(i)=i;

bit=bitand(code,1);

if(bit==0)

d(i)=-1;

else

d(i)=bit;

end

i=i+1;

if(code)

code=floor(code/2);

end

end

Main Program to multiply Data and Code Pulse in the form of binary bits which will be seen on the Receiver end:

function txdata = tx(data)

code=150;

[tc,dc]=tx_code(code);

[td,dd]=tx_data(data);

tx_out=dc.*dd

Reference:

  • J Bannister; P Mather; S Coope; Convergence Technology for 3G Network, Wiley 2004.
  • Taub & Schilling, Principle of Communications Systems, Mc Graw Hill 1986