Implementation and performance evaluation of multi level pseudo random sequence generator

ABSTRACT


INTRODUCTION
Main challenges in telecommunication systems, data transmission at a high rate while maintaining user security [1], as a result of the usage of spread spectrum technology in telecommunication systems, direct sequence code division multiple access (DS-CDMA) systems have been considerably increased. Because of its important characteristics, such as low power spectral density [2], wide bandwidth, low interception probability, transmitted signal under noise level, and robustness against multipath fading, anti-interference capability [3], the direct-sequence spread spectrum (DSSS) technique has been widely used in secured digital communications. To spread the bandwidth and transmit the signal under the noise level in DS-CDMA systems [4], the transmitters use periodic pseudo noise (PN) sequences and modulate the baseband signal before transmission [5].
Many applications, such as security applications and sophisticated communication systems, require random sequence frames [6]. One of the most well-known methods to generate the pseudo-random sequence  [7]. It uses a set of shift registers connected in serial to create the random series [8]. This method LFSR is considered low complexity and could be implemented either using simple shift registers or using field programmable gate array (FPGA) [9]. The random number generation (RNG) was introduced to use in security applications and in cryptography [10], there is a real need for a random sequence with reasonable randomness probability to use in data ciphering [5]. Here, mathematics starts to get its role in random sequence generation. Many researchers start a competition to provide a sequence with the best randomness probability [11]. For example, using a gaussian random number generator (GRNG) algorithm to generate a random number sequence and examine the behavior of random numbers generated in the region of the Gaussian probability density function [12]. Also, pseudo-random sequence generations find their way into database applications; it introduced a generation algorithm with 2,000 database applications [13]. Also, time-variant recursions of accumulators are used to generate the random sequence, this method is characterized by low complexity uses the low resource of hardware [14]. Random sequence generations wildly used in communication applications, audio is used as a source to generate a random sequence with reasonable randomness probability [15]. The pseudo-random number generation also uses quadratic irrationals to produce a generator has fulfilled in the application of cryptography [16]. FPGA technology issued to implement the random sequence generator because of its flexibility in hardware implementation and high speed [17]. The security application takes benefit from the random sequence in modern cypher applications such as rabbit cypher [18]. The generated pseudo-random sequence using a computer may suffer from the good arbitrary start point [19], but the rest of the random series has deterministic properties or also parodic properties [19]. Quantum number generation introduced to use as a random number generator with excellent randomness properties over typical random number generator [20].
In this paper, we focus on using a random sequence as the adaptive sequence between both the transmitter and receiver in a communication application. In the next section, introduce the proposed multi-level pseudo-random sequence generator (MLPN) mathematical model.

PN SEQUENCE
PN is a sequence of binary values, such as ±1, that looks to be random but is actually absolutely deterministic and periodic, LFSR are commonly used to create PN sequences [21]. The number of shifts register stages determines the length of the PN sequence. The maximum allowable PN sequence length, N is provided by (2) assuming there are m shift registers used [22]: Such a sequence is referred to as a maximal length sequence. The recursive formula is used to construct the sequence according to the formula [7]: Additions and multiplications in the above formula represent the modulo-2, and all terms are binary (0 or 1). The connection vectors C1, C2,........... Cn sets the major properties of the generated sequence by defining the LFSR sequence generator's characteristic polynomial. The PN code produced by the LFSR with n flip-flops is periodic. The main constraints of PN sequence.
PN sequence represent statistical random sequence and includes several characteristics such as nearly equal numbers of zeros and ones. The shifted versions of the sequence have a very poor correlation and crosscorrelation with other signals, such as interference and noise, is extremely low. The main disadvantage of PN codes is their small code family size, which means they only serve a small number of mobile users [23].

