CDMA : how to?
Hi,
The rand() function generates a random number uniformally distributed between [0,1] according to the state of the matlab seed, at any time you can set the seed generator to a fixed value by rand('state',j) where j is an integer value, by default the seed generator is set to rand('state',0).
you can write for instance the following script for generating the Psuedo randon code:
-----------
rand('state',0);
for i=1:n
x(1,i)=rand(1);
end
The above script gives the same random number squence vector x(1,n) of length n each time it is executed.
by pseudo random codes I mean pseudo noise codes, which are generated randomly for cdma communications
If anyone knows how to generate them please msg me
Look at IS-95 (CDMA standard) and search for the Polynomial Generator for the Noise Generator RNG. The moment you know the Polynomial, it is a simple LFSR implemenation with Matlab.....
I think that the codes used in this system are not truly pseudorandom. They are Walsh codes. Since all of the transmissions of radio units are synchronized, the code for each signal is repeated for each bit. The codes under these conditions have exactly zero cross correlation.
Truly pseudorandom codes have a autocorrelation of minus one for offsets and N for allignment. I vaguely remember that crosscorrelations between different codes are worse than this.
See the book CDMA System Engineering Handbook by Lee and Miller published by Artech House in 1998. Chapter 5 deals with this part of the system.
two codes in my knowledge that are used these are pseuso noise codes for reverse link and walsh codes for the forward link. as far as the orthognality is concerned the codes have no or very low auto corelation and zero or very low cross corelation if the system is ideally synchronized. can any body add any think more? plus
can anybody upload this book
CDMA System Engineering Handbook by Lee and Miller published by Artech House in 1998
Hello all,
see attachment - this is very simple png generator for Simulink I've made years ago for some classes..
I'm not sure if it will help
best,
Eirp
start with hadamard matrices
H=[ 1 1; 1 -1];
your walsh code will be:
W(1)= [H H ; H -H];
W(2)= [W(1) W(1); W(1) -W(1)];
W(3)= [W(2) W(2); W(2) -W(2)];
W(4)= [W(3) W(3); W(3) -W(3)];
.........
WN= [W(N-1) W(N-1); W(N-1) -W(N-1) ]
you can chance collumns or rows as you wish to regenerate these.
But Hadamard code is not PN Code, isn't?
And in IS-95 system, PN short code is used to distinguish different base station in forward channel; and long code to distinguish different mobiles i think.
Walsh codes are used to identify various logic channels, like different voice users, synch channel, etc.
You can easilyu generate walsh hadamard code by command hadamard(n) and it will generate n by n matrix, u can pick any row and use it as walsh code
