project1 report

27
PROJECT-1 REPORT ON TO GENERATE PRN/TRUNCATED PRN SEQUENCE AND STUDY THE PERFORMANCE USING LAB VIEW AMITY SCHOOL OF ENGINEERING & TECHNOLOGY. Under the valuable guidance of Dr. P. Banerjee & Ms. Monika Kaushik AMITY UNIVERSITY, UTTAR PRADESH SUBMITTED BY :- NAME : MANISHA SHARMA ENROLLMENT NO. :A2326612002 PROGRAMME: M.TECH (W.C.)

Upload: manishascribd

Post on 21-May-2017

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Project1 Report

PROJECT-1 REPORT

ON

TO GENERATE PRN/TRUNCATED PRN SEQUENCE AND STUDY THE PERFORMANCE USING LAB VIEW

AMITY SCHOOL OF ENGINEERING & TECHNOLOGY.

Under the valuable guidance of

Dr. P. Banerjee

&

Ms. Monika Kaushik

AMITY UNIVERSITY,

UTTAR PRADESH

SUBMITTED BY:-

NAME : MANISHA SHARMA

ENROLLMENT NO. :A2326612002

PROGRAMME: M.TECH (W.C.)

Page 2: Project1 Report

CERTIFICATE

On the basis of declaration submitted by MANISHA SHARMA , student of M.Tech (Wireless Communication), we hereby certify that the project titled “TO GENERATE PRN/TRUNCATED PRN AND TO STUDY THE PERFORMANCE USING LAB VIEW” which is submitted to Department of Electronics and

Communication, Amity School of Engineering and Technology, Amity University,

NOIDA, Uttar Pradesh in partial fulfilment of the requirement for the award of the

degree of Master of Technology in Wireless Communication, is an original

contribution with existing knowledge and faithful record of work carried out by her

under our guidance and supervision.

To the best of our knowledge this work has not been submitted in part or full for any

Degree or Diploma to this University or elsewhere.

Dr. P. BANERJEE Ms. MONIKA KAUSHIK

Dept. Of ECE Dept. Of ECE

ASET ASET

2

Page 3: Project1 Report

ACKNOWLEDGMENT

I , sincerely , acknowledge with sincere thanks contribution of Dr. P. BANERJEE,

and Ms. MONIKA KAUSHIK , in guiding the preparation of Project 1 . I also

acknowledge with sincere thanks , to the contribution of Ms. NEERU AGARWAL who helped and guided me in the finalization of the Project 1.

I, sincerely thank them for the guidance and help provided by them in the completion

of this Project 1 .

MANISHA SHARMA

M.TECH. (W.C.)

3

Page 4: Project1 Report

DECLARATION

I, MANISHA SHARMA student of M.Tech (WC) hereby declare that the Project 1

titled “TO GENERATE PRN/TRUNCATED PRN AND TO STUDY THE PERFORMANCE USING LAB VIEW” which is submitted by me to Department Of

ECE, Amity School of Engineering and Technology, Amity University Uttar Pradesh,

NOIDA, in partial fulfilment of requirement for the award of the degree of Master of

Technology in Wireless Communication , has not been previously formed the basis

for the award of any degree, diploma or other similar title or recognition.

NOIDA

DATE Name and signature of Student

4

Page 5: Project1 Report

ABSTRACT

A very dynamical development of virtual instrumentation in recent years has caused a very good acceptance of this concept and its use in many applications. This concept, as one flexible and cost-effective solution for test and measurement, is used in this project for implementation of maximum length pseudorandom noise sequences(PRN) and their truncation. Because of their properties, the pseudorandom binary sequences are often used in development and improvement of modern pseudorandom position encoders as well as in testing of some sensors, analog-to-digital converters, etc.

Also the PRN codes act as spreading codes in the spread-spectrum communications system. Sometimes there is a need to shorten the PRN sequence to decrease the acquisition time and to match the data field size in frame structures . Some properties of truncated PRN sequences will be studied keeping in mind its application in communication system 9 stage shift registers will be used to implement in Lab View .

Key words: virtual instrument, pseudorandom noise sequence

5

Page 6: Project1 Report

Table Of Contents

S.NO. TITLE PAGE NO.

1. INTRODUCTION 7