GOLDEN PN SEQUENCES
In 1967 and1968, Gold suggested the gold sequences. It refers to a particular type of binary random (Pseudo Random) sequence in which the correlation between member sequences is extremely low, the golden are made by XOR two m sequences of the same length. Gold code are generated by XOR pair of PN sequence. For a gold sequence of length = 2 − 1, two L linear feedback shift register LFSR of length 2 − 1 are used. Gold sequences provide superior cross-correlation qualities than maximum length LFSR sequences when the LFSRs are chosen suitably. The gold code has the advantage of a uniform and bounded cross correlation between the two codes [24].
Gold and Kasami demonstrated that the cross correlation only has three possible values for certain well-chosen m-sequences, namely-1, -t, and t-2. The terms "preferred sequences" refer to two of these types of sequences. The length of the LFSR utilized here is purely dependent on t. The length of the LFSR utilized here is purely dependent on t [25]. Figure 1 explain block diagram of golden code sequence generator: If m is even = 2 ( +2) 2 ⁄ + 1 (4) Figure 1. Golden PN sequence generator In comparison to its PN sequence, gold codes have a larger code family size, which gives them more importance, so that gold codes overcome the drawback of PN codes' small code family size [22].

MULTI-LEVEL PSEUDO RANDOM SEQUENCE GENERATOR MATHEMATICAL MODEL
To understand the need for proposed MLPN sequence generator. Golden PN sequence has a good characteristic but with drawback its fixed, in this paper, introduce MLPN sequence pass the problem of changing the PN sequence used between the transmitter and receiver. The golden PN sequence is fixed. So, if we use it to process the data between the transmitter and receiver there is a chance for an unauthorized intruder to discover the used golden PN sequence and then the transmitted data. The proposed MLPN sequence pass this problem by a proposed design based on a mathematical model used to generate a PN sequence a cording a pre-defined Key between transmitter and receiver. This key can change with a large number of possibilities between transmitter and receiver. MLPN sequence need a special design of levels organized as net to discover the original data. MLPN sequence gives level of security for transmitted data. So, the unauthorized intruder needs the key and the MLPN sequence Net to discover the transmitted data. In this article discuss the mathematical model used to generate MLPN sequence. This discussion covers the following: a. Introduce the mathematical model for the proposed MLPN sequence generator. b. The mathematical model gives the facility of changing generating PN key according to presenting between transmitter and receiver, so it provides an adaptive process. And produce different pseudo-random sequence at each different key. c. The MLPN generator gives the ability to change the random sequence length according to the presenting parameter.
Consider the MLPN sequence as rectangular (or window) as shown in Figure 2 and each row called level; these levels have shifted version of reference golden code ( 1 ). Shifted versions of golden code takes the last element and rotate it to first location and push the other elements to the right side so: Golden code PN sequence vector.
Shifted golden code by one bit, Where n is number of golden code elements. Each shifted version of golden code represents level. So, from her comes the name multiple level. Because we will use these multiple levels in PN sequence generation. If we define a pair which indicate the start and end of the movements along the levels. Where each shifted version of golden sequence called level so: Where (1) represent start of transition on level, (1) represent end of transition on level. Each pair give two bits, one from start state and the second from the end state. Group of pairs, if we combine more than single pair in a group, we can construct what so called group of pairs, this group of pairs will represent the key of MLPN sequence generator. (1). (1)) . ( (2). (2)) . ( (3). (3)) … ( ( ). ( ))} Where N=number of pairs.
Where = . So, if we refer to the key as a mathematical representation of window, the key of seven bits and two steps with four levels could be in the form: Where represent number of levels, each group represent half of the golden code sequence, Step length=number of levels The probability of start ( ) and end ( ) of each group according to the window diagram in Figure 3 is equal to: For first step we can consider four start probability with end state as: 1-First level, R represent the result vector The start states First state end options (17) 2-Second level the start states The end states 1 (4) = 1 (2) (2) = 1 Fourth state end options (20) Note: we can apply key pair as desired, for example there is possibility to apply 4 pairs in first step, but sure we can choose two only. Or even multiple pairs with random order. Just keep in mind each pair gives two bits, the first from start point and the second in the end point. The window has flexibility in generation MLPN sequence. Note for the second step, the same window repeated the probability of second window by itself is the same of first step. Just consider shift in position by number of levels. For example, start of first level will be in location 4 instead of location one of first step and so on. Refer to Figure 3 gives good understanding of state transition on window diagram. In following illustrative example how to construct and generate MLPN sequence. Consider golden sequence has PN vector as shown:   b. Increase number of levels as desired, but the single pair still gives two bits only related to start state and end state, the step length sure will increase with increasing number of levels. c. The pairs group represent the secret key between the transmitter and the receiver, these groups can be chosen as desired between transmitter and receiver and sure changed easily. Each change gives different MLPN sequence. d. Generated PN by this method can be applied easily to any application use PN sequence in its construction. e. The first level G1 can be golden sequence or any other PN sequence. Also, each level can use any random generated PN in each level. So, each level may include its own PN sequence not always the shifted version. The pairs group represent the secret key between the transmitter and the receiver, these groups can be chosen as desired between transmitter and receiver and sure changed easily. Each change gives different MLPN sequence.

