Project Summer Internship2
Project Summer Internship2
ON
TO GENERATE PRN/TRUNCATED PRN SEQUENCE AND ANALYSE THE PROPERTIES USING LAB VIEW
SU'MITTE% 'Y+, NAME + MANISHA SHARMA ENROLLMENT NO& +A-.-//0-11PROGRAMME+ M&TECH 23&C&4
CERTIFICATE
On the basis of declaration submitted by MANISHA SHARMA , student of M&Te"h 23!rele55 C#66un!"at!#n4, we hereby certify that the project titled TO GENERATE PRN7TRUNCATE% PRN AN% TO STU%Y THE PROPERTIES USING LA' )IE3 which is submitted to Department of Electronics and Communication, Amity School of Engineering and echnology, Amity !ni"ersity, #O$DA, !ttar %radesh in partial fulfilment of the re&uirement for the award of the degree of 'aster of echnology in (ireless Communication, is an original contribution with e)isting *nowledge and faithful record of wor* carried out by her under my guidance and super"ision+ o the best of our *nowledge this wor* has not been submitted in part or full for any Degree or Diploma to this !ni"ersity or elsewhere+
AC8NO3LE%GMENT
in guiding
the preparation of Summer $nternship %roject + $ also ac*nowledge with sincere than*s , to the contribution of M5& NEERU AGAR3AL who helped and guided me in the finali,ation of the %roject +
$, sincerely than* them for the guidance and help pro"ided by them in the completion of this %roject +
%ECLARATION
$, MANISHA SHARMA student of '+ ech /(C0 hereby declare that the Summer $nternship %roject titled TO GENERATE PRN7TRUNCATE% PRN AN% TO STU%Y THE PROPERTIES USING LA' )IE3 which is submitted by me to Department Of ECE, Amity School of Engineering and echnology, Amity !ni"ersity !ttar %radesh, #O$DA, in partial fulfilment of re&uirement for the award of the degree of 'aster of echnology in (ireless Communication , has not been pre"iously formed the basis for the award of any degree, diploma or other similar title or recognition+
A'STRACT
A "ery dynamical de"elopment of "irtual instrumentation in recent years has caused a "ery good acceptance of this concept and its use in many applications+ his concept, as one fle)ible and cost1effecti"e solution for test and measurement, is used in this project for implementation of ma)imum length pseudorandom noise se&uences/%.#0 and their truncation+ 2ecause of their properties, the pseudorandom binary se&uences are often used in de"elopment and impro"ement of modern pseudorandom position encoders as well as in testing of some sensors, analog1to1digital con"erters, etc+ Also the %.# codes act as spreading codes in the spread1spectrum communications system+ Sometimes there is a need to shorten the %.# se&uence to decrease the ac&uisition time and to match the data field si,e in frame structures + Some properties of truncated %.# se&uences will be studied *eeping in mind its application in communication system 3 stage shift registers will be used to implement in 4ab 5iew + 8e9 :#rd56 "irtual instrument, pseudorandom noise se&uence
Table O$ C#ntent5
S&NO+
TITLE
PAGE NO+
7+
$# .OD!C $O#
9+
7;
<+
=E#E.A $O# O: %SE!DO.A#DO' 2$#A.> SE?!E#CE O: 'A@$'!' 4E#= B77 %# SE?!E#CE =E#E.A $O#
7<
A+
7C
B+
78
C+
99
C+
CO#C4!S$O#
93
D+
:! !.E (O.E
<;
8+
.E:E.#CES
<7
INTRO%UCTION
he "ision of "irtual instrumentation changed and impro"ed the way engineers and scientists wor*, deli"ering solutions in less de"elopment time, with lower costs, and greater fle)ibility+ $t can be noted that "irtual instrumentation has had a constant and e)tensi"e de"elopment 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 de"elopment is a "ery dynamical de"elopment of computer techni&ues and digital electronics+ day+ he "irtual instrument concept offers the possibility for an engineer to use fle)ible and powerful software running on a computer combined with instrumentation hardware to define a custom test and measurement solution+ he de"elopment of "irtual instrumentation enables a series of new possibilities in the field of measurement techni&ues, research wor*, etc+ (hat is important is the fact that "irtual instruments are significantly cheaper than traditional+ hey are also "ery he good fle)ible, i+e+ ha"e a possibility of simple modification and upgrading+ he presence of "irtual instrumentation in industry, education, e"eryday life etc, is getting wider each
properties of "irtual instruments are modularity and hierarchy, i+e+ the possibility of di"iding a comple) tas* into simplier problems and their separate reali,ations and testing, and connecting them to comple) "irtual instrument+ 5irtual instrumentation also offers a possibility of communication with traditional instruments through an appropriate interface, which is widely used in de"elopment and during reali,ation of "irtual and remote laboratories+ here are different de"elopment tools and en"ironments for reali,ation and design of "irtual instruments+ One of the most often used and widespread is
7
4ab5$E(, by #ational $nstruments , which as a graphical de"elopment platform enables intuiti"e and simple de"elopment without the need for serious pre"ious programming *nowledge+ he programming is performed by a graphical programming language, which is easier for learning and debugging than te)tual+ he pseudorandom binary se&uences /%.2S0 are a useful type of periodic signals, which ha"e the following properties6 70 the signal is bipolar, series of 7Fs and ;FsG 90 the %.2S is a deterministic repeatable signalG <0 the %.2S e)hibits a uniform power spectral density o"er a wide fre&uency bandG A0 according to the window property of %.2S of length 9n17, any n1bit code word obtained by a window of width n, is uni&ue and may fully identify the windowFs absolute position p relati"e to the beginning of the se&uence+ his is used in pseudorandom absolute encoders+ he area of %.2S application is wide, for e)ample, during design and testing of pseudorandom position encoders, then for testing of measurement transducers , AD con"erters testing , in the field of communication , measurement of fre&uency response , na"igation systems, scrambling, cryptographic applications, etc+ Other applications are found in surface characteri,ation and <D scene modeling, and in audio applications to measure the properties of loudspea*ers+ he generation of pseudorandom binary se&uences can be implemented in different ways, including using a discrete shift register and flip1flops, using a microprocessor, using a :%=A1based implementation ,'A 4A2 etc+ -owe"er, methods of pseudorandom binary se&uences generation based on "irtual instrumentation concept are presented in this project+
9+ :.O# %A#E46 he front panel window is the user interface for the 5$ +
10
4ab5$E( programs are called "irtual instruments, or 5$s, because their appearance and operation often imitate physical instruments, such as oscilloscopes and multimeters+ 4ab5$E( contains a comprehensi"e set of tools for ac&uiring, analy,ing, displaying, and storing data, as well as tools to help troubleshoot code we write+
11
12
L he number of M7Fs and the number of M;Fs in a %# se&uence are only different by one /2A4A#CE %.O%E. >0+ L .un lengths of ,eroes or ones are the same as in a coin flipping e)periment+ -alf of the run lengths are unity, one1&uarter are of length two, one1eighth are of length three and a fraction 7N9n of all runs are of length n /.!# %.O%E. >0+ L $f the se&uence is shifted by any non1,ero number of elements, the resulting se&uence will ha"e an e&ual number of agreements and disagreements with the original se&uence /A! OCO..E4A $O# %.O%E. >0 . he 24OCE D$A=.A' of the reali,ed "irtual instrument using a 4ab5$E( 77+; software en"ironment is shown in :ig+ -ere a 7B bit pn se&uence is generated using A 4inear :eedbac* Shift .egisters+
13
:ollowing %# code is generated on the :ront %anel of the 4A2 5$E(+ %# CODE6
(A5E:O.'6
he abo"e generated pn code is satisfying all the properties of the pn se&uence6 7+ #o+ of 7Fs /I 80 O #o+ of ;Fs /I D0 , balance property is satisfied+ 9+ otal no+ of runs I 8+ -alf the no+ of runs /IA0 are of length, 7 i+e+ ;,7,;,7+ One1&uater /I90 are of length 9 ,i+e+ 77 H ;;+ One1eighth /I70 are of length < i+e+ ;;;+ -ence .un property is satisfied+
14
<+ $f the se&uence is shifted by any non1,ero number of elements, the resulting se&uence will ha"e an e&ual number of agreements and disagreements with the original se&uence+ 777;7;77;;7;;; 7777;7;77;;7;; aaaddddadaddaa -ence Autocorrelation property is satisfied+
#O E6 $n the de"eloped solution, for a gi"en length of shift register, the generation mode of pseudorandom binary se&uences can be selected, i+e+ if generation is done by using @O. gates or @#O. gates+
15
(ith reference to the pre"ious A bit %# se&uence , we will now generate a 31bit %# se&uence ,which will result in a B77 length se&uence+ A nine1element shift register is placed on a (hile 4oop+ An e)clusi"e O. gate is used whose inputs ha"e been wired to ?B and ?3+ he loop inde) *eeps trac* of the cycle count, and it stops when the output becomes e&ual to the initial "alue+ An initial seed is set at starting of the process and each shift registers on the loop are initiali,ed+ he parallel output can be obser"ed either on 4ED indicators or in addition, a pseudo1random se&uence of ones and ,eros can be produced at Serial Out+ :ollowing is the bloc* diagram of 31bit %# se&uence+
16
$n this code the tapping is done from A th and 3th shift register and then )oring them + his output is then fed bac* to the 7 st register + he code length and the seed "alue are B77+
he output of the set up is obser"ed on the wa"eform chart on the :ront %anel of 4A2 5$E(, as follows+
17
he B77 %# code is "ery large to be obtained , hence plotting the wa"eform is more con"enient and moreo"er it gi"es a better "iew+ his se&uence also satisfies all the three basic properties of the %# se&uence li*e the pre"ious one+
18
ac&uisition time and still preser"e the ad"antage of a %.#1se&uence + E"en more commomnly, the %.# se&uence could be shortened to fit into the data field si,e in frame structures + :urther , the se&uence number which is di"isible by B or 7;, sometimes ma*e the system design less complicated+ o shorten the se&uence one has to delete few bits+ been cut+ $n this project the last 77 bits of B77 length %.# se&uence are being remo"ed by using some additional bloc*s in that of the generation + -ere a DE4E E :.O' A..A> icon from the fuction pallete is inserted in the pre"ious diagram and 77 bits are then remo"ed from the B77 se&uence to obtain the B;; length se&uence+ he resulting se&uences
may be called truncated PRN sequences , where the first or last few bits ha"e
:ollowing is the bloc* diagram for the truncation of the last 77 cycles of B77 %# se&uence6
19
2y running the abo"e bloc* diagram we obtain se&uence in which last 77 cycles are remo"ed +$t can be seen below the following wa"eform charts of the normal %.# se&uence and runcated %.# se&uence that wa"eform in the 9 nd chart are stopped at the B;;th se&uence +
20
AUTOCORRELATION PROPERTIES
After truncating the %# se&uence , their autocorrelation properties are studied+ he autocorrelation Rxx/t0 of a function x/t0 is defined as
21
where the symbol denotes correlation+ Side 4obes6 Side lobes occur on each side of the main lobe and approach ,ero at multiples of fsNN from the main lobe+ 2y "arying seed "alues the autocorrelation of %.# and %.# se&uence "aried+ Considering 77 bits truncation, following obser"ations were obtained 6 %olynomial6 7QDAQD3 Seed "alue R ;;;;;7;7; runcated bits 17;;7;7;;;;;
22
Autocorr of tprn se&+ 4i*e this by "arying the seed "alues different results were obtained+ Also for different seed "alues , the pea* side lobe /rms0 "alues were obtained +
SEED VALUES
RMS value of 11 bit tru !ate" #R$ %e&' 0'037004 3 0'037004 3 0'036634 2 0'037091 7 0'036472 0'036439 5 0'036972 3 0'036991 4 0'036906 0'036511 1 0'036840 8 0'036730 2 0'036530 4
RMS value of 31 bit tru !ate" #R$ %e&' 0'038263 4 0'038308 8 0'037745 6 0'038052 8 0'037625 5 0'037585 1 0'037993 3 0'037971 3 0'038021 4 0'037555 2 0'037844 8 0'038110 8 0'037451 9
RMS value of 51 bit tru !ate" #R$ %e&' 0'039400 2 0'039469 6 0'038888 9 0'039303 5 0'038719 8 0'038985 6 0'039322 9 0'039260 6 0'039337 0'038643 8 0'03927 0'039300 9 0'038570 3
RMS value of 101 bit tru !ate" #R$ %e&' 0'042328 4 0'042288 6 0'042159 3 0'041739 5 0'042438 1 0'042383 3 0'042693 4 0'041777 1 0'042528 4 0'041881 3 0'041881 3 0'042338 1 0'041954 8
RMS value of 151 bit tru !ate" #R$ %e&' 0'045895 6 0'045945 1 0'046445 1 0'045732 6 0'045626 4 0'046397 0'046231 1 0'045743 8 0'045642 4 0'045582 1 0'046039 4 0'045749 5 0'046298 8
RMS value of 201 bit tru !ate" #R$ %e&' 0'050400 4 0'050352 3 0'051336 3 0'050491 0'050392 4 0'050999 9 0'050280 2 0'050403 1 0'050175 7 0'050549 6 0'051276 0'050674 5 0'051176 2
00000101 0 00001010 0 00001111 0 00010100 0 00011001 0 00011110 0 00100011 0 00101000 0 00101101 0 00110010 0 00110111 0 00111100 0 01000001 0
RMS value of 301 bit tru !ate " #R$ %e&' 0'065412 0'064847 0'0638377 0'0641826 0'064827 0'0640273 0'0641556 0'063858 0'0638987 0'0638105 0'0627224 0'0645458 0'0633816
23
01000110 0 01001011 0 01010000 0 01010101 0 01011010 0 01011111 0 01100100 0 01101001 0 01101110 0 01110011 0 01111000 0 01111101 0 10000010 0 10000111 0 10001100 0 10010001 0 10010110 10011011 0 10100000 0 10100101 0 10101010 0 10101111 0 10110100 0
0'369558 0'036879 0'037001 7 0'037001 3 0'036924 2 0'036878 6 0'036548 8 0'036283 6 0'036813 8 0'036511 5 0'036903 4 0'036931 6 0'036523 4 0'036923 0'036907 7 0'036940 7 0'036717 1 0'036350 2 0'036989 6 0'036938 1 0'037035 9 0'036789 9 0'036542 2
0'037936 0'037796 9 0'038019 0'037957 5 0'038104 1 0'038006 6 0'037578 8 0'037566 8 0'037883 5 0'037622 7 0'037867 3 0'037977 5 0'037455 8 0'037856 3 0'037912 7 0'038010 9 0'038028 0'037806 0'037998 5 0'038162 5 0'037996 1 0'038154 5 0'037526 3
0'039311 9 0'038800 5 0'039277 9 0'039268 4 0'038950 2 0'039356 9 0'038644 9 0'038853 5 0'039275 8 0'038679 4 0'039026 2 0'039338 0'038601 7 0'039119 4 0'039336 0'039143 0'039199 8 0'038944 4 0'039313 5 0'039302 0'039303 5 0'039029 4 0'038913 3
0'042811 7 0'042240 5 0'042417 6 0'042250 1 0'042015 7 0'042384 7 0'041903 5 0'042314 7 0'041864 6 0'042119 3 0'042021 2 0'042421 7 0'042022 6 0'042087 5 0'042791 3 0'041690 8 0'042178 5 0'042268 0'042303 7 0'042265 3 0'042294 1 0'042225 4 0'042262 5
0'046189 3 0'046707 7 0'045870 3 0'045838 5 0'046091 6 0'045841 3 0'045886 2 0'045947 0'046101 8 0'045971 3 0'046107 4 0'045892 8 0'046232 9 0'046017 0'046260 8 0'045689 4 0'045835 7 0'046445 1 0'045806 7 0'046021 7 0'045854 4 0'046167 9 0'046485 7
0'050274 8 0'05024 0'050044 2 0'050224 0'050443 1 0'049726 1 0'050701 0'050140 9 0'051396 5 0'051039 4 0'051152 6 0'049960 9 0'049960 9 0'050825 5 0'050229 3 0'050573 5 0'050568 2 0'051346 8 0'050098 0'050250 7 0'050397 7 0'050363 0'051561 1
0'063593 0'0652596 0'0654914 0'06518 0'0624111 0'064987 0'0636611 0'0659919 0'0630117 0'0643847 0'06472 0'0649271 0'0635454 0'0651467 0'0638377 0'0631078 0'0647668 0'0637494 0'065696 0'0648069 0'0651002 0'0640949 0'063559
24
10111001 0 10111110 0 11000011 0 11001000 0 11001101 0 11010010 0 11010111 0 11011100 0 11100001 0 11100110 0 11101011 0 11110000 0 11110101 0
0'036834 3 0'036409 2 0'036751 1 0'036533 5 0'036910 7 0'037180 9 o'o36965 4 0'036991 4 0'036744 2 0'036505 4 0'036622 4 0'036555 4 0'036912 5
0'037968 0'037596 2 0'037972 3 0'037541 7 0'037887 8 0'038020 9 0'037852 4 0'038049 9 0'038030 9 0'037667 4 0'037908 4 0'037671 2 0'037895
0'039278 9 0'038620 9 0'039174 6 0'038616 6 0'038891 6 0'039179 3 0'039159 3 0'039034 6 0'039227 0'038728 9 0'039310 3 0'038905 3 0'039138 3
0'041849 4 0'041953 4 0'042050 2 0'042014 3 0'042141 3 0'042410 7 0'042211 6 0'042449 1 0'042503 8 0'042138 6 0'042211 6 0'042287 2 0'042325 7
0'045990 9 0'046035 7 0'046167 0'046027 3 0'046219 0'046415 5 0'045825 4 0'046025 4 0'046164 2 0'046093 5 0'045986 2 0'046410 9 0'045837 6
0'050904 8 0'051451 4 0'051057 8 0'051028 9 0'051057 8 0'051097 3 0'050379 0'051060 5 0'051081 5 0'051010 4 0'050767 3 0'051171 0'049925 9
0'0628603 0'0656631 0'0631215 0'0634977 0'0655509 0'0629498 0'0626948 0'0626948 0'0626948 0'0639325 0'065696 0'0650536 0'0645391
:rom the abo"e results further analysis was being done by plotting graphs between the truncation and the rms "alues at different seed "alues and following obser"ations were being made+ Considering for few seed "alues6
tprn/p rn "!!/"
seed- !
seed"!
seed!! !.!$'"
!.!$&!! %$
%(!/"
!.!$(#'
!.!$&"
!.!$&&
25
$% %'!/" !.!$)%! !# % !/" !.!%#$# (% $'!/" !.!%"() "' $ !/" !.!"!%! !% # !/" !.!'"% #
#( !.!$)#
"" !.!$)! #)
=raph6
26
0 .0 7 000001010 000010100 000011110 000101000 000110010 000111100 001000110 001010000 001011010 001100100
0 .0 6 5
0 .0 6
0 .0 5 5
R M S V a lu e 0 .0 5 0 .0 4 5 0 .0 4 0
0 .5
1 .5
2 T R u n c a tio n i n d B
2 .5
3 .5
27
tprn/p rn !.!)%"
seed! !.!$&! !%
seed!! !.!$'"
seed#!! !.!$'" %) !.!$&" &) !.!$(' %" !.!% ) !% !.!%"( (' !.!"!& ! !.!'$' '
seed#"! !.!$') $# !.!$&) &( !.!$)$ $( !.!%#% ## !.!%"( )$ !.!%)) ' !.!'%) #&
seed%!! !.!$'" $% !.!$&" %# !.!$(' & !.!%#! % !.!%'! #& !.!" ! #) !.!'$% )(
seed%"! !.!$'& %% !.!$(! $ !.!$)# #& !.!%#" !% !.!%' '% !.!" ! (# !.!'#' )"
!.!'"% #
!.!'%( #&
=raph6
28
0 .0 7 000001010 000010100 000011110 000101000 000110010 000111100 001000110 001010000 001011010 001100100
0 .0 6 5
0 .0 6
0 .0 5 5
R M S V a lu e 0 .0 5 0 .0 4 5 0 .0 4 0
50
100
150 T ru n c a tio n
200
250
300
350
-ence by obser"ing the abo"e results it can be concluded that the by increasing the number of bits truncated the pea* side lobe le"el increases but there is less de"iation for different seed "alues+
29
CONCLUSION
%seudorandom binary se&uences are a type of periodic signals with some useful properties, and can be generated in different ways+ pointed out in the project. he %seudo .andom 2inary #oise se&uences were successfully generated and further are truncated in #$ 4ab 5iew software+ he wa"eforms of both the se&uences are being compared+ he reali,ed %.# se&uence is "ery fle)ible and can be used widely in "arious fields of research wor*+ =raphical programming which is used for implementation of this generation is easier to learn than te)tual or 5-D4 programming+ Autocorrelation properties of both pn and truncated pn se&uence are being studied+ As truncation increases the pea* side lobes also increases for different seed "aluesbut with "ery less de"iation+ + he ad"antages of using "irtual instrumentation for generation of pseudorandom binary se&uences are
30
FUTURE 3OR8
he %.# se&uences and the runcated %.# are "ery widely used se&uences in "arious applications, so there is a lot of scope in the study of these se&uences by modifying them in different ways, li*e by truncating the pn se&uence ,more number of se&uence can be generated, and can be implemented in different softwares+ $n 4ab 5iew software, by studying the performances of these se&uences can be done and then comparing it with the simple %.# se&uence+ After studying the properties further study can be done in the spectrum of these se&uences+
31
REFERENCES
7+ Study on %otentiality of runcated %.# Se&uences for Communication R %+2anerjeeS , !shaben Eeshwala and 'oni*a Eaushi* ECE ,ASE ,Amity !ni"ersity, #oida19;7<;<+ 9+ 'arco 2aldi, :ranco Chiaraluce, #oureddine 2ounjnah, .oberto =arello, On the Autocorrelation %roperties oTf runcated 'a)imum14ength Se&uences and heir Effect on the %ower Spectrum $EEE rans Signal %rocessing, "ol+ B8 , no+ 79, December 9;7;+ <+ S+(+=olomb, Shift .egister Se&uences+ 4aguna -ills ,CA6 Aegean %ar* %ress, 7387+ A+ 4ab5$E( 8+;, User's Manual, #ational $nstruments, www+ni+com, !SA, 9;;B+
DS1
O:D' ,'ing 4iu, 'atthieu CrussiUere, Pean1:rancVois -Welard !ni"ersitWe EuropWeenne de 2retagne /!E20 $#SA, $E ., !'. C7CA, :1<BD;8, .ennes, :rance+
D+
:undamentals of Digital Electronics ,'arch 7338 Edition %art #umber <973A8A1;7 ,by %rofessor 2arry %aton Dalhousie !ni"ersity
32