4.42857

4.4 | 7 ratings Rate this file 24 Downloads (last 30 days) File Size: 5.43 KB File ID: #8634

CDMA MODEM

by Waqas Mansoor

 

04 Oct 2005 (Updated 05 Oct 2005)

Multiple access using CDMA for 2 users in an AWGN channel.

| Watch this File

File Information
Description

Description of program

1. Convert input bits to bipolar bits.. 1 to 1 and 0 to -1 for user1 and user2
2. Take 100 samples per bit for both user1 and user2 and then plot base band signal which is in bipolar NRZ format.
3. Then BPSK modulate the signal. Take care that sampling rate of sinusoidal carrier matches the sampling rate per bit. Here it is 100 samples per carrier and then plot the BPSK signal
4.
This segment of code:

               for i=1:length_user1
    for j=1:10 %chip rate is 10 times the bit rate
        pn1=[pn1 seed1(4)];
        if seed1 (4)==seed1(3) temp=-1;
          else temp=1;
          end
              seed1(4)=seed1(3);
              seed1(3)=seed1(2);
              seed1(2)=seed1(1);
              seed1(1)=temp;
    end
end
 
performs the function of exclusive or gate and shift registers. There are 4 shift registers XOR the contents of register3 and register4 and put the result in register1 , move the original contents of shift register1 to register2 and register2 to register3, register3 to register 4 and the content of register4 is the chip of PN code at each clock pulse

5. Multiply the BPSK modulated signal with the PN code. Here again the care should be taken to match the sampling rate. i.e no. of chip per bit* no of samples per chip = no of samples per bit of BPSK modulated signal.
6. Same procedure is carried out for user2 bits.
7. The channel is AWGN channel with SNR 5 dbs. In channel the signal from user1 is added to signal from user2 and white Guassian noise is added.
8. At receiver end , first received signal is multiples with PN then BPSK demodulated by multiplying with the carrier(coherent demod)
9. then the samples over 1 bit interval is summed. And if the sum is greater than 0 than the received bit is 1 else rxbit is 0. Summation is used in place of integration because it is a discrete time system
10. Same procedure is repeated for user2.

Conclusion: If SNR is of more than some reasonable value there are no bit errors.

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (12)
07 Feb 2006 Altamash Ahmed

good shot!

23 Mar 2006 ALI ALNEHMY  
27 Mar 2006 le tuan  
14 Jun 2006 maha ali

im new in this site.i need ur email id mr waqas mansoor

25 Nov 2006 Karim George  
25 Nov 2006 mahmood abbasi

This is an excellent technique.

09 Apr 2007 abdalbaset ali

simulation of pn offset plannin g in cdma

25 Jun 2007 Shahriar Ferdous  
14 Jul 2007 fengky wijaya

thank you very much for your help...^_^

12 Aug 2007 Muhammad Rizwan

Hi, I want to know something if you can help.
I have spread the bits with walsh code then with PN code and added awgn noise to it. On receiving side when I multiplied this received signal with conjugate of PN code it was removed from bit .Now how can I remove the walsh function to gain actual original bits.

31 Aug 2007 sharique mohd

sir, iI want to know something if u help.
Sir i want to do work on spreading sequence that will also use phase combination i.e, phase combination [0 pi/2 3*pi/2]
i want to use as[0 1 3].
is it possible in cdma

07 Dec 2009 abwd

thx

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
wireless Waqas Mansoor 22 Oct 2008 08:01:40
cdma Waqas Mansoor 22 Oct 2008 08:01:40
spread spectrum Waqas Mansoor 22 Oct 2008 08:01:40
multiple access Waqas Mansoor 22 Oct 2008 08:01:40
modulate Waqas Mansoor 22 Oct 2008 08:01:40
convert Waqas Mansoor 22 Oct 2008 08:01:40
cdma shahidhoom pasha 27 Jun 2009 11:32:51
multiple access anessa 26 Feb 2011 14:30:34
cdma Ouqing Wang 22 Jan 2012 06:25:12

Contact us at files@mathworks.com