2. NI Lab View: A BRIEF VIEW 9

3. GENERATION OF PSEUDORANDOM BINARY SEQUENCE OF MAXIMUM LENGTH

11

4. 511 PN SEQUENCE GENERATION 14

5. TRUNCATED PSEUDO RANDOM NOISE SEQUENCE 16

6. CONCLUSION 19

7. FUTURE WORK 20

8. REFERNCES 21

INTRODUCTION

6

Page 7: Project1 Report

The vision of virtual instrumentation changed and improved the way engineers and scientists work, delivering solutions in less development time, with lower costs, and greater flexibility. It can be noted that virtual instrumentation has had a constant and extensive development regarding hardware and software and was widely adopted mostly in test and measurement areas in the last decade. Of course, the main catalyst of that development is a very dynamical development of computer techniques and digital electronics. The presence of virtual instrumentation in industry, education, everyday life etc, is getting wider each day.

The virtual instrument concept offers the possibility for an engineer to use flexible and powerful software running on a computer combined with instrumentation hardware to define a custom test and measurement solution. The development of virtual instrumentation enables a series of new possibilities in the field of measurement techniques, research work, etc. What is important is the fact that virtual instruments are significantly cheaper than traditional. They are also very flexible, i.e. have a possibility of simple modification and upgrading. The good properties of virtual instruments are modularity and hierarchy, i.e. the possibility of dividing a complex task into simplier problems and their separate realizations and testing, and connecting them to complex virtual instrument. Virtual instrumentation also offers a possibility of communication with traditional instruments through an appropriate interface, which is widely used in development and during realization of virtual and remote laboratories.

There are different development tools and environments for realization and design of virtual instruments. One of the most often used and widespread is LabVIEW, by National Instruments , which as a graphical development platform enables intuitive and simple development without the need for serious previous programming knowledge. The programming is performed by a graphical programming language, which is easier for learning and debugging than textual.

The pseudorandom binary sequences (PRBS) are a useful type of periodic signals, which have the following properties: 1) the signal is bipolar, series of 1’s and 0’s; 2) the PRBS is a deterministic repeatable signal; 3) the PRBS exhibits a uniform power spectral density over a wide frequency band; 4) according to the “window property” of PRBS oflength 2n-1, any n-bit code word obtained by a window of width n, is unique and may fully identify the window’s absolute position p relative to

7

Page 8: Project1 Report

the beginning of the sequence. This is used in pseudorandom absolute encoders.

The area of PRBS application is wide, for example, during design and testing of pseudorandom position encoders, then for testing of measurement transducers , AD converters testing , in the field of communication , measurement of frequency response , navigation systems, scrambling, cryptographic applications, etc. Other applications are found in surface characterization and 3D scene modeling, and in audio applications to measure the properties of loudspeakers.

The generation of pseudorandom binary sequences can be implemented in different ways, including using a discrete shift register and flip-flops, using a microprocessor, using a FPGA-based implementation ,MATLAB etc. However, methods of pseudorandom binary sequences generation based on virtual instrumentation concept are presented in this project.

NI Lab View: A Brief View

8

Page 9: Project1 Report

LabVIEW is a highly productive development environment that engineers and scientists use for graphical programming and unprecedented hardware integration to rapidly design and deploy measurement and control systems. Within this flexible platform, engineers scale from design to test and from small to large systems while reusing IP and refining their processes to achieve maximum performance.

It is a graphical programming language that uses icons instead of lines of text to create applications. In contrast to text based programming languages, where instructions determine program execution, LabVIEW uses dataflow programming, where the flow of data determine execution order.

It consists of two main blocks: BLOCK DIAGRAM & FRONT PANEL.

1. BLOCK DIAGRAM:

Block diagram objects include terminals, subVIs, functions, constants, structures, and wires, which transfer data among other block diagram objects.

Example of a Block Diagram window

2. FRONT PANEL:

The front panel window is the user interface for the VI.

9

Page 10: Project1 Report

Example of a Front Panel Window

LabVIEW programs are called virtual instruments, or VIs, because their appearance and operation often imitate physical instruments, such as oscilloscopes and multimeters. LabVIEW contains a comprehensive set of tools for acquiring, analyzing, displaying, and storing data, as well as tools to help troubleshoot code we write.

