Lateef AAA, Ayed B, Khalid S, Ali F, Ghazi M and Mahammed KA*
Department of Electrical Engineering, College of Engineering, Al Dawadmi, Shaqra University, Saudi Arabia
Received Date: April 24, 2017; Accepted Date: May 22, 2017; Published Date: May 29, 2017
Citation: Lateef AAA, Ayed B, Khalid S, Ali F, Ghazi M, et al. (2017) Matlab Simulation for Generation and Performance Analysis of Gold Codes in CDMA. J Biosens Bioelectron 8: 243. doi: 10.4172/2155-6210.1000243
Copyright: © 2017 Lateef AAA, et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Visit for more related articles at Journal of Biosensors & Bioelectronics
In communication, SS plays a vital role in practical application like mobile communication in CDMA because it has advantage like noise immunity. Spread spectrum technique may be a digital pass band technique. Some good codes are used by SS modulation and demodulation scheme0.s. At the channel the signal with noise gets jammed and results in transmission problem. So, this paper depicts PN codes for the development of gold codes with accuracy. These codes ought to be well arranged to the message signal. This sequence which is developed as the spreaded signal for the transmission process in CDMA shall contain the noise immunity property. Received signal from the transmission process is despreaded in receiver. Designed sequence with similar gold codes acclimated to redesign the baseband signal. For the above mentioned process Matlab simulation programming has been adopted.
Pseudo Noise (PN) codes; Spread spectrum; CDMA; Gold codes
In the last few years the area of wireless communication has increased. This type of conversation is a new method and it is referred as Spread Spectrum (SS). Spreading method required large bandwidth in comparison with transmitting signal bandwidth. “SS technique is use as a part of transmitter that spreads the frequency of the signal to a wide range ”. It is used in process of demodulation to dispread original signal. “SS method will increase the bandwidth of information message signal to larger than is required to transmit  as shown in Figure 1”.The enlarged information measure permits the supply to wrap its message in protected envelope for a safer transmission.
“Firstly it was developed as a modern technique of communication by the military ”. Intentional impedance and jamming is least delicate by the third parties. However, it has grown to be very famous within the realm of private communication lately. In this paper, we try to utilize the SS technique for analyzing Direct Sequence-SS. In same band level, SS tries to manage against the performance of interference and obstruction with other users . In addition, the noisy signal is adjusted with the modulating signal to transmitted or spreaded and carries out the demodulation process or "de-spread" process at the end of the receiver. “This de-spreading process in turn spreads those signals which are not properly spread when transmitted ”. By this the impact is diminished and the yield will be the desired flag.
Properties: (a) The required signal is spread over a large bandwidth in comparison to the bandwidth needed to send the signal; (b) PN codes are used in spreading method.
In SS scheme, in comparison with bandwidth it is increased for required signals. “Processing gain is defined as the signal’s increased bandwidth to the minimal essential bandwidth for the transmission of information or data signal ”. Because of the spreading, there is a change in preparing gain GP and by using jamming margin; gain can be evaluated in a better way .
The above equation suggests the safety of the signal before corrupting. The characteristic of spreading is achieved by PN codes. The achieved signal is joined again with the PN codes. Each measured bit is encoded with numerous bits inside the PN selected bits. The new information must be sent at an equivalent rate to the first rate duplicated by the quantity of PN codes bits used to encode information. This transmission approach is because of the noise immunity measured. Gain (GP) is as a result of increased bandwidth . Let us see how spreading method protect the signal from corruption and obstruction. The main task of this proposed paper is to construct original signal with same gold codes by using DS-SS scheme. For achieving we adopted Matlab simulation programming.
Direct sequence spread spectrum (DS-SS)
“Today DS-SS is the most commonly used method of SS technique because it can be easily implemented and simple in using. In this system the carrier and PN codes are modulated at very high frequency ”. Signal frequency is f and T=1/f is the pulse time. “Transmitted PN sequence at a rate of frequency called as chipping frequency fc ”. Therefore the signal rate is given as fc/f. Individually, each bit of modulating signal is known as chip.
Figure 2 explains about the two signals at the same instance of time . In transmitted signal the data signal is the first signal and second one is PN sequence. The frequency domain of the data signal and PN sequence is shown in Figure 3.
Assuming the data signal be m(t), transmitted at frequency f, and PN sequence be PN(t), with chipping frequency fc. “Modulated signal is given as 
Where PN is Pseudo random Noise sequence”. When the modulated signal is compiled for the properties of correlation then the spreaded signal is given as S(t) and based on power distribution it leads to original message signal m(t).
Where J(t) is jamming signal and N(t) is the noise signal. J(t) and N(t) multiplied to gain the bandwidth and filter is applied before recapture the message signal with reduced power of jamming signal which is given by processing gain . By doing this data signal is protected from jammers.
These codes are effective in designing of good sequences. As it is using m-sequences for various sequences for numerous users. Gold sequences are based on preferred pairs m-sequences. “For example, take the polynomials 1+x^2+x^5 and 1+x+x^2+x^4+x^5  M-sequences gave only one sequence of length by joining two of these successions, in addition to the two m-groupings themselves, produce arrangements (every one length ) that can be utilized to spread distinctive info messages (diverse clients CDMA)”. M-sequences help the gold sequences by arranging the bits to use in DSSS. The needed property about Gold codes is that they are adjusted (i.e., same number of 1 and - 1s) (Figure 4).
The Gold code has been used as a spreading code in a SIMULINK based multi-user downlink CDMA system model and the resulting BER values have been plotted for different values of channel SNR [7,8] (Figure 5).
Spreading method and dispreading method
Modulating RF waves with a digital code with high bit rate is transmitted as message for DS modulation. This code sequence is usually a PN code. In telecommunications, DSSS may be a SS modulation technique. “As said earlier we replace each bit with n-new bits to attain spreading sequence. In other words, every bit is allotted a code of n bits, referred to as chips, wherever the chip rate is n times that of the info bit”  (Figure 6).
“Within the transmitter stage, the baseband information signal m(t) is Spread using gold Sequence ”. Then, the resultant spreaded signal s(t) is applied to modulator. The modulator s(t) is transmitted over AWGN channel. Consequently, transmitted signal is therefore a right away gold sequence. Finally in receiver original message is recovered from the spreaded signal .
Transmitter (Step 1): (1) By using rand function an array of random signal sequence is generated and assumed as a message signal. (2) Gold sequence is built with the help of two PN (Pseudo Noise) progressions PN1 and then for step one modulating output sequence is generated. (3) By using Gold Codes from second step modulated signal is constructed.
Algorithm for gold code generation (Step 2): (1) Generating the bit pattern with each bit 6 samples long.
(2) Generation of first and second PN codes of 20 bit by XORing then each bit is shifted continuously. (3) Combing the generated pattern bit in step 1 and the XORed bits from step 2 are used to generate gold codes sequence.
(4) XORed sequence is stored in gold.
Modulation with gold code (Step 3): The basic idea behind modulation was that in modulation method; replace every individual “0” bit of message signal with the generated Gold Code bits. For every individual “1” bit in the message signal with the Inverted bit of Gold Code. Therefore, replacing all the bits of message signal into sequence of spreaded signal.
Receiver (Step 4): Basically in receiver the process of demodulation take place and here “demodulating the received spreaded signal with the gold code to create the original message signal ”:
1. Gold codes and Original message bits are of equal length, each bit is XORed with the spreaded signal bit for every successive bit of both the signals.
2. Modulating signal of 20 bits by XORing yields as 0 or 1. If resulted bit is 0, then stored “0” in despreaded signal array and if it is 1, it is stored as 1.
3. Finally, from despreaded signal the original message signal is reproduced.
In simulation and results, the full processing procedures are discussed. During the discussion, according codes in MATLAB are attached with printed results.
Based on the above mentioned information, we had designed a MATLAB code for the simulation of DSSS . Several runs of the developed program were performed. The results of simulation are presented as Modulation and Demodulation of message signal. The Modulation of message signal was explained in Figure 7; The Demodulation of received signal and Graph Showing FFT for Separated and deseparated signals were explained in Figures 8 and 9.
By observing the resulted graph we can conclude the following:
1. We have successfully generated the gold code of 20 bit length and modulated a message signal also of 20 bit length with the gold code to produce a spreaded signal of length 400 bits.
2. We have successfully demodulated the spreaded signal using the same gold code sequence to produce the original modulating signal.
3. We have also calculated the FFT of spreaded signal and despreaded signal.
The objective of this paper is to produce gold codes and recreate the DSSS adjustment utilizating MATLAB. Consequences of reproduction of original message signal are obviously shows that the objective is accomplished.
Make the best use of Scientific Research and information from our 700 + peer reviewed, Open Access Journals