CORRELATION
The correlation properties of PN codes are significant in CDMA code design because they determine not only the level of channel access interference [6]. which contains interference from other users of the channel as well as self-interference due to multi-path propagation, but also the code acquisition properties. The concept of correlation is determining the degree of similarity between two sets of data. It has a range of -1 to 1 as its definition. A partial correlation value is shown by the other value. The correlation factor can be categorized in two types Auto correlation and cross correlation. In auto correlation the matching of sequence with all phase shifts of itself is known as auto correlation. pure random data must have a correlation value around to 0 about any auto correlations with a phase angle other than zero, the auto correlation formula is defining as: Cross correlation compares two sequences from different source instead of comparing a shifted copy of a sequence with itself. The cross correlation between two sequence A and B is defining as: In next paragraph discuss the performance of MLPN sequence generator as compared with Golden sequence using MATLAB software package. Also consider the auto-correlation properties for each generated PN sequence.

MLPN SEQUENCE PERFORMANCE SIMULATION
MLPN sequence generated using the window diagram. In previous paragraphs discuss the mathematical model, generation with illustrated examples. Here discusses the performance of generated MLPN sequence as compared with good performance well known golden code. The tool used to test the performance is MATLAB software package. Actually, the test includes programming a communication system deals with PN sequence. This communication system tested with different modulation schemes. The modulation schemes include BPSK, QPSK, and 16QAM. Figure 3 explain BER perform of MLPN at 4 levels with QPSK.
The system uses PN sequence generator to generate either golden sequence or MLPN sequence. This depends on our choice during simulation. Also, for modulation schemes, the simulation uses one of these modulation schemes during simulation, this depends on the case under test. So, this simple communication system will test golden sequence and MLPN sequence under same modulation scheme. The cases under test with its parameter listed in Table 1. Note GP abbreviation refers to golden sequence polynomial. Golden sequence has two generating polynomials. The D refers to D-register. The initial condition of D registers is shown in Table 1 for each case. Note golden sequence is periodic, it means the generation polynomial used to generate 8 bits is the same for generation 16 bit, because its periodic the bits frame repeat itself. We can take the golden sequence length as needed in simulation. For MLPN sequence simulation consider two types one based on four levels with two steps and two groups, each group consist of two pairs, each pair gives two bits. So over all gives 8-bits. The second MLPN consist of five levels with four steps. Each step will operate with its own group. Each group designed with two pairs. Recall each pair gives two bits. So over all we generate 16-bit MLPN sequence. The simulation results listed in Figures 5-8. The comparison between all systems summarized in Table 2. And followed by comment on results. Figure 4 refers to comparison of BER performance of MLPN 4 with golden at 16QAM. Figure 5 refers to comparison of BER performance of MLPN 5 with golden at BPSK. Figure 6 refers to comparison of BER performance of MLPN 5 with golden at QPSK.  Referring to simulation results shown in Table 2. It shows the proposed MLPN sequence gives a good performance as comparison with the golden code sequence. It actually the same performance for a large range of SNR. The small difference at the end of the bit error rate (BER) performance curve. So, the performance almost the same. But from the other side of view. The MLPN sequence has more flexibility in changing the sequence, by changing the generation key. While for golden sequence it's fixed. The MLPN sequence gives a new PN sequence when changing the generation key. It does not represent the shifted version of the previous MLPN sequence. But it generates a new sequence depending on the Key and the pairs included inside groups. This property gives the proposed MLPN sequence advantage over the common golden code sequence. Its application can include data security too, because its PN sequence changed with key. The probability of finding new sequence depends on number of steps. An increasing number of levels and number of steps with number of groups gives a good probability to generate a large range of MLPN sequences.
The auto correlation for MLPN sequence of four levels and golden sequence is shown in Figure 8. The cross correlation between two sequences MLPN and golden with 8-bits in length is shown in Figure 9. The auto correlation show mirror at the center of 8 for both MLPN and golden sequence. The correlation shows the similarity between two sequences. Also, the auto correlation and cross correlation for MLPN and golden sequence for 16-bit length are shown in Figure 10 and Figure 11 respectively.