GENERATION OF PSEUDORANDOM BINARY SEQUENCES OF MAXIMUM LENGTH

10

Page 11: Project1 Report

The pseudorandom binary sequences of maximum length can be generated by using shift register which is composed of n flip-flops and appropriate feedback connections. The order of binary zeros and binary ones depends on feedback configuration.

With a proper selection of feedback, a pseudorandom binary sequence of maximum length m = 2^n- 1 is generated, where n is the number of stages in the shift register. Also, it does not matter which state is considered to be initial, if state "zero" is turned off. In the configuration of pseudorandom sequence generator using exclusive-OR (XOR) gates is not allowed to appear the state where all outputs of shift register are zeros, because 0XOR 0 = 0. A properly selected feedback provides a generation of pseudorandom sequences of maximum length, m = 2^n- 1. The sequences are deterministic, but exhibit noise properties similar to randomness.

Example of linear feedback shift register

A PN sequence has three following properties:

· The number of ‘1’s and the number of ‘0’s in a PN sequence are only different by one (BALANCE PROPERTY).

· Run lengths of zeroes or ones are the same as in a coin flipping experiment. Half of the run lengths are unity, one-quarter are of length two, one-eighth are of length three and a fraction 1/2n of all runs are of length n (RUN PROPERTY).

· If the sequence is shifted by any non-zero number of elements, the resulting sequence will have an equal number of agreements and

11

Page 12: Project1 Report

disagreements with the original sequence (AUTOCORRELATION PROPERTY).

The BLOCK DIAGRAM of the realized virtual instrument using a LabVIEW 11.0 software environment is shown in Fig.

Here a 15 bit pn sequence is generated using 4 Linear Feedback Shift Registers.

Block Diagram of 15 length PN sequence

Following PN code is generated on the Front Panel of the LAB VIEW.

PN CODE:

12

Page 13: Project1 Report

WAVEFORM:

The above generated pn code is satisfying all the properties of the pn sequence:

1. No. of 1’s (= 8) > No. of 0’s (= 7) , balance property is satisfied.2. Total no. of runs = 8.

Half the no. of runs (=4) are of length, 1 i.e. 0,1,0,1. One-quater (=2) are of length 2 ,i.e. 11 & 00. One-eighth (=1) are of length 3 i.e. 000. Hence Run property is satisfied.

3. If the sequence is shifted by any non-zero number of elements, the resulting sequence will have an equal number of agreements and disagreements with the original sequence. 1 1 1 0 1 0 1 1 0 0 1 0 0 0 1 1 1 1 0 1 0 1 1 0 0 1 0 0 a a a d d d d a d a d d a a

Hence Autocorrelation property is satisfied.

NOTE: In the developed solution, for a given length of shift register, the generation mode of pseudorandom binary sequences can be selected,i.e. if generation is done by using XOR gates or XNOR gates.

511 PN SEQUENCE GENERATION

13

Page 14: Project1 Report

With reference to the previous 4 bit PN sequence , we will now generate a 9-bit PN sequence ,which will result in a 511 length sequence.

A nine-element shift register is placed on a While Loop. An exclusive ORgate is used whose inputs have been wired to Q5 and Q9. The loop index keeps track of the cycle count, and it stops when the output becomes equal to the initial value. An initial seed is set at starting of the process and each shift registers on the loop are initialized.

The parallel output can be observed either on LED indicators or in addition, a pseudo-random sequence of ones and zeros can beproduced at Serial Out.

Following is the block diagram of 9-bit PN sequence.

Block Diagram of 9-bit PN sequence

In this code the tapping is done from 4th and 9th shift register and then xoring them . This output is then fed back to the 1st register . The code length and the seed value are 511.

14

Page 15: Project1 Report

The output of the set up is observed on the waveform chart on the Front Panel of LAB VIEW, as follows.

The 511 PN code is very large to be obtained , hence plotting the waveform is more convenient and moreover it gives a better view.This sequence also satisfies all the three basic properties of the PN sequence like the previous one.

TRUNCATED PSEUDO RANDOM NOISE SEQUENCE

15

Page 16: Project1 Report

The PN sequences are not truly random but these codes have a very good correlation properties and nearly ideal properties similar to those of a sequence of independent and identically distributed binary random variables. These properties are essential components in a wide variety of modern applications like radar ranging system , code division multiple access in spread spectrum ,error correction, cryptographic systems, and many others.

