Gold Code Report

download Gold Code Report

of 51

description

A Thesis on Performance Analysis of Gold code based CDMA System

Transcript of Gold Code Report

Chapter 1: Preamble1.1 ObjectiveThe objective of the work is to design and simulate a multiuser spread spectrum CDMA system where user data is spreaded with gold sequence. In a spread spectrum system the transmitted data is encoded or spreaded with PN code and are transmitted. As the number of users increases, correlation amongst these PN codes also increases, leading to increased BER. This BER can be reduced if the PN codes are uncorrelated. Their auto correlation must be high enough and cross correlation must be low enough. This can not be achieved by normal PN sequence. Therefore in this work we develop a Gold Code generation which achieves very minimum cross correlation and therefore interference amongst various user data is minimum.1.2 Statement of the problem The project statement can be summarized as to design and simulate a spread spectrum system with gold code and to demonstrate the low cross correlation and high autocorrelation properties of gold code improves the performance of the system under multi user environment and under the presence of noise like Gaussian noise.

1.3 General Introduction to Wireles Multiple accessMultiple Access Techniques

Multiple Accesses is fundamental to satellite communication because it is the means by which the wide geographic coverage capability and broadcast nature of the satellite channel are exploited. Multiple Access is the ability of a large number of earth stations to simultaneously interconnect their respective voice, data, Teletype and TV links through a satellite. It effects all elements of the system, determines the system capability and flexibility and has a strong influence on costs. Multiple access means multiple, simultaneous users can be supported in other words a large number of users share a common pool of radio channels and any user can gain access to any channel.(each user always not assigned same channel).A channel is a portion of the limited radio resource which is temporarily allocated for a specific purpose each as a phone call Multiple Access method is a definition of how radio spectrum is divided in to channels and how channels are allocated to many users of the system. There are three basic dimensions that can be allocated to provide multiple access: Space Time Frequency Spatial allocations are largely fixed by significant infrastructure deployment decisions. Time and frequency can be allocated more flexibly. Here, well focus on time and frequency based multiple-access techniques.The three fundamental allocation schemes are: Frequency Division Multiple Access(FDMA) Time Division Multiple Access(TDMA)Code Division Multiple Access (CDMA)Any Multiple-Access technique encountered in theoretically offers the same capacity in an ideal environment. But in environments typically Cellular Communications, some techniques provide better capacity than the others. The capacity limitation of earlier analog cellular systems employing frequency modulation and digital techniques offering more capacity were proposed for overcoming the limitation. Time Division Multiple Access (TDMA) and Code Division Multiple Access (CDMA) were the primary digital transmission techniques that were researched and it was found that CDMA systems offer the highest capacity than the other competing digital technologies (like TDMA) and analog technologies.CODE DIVISION MULTIPLE ACCESSIn a code-division multiple-access (CDMA) communication system, a communication channel with a given band-width is accessed by all the users simultaneously. The different mobile users are distinguished at the base station receiver by the unique spreading code assigned to the users to modulate the transmitted signals. Hence, the CDMA signal transmitted by any given user consists of that users data which modulates the unique spreading code assigned to that user, which in turn modulates a carrier using any well-known modulation scheme. The frequency of this carrier is the same for all users. At the receiver separation is possible because each user spreads the modulated waveform over a wide bandwidth using unique spreading codes. The set of codes used must have the following correlation properties: Each code must be easily distinguishable from a replica of itself shifted in time. Each code must be easily distinguishable regardless of other codes used on the network. CDMA is the most suitable multiple access transmission technology for Mobile Communications and all the 3rd Generation Mobile Communication Standards suggest CDMA for the Air-Interface..The main reason for the success of this technology is the huge increase in capacity covered by CDMA systems when compared to other analog (FM) or digital (TDMA) transmission systems.Code division multiple accessGenerically, Code Division Multiple Access (or CDMA) is any use of any form of spread spectrums by multiple transmitters to send to the same receiver on the same frequency channel at the same time without harmful interference. Other widely used multiple access techniques are Time Division Multiple Access (TDMA) and Frequency Division Multiple Access ( FDMA ). In these three schemes, receivers discriminate among various signals by the use of different codes, time slots and frequency channels, respectively. The term CDMA is also widely used to refer to a family of specific implementations of CDMA pioneered by Qualcomm for use in digital cellular telephony. These include IS-95 and IS-2000 . The two different uses of this term can be confusing. CDMA (the technique) is used in the UMTS standard. However, CDMA(the standard) and UMTS have been competing for adoption in many markets. Another important application of CDMA -- predating and entirely distinct from CDMA cellular -- is the Global Positioning System, GPS . All forms of CDMA use spread spectrum process gain to allow receivers to partially discriminate against unwanted signals. Signals with the desired spreading code and timing are received, while signals with different spreading codes (or the same spreading code but a different timing offset) appear as wideband noise reduced by the process gain.