MLPN SEQUENCE GENERATOR FPGA IMPLEMENTATION
MLPN sequence generator designed to give flexible changed PN sequence. The mathematical model that describes the generator is quite simple; it represents the operation followed to generate the sequence. The transmitter side and receiver side could quickly agree with the same key to generate the random sequence. MLPN can implemented using microcontroller or FPGA. The FPGA choice provides the ability to implement the MLPN sequence generator with high speed in operation. The MLPN sequence generator implementation depends on the mathematical model, because it describes the mathematical operations used to generate the PN sequence according a key. This mathematical operation programmed using very high-speed description language VHDL. Figure 12 show the Universal test waveform of the MLPN sequence. Figure 13 shows block diagram of MLPN sequence FGPA implementation. Figure 14 show block diagram of FPGA implementation. Figure 14 show flow chart steps to implement MLPN sequence generator using VHDL language. The implementation uses Quartus software with Cyclone IV EP4CE6E22C8N FPGA from Altera.
The universal waveform test is used to verify the implementation, test its operation with variable inputs. The design includes 7 bits MLPN sequence XOR with input data for the encoded data vector then XOR again with the encoded data vector to restore the input data vector. The decoded data vector sure exactly the same input data vector. The simulation shows the Implementation of MLPN sequence generator works without any mistakes. Figure 15 show the MLPN sequence netlist view. The simulation and test of the MLPN sequence generator show the possibility to implement it using FPGA. But keep in mind the simple and clear mathematical model permit to of use other technologies to implement MLPN sequence generator. For example, referring to the microcontroller. It uses integrated development environment IDE in design and program variable systems. Its language characterized by its easy and powerful C language. Program MLPN sequence generator not so hard job, actually its very similar to simulating MLPN using MATLAB with m files extension type. This gives the facility and ability to use MLPN sequence generator with variable applications.

CONCLUSION
In this paper introduce a proposal pseudo random sequence generator, introduce its mathematical model and discuss its operation with illustrative examples. This MLPN sequence generator characterized by its simple mathematical model, can generate different random sequence lengths according to the key. Also, it can provide adaptive operation with agreeing between transmitter and receiver. This paper also introduces FPGA implementation using Altera FPGA, to show this MLPN sequence generator is applicable. In this paper discuss two MLPN generators, one with four levels and the second with five levels. But the design can consist of multiple levels with a different number of steps. Use MATLAB to comparison between MLPN and well-known golden sequence, the BER curves show MLPN has good performance likely golden sequence for a large range SNR. The construction of MLPN decided by the designer according to application. And take into consideration the complexity of the target design. Finally, this MLPN sequence generator can be used in security applications, especially with systems that not need sophisticated design with the accepted security level.