However ,the properties of randomness in PRN-sequences are strictly dependent on their full length. Just cutting out one or few bits from the specified length can adversely disturb the system performance.

But it may be desirable to shorten the length of sequence in some applications .For example, for 8-stage PRN sequence the length of the sequence is 255, whereas for 9-stage it is 511 and for 10-stage is 1023. There is large gap in the selection of sequence length between 256 and 511 and further between 511 and 1023. Some shorter or intermediate length may be convenient to reduce the acquisition time and still preserve the advantage of a PRN-sequence . Even more commomnly, the PRN sequence could be shortened to fit into the data field size in frame structures . Further , the sequence number which is divisible by 5 or 10, sometimes make the system design less complicated.

To shorten the sequence one has to delete few bits. The resulting sequences may be called truncated PRN sequences , where the first or last few bits have been cut. In this project the last 11 bits of 511 length PRN sequence are being removed by using some additional blocks in that of the generation .Here a “DELETE FROM ARRAY” icon from the fuction pallete is inserted in the previous diagram and 11 bits are then removed from the 511 sequence to obtain the 500 length sequence.

Following is the block diagram for the truncation of the last 11 cycles of 511 PN sequence:

16

Page 17: Project1 Report

Block Diagram of Truncated PRN sequence

By running the above block diagram we obtain sequence in which last 11 cycles are removed .It can be seen below the following waveform charts of the normal PRN sequence and Truncated PRN sequence that waveform in the 2nd chart are stopped at the 500th sequence .

Waveform of normal PRN sequence

17

Page 18: Project1 Report

Waveform of Truncated PRN sequence

Hence the desired result was obtained.

CONCLUSION

Pseudorandom binary sequences are a type of periodic signals with some useful properties, and can be generated in different ways. The advantages of using virtual instrumentation for generation of pseudorandom binary sequences are pointed out in the project.

18

Page 19: Project1 Report

The Pseudo Random Binary Noise sequences were successfully generated and further are truncated in NI Lab View software. The waveforms of both the sequences are being compared. The realized PRN sequence is very flexible and can be used widely in various fields of research work. Graphical programming which is used for implementation of this generation is easier to learn than textual or VHDL programming.

Changing PRN signal parameters, such as generation mode, length of shift register, frequency, minimum and maximum value of signal, is quite easy in a user friendly interface. Uniform power spectral density over a wide frequency band of PRN signal is used for measurement of some properties of the test object, such as frequency response.

FUTURE WORK

The PRN sequences and the Truncated PRN are very widely used

sequences in various applications, so there is a lot of scope in the study

of these sequences by modifying them in different ways, like by

truncating the pn sequence ,more number of sequence can be

19

Page 20: Project1 Report

generated, and can be implemented in different softwares. In Lab View

software, by studying the performances of these sequences can be done

and then comparing it with the simple PRN sequence.

REFERENCES

1. Study on Potentiality of Truncated PRN Sequences for Communication –P.Banerjee* , Ushaben Keshwala and Monika KaushikECE ,ASET ,Amity University, Noida-201303.

20

Page 21: Project1 Report

2. Marco Baldi, Franco Chiaraluce, Noureddine Bounjnah, Roberto Garello, “On the Autocorrelation Properties o\f Truncated Maximum-Length Sequences and Their Effect on the Power Spectrum”IEEE Trans Signal Processing, vol. 58 , no. 12, December 2010.

3. S.W.Golomb, Shift Register Sequences. Laguna Hills ,CA: Aegean Park Press, 1981.

4. LabVIEW 8.0, User's Manual, National Instruments, www.ni.com, USA, 2005.

5. Improved Channel Estimation Methods based on PN sequence for TDS-OFDM ,Ming Liu, Matthieu Crussi`ere, Jean-Franc¸ois H´elard Universit´e Europ´eenne de Bretagne (UEB) INSA, IETR, UMR 6164, F-35708, Rennes, France.

6. NI Lab View, Using External Code in Lab View.

7. Fundamentals of Digital Electronics ,March 1998 Edition Part Number 321948A-01 ,by Professor Barry Paton Dalhousie University

21