The way this works is that each station is assigned a spreading code or chip sequence . Such chip sequences are expressed as a sequence of -1 and +1 values. The dot product of each chip sequence with itself is 1 (and the dot product with its complement is -1), whereas the dot product of two different chip sequences is 0.

E.g. if C1 = (-1,-1,-1,-1) and C2 = (+1,-1,+1,-1) C1 . C1 = (-1,-1,-1,-1) . (-1,-1,-1,-1) = +1 C1 . -C1 = (-1,-1,-1,-1) . (+1,+1,+1,+1) = -1 C1 . C2 = (-1,-1,-1,-1) . (+1,-1,+1,-1) = 0 C1 . -C2 = (-1,-1,-1,-1) . (-1,+1,-1,+1) = 0

This property is called orthogonality. These sequences are Walsh codes and can be derived from a binary Walsh matrix . A station sends out its chip sequence to send a 1, and its inverse to send a 0 (or +1 and a -1; zero being silence).

When multiple chip codes are sent by multiple stations, the signals add up in the air. For example the chip sequences (-1,-1,-1,-1) and (+1,-1,+1,-1) add up to (0,-2,0,-2). The receiver merely needs to calculate the dot product of the station it's interested in with the signal in the air. E.g. (-1,-1,-1,-1) . (0,-2,0,-2) = +1. Had -1 been sent the signal in the air would have been (+2,0,+2,0) and the dot product would have been (-1,-1,-1,-1) . (+2,0,+2,0) = -1. A TDMA or FDMA receiver can in theory completely reject arbitrarily strong signals on other time slots or frequency channels. This is not true for CDMA; rejection of unwanted signals is only partial. If any or all of the unwanted signals are much stronger than the desired signal, they will overwhelm it. This leads to a general requirement in any CDMA system to approximately match the various signal power levels as seen at the receiver. This is inherent in the GPS in that all of the satellites are roughly equidistant from the users on or near the earth's surface. In CDMA cellular, the base station uses a fast closed-loop power control scheme to tightly control each mobile's transmit power.

The need for power control can be deduced neatly from the above calculations; if some stations would broadcast +0.8 and -0.8 and others +1.2 and -1.2, this would wreak havoc with the calculations.

Forward error correction (FEC) coding is also vital in any CDMA scheme to reduce the required signal-to-interference ratio and thereby maximize channel capacity.

CDMA's main advantage over TDMA and FDMA is that the number of available CDMA codes is essentially infinite. This makes CDMA ideally suited to large numbers of transmitters each generating a relatively small amount of traffic at irregular intervals, as it avoids the overhead of continually allocating and deallocating a limited number of orthogonal time slots or frequency channels to individual transmitters. CDMA transmitters simply send when they have something to say, and go off the air when they don't.

Chapter 2CDMA System2.1 Tran receiver:

Figure 1: Basic Block Diagram of CDMA SystemEach user in the system is allocated with Unique PN sequence. These sequences are un correlated. Before transmission, user data is spreaded with the users PN sequence. Spreading is a function which first increases the chip rate of the data and then XOR the data with the PN code. In channel encoding convolution codes are added with the base band signal which helps detecting and removing the channel noise. Channel is the medium of transmission of data. Different users data are transmitted simultaneously without requiring any phase delay in transmission like that of frequency hopping technique. At the receiver, using the multiuser detection system using matched filter, the data of different users are separated. Further it is decoded with respective users PN code. Modulation is performed as either QPSK or BPSK to enhance the power of the signal.The most important part of the system is selecting the PN code. Because multiple users may transmit at the same time, the codes must be orthogonal and must present very little correlation. i.e. a particular sub sequence in a code must not repeat for any other user. Though theoretically it is not possible, but careful selection of the code amy lead to the same. 2.2Basic Principle of Spread Spectrum System:

The building block of the DSSS system is

Figure 2: Input: side of SS1. Binary data dt with symbol rate Rs = 1/Ts(=bit rate Rb for BPSK)2. Pseudo noise code Pnt with chip rate Rc = 1/Tc(an integer of Rs)

Spreading:In the transmitter the binary data dt is directly multiplied with the PN sequence Pnt which is independent of binary data to produce the transmitted baseband signal txb.txb = dt.PntThe effect of multiplication of dt with the PN sequence is to spread the baseband b/ w Rs of dt to a baseband bandwidth of Rc.

Advantages of Spread Spectrum:

1) Improved interference rejection.To simplify the influence of interference the spread spectrum system is considered for baseband BPSK communication(without filtering) FIGUREThe received signal rxb consist of the transmitted signal txb plus an additive intereference(noise ,jammer etc) rxb = txb + i = dt.Pnt+ito recover the original data dt the received signal rxb is multiplied with locally generated PN sequence Pnr that is an exact replica of that used in the transmitter(ie Pnr = Pnt & synchronized) the multiple o/p is given by dr = rxb .Pnt = dt .Pnt.Pnt + i.PntThe data signal dt is multiplied twice by the PN sequence Pnt whereas the unwanted interference i is multiplied only once .Due to the property of PN sequence Pnt.Pnt = +1 for all tThe multiplier o/p becomes dr = dt + i.Pnt the data signal dt is reproduced at the multiplier o/p in the receiver, except for the interference represented by the additive term i .Pnt multiplication of the interference i by the locally generated PN sequence ,means that the spreading code will affect the interference just as it did with the information bearing signal at the transmitter. Noise & interference being uncorrelated with the PN sequence become noise like having higher b/w & reduced power density after the multiplication. After dispreading the data component dt is narrow band (Rs) where as the interferences component is wideband(Rc) .By applying the dr signal to a base band (low pass) filter with a b/w just large enough to accommodate the recovery of the data signal ,most of the interference component i is filtered out. The effect of the interference is reduced by the processing gain (Gp) .2) Code division multiplexing for cdma applicationIn CDMA systems all users transmit in the same b/w simultaneously .in this transmission technique ,the frequency spectrum of the data signal is spread using a code uncorrelated with that signal as a result the b/w occupancy is much higher than required .The codes used for spreading have low cross correlation values & are unique to every user. This is the reason that a receiver which has knowledge about the code of the intended transmitter, is capable of selecting the desired signal .

3) Low density power spectra for signal hiding.White noise has the same power spectral density Gwgn (f) for all frequencies as shown in figure. As the PN codes are derived from these white noise we can see that the spectral power density is No/2 & these Pn codes are used for signal hiding. Hence we can say that the power spectral density is low for signal hiding.4) High resolution ranging.5) Secure communication (privacy).In these days the sss are used in military & other wide range of applications as they provide secure communication that is the privacy is maintained since the sss uses the PN codes for signal hiding, unless & until we know the intended PN code for a particular message signal or the user, we cannot get back the message signal due to the autocorrelation property only when the PN sequence at the transmitter matches the PN code at the receiver, then only the signal can be recovered.Theu sss provides secure communication ie only the intended user can decode the signal & it is very difficult to know the PN sequence .6) Anti jam capability.The goal of a jammer is to disturb the communication of his adversary.The goals of the communicator are to develop a jam resistant communication system under following assumption1. Complete invulnerability is not possible.1. The jammer has a prior knowledge of most system parameters, frequency bands, timing,traffic etc.1. The jammer has no prior knowledge of the PN spreading code. Protection against the jamming waveform is provided by purposely making the information bearing signal occupy a b/w for in excess of the minimum b/w necessary to transmit it .This has the effect of making the transmitted signal assume a noise like appearance so as to blend in the background. The transmitted signal is thus enabled to propagate through the channel undetected by anyone who may be listening.7) Increased capacity and spectral efficiency in some mobile cellular personal communication system applications(pcs) .As there is no limitation on the time & frequency utilization any user can transmit at any time & using as much b/w as required & also there is no intereference among the users alyhough they are using the same b/w .Hence the spectral efficiency is greatly increased .8)Graceful degradation of performance as the number of simultaneous users of an RF channel increases.As the no. of users sharing the same RF channel increases the intereference among the adjacent users also increases as the autocorrelation & crosscorrelation properties cannot be achieved perfectly in practical communication system. Due to this intereference there is a degredation in performance at the receiver in getting back the signal & the computational load also increases correspondly.9) Low cost of implementation.10) Readily available IC components.

Encoding:Source encoder:Let the input to the source encoder be a string of source symbol from the source alphabet S={S1,S2----Sn}occurring at the rate of Rs symbol/sec. A source encoder converts a symbol sequence into a binary sequence of 0sand 1s by assigning code words to the symbol in the input sequence. Binary coding is preferred because of its high efficiency of transmission and also the case with which they can be transmitted over the channel. The simplest way of coding is to assign a fixed length binary code word to each symbol in the input sequence but fixed length coding of individual symbol in a source o/p is efficient only if symbol occur with equal probabilities in a statistical independent sequence. In most practical situation the symbols occur with unequal probabilities .The source encoder then assigns variable length code word to these symbols. The important parameters of a source encoder are block size length of the code word, average data rate and encoder efficiency.Linear block codes:In channel encoder, a block of k message bits is encoded into a block of n bits by adding (n-k) No. of check bits as shown in fig below.Clearly n > k and such a code formed is called (n, k) block code. These (n-k) check bits are derived from k message bits.

Figure: Channel Encoder ModelA (n, k) block code is said to be a (n, k) linear block code if it satisfies the condition given below.Let C1 and C2 be any two code words (n bits) belonging to a set of (n, k) block code. If C1 x-or C2 is also a n bit code word belonging to the same set of (n, k) block code ,then such a block code is called (n,k) linear block codes.A (n,k) linear block code is said to be systematic if the k message bits appear either at the beginning of the code word or at the end of the code word as depicted in the fig above.

Matrix description of linear block codes:Let the message block of k bits (code words) be represented as a row vector or k tuple called message vector given by [D]={ d1,d2----------,dk}Where d1,d2------dk are either 0s or 1s .thus there are 2k distinct message vector and all these message vectors put together represent k tuples in a k dimensional sub space over a vector space of all n tuples over a field space called GALOIS FIELD denoted by GF(2).The channel encoder systematically adds (n-k)No of check bits to form a (n,k) linear block code. Then the 2k code vectors can be represented by C={C1, C2,----------Cn}----------1.Note that only k tuples out of n tuples in the above equation are valid code vectors and the remaining (2n-2k) code vectors are invalid code vectors, which form the error vectors. The ratio k/n is defined as the rate efficiency of the (n,k)linear block codes .In a systematic linear block codes the message bits appear at the beginning of the code vector therefore Ci = di for all i=1 ,2,-----,k ----------2The remaining (n-k )bits are check bits .hence equation 1&2 can be combined as

[C]={C1,C2,-----------,Ck,Ck+1,Ck+2----------,Cn} ------------3

k message bits(n-k)check bits

These (n-k) No of check bits Ck+1,-------,Cn are derived from k message bits using a predetermined rule as fallows .

Ck+1=p11d1+p21d2+-------pk1dkCk+2 =p21d1+p22d2+------pk2dk - Cn=p1,n-kd1+p2,n-kd2+-----pk,n-kdk Where p11,p21,p12,p22--------are either 0s or 1s and the addition above is performed using modulo 2 arithmetic it is possible to combine 2,3,4 eqn and express the result in a matrix form as [C1 C2 --------Ck Ck+1 Ck+2---------Cn]=

or [C] = [D] [G ]Where [G] is called as Generator matrix of the order (k*n) given by [G] = [Ik P] (k*n) ----------6Where Ik = unit matrix of order k [P] = Arbitrary matrix called Parity matrix of order k*(n-k) When eqn 6 is used for writing the general matrix [G] , then the systematic linear block code so obtained will have the message bits at the beginning of the code vector and check bits at the end .The generator matrix [G] can also be expressed as [G] = [P Ik] in which case the message bits will be presented at the end & check bits at the beginning of the code vector. The parity matrix [P] is suitably selected to correct random & burst errors.

Parity Check matrix [H]: The generator matrix is given by

Associated with the generator matrix [G] ,is another matrix called Parity check matrix -H given by [H ] = [PT In-k] .[H] matrix is a (n-k) * (n) matrix & this matrix is used in error correction .

Syndrome and error correction:Suppose that C=(C1 C2--------------Cn) be a valid code vector transmitted over a noisy communication channel belonging to (n,k) linear block code .Let R={r1r2 ----------rn} be the received vector .Due to the noise in the channel r1,r2--------rn may be different from C1 C2--------Cn.The errorVector or error pattern E is defined as the difference between R & C . E= R-C=R+CSince subtraction is same as addition in modulo-2 arithmetic .The error vector e can be represented as a vector by E= {e1 e2--------en} .From the above eqn it is clear that E is also a n tuple where ei=1 if ri not equal to ci & ei=0 if ri=Cn.The 1s present in the error vector E represent the errors caused by noise in the channel.In eqn E=R+C, the receiver knows only R and it does not know C & E.In order to find E & then C, the receiver does the decoding operation by determining an (n-k) vector S defined as S=RHT=(S1 S2 -----------Sn-k)

The (n-k) vector S is called Error syndrome of R.We know that, R=C+E, S=(C+E) HT =CH T+EHTbut CHT = 0, thus S= EHTThe receiver finds E from S = EHT as S & HT are both known .Then from R=C+E the transmitted code vector C can be found out .The syndrome S of the received vector will be zero if R is the valid code vector .When R not equal to C , then S not equals to zero & the receiver then detects & corrects the error .

Decoding:Decoder: The source decoder converts the binary o/p of the channel decoder into a symbol sequence .The decoder for a fixed length code words is quite simple, but the decoder for a system using variable length code words will be very complex. Therefore the function of the decoder is to convert the corrupted signals into a symbol sequence & the function of the receiver is to identify the symbol sequence & match it with the correct sequence.

Channel:A communication channel provides the electrical connection between the source & destination .The channel may be a pair of wires or a telephone cable or free space over which the information-bearing signal is radiated. Due to physical limitations, communication channels have only finite b/w & the information-bearing signal suffers amplitude & phase distortion as it travels over the channel. In addition to the distortion, the signal power also decreases due to attenuation of the channel. Furthermore, the channel is corrupted by unwanted unpredictable electrical signals referred as noise. While some of the degrading effects of the channels can be removed or compensated for the effect of noise cannot be completely removed .The main objective of a communication system design is to suppress the ill effects of noise as much as possible. When binary symbols are transmitted over the channel, the effect of noise is to convert some of the zeros into ones & some of the ones to zero. The signals are then are said to be corrupted by noise.

Modulation:

Figure: Channel Properties of SsSpread spectrum system are spreading the information signal dt which has a BWinfo, over a much larger b/w BWss .

BWinfo Rs