Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

www.jntuworld.

com

www.jwjobs.net

DEPARTM ENT

OF

ELECTRONICS & COMM UNICATION ENGINEERING (ECE)

DIGITAL SIGNAL PROCESSING (DSP)

LAB MANUAL

TH B.TECH (ECE) IV YR IST SEM

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

1/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

DSP Lab Manual igital !ignal "ro#e!!ing i! an area of !#ien#e and engineering t$at t$e!e develo"ed ra"idly over %0 year!& T$i! ra"id develo"'ent i! re!(lt of !ignifi#ant advan#e! in digital #o'"(ter te#$nology and integrated #ir#(it fabri#ation &t$e ra"id develo"'ent in )C te#$nology *+,-). of ele#troni#! #ir#(it a! !"(rred t$e develo"'ent of "o/er f(ll, !'aller, fa!ter and #$i""er digital #o'"(ter $ard/are& Hen#e it i! "o!!ible to #on!tr(#t $ig$ly !o"$i!ti#ated digital !y!te' #a"able to "erfor' #o'"le0 digital !ignal "ro#e!!ing f(n#tion& )n t$i! laboratory /e "re!ent t$e f(nda'ental! of digital !ignal!, !y!te'!, 'odern digital "ro#e!!ing algorit$'! and a""li#ation! for !t(dent in ele#troni#! and #o''(ni#ation engineering )n t$i! ,aboratory /e are in!tr(#ted to !t(dy t$e i'"ortan#e of igital !ignal "ro#e!!ing a""li#ation! in day1to1day life and t$e #on#e"t! re2(ired to develo" t$e!e a""li#ation!& T$e ba!i# #on#e"t! #an be i'"le'ented by /riting $ig$ level, 'edi(' level, and a!!e'bly level "rogra'! (!ing t$e 3AT,A4, CC- and T3- %20C 561% "ro#e!!or in!tr(#tion!& Hen#e yo( are re2(e!ted to !t(dy t$e ar#$ite#t(re of t$e "ro#e!!or along /it$ t$e in!tr(#tion !et and t$e a!!e'bler dire#tive! (!ed for t$e "rogra''ing& 7e /ill al!o introd(#e o(r!elve! to t$e 3AT,A4 tool and i'"le'ent !o'e of t$e ba!i# C, 3AT,A4 "rogra'! to ill(!trate t$e #on#e"t! of igital !ignal "ro#e!!ing& 8o( are re2(e!ted to 1& 7rite t$e a!!e'bly #ode for t$e re2(ired o"eration 2& o/nload t$e "rogra' to t$e "ro#e!!or (!ing t$e -P)9 !oft/are *CC- : ) E. %& E0e#(te t$e "rogra' and re#ord t$e re!(lt! for vario(! in"(t!&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

2/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

INDEX 1& Ar#$ite#t(re of -P #$i"!1T3- %20C 561% -P Pro#e!!or 2& ,inear #onvol(tion %& Cir#(lar #onvol(tion ;& <)= <ilter *,P/HP. U!ing 7indo/ing te#$ni2(e a& =e#tang(lar /indo/ b& Triang(lar /indo/ #& 9ai!er /indo/ 5& ))= <ilter*,P/HP. on -P "ro#e!!or! 5& N1"oint <<T algorit$' 6& Po/er -"e#tral en!ity of a !in(!oidal !ignal! 8& <<T of 11 !ignal "lot >& 3AT,A4 "rogra' to generate !(' of !in(!oidal !ignal! 10& 3AT,A4 "rogra' to find fre2(en#y re!"on!e of analog*,P/HP. 10& ?ffline "ro#e!!ing E0a'"le! (!ing 561% "ro#e!!or Addition 3(lti"li#ation -$ifting ,ogi#al ?"eration Cir#(lar 4(ffering 11& =eal ti'e e0a'"le! (!ing 561% "ro#e!!or -a'"ling ,inear #onvol(tion Cir#(lar #onvol(tion <)= filter de!ign ))= filter de!ign <a!t <o(rier tran!for' 12& ,i!t of E0"eri'ent! in 4&Te#$ ,ab 1%& 3AT,A4 E0a'"le! Co'"(tation (!ing 'atri#e! 3agnit(de and "$a!e of tran!for'ed !ignal (!ing <<T Convol(tion and Correlation of !ignal! <re2(en#y re!"on!e of a filter <ilter de!ign (!ing /indo/ing ))= 4(tter/ort$ filter! ))= C$eby!$ev filter!

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

%/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

CHAPTER I

!. INTRODUCTION TO DSP PROCESSORS

A !ignal #an be defined a! a f(n#tion t$at #onvey! infor'ation, generally abo(t t$e !tate or be$avior of a "$y!i#al !y!te'& T$ere are t/o ba!i# ty"e! of !ignal! vi@ Analog *#ontin(o(! ti'e !ignal! /$i#$ are defined along a #ontin((' of ti'e!. and igital *di!#rete1ti'e.& =e'arAably, (nder rea!onable #on!traint!, a #ontin(o(! ti'e !ignal #an be ade2(ately re"re!ented by !a'"le!, obtaining di!#rete ti'e !ignal!& T$(! digital !ignal "ro#e!!ing i! an ideal #$oi#e for anyone /$o need! t$e "erfor'an#e advantage of digital 'ani"(lation along /it$ todayB! analog reality& Hen#e a "ro#e!!or /$i#$ i! de!igned to "erfor' t$e !"e#ial o"eration!*digital 'ani"(lation!. on t$e digital !ignal /it$in very le!! ti'e #an be #alled a! a igital !ignal "ro#e!!or& T$e differen#e bet/een a -P "ro#e!!or, #onventional 'i#ro"ro#e!!or and a 'i#ro#ontroller are li!ted belo/& M"#$%&$%#'((%$ or Ceneral P(r"o!e Pro#e!!or !(#$ a! )ntel 0085 or 3otorola 58000 fa'ily Contain! 1 only CPU 1No =A3 1No =?3 1No )/? "ort! 1No Ti'er M"#$%#%n)$%ll'$ !(#$ a! 8051 fa'ily Contain! 1 CPU 1 =A3 1 =?3 1)/? "ort! 1 Ti'er D 1 )nterr("t #ir#(itry -o'e 3i#ro Controller! al!o #ontain A/ , /A and <la!$ 3e'ory DSP P$%#'((%$( !(#$ a! Te0a! in!tr('ent! and Analog evi#e! Contain! 1 CPU 1 =A3 1=?3 1 )/? "ort! 1 Ti'er ?"ti'i@ed for : fa!t arit$'eti# E0tended "re#i!ion (al o"erand fet#$ Eero over$ead loo" Cir#(lar b(ffering

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

;/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

T$e ba!i# feat(re! of a -P Pro#e!!or are

F'a)u$' <a!t13(lti"ly a##('(late 3(lti"le : a##e!! 'e'ory ar#$ite#t(re -"e#iali@ed addre!!ing 'ode! -"e#iali@ed "rogra' #ontrol ?n1#$i" "eri"$eral! and )/? interfa#e!

U(' 3o!t -P algorit$'!, in#l(ding filtering, tran!for'!, et#& are '(lti"li#ation1 inten!ive 3any data1inten!ive -P o"eration! re2(ire reading a "rogra' in!tr(#tion and '(lti"le data ite'! d(ring ea#$ in!tr(#tion #y#le for be!t "erfor'an#e Effi#ient $andling of data array! and fir!t1in, fir!t1o(t b(ffer! in 'e'ory Effi#ient #ontrol of loo"! for 'any iterative -P algorit$'!& <a!t interr("t $andling for fre2(ent )/? o"eration!& ?n1#$i" "eri"$eral! liAe A/ #onverter! allo/ for !'all lo/ #o!t !y!te' de!ign!& -i'ilarly )/? interfa#e! tailored for #o''on "eri"$eral! allo/ #lean interfa#e! to off1#$i" )/? devi#e!&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

5/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

*. ARCHITECTURE OF +,!- DSP PROCESSOR


T$i! #$a"ter "rovide! an overvie/ of t$e ar#$ite#t(ral !tr(#t(re of t$e T3-%20C5600 -P, /$i#$ #o'"ri!e! t$e #entral "ro#e!!ing (nit *CPU., 'e'ory, and on1#$i" "eri"$eral!& T$e C560E -P! (!e an advan#ed 'odified Harvard ar#$ite#t(re t$at 'a0i'i@e! "ro#e!!ing "o/er /it$ eig$t b(!e!& -e"arate "rogra' and data !"a#e! allo/ !i'(ltaneo(! a##e!! to "rogra' in!tr(#tion! and data, "roviding a $ig$ degree of "aralleli!'& <or e0a'"le, t$ree read! and one /rite #an be "erfor'ed in a !ingle #y#le& )n!tr(#tion! /it$ "arallel !tore and a""li#ation1!"e#ifi# in!tr(#tion! f(lly (tili@e t$i! ar#$ite#t(re& )n addition, data #an be tran!ferred bet/een data and "rogra' !"a#e!& -(#$ Paralleli!' !(""ort! a "o/erf(l !et of arit$'eti#, logi#, and bit1'ani"(lation o"eration! t$at #an all be "erfor'ed in a !ingle 'a#$ine #y#le& Al!o, t$e C5600 -P in#l(de! t$e #ontrol 'e#$ani!'! to 'anage interr("t!, re"eated o"eration!, and f(n#tion #alling& <ig 2 : 1 4,?C9 )AC=A3 ?< T3- %20+C 561%

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

5/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

Bus Structure T$e C5600 F -P ar#$ite#t(re i! b(ilt aro(nd eig$t 'aGor 151bit b(!e! *fo(r "rogra'/data b(!e! and fo(r addre!! b(!e!.H I T$e "rogra' b(! *P4. #arrie! t$e in!tr(#tion #ode and i''ediate o"erand! fro' "rogra' 'e'ory& I T$ree data b(!e! *C4, 4, and E4. inter#onne#t to vario(! ele'ent!, !(#$ a! t$e CPU, data addre!! generation logi#, "rogra' addre!! generation logi#, on1#$i" "eri"$eral!, and data 'e'ory& I T$e C4 and 4 #arry t$e o"erand! t$at are read fro' data 'e'ory& I T$e E4 #arrie! t$e data to be /ritten to 'e'ory& I <o(r addre!! b(!e! *PA4, CA4, A4, and EA4. #arry t$e addre!!e! needed for in!tr(#tion e0e#(tion& T$e C5600 -P #an generate (" to t/o data1'e'ory addre!!e! "er #y#le (!ing t$e t/o a(0iliary regi!ter arit$'eti# (nit! *A=AU0 and A=AU1.& T$e P4 #an #arry data o"erand! !tored in "rogra' !"a#e *for in!tan#e, a #oeffi#ient table. to t$e '(lti"lier and adder for '(lti"ly/a##('(late o"eration! or to a de!tination in data !"a#e for data 'ove in!tr(#tion! *3+P and =EA A.& T$i! #a"ability, in #onG(n#tion /it$ t$e feat(re of d(al1o"erand read, !(""ort! t$e e0e#(tion of !ingle1#y#le, %1o"erand in!tr(#tion! !(#$ a! t$e <)=in!tr(#tion& T$e C5600 -P al!o $a! an on1#$i" bidire#tional b(! for a##e!!ing on1#$i" "eri"$eral!& T$i! b(! i! #onne#ted to 4 and E4 t$ro(g$ t$e b(! e0#$anger in t$e CPU interfa#e& A##e!!e! t$at (!e t$i! b(! #an re2(ire t/o or 'ore #y#le! for read! and /rite!, de"ending on t$e "eri"$eralB! !tr(#t(re& Central Processing Unit (CPU) T$e CPU i! #o''on to all C560E devi#e!& T$e C560 CPU #ontain!H I ;01bit arit$'eti# logi# (nit *A,U. I T/o ;01bit a##('(lator! I 4arrel !$ifter I 16 J 161bit '(lti"lier I ;01bit adder I Co'"are, !ele#t, and !tore (nit *C--U. I ata addre!! generation (nit I Progra' addre!! generation (nit
Arithmetic Logic Unit (ALU)

T$e C560 -P "erfor'! 2!1#o'"le'ent arit$'eti# /it$ a ;01bit arit$'eti# logi# (nit *A,U. and t/o ;01bit a##('(lator! *a##('(lator! A and 4.& T$e A,U #an al!o "erfor' 4oolean o"eration!& T$e A,U (!e! t$e!e in"(t!H I 151bit i''ediate val(e I 151bit /ord fro' data 'e'ory I 151bit val(e in t$e te'"orary regi!ter, T I T/o 151bit /ord! fro' data 'e'ory I %21bit /ord fro' data 'e'ory I ;01bit /ord fro' eit$er a##('(lator T$e A,U #an al!o f(n#tion a! t/o 151bit A,U! and "erfor' t/o 151bit o"eration! !i'(ltaneo(!ly&
2008 Private Engineering College, Affiliated to JNTU, Hyderabad 6/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

<ig 2 : 2 A,U UN)T


Accumulators

A##('(lator! A and 4 !tore t$e o(t"(t fro' t$e A,U or t$e '(lti"lier/adder blo#A& T$ey #an al!o "rovide a !e#ond in"(t to t$e A,UK a##('(lator A #an be an in"(t to t$e '(lti"lier/adder& Ea#$ a##('(lator i! divided into t$ree "art!H I C(ard bit! *bit! %>:%2. I Hig$1order /ord *bit! %1:15. I ,o/1order /ord *bit! 15:0. )n!tr(#tion! are "rovided for !toring t$e g(ard bit!, for !toring t$e $ig$1 and t$e lo/1order a##('(lator /ord! in data 'e'ory, and for tran!ferring %21bit a##('(lator /ord! in or o(t of data 'e'ory& Al!o, eit$er of t$e a##('(lator! #an be (!ed a! te'"orary !torage for t$e ot$er&
Barrel Shifter

T$e C560 -P barrel !$ifter $a! a ;01bit in"(t #onne#ted to t$e a##('(lator! or to data 'e'ory *(!ing C4 or 4., and a ;01bit o(t"(t #onne#ted to t$e A,U or to data 'e'ory *(!ing E4.& T$e barrel !$ifter #an "rod(#e a left !$ift of 0 to %1 bit! and a rig$t !$ift of 0 to 15 bit! on t$e in"(t data& T$e !$ift re2(ire'ent! are defined in t$e !$ift #o(nt field of t$e in!tr(#tion, t$e !$ift #o(nt field *A-3. of !tat(! regi!ter -T1, or in te'"orary regi!ter T */$en it i! de!ignated a! a !$ift #o(nt regi!ter.&T$e barrel !$ifter and t$e e0"onent en#oder nor'ali@e t$e val(e! in an a##('(lator in a !ingle #y#le& T$e ,-4! of t$e o(t"(t are filled /it$ 0!, and t$e 3-4! #an be eit$er @ero filled or !ign e0tended, de"ending on
2008 Private Engineering College, Affiliated to JNTU, Hyderabad 8/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

t$e !tate of t$e !ign1e0ten!ion 'ode bit *-L3. in -T1& Additional !$ift #a"abilitie! enable t$e "ro#e!!or to "erfor' n('eri#al !#aling, bit e0tra#tion, e0tended arit$'eti#, and overflo/ "revention o"eration!&
Multiplier/Adder Unit

T$e '(lti"lier/adder (nit "erfor'! 16 I 161bit 2!1#o'"le'ent '(lti"li#ation /it$ a ;01bit addition in a !ingle in!tr(#tion #y#le& T$e '(lti"lier/adder blo#A #on!i!t! of !everal ele'ent!H a '(lti"lier, an adder, !igned/(n!igned in"(t #ontrol logi#, fra#tional #ontrol logi#, a @ero dete#tor, a ro(nder *2! #o'"le'ent., overflo//!at(ration logi#, and a 151bit te'"orary !torage regi!ter *T.& T$e '(lti"lier $a! t/o in"(t!H one in"(t i! !ele#ted fro' T, a data1'e'ory o"erand, or a##('(lator AK t$e ot$er i! !ele#ted fro' "rogra' 'e'ory, data 'e'ory, a##('(lator A, or an i''ediate val(e& T$e fa!t, on1#$i" '(lti"lier allo/! t$e C5;0 -P to "erfor' o"eration! effi#iently !(#$ a! #onvol(tion, #orrelation, and filtering& )n addition, t$e '(lti"lier and A,U toget$er e0e#(te '(lti"ly/a##('(late *3AC. #o'"(tation! and A,U o"eration! in "arallel in a !ingle in!tr(#tion #y#le& T$i! f(n#tion i! (!ed in deter'ining t$e E(#lidian di!tan#e and in i'"le'enting !y''etri#al and ,3- filter!, /$i#$ are re2(ired for #o'"le0 -P algorit$'!& -ee !e#tion ;&5, 3(lti"lier/Adder Unit, on "age ;11>, for 'ore detail! abo(t t$e '(lti"lier/adder (nit& <ig 2 : % 3U,T)P,)E=/A E= UN)T

<ig 2 : % 3U,T)P,)E=/A

E= UN)T

T$e!e are t$e !o'e of t$e i'"ortant "art! of t$e "ro#e!!or and yo( are in!tr(#ted to go t$ro(g$ t$e detailed ar#$ite#t(re on#e /$i#$ $el"! yo( in develo"ing t$e o"ti'i@ed #ode for t$e re2(ired a""li#ation&
2008 Private Engineering College, Affiliated to JNTU, Hyderabad >/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

CHAPTER II

DSP PROGRAMS IN C

1. L"n'a$ C%n.%lu)"%n
AIM To verify ,inear Convol(tion& E/UIPMENTS T3- %20C561% 9it& =-2%2 -erial Cable Po/er Cord THEORY Convol(tion i! a for'al 'at$e'ati#al o"eration, G(!t a! '(lti"li#ation, addition, and integration& Addition taAe! t/o numbers and "rod(#e! a t$ird number, /$ile #onvol(tion taAe! t/o signals and "rod(#e! a t$ird signal& Convol(tion i! (!ed in t$e 'at$e'ati#! of 'any field!, !(#$ a! "robability and !tati!ti#!& )n linear !y!te'!, #onvol(tion i! (!ed to de!#ribe t$e relation!$i" bet/een t$ree !ignal! of intere!tH t$e in"(t !ignal, t$e i'"(l!e re!"on!e, and t$e o(t"(t !ignal&

)n t$i! e2(ation, 01*A., 02 *n1A. and y*n. re"re!ent t$e in"(t to and o(t"(t fro' t$e !y!te' at ti'e n& Here /e #o(ld !ee t$at one of t$e in"(t i! !$ifted in ti'e by a val(e everyti'e it i! '(lti"lied /it$ t$e ot$er in"(t !ignal& ,inear Convol(tion i! 2(ite often (!ed a! a 'et$od of i'"le'enting filter! of vario(! ty"e!& ALGORITHM S)'& ! e#lare t$ree b(ffer! na'ely )n"(t b(ffer, Te'"orary 4(ffer, ?(t"(t 4(ffer& S)'& * Cet t$e in"(t fro' t$e C? EC, !tore it in )n"(t b(ffer and tran!fer it to t$e fir!t lo#ation of t$e Te'"orary b(ffer& S)'& - 3aAe t$e Te'"orary b(ffer to "oint to t$e la!t lo#ation& S)'& 0 3(lti"ly t$e te'"orary b(ffer /it$ t$e #oeffi#ient! in t$e data 'e'ory and a##('(late it /it$ t$e "revio(! o(t"(t& S)'& 1 -tore t$e o(t"(t in t$e o(t"(t b(ffer& S)'& + =e"eat t$e !te"! fro' 2 to 5& PROGRAM Min#l(deN!tdio&$O int 0P15Q,$P15Q,yP15QK 'ain*. R int i,G,',nK "rintf*STn enter val(e for 'S.K !#anf*SUdS,D'.K "rintf*STn enter val(e for nS.K !#anf*SUdS,Dn.K
2008 Private Engineering College, Affiliated to JNTU, Hyderabad 10/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

"rintf*SEnter val(e! for i/"TnS.K for*iV0KiN'KiWW. !#anf*SUdS,D0PiQ.K "rintf*SEnter +al(e! for n TnS.K for*iV0KiNnKiWW. !#anf*SUdS,D$PiQ.K for*iV'KiNV'Wn11KiWW. 0PiQV0K for*iVnKiNV'Wn11KiWW. $PiQV0K for*iV0KiN'Wn11KiWW. R yPiQV0K for*GV0KGNViKGWW. R yPiQVyPiQW*0PGQX$Pi1GQ.K Y Y for*iV0KiN'Wn11KiWW. "rintf*STn T$e +al(e of o(t"(t yPUdQVUdS,i,yPiQ.K Y =e!(ltH enter val(e for '; enter val(e for n; Enter val(e! for i/" 12%; Enter +al(e! for n 12%; T$e +al(e of o(t"(t yP0QV1 T$e +al(e of o(t"(t yP1QV; T$e +al(e of o(t"(t yP2QV10 T$e +al(e of o(t"(t yP%QV20 T$e +al(e of o(t"(t yP;QV25 T$e +al(e of o(t"(t yP5QV2; T$e +al(e of o(t"(t yP5QV15

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

11/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

2& C"$#ula$ C%n.%lu)"%n


AIM To verify Cir#(lar Convol(tion& E/UIPMENTS -AN - TELA- 5;15 9it& =-2%2 -erial Cable Po/er Cord THEORY Cir#(lar #onvol(tion i! anot$er /ay of finding t$e #onvol(tion !(' of t/o in"(t !ignal!& )t re!e'ble! t$e linear #onvol(tion, e0#e"t t$at t$e !a'"le val(e! of one of t$e in"(t !ignal! i! folded and rig$t !$ifted before t$e #onvol(tion !(' i! fo(nd& Al!o note t$at #ir#(lar #onvol(tion #o(ld al!o be fo(nd by taAing t$e <T of t$e t/o in"(t !ignal! and finding t$e "rod(#t of t$e t/o fre2(en#y do'ain !ignal!& T$e )nver!e <T of t$e "rod(#t /o(ld give t$e o(t"(t of t$e !ignal in t$e ti'e do'ain /$i#$ i! t$e #ir#(lar #onvol(tion o(t"(t& T$e t/o in"(t !ignal! #o(ld $ave been of varying !a'"le lengt$!& 4(t /e taAe t$e <T of $ig$er "oint, /$i#$ ever !ignal! level! to& <or eg& )f one of t$e !ignal i! of lengt$ 255 and t$e ot$er !"an! 51 !a'"le!, t$en /e #o(ld only taAe 255 "oint <T& -o t$e o(t"(t of ) <T /o(ld be #ontaining 255 !a'"le! in!tead of %05 !a'"le!, /$i#$ follo/! N1WN2 : 1 /$ere N1 D N2 are t$e lengt$! 255 and 51 re!"e#tively of t$e t/o in"(t!& T$(! t$e o(t"(t /$i#$ !$o(ld $ave been %05 !a'"le! long i! fitted into 255 !a'"le!& T$e 255 "oint! end (" being a di!torted ver!ion of t$e #orre#t !ignal& T$i! "ro#e!! i! #alled #ir#(lar #onvol(tion& PROGRAM2 /X "rg to i'"le'ent #ir#(lar #onvol(tion X/ Min#l(deN!tdio&$O int ',n,0P%0Q,$P%0Q,yP%0Q,i,G,te'"P%0Q,A,02P%0Q,aP%0QK void 'ain*. R "rintf*S enter t$e lengt$ of t$e fir!t !e2(en#eTnS.K !#anf*SUdS,D'.K "rintf*S enter t$e lengt$ of t$e !e#ond !e2(en#eTnS.K !#anf*SUdS,Dn.K "rintf*S enter t$e fir!t !e2(en#eTnS.K for*iV0KiN'KiWW. !#anf*SUdS,D0PiQ.K "rintf*S enter t$e !e#ond !e2(en#eTnS.K for*GV0KGNnKGWW. !#anf*SUdS,D$PGQ.K

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

12/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

if*'1nZV0. R if*'On. @eroX/ R for*iVnKiN'KiWW. $PiQV0K nV'K Y for*iV'KiNnKiWW. 0PiQV0K 'VnK Y yP0QV0K aP0QV$P0QK for*GV1KGNnKGWW. aPGQV$Pn1GQK

/X)f lengt$ of bot$ !e2(en#e! are not e2(alX/ /X Pad t$e !'aller !e2(en#e /it$

/Xfolding $*n. to $*1n.X/

/XCir#(lar #onvol(tionX/ for*iV0KiNnKiWW. yP0QWV0PiQXaPiQK for*AV1KANnKAWW. R yPAQV0K /X#ir#(lar !$iftX/ for*GV1KGNnKGWW. 02PGQVaPG11QK 02P0QVaPn11QK for*iV0KiNnKiWW. R aPiQV02PiQK yPAQWV0PiQX02PiQK Y Y /Xdi!"laying t$e re!(ltX/ "rintf*S t$e #ir#(lar #onvol(tion i!TnS.K for*iV0KiNnKiWW. "rintf*SUd TtS,yPiQ.K Y

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

1%/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

?UTPUTH1 Enter t$e fir!t !e2(en#e 5 5 6 Enter t$e !e#ond !e2(en#e 6 8 5 ; ?UTPUT K1 >; 110 t$e #ir#(lar #onvol(tion i! 122 105

3odel Cra"$H1

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

1;/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

-. CORRELATION AIMH To #onvert Cir#(lar Convol(tion E/UIPMENTS TELA- T3- %20 C561% 9it& =-2%2 -erial Cable Po/er Cord THEORY2 Correlation i! 'ea!(re! of t$e degree to /$i#$ t/o !e2(en#e! are !i'ilar &T$ere are t/o ty"e! of Correlation 1& Cro!! #orrelation 2&A(to #orrelation C$%(( C%$$'la)"%nH1 given t/o real val(ed !e2(en#e! 01*n. of finite energy , t$e #ro!! #orrelation of 01*n. and 02*n. i! a !e2(en#e r0y *1. defined a! r0y* 1 .V Min#l(deN!tdio&$O int ',n,LP%0Q,=L8P%0Q,8P%0Q,i,G,te'"P%0Q,A,L2P%0Q,aP%0QK void 'ain*. R "rintf*Senter t$e lengt$ of t$e fir!t !e2(en#eTnS.K !#anf*SUdS,D'.K "rintf*Senter t$e lengt$ of t$e !e#ond !e2(en#eTnS.K !#anf*SUdS,Dn.K "rintf*Senter t$e fir!t !e2(en#eTnS.K for*iV0KiN'KiWW. !#anf*SUdS,DLPiQ.K "rintf*Senter t$e !e#o(nd !e2(en#eTnS.K for*GV0KGNnKGWW. !#anf*SUdS,D8PGQ.K for*iVnKiN'Wn11KiWW. LPiQV0K for*iV'KiNnW'11KiWW. 8PiQV0K if*'On. aV'K el!e aVn for*lV0KlNaKlWW. R =L8PlQV0K for*nV0KnNaKnWW.

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

15/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

R =L8PlQWVLPnWlQXL2PnQK Y Y "rintf*St$e #orrelation i!TnS.K for*iV0KiNnKiWW. "rintf*SUdTtS,=L8PiQ.K Y enter t$e lengt$ of t$e fir!t !e2(en#e 5 enter t$e lengt$ of t$e !e#ond !e2(en#e 5 enter t$e fir!t !e2(en#e 5,5,5,5,5,5 enter t$e !e#o(nd !e2(en#e 5,5,5,5,5,5 t$e #orrelation i! 125,100,65,50,25 OUTPUT2

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

15/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

0. DISCRETE FOURIER TRANSFORM


AIM To find t$e <a!t <o(rier Tran!for' for t$e realti'e !a'"le!& HARD3ARE RE/UIREMENTS T3-%20C561% -9& U-4 Cable& Po/er Cord 5+ Ada"ter !. THEORY T$e Tran!for' o'ain Te#$ni2(e involve! t$e tran!for'ation of t$e ti'e do'ain !ignal into a fre2(en#y do'ain one& T$e available 'et$od! of i'"le'enting t$e tran!for'ation are
X * k . = x * n. e
k =0 N 1 n =0 M

D"(#$')' F%u$"'$ T$an(4%$5 Fa() F%u$"'$ T$an(4%$5


nk n

j 2

K0 < k < N 1

*;.

x *k . = x*n. W

j 2

nk n

K0 < k < N 1

*5.

P=?C=A3H Min#l(deN!tdio&$O Min#l(deN'at$&$O Mdefine "i %&1;15 Mdefine PT- 5; float LPPT-QK 'ain*. R float 0rPPT-Q,0iPPT-Q,A,n,NVPT-K float L=PPT-Q,L)PPT-QK for*iV0KiNPT-11KWW. R 0rPiQV!in*2X"iX10Xi/5;&0.K 0iPiQV0K Y for *AV0KANNKAWW. R LrPAQV0K LiPAQV0K for *nV0K NNK nWW. R L=PAQWV*0rPnQX#o!*2X"iXAXn/N..W*0iPnQX!in*2X"iXAXn/N..K L)PAQWV*0iPnQX!in*2X"iXAXn/N..1*0rPnQX#o!*2X"iXAXn/N..K Y LPAQV!2rt**L=PAQXL=PAQ.W*L)PAQXL)PAQ..K "rintf*SUfTnS,LPAQ.K Y

5.
2008

FAST FOURIER TRANSFORM


Private Engineering College, Affiliated to JNTU, Hyderabad 16/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

AIM To find t$e <a!t <o(rier Tran!for' for t$e realti'e !a'"le!& HARD3ARE RE/UIREMENTS T3-%20C561% -9& U-4 Cable& Po/er Cord 5+ Ada"ter THEORY T$e <a!t <o(rier Tran!for' i! (!ef(l to 'a" t$e ti'e1do'ain !e2(en#e into a #ontin(o(! f(n#tion of a fre2(en#y variable& T$e <<T of a !e2(en#e R0*n.Y of lengt$ N i! given by a #o'"le01val(ed !e2(en#e L*A.&
M nk n

X * k . = x * n. e
k =0

j 2

K0 < k < N 1

T$e above e2(ation i! t$e 'at$e'ati#al re"re!entation of t$e <T& A! t$e n('ber of #o'"(tation! involved in tran!for'ing a N "oint ti'e do'ain !ignal into it! #orre!"onding fre2(en#y do'ain !ignal /a! fo(nd to be N2 #o'"le0 '(lti"li#ation!, an alternative algorit$' involving le!!er n('ber of #o'"(tation! i! o"ted& 7$en t$e !e2(en#e 0*n. i! divided into 2 !e2(en#e! and t$e !e"arately, t$e re!(lting n('ber of #o'"(tation! /o(ld be N2/2 *i&e&.
2 nk * 2 n +1. k x * k . = x * 2n. WN + x*2n + 1. WN n =0 n =0 N2 21 N2 21

<T "erfor'ed

*5.

Con!ider 0*2n. be t$e even !a'"le !e2(en#e! and 0*2nW1. be t$e odd !a'"le !e2(en#e derived for' 0*n.&

x * 2n.
n =0

N2 2 1

2 nk WN

/o(ld re!(lt in *6.


2008 Private Engineering College, Affiliated to JNTU, Hyderabad 18/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

*N/2.2'(lti"li#ationB!

x*2n + 1.
n =0

N2 2 1

* 2 n +1. k WN

*8.

an ot$er *N/2.2 '(lti"li#ation[! finally re!(lting in *N/2.2 W *N/2.2 V


N2 N2 N2 + = Computatio ns ; ; 2

<(rt$er !olving Eg& *2.


* 2 nk . x* k . = x*2n. WN2 nk + x* 2n + 1. WN W *>. n =0 n =0 N N2 21 N 21 k

2 nk * 2 nk . *10. = x * 2 n . WN + W x*2n + 1. WN n =0 N n =0

N 2 1

N 21

ividing t$e !e2(en#e 0*2n. into f(rt$er 2 odd and even !e2(en#e! /o(ld red(#e t$e #o'"(tation!& 7N i! t$e t/iddle fa#tor =e
W
W
nk N

j 2 n
j 2 n

=e

nk

N K+ 2 N

= WN W
j 2 n n 2

N K+ 2 N

*11.

=e

j 2 k n

k = WN

j 2 k n

k = WN *#o! j !in .

=W

N K+ 2 N

k = WN *1.

=W

N K+ 2 N

k = WN

*12.

E'"loying t$i! e2(ation, /e ded(#e


2008 Private Engineering College, Affiliated to JNTU, Hyderabad 1>/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

2 nk * 2 nk . *1%. x * k . = x * 2 n . WN + x*2n + 1. WN n =0 n=0


N

N2 21

N 21

K 21 N 2 nk * 2 nk . *1;. x * k + . = x * 2 n. W N W x *2n + 1. 21 WN 2 n =0 N

T$e ti'e b(rden #reated by t$i! large n('ber of #o'"(tation! li'it! t$e (!ef(lne!! of <T in 'any a""li#ation!& Tre'endo(! effort! devoted to develo" 'ore effi#ient /ay! of #o'"(ting <T re!(lted in t$e above e0"lained <a!t <o(rier Tran!for' algorit$'& T$i! 'at$e'ati#al !$ort#(t red(#e! t$e n('ber of #al#(lation! t$e <T re2(ire! dra!ti#ally& T$e above 'entioned radi012 de#i'ation in ti'e <<T i! e'"loyed for do'ain tran!for'ation& ividing t$e <T into !'aller <T! i! t$e ba!i! of t$e <<T& A radi012 <<T divide! t$e <T into t/o !'aller <T!, ea#$ of /$i#$ i! divided into !'aller <T! and !o on, re!(lting in a #o'bination of t/o1"oint <T!& T$e e#i'ation 1)n1Ti'e * )T. <<T divide! t$e in"(t *ti'e. !e2(en#e into t/o gro("!, one of even !a'"le! and t$e ot$er of odd !a'"le!& N/2 "oint <T are "erfor'ed on t$e t$e!e !(b1!e2(en#e! and t$eir o(t"(t! are #o'bined to for' t$e N "oint <T&

FIG. -A.!

T$e above !$o/n 'at$e'ati#al re"re!entation for'! t$e ba!i! of N "oint <<T and i! #alled t$e Bu))'$4l6 S)$u#)u$'&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

20/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

STAGE 7 I

STAGE II

STAGE 7 III FIG. -A.* 7 8 POINT DIT

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

21/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

ALGORITHM S)'& ! !a'"le t$e in"(t *N. of any de!ired fre2(en#y& Convert it to fi0ed1"oint for'at and !#ale t$e in"(t to avoid overflo/ d(ring 'ani"(lation& S)'& * e#lare fo(r b(ffer! na'ely real in"(t, real e0"onent, i'aginary e0"onent and i'aginary in"(t& S)'& e#lare t$ree #o(nter! for !tage, gro(" and b(tterfly& S)'& 0 )'"le'ent t$e <a!t <o(rier Tran!for' for t$e in"(t !ignal& S)'& 1 -tore t$e o(t"(t *=eal and )'aginary. in t$e o(t"(t b(ffer& S)'& + e#re'ent t$e #o(nter of b(tterfly& =e"eat fro' t$e -te" ; (ntil t$e #o(nter rea#$e! @ero& S)'& , )f t$e b(tterfly #o(nter i! @ero, 'odify t$e e0"onent val(e& S)'& 8 =e"eat fro' t$e -te" ; (ntil t$e gro(" #o(nter rea#$e! @ero& S)'& 9 )f t$e gro(" #o(nter i! @ero, '(lti"ly t$e b(tterfly val(e by t/o and divide t$e gro(" val(e by t/o& S)'& !: =e"eat fro' t$e -te" ; (ntil t$e !tage #o(nter rea#$e! @ero& S)'& !! Tran!'it t$e <<T o(t"(t t$ro(g$ l"n' %u) "ort& PROGRAM2 Min#l(de N'at$&$O Mdefine PT- 128 //M of "oint! for <<T Mdefine P) %&1;15>255%58>6> ty"edef !tr(#t Rfloat real,i'agKY C?3P,ELK void <<T*C?3P,EL X8, int n.K //<<T "rototy"e float iob(fferPPT-QK //a! in"(t and o(t"(t b(ffer float 01PPT-Q,0PPT-QK //inter'ediate b(ffer !$ort iK //general "(r"o!e inde0 variable !$ort b(ffer#o(nt V 0K //n('ber of ne/ !a'"le! in iob(ffer !$ort flag V 0K //!et to 1 by )-= /$en iob(ffer f(ll float yP128QK C?3P,EL /PPT-QK //t/iddle #on!tant! !tored in / C?3P,EL !a'"le!PPT-QK //"ri'ary /orAing b(ffer 'ain*. R float G,!('V0&0 K int n,A,i,aK for *i V 0 K iNPT- K iWW. // !et (" t/iddle #on!tant! in / R /PiQ&real V #o!*2XP)Xi/*PT-X2&0..K //=e #o'"onent of t/iddle #on!tant! /PiQ&i'ag V1!in*2XP)Xi/*PT-X2&0..K /X)' #o'"onent of t/iddle #on!tant!X/ Y

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

22/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

/XXXXXXXXXXXXXXXX)n"(t-ignalL*n.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ for*iV0,GV0KiNPT-KiWW. R 0PiQ V !in*2XP)X5Xi/PT-.K !a'"le!PiQ&realV0&0K !a'"le!PiQ&i'agV0&0K Y // -ignal 0*<!.V!in*2X"iXfXi/<!.K

/XXXXXXXXXXXXXXXXXXXXXX <<T of =*t. XXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ for *i V 0 K i N PT- K iWW. //!/a" b(ffer! R !a'"le!PiQ&realViob(fferPiQK //b(ffer /it$ ne/ data Y for *i V 0 K i N PT- K iWW. !a'"le!PiQ&i'ag V 0&0K <<T*!a'"le!,PT-.K //i'ag #o'"onent! V 0 //#all f(n#tion <<T&#

/XXXXXXXXXXXXXXXXXXXX P- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ for *i V 0 K i N PT- K iWW. //#o'"(te 'agnit(de R 01PiQ V !2rt*!a'"le!PiQ&realX!a'"le!PiQ&real W !a'"le!PiQ&i'agX!a'"le!PiQ&i'ag.K Y Y //end of 'ain

void <<T*C?3P,EL X8, int N. //in"(t !a'"le array, M of "oint! R C?3P,EL te'"1,te'"2K //te'"orary !torage variable! int i,G,AK //loo" #o(nter variable! int (""erIleg, lo/erIlegK //inde0 of (""er/lo/er b(tterfly leg int legIdiffK //differen#e bet/een (""er/lo/er leg int n('I!tage! V 0K //n('ber of <<T !tage! *iteration!. int inde0, !te"K //inde0/!te" t$ro(g$ t/iddle #on!tant i V 1K //log*ba!e2. of N "oint!V M of !tage! do R n('I!tage! WV1K i V iX2K Y/$ile *iZVN.K legIdiff V N/2K //differen#e bet/een (""erDlo/er leg! !te" V *PT-X2./NK //!te" bet/een val(e! in t/iddle&$ // 512 for *i V 0Ki N n('I!tage!K iWW. //for N1"oint <<T

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

2%/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

R inde0 V 0K for *G V 0K G N legIdiffK GWW. R for *(""erIleg V GK (""erIleg N NK (""erIleg WV *2XlegIdiff.. R lo/erIleg V (""erIlegWlegIdiffK te'"1&real V *8P(""erIlegQ.&real W *8Plo/erIlegQ.&realK te'"1&i'ag V *8P(""erIlegQ.&i'ag W *8Plo/erIlegQ.&i'agK te'"2&real V *8P(""erIlegQ.&real 1 *8Plo/erIlegQ.&realK te'"2&i'ag V *8P(""erIlegQ.&i'ag 1 *8Plo/erIlegQ.&i'agK *8Plo/erIlegQ.&real V te'"2&realX*/Pinde0Q.&real 1te'"2&i'agX*/Pinde0Q.&i'agK *8Plo/erIlegQ.&i'ag V te'"2&realX*/Pinde0Q.&i'ag Wte'"2&i'agX*/Pinde0Q.&realK *8P(""erIlegQ.&real V te'"1&realK *8P(""erIlegQ.&i'ag V te'"1&i'agK Y inde0 WV !te"K Y legIdiff V legIdiff/2K !te" XV 2K Y G V 0K for *i V 1K i N *N11.K iWW. //bit rever!al for re!e2(en#ing data R A V N/2K /$ile *A NV G. R G V G 1 AK A V A/2K Y G V G W AK if *iNG. R te'"1&real V *8PGQ.&realK te'"1&i'ag V *8PGQ.&i'agK *8PGQ.&real V *8PiQ.&realK *8PGQ.&i'ag V *8PiQ.&i'agK *8PiQ.&real V te'"1&realK *8PiQ.&i'ag V te'"1&i'agK Y Y ret(rnK Y

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

2;/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

OUTPUT2

<T or <<T !"e#tr(' of !in(!oidal !ignal fV 10 H@

+.FIR FILTER
2008 Private Engineering College, Affiliated to JNTU, Hyderabad 25/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

A M! " To de!ign and i'"le'ent a lo/ "a!! <)= filter (!ing /indo/ing te#$ni2(e& APPARATUS2 1& 2& %& ;& T3-%20C5;15 -9& U-4 Cable& Po/er Cord 5+ Ada"ter&

#$%&'(! " A <inite )'"(l!e =e!"on!e *<)=. filter i! a di!#rete linear ti'e1invariant !y!te' /$o!e o(t"(t i! ba!ed on t$e /eig$ted !(''ation of a finite n('ber of "a!t in"(t!& An <)= tran!ver!al filter !tr(#t(re #an be obtained dire#tly fro' t$e e2(ation for di!#rete1ti'e #onvol(tion& y * n. = x * k . h* n k . 0 < n < N 1
k =0 N 1

(!)

)n t$i! e2(ation, 0*A. and y*n. re"re!ent t$e in"(t to and o(t"(t fro' t$e filter at ti'e n& $*n1A. i! t$e tran!ver!al filter #oeffi#ient! at ti'e n& T$e!e #oeffi#ient! are generated by (!ing < - *<ilter e!ign -oft/are or igital filter de!ign "a#Aage.&

)indo*s!
Min#l(de N!tdio&$O Min#l(de N'at$&$O Mdefine "i %&1;15 int N,nK float $P5;QK void 'ain*. R "rintf*Senter t$e n('ber of !a'"le!TnS.K !#anf*SUdS,DN.K for*nV0KnN*N11.KnWW. R $PnQV0&0K $PnQV 0&;2W0&5X#o!*2X"iXn/*N11..W0&08X#o!*;X"iXn/*N11..K "rintf*S$PUdQVUfTnS,n,$PnQ.K Y Y

'%SUL#!
2008 Private Engineering College, Affiliated to JNTU, Hyderabad 25/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

PROGRAM2 Min#l(de N!tdio&$O Min#l(de N'at$&$O Mdefine "i %&1;15 int N,nK float $P5;QK void 'ain*. R "rintf*Senter t$e n('ber of !a'"le!TnS.K !#anf*SUdS,DN.K for*nV0KnN*N11.KnWW. R $PnQV0&0K $PnQV11*;Xn/*float.*n11.. K "rintf*S$PUdQVUfTnS,n,$PnQ.K Y Y

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

26/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

7ave for'H1

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

28/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

,. IIR FILTER
A M! " To de!ign and i'"le'ent a lo/ "a!! ))= filter (!ing /indo/ing te#$ni2(e& APPARATUS2 1& 2& %& ;& T3-%20C5;15 -9& U-4 Cable& Po/er Cord 5+ Ada"ter&

#$%&'(! " T$e ))= filter #an reali@e bot$ t$e "ole! and @eroe! of a !y!te' be#a(!e it $a! a rational tran!fer f(n#tion, de!#ribed by "olyno'ial! in @ in bot$ t$e n('erator and t$e deno'inatorH

H * z.

b a
k =1
M

k =0 N

z k
*2.

T$e differen#e e2(ation for !(#$ a !y!te' i! de!#ribed by t$e follo/ingH y * n. = bk x * n k . +


k =0

a
k =1

y *n k .

*%.

3 and N are order of t$e t/o "olyno'ial! bA and aA are t$e filter #oeffi#ient!& T$e!e filter #oeffi#ient! are generated (!ing < *<ilter e!ign !oft/are or igital <ilter de!ign "a#Aage.& LPF2 Min#l(deN!tdio&$O Min#l(deN'at$&$O Mdefine "i %&1;15 float L'odP5;Q,LrP5;Q,LiP5;QK float 0rP5;Q,0iP5;Q,$P100Q,yP5;QK int n,A,i,N,/,/#K void 'ain*. R for*AV0KANV5%KAWW. R 0rPAQV!in**2X"iX10XA./5;.W!in**2X"iX50XA./5;.K 0iPAQV0&0K Y for*AV0KANV5%KAWW. R LrPAQV0K LiPAQV0K
2008 Private Engineering College, Affiliated to JNTU, Hyderabad 2>/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

for*nV0KnNV5%KnWW. R LrPAQWV0rPnQX#o!**2X"iXAXn./5;&0.W0iPnQX!in**2X"iXAXn./5;&0.K LiPAQWV0iPnQX#o!**2X"iXAXn./5;&0.10rPnQX!in**2X"iXAXn./5;&0.K Y L'odPAQV!2rt*LrPAQXLrPAQWLiPAQXLiPAQ.K Y "rintf*Senter t$e order of t$e filterTnS.K !#anf*SUdS,D/.K "rintf*Senter t$e #(toff fre2(en#yTnS.K !#anf*SUdS,D/#.K for*/V0K/N100K/WW. R $P/QV1/!2rt*1W"o/*//*float./#,2XN..K "rintf*S$PUdQVUfTnS,/,$P/Q.K Y for*AV0KANV5%KAWW. R yPAQVL'odPAQX$PAQK "rintf*SyPUdQVUfTnS,A,yPAQ.K YY

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

%0/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

INPUT

OUTPUT

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

%1/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

HPF2 PROGRAM2 Min#l(deN!tdio&$O Min#l(deN'at$&$O Mdefine "i %&1;15 float L'odP5;Q,LrP5;Q,LiP5;QK float 0rP5;Q,0iP5;Q,$P100Q,yP5;QK int n,A,i,N,/,/#K void 'ain*. R for*AV0KANV5%KAWW. R 0rPAQV!in**2X"iX10XA./5;.W!in**2X"iX50XA./5;.K 0iPAQV0&0K Y for*AV0KANV5%KAWW. R LrPAQV0K LiPAQV0K for*nV0KnNV5%KnWW. R LrPAQWV0rPnQX#o!**2X"iXAXn./5;&0.W0iPnQX!in**2X"iXAXn./5;&0.K LiPAQWV0iPnQX#o!**2X"iXAXn./5;&0.10rPnQX!in**2X"iXAXn./5;&0.K Y L'odPAQV!2rt*LrPAQXLrPAQWLiPAQXLiPAQ.K Y "rintf*Senter t$e order of t$e filterTnS.K !#anf*SUdS,D/.K "rintf*Senter t$e #(toff fre2(en#yTnS.K !#anf*SUdS,D/#.K for*/V0K/N100K/WW. R $P/QV1/!2rt*1W"o/*/#/*float./,2XN..K "rintf*S$PUdQVUfTnS,/,$P/Q.K Y for*AV0KANV5%KAWW. R yPAQVL'odPAQX$PAQK "rintf*SyPUdQVUfTnS,A,yPAQ.K YY

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

%2/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

INPUT

OUTPUT

RESULT2 T$(! t$e ))= ,o/ "a!! filter /it$ #(t off fre2(en#y 12H@ $a! been de!igned&

+. P&)%' SP%C#'AL ,%-S #(


2008 Private Engineering College, Affiliated to JNTU, Hyderabad %%/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

A M! " To de!ign and i'"le'ent a lo/ "a!! <)= filter (!ing /indo/ing te#$ni2(e& APPARATUS2 1& 2& %& ;& T3-%20C561% -9& U-4 Cable& Po/er Cord 5+ Ada"ter&

PROGRAM2

Min#l(de N'at$&$O Mdefine PT- 128 //M of "oint! for <<T Mdefine P) %&1;15>255%58>6> ty"edef !tr(#t Rfloat real,i'agKY C?3P,ELK void <<T*C?3P,EL X8, int n.K //<<T "rototy"e float iob(fferPPT-QK //a! in"(t and o(t"(t b(ffer float 01PPT-Q,0PPT-QK //inter'ediate b(ffer !$ort iK //general "(r"o!e inde0 variable !$ort b(ffer#o(nt V 0K //n('ber of ne/ !a'"le! in iob(ffer !$ort flag V 0K //!et to 1 by )-= /$en iob(ffer f(ll float yP128QK C?3P,EL /PPT-QK //t/iddle #on!tant! !tored in / C?3P,EL !a'"le!PPT-QK //"ri'ary /orAing b(ffer 'ain*. R float G,!('V0&0 K int n,A,i,aK for *i V 0 K iNPT- K iWW. // !et (" t/iddle #on!tant! in / R /PiQ&real V #o!*2XP)Xi/*PT-X2&0..K //=e #o'"onent of t/iddle #on!tant! /PiQ&i'ag V1!in*2XP)Xi/*PT-X2&0..K /X)' #o'"onent of t/iddle #on!tant!X/ Y /XXXXXXXXXXXXXXXX)n"(t -ignal XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ for*iV0,GV0KiNPT-KiWW. R 0PiQ V !in*2XP)X5Xi/PT-.K !a'"le!PiQ&realV0&0K !a'"le!PiQ&i'agV0&0K Y // -ignal 0*<!.V!in*2X"iXfXi/<!.K L*n.

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

%;/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

/XXXXXXXXXXXXXXXXXXXXA(to Correlation XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ for*nV0KnNPT-KnWW. R !('V0K for*AV0KANPT-1nKAWW. R !('V!('W*0PAQX0PnWAQ.K // A(to Correlation =*t. Y iob(fferPnQ V !('K Y

of

L*n.V=*t.

/XXXXXXXXXXXXXXXXXXXXXX <<T of =*t. XXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ for *i V 0 K i N PT- K iWW. //!/a" b(ffer! R !a'"le!PiQ&realViob(fferPiQK //b(ffer /it$ ne/ data Y for *i V 0 K i N PT- K iWW. !a'"le!PiQ&i'ag V 0&0K <<T*!a'"le!,PT-.K //i'ag #o'"onent! V 0 //#all f(n#tion <<T&#

/XXXXXXXXXXXXXXXXXXXX P- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ for *i V 0 K i N PT- K iWW. //#o'"(te 'agnit(de R 01PiQ V !2rt*!a'"le!PiQ&realX!a'"le!PiQ&real W !a'"le!PiQ&i'agX!a'"le!PiQ&i'ag.K Y Y //end of 'ain

void <<T*C?3P,EL X8, int N. //in"(t !a'"le array, M of "oint! R C?3P,EL te'"1,te'"2K //te'"orary !torage variable! int i,G,AK //loo" #o(nter variable! int (""erIleg, lo/erIlegK //inde0 of (""er/lo/er b(tterfly leg int legIdiffK //differen#e bet/een (""er/lo/er leg int n('I!tage! V 0K //n('ber of <<T !tage! *iteration!. int inde0, !te"K //inde0/!te" t$ro(g$ t/iddle #on!tant i V 1K //log*ba!e2. of N "oint!V M of !tage! do R n('I!tage! WV1K i V iX2K Y/$ile *iZVN.K legIdiff V N/2K //differen#e bet/een (""erDlo/er leg!
2008 Private Engineering College, Affiliated to JNTU, Hyderabad %5/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

!te" V *PT-X2./NK //!te" bet/een val(e! in t/iddle&$ // 512 for *i V 0Ki N n('I!tage!K iWW. //for N1"oint <<T R inde0 V 0K for *G V 0K G N legIdiffK GWW. R for *(""erIleg V GK (""erIleg N NK (""erIleg WV *2XlegIdiff.. R lo/erIleg V (""erIlegWlegIdiffK te'"1&real V *8P(""erIlegQ.&real W *8Plo/erIlegQ.&realK te'"1&i'ag V *8P(""erIlegQ.&i'ag W *8Plo/erIlegQ.&i'agK te'"2&real V *8P(""erIlegQ.&real 1 *8Plo/erIlegQ.&realK te'"2&i'ag V *8P(""erIlegQ.&i'ag 1 *8Plo/erIlegQ.&i'agK *8Plo/erIlegQ.&real V te'"2&realX*/Pinde0Q.&real 1te'"2&i'agX*/Pinde0Q.&i'agK *8Plo/erIlegQ.&i'ag V te'"2&realX*/Pinde0Q.&i'ag Wte'"2&i'agX*/Pinde0Q.&realK *8P(""erIlegQ.&real V te'"1&realK *8P(""erIlegQ.&i'ag V te'"1&i'agK Y inde0 WV !te"K Y legIdiff V legIdiff/2K !te" XV 2K Y G V 0K for *i V 1K i N *N11.K iWW. //bit rever!al for re!e2(en#ing data R A V N/2K /$ile *A NV G. R G V G 1 AK A V A/2K Y G V G W AK if *iNG. R te'"1&real V *8PGQ.&realK te'"1&i'ag V *8PGQ.&i'agK *8PGQ.&real V *8PiQ.&realK *8PGQ.&i'ag V *8PiQ.&i'agK *8PiQ.&real V te'"1&realK *8PiQ.&i'ag V te'"1&i'agK Y Y ret(rnK ;

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

%5/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

CHAPTER III OFFLINE PROCESSING EXAMPLES


T$e ter' offline "ro#e!!ing indi#ate! t$at t$e "rogra'! /$i#$ yo( are de!igning are liAe !i'(lation i&e& yo( are not (!ing t$e real ti'e in"(t! and o(t"(t! al!o yo( are !eeing in t$e "ro#e!!or regi!ter! or 'e'ory only& !. ADDITION A"52 To "erfor' addition o"eration on t/o n('ber! re!iding in 'e'ory& A&&a$a)u(2 T3- %20C 5;15 "ro#e!!or P$%<$a52 &in#l(de \5;15I)+&a!'] &data &/ord 000%$, 000;$ // in"(t n('ber! // &te0t &in#l(de \intve#t&a!'] 4egin -T3 -T3 -T3 , , A -T, &end M1000$,A=1 // 'e'ory lo#ation of fir!t n('ber // M1001$,A=2 // 'e'ory lo#ation of !e#ond n('ber // M1500$,A=% // 'e'ory lo#ation of re!(lt // XA=1,A XA=2,4 A,0,4 4,XA=%

R'(ul)2 T$e re!(lt of addition o"eration #an be re#orded fro' t$e 'e'ory lo#ation&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

%6/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

*. MULTIPLICATION A"52 To "erfor' '(lti"li#ation o"eration on t/o n('ber! re!iding in 'e'ory& A&&a$a)u(2 T3- %20C 5;15 "ro#e!!or P$%<$a52 &in#l(de \5;15I)+&a!'] &data &/ord 0005$, 0002$ // in"(t n('ber! // &te0t &in#l(de \intve#t&a!'] 4egin -T3 -T3 -T3 3P8 -T, &end M1000$,A=1 // 'e'ory lo#ation of fir!t n('ber // M1001$,A=2 // 'e'ory lo#ation of !e#ond n('ber // M1500$,A=% // 'e'ory lo#ation of re!(lt // XA=1,XA=2,4 4,XA=%

R'(ul)2 T$e re!(lt of '(lti"li#ation o"eration #an be re#orded fro' t$e 'e'ory lo#ation&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

%8/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

-. SHIFTING A"52 To "erfor' left !$ift and rig$t !$ift o"eration on a n('ber re!iding in 'e'ory& A&&a$a)u(2 T3- %20C 5;15 "ro#e!!or P$%<$a52 &in#l(de \5;15I)+&a!'] &data &/ord 000%$, // in"(t n('ber // &te0t &in#l(de \intve#t&a!'] 4egin -T3 -T3 -T3 , , -<TA -<TA -T, -T, &end M1000$,A=5 // 'e'ory lo#ation of fir!t n('ber // M1500$,A=2 // 'e'ory lo#ation of left !$ifted n('ber // M1500$,A=% // 'e'ory lo#ation of rig$t !$ifted n('ber // XA=5,A XA=5,4 A,11 4,1 A,XA=2 4,XA=%

R'(ul)2 -$ifting t$e n('ber left by one bit i! e2(ivalent to '(lti"lying n('ber by 2 -$ifting t$e n('ber left by one bit i! e2(ivalent to dividing n('ber by 2

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

%>/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

0. LOGICAL OPERATIONS A"52 To "erfor' logi#al o"eration! on t/o n('ber! re!iding in 'e'ory& A&&a$a)u(2 T3- %20C 5;15 "ro#e!!or P$%<$a52 &in#l(de \5;15I)+&a!'] &data &/ord 000%$,0006$ // in"(t n('ber! // &te0t &in#l(de \intve#t&a!'] 4egin -T3 -T3 -T3 -T3 -T3 , , AN ?= -T, -T, , NEC -T, &end M1000$,A=5 M1001$,A=; M1500$,A=% M1500$,A=2 M1600$,A=1 XA=5,A XA=;,4 A,0,A 4,0,4 A,XA=% 4,XA=2 XA=5,A A A,XA=1 // 'e'ory lo#ation of fir!t n('ber // // 'e'ory lo#ation of !e#ond n('ber // // 'e'ory lo#ation of re!(lt d(e to AN o"eration // // 'e'ory lo#ation of re!(lt d(e to ?= o"eration // // 'e'ory lo#ation of re!(lt d(e to NECATE o"eration //

R'(ul)2 T$e logi#al o"eration! are "erfor'ed on a n('ber&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

;0/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

1. CIRCULAR BUFFERING A"52 To reveal t$e #on#e"t of #ir#(lar b(ffering& A&&a$a)u(2 T3- %20C 5;15 "ro#e!!or P$%<$a52 &in#l(de \5;15I)+&a!'] &data &/ord 1$,2$,%$,;$,5$ &te0t &in#l(de \intve#t&a!'] 4egin -T3 -T3 -T3 -T3 =PT4 , -T, ,1 N?P &end

// array of n('ber! //

M1000$,A=5 // data 'e'ory addre!! // M2000$,A=5 // o(t"(t b(ffer // M;$,49 // loading t$e !i@e of #ir#(lar b(ffer to 49 regi!ter // M20$,4=C ,1 XA=5WU,0,A A,0,XA=5W

R'(ul)2 T$e #on#e"t of #ir#(lar b(ffering i! ob!erved

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

;1/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

CHAPTER IV REAL TIME EXAMPLES


!. SAMPLING A M! " To !t(dy t$e #on#e"t of !a'"ling #ontin(o(! !ignal /it$ a !a'"ling fre2(en#y of ;89H@ and re#on!tr(#t t$e !a'e& APPARATUS2 1& T3-%20C5;15 -9& 2& U-4 Cable& %& Po/er Cord 0& 5+ Ada"ter& THEORY2 -a'"ling i! a "ro#e!! by /$i#$ a #ontin(o(!1ti'e !ignal i! #onverted into a di!#rete1 ti'e !ignal& ,et 0*t. be a #ontin(o(! ti'e varying !ignal& T$e !ignal 0*t. i! !a'"led at reg(lar interval of ti'e /it$ !a'"ling "eriod T& T$e !a'"led !ignal 0*nT. i! given by 0*nT. V 0*t. ^ t V nT V 0*nT., 1 N n N T$e #ontin(o(! ti'e !ignal 0*t. i! '(lti"lied by t$e !a'"ling f(n#tion !*t. /$i#$ i! a !erie! of i'"(l!e!& T$e re!(ltant !ignal i! a di!#rete ti'e !ignal 0*n.& 0*n. V 0*t. !*t. ^ t V nT, 1 N n N

x(T)

x(nT)

T
Continuous Time Signal nT

T 3T 5T 7T

9T 11T

13T

15T

Discrete Time Signal nT

PROGRAM2 K-a'"ling "rogra' K-tarting addre!! H 1000$ K -P)9 o(t"(t H 1500$ &in#l(de S5;15I)+&a!'S &data
2008 Private Engineering College, Affiliated to JNTU, Hyderabad ;2/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

&te0t !tart =-4L )NT3 , M0224$,0,A -T,3 A,P3-T K111111111111111111111111-erial Port )nitiali@ation!1111111111111111111111111 K111111111111111111111111113#4-P0 )nitiali@ation!1111111111111111111111111111 --4L )NT3 -T3 -PC=1, 3#4-P0I-P-A -T3 M00>0$,3#4-P0I-PN?P N?P -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3
2008

K-PC=1 re!et

-PC=2,3#4-P0I-P-A M0020$,3#4-P0I-PPC=,3#4-P0I-P-A M0A00$,3#4-P0I-P=C=1,3#4-P0I-P-A M00A0$,3#4-P0I-P=C=2,3#4-P0I-P-A M0001$,3#4-P0I-PLC=1,3#4-P0I-P-A M00A0$,3#4-P0I-PLC=2,3#4-P0I-P-A M0001$,3#4-P0I-P-=C=1,3#4-P0I-P-A M0016$,3#4-P0I-P-=C=2,3#4-P0I-P-A M%0%<$,3#4-P0I-P3C=1,3#4-P0I-P-A M0001$,3#4-P0I-P3C=2,3#4-P0I-P-A M0000$,3#4-P0I-P=CE=4,3#4-P0I-P-A M0001$,3#4-P0I-P=CE=A,3#4-P0I-P-A M0001$,3#4-P0I-PLCE=4,3#4-P0I-P-A M0001$,3#4-P0I-P-

K-PC=2 re!et KPC= K=C=1 K%2 4)T- 7?= -)EE K=C=2 KLC=1 K%2 4)T- 7?= -)EE KLC=2 K-=C=1 K1116 K-=C=2 K3C=1 K3C=2 K=CE=4 K=CE=A KLCE=4

Private Engineering College, Affiliated to JNTU, Hyderabad

;%/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

-T3 -T3 -T3 -T3 N?P N?P -T3 -T3

LCE=A,3#4-P0I-P-A M0001$,3#4-P0I-P-PC=1,3#4-P0I-P-A M00>1$,3#4-P0I-P-

KLCE=A

KTaAe [e' o(t of re!et

-PC=2,3#4-P0I-P-A M00A1$,3#4-P0I-P-

K111111111111111111111111113#4-P2 )nitiali@ation!111111111111111111111111111111 -T3 -T3 N?P N?P -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3 -T3
2008

-PC=1,3#4-P2I-P-A M00>0$,3#4-P2I-P-

K-PC=1 re!et

-PC=2,3#4-P2I-P-A M0020$,3#4-P2I-PPC=,3#4-P2I-P-A M0A00$,3#4-P2I-P=C=1,3#4-P2I-P-A M00A0$,3#4-P2I-P=C=2,3#4-P2I-P-A M0000$,3#4-P2I-PLC=1,3#4-P2I-P-A M00A0$,3#4-P2I-PLC=2,3#4-P2I-P-A M0000$,3#4-P2I-P-=C=1,3#4-P2I-P-A M0005$,3#4-P2I-P-=C=2,3#4-P2I-P-A M%0%4$,3#4-P2I-P3C=1,3#4-P2I-P-A M0001$,3#4-P2I-P3C=2,3#4-P2I-P-A M0000$,3#4-P2I-P=CE=4,3#4-P2I-P-A M0001$,3#4-P2I-P=CE=A,3#4-P2I-P-A M0001$,3#4-P2I-P-

K-PC=2 re!et KPC= K=C=1 K%2 4)T- 7?= -)EE K=C=2 KLC=1 K%2 4)T- 7?= -)EE KLC=2 K-=C=1 K115 K-=C=2 K3C=1 K3C=2 K=CE=4 K=CE=A
;;/52

Private Engineering College, Affiliated to JNTU, Hyderabad

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

-T3 -T3 -T3 -T3 -T3 -T3 N?P N?P -T3 -T3

LCE=4,3#4-P2I-P-A M0001$,3#4-P2I-PLCE=A,3#4-P2I-P-A M0001$,3#4-P2I-P-PC=1,3#4-P2I-P-A M00>1$,3#4-P2I-P-

KLCE=4 KLCE=A

KTaAe [e' o(t of re!et

-PC=2,3#4-P2I-P-A M00A1$,3#4-P2I-P-

K11111111111111111111End of -erial Port! )nitiali@ation!11111111111111111111111 =-4L )NT3

, M02<$,0,A -T,3 A,)3= -T3 -T3 -T3 -T3 -T3 -T3 N?P -T3 -T3 -T3 M0$,3#4-P0I L=1 M0$,3#4-P0I L=2 M0006$,CP)?C= M000%$,CP)?-= M-PC=2,3#4-P2I-P-A M00E1$,3#4-P2I-PM0006$,CP)?-= M-PC=2,3#4-P0I-P-A M00E1$,3#4-P0I-PK-#lA D <! K3#lA

K1111111111111111111111111111111111111111111111111111111111111111111111111111 -T3 M128,49 -T3 M1500$,A=1 --4L -L3 7A)T N?P N?P N?P 4 7A)T

'%SUL#! " T$(! t$e #ontin(o(! ti'e !ignal i! !a'"led at ;8 9H@ and t$e original !ignal i! re#on!tr(#ted&
2008 Private Engineering College, Affiliated to JNTU, Hyderabad ;5/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

CHAPTE=1+ MA#LAB %.AMPL%S !. C%5&u)a)"%n u("n< 5a)$"#'(


A M!" To perform some arithmetic operations using matrices. #$%&'(! " !T"!# itself means that matrix la$orator%. To compute matrix multiplications& a''ition& in(erse of the matrix etc of an% or'er can $e o$taine' easil%. P'&/'AM! " !) * 1 + 3, - 5 ., 7 / 9 0, #) * + 3 -, 5 - 7, 1 1 1 0, C) ! 1 # D) !2 D1)D3+ 4) 567 (!) 8) !(3&193) :) !(193,1 ) ;) :.1: S< (;) '%SUL#! " #asic arithmetic operations on matrices =ere o$ser(e' using !T"!#.

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

;5/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

*. Ma<n")u=' an= P>a('


A M!" To compute agnitu'e an' >hase of transforme' signal using 88T.

#$%&'(! " 8ast 8ourier Transform algorithms are faster algorithms to compute D8T. agnitu'e an' >hase plots can $e o$ser(e' for the 8ourier transforme' signal. Cestral anal%sis is special case of fre?uenc% 'omain techni?ues. P'&/'AM! " 8s ) 1@@@, T ) 1A 8s, t ) @9T91, % ) sin ( + 1 pi 1 +@@ 1 t ), AA generates sine =a(e of +@@;B AA plot(%) B ) fft(%&1@+-), AA gets 1@+- point fft for % AA 6 ) ( @ 91@+3 )2 1 8s A 1@+-, B1 ) a$s(B), plot( 6& B1) title( 88T >lot ) B+ ) angle (B), plot( 6& B+ ) title( >hase >lot ) '%SUL#! " agnitu'e an' >hase plots =ere o$ser(e' an' plotte'.

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

;6/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

-. C%n.%lu)"%n an= C%$$'la)"%n


A M!" To fin' con(olution an' correlation of signals #$%&'(! " 5f input is gi(en to an% s%stem& output from the s%stem is nothing $ut con(olution of input time signal an' the s%stem impulse response. Con(olution in time 'omain is same as multiplication in fre?uenc% 'omain. Correlation is measurement of similarit%. Cross correlation gi(es the similarit% $et=een t=o 'ifferent signals =hereas autocorrelation gi(es the similarit% of the signal =hen the same signal =as 'ela%e'. 8ourier transform of autocorrelation is po=er spectral 'ensit% of the signal (>SD) P'&/'AM! " x ) * 1 1 C1 1 C1 C1 0, h ) * C1 C1 1 C1 C1 C1 0, % ) con(( x& h ) cr ) xcorr ( x & h ) plot ( cr ) title ( >lot of Cross correlation ) %la$el( agnitu'e ) xla$el( "ag ) ar ) xcorr(x) plot ( ar ) RESULT2 Convol(tion and Correlation "lot! /ere ob!erved and "lotted&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

;8/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

0. F$'?u'n#6 R'(&%n(' %4 F"l)'$


A M!" To fin' fre?uenc% response of filter for specifie' coefficients. #$%&'(! " 8ilter =ith coefficients are gi(en. The fre?uenc% D magnitu'e plot gi(es the fre?uenc% response. P'&/'AM! " $ ) * @.@995 @.19/9 @.@995 0, a ) * 1 C@.931. @.3+9- 0, * h = 0 ) fre?B ( $& a& 1@@ ), % ) a$s(h), i ) fre?B( $& a& 1@@& +@@ ) plot(i) semilogx(=& %) RESULT2 <re2(en#y re!"on!e of !"e#ified filter i! "lotted&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

;>/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

1. FIR F"l)'$ D'("<n


A M!" To 'esign 85E 'igital filters. #$%&'(! " 85E D filter is a finite impulse response filter. Fr'er of the filter shoul' $e specifie'. 5nfinite response is truncate' to get finite impulse response. placing a =in'o= of finite length 'oes this. T%pes of =in'o=s a(aila$le are Eectangular& #arlett& ;amming& ;anning& #lacGmann =in'o= etc. This 85E filter is an all Bero filter. P'&/'AM! " n ) +@, fp ) +@@, f? ) 3@@, fs ) 1@@@, fn ) + 1 fp A fs, =in'o= ) #lacGman ( n31 ), $) fir1 ( n& fn & =in'o= ) * h = 0 ) fre?B( $& 1& 1+/ ), plot( =Api & a$s(h) ) RESULT2

AA lo= pass filter AA

A ,P< i! de!igned (!ing 4la#A'an /indo/&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

50/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

+. IIR Bu))'$ @%$)> F"l)'$ D'("<n


A M!" To 'esign 55E #utter=orth 'igital filters. #$%&'(! " 55E filters can $e expan'e' as infinite impulse response filters. 5n 'esigning 55E filters& cutoff fre?uencies of the filters shoul' $e mentione'. The or'er of the filter can $e estimate' using $utter =orth pol%nomial. That2s =h% the filters are name' as $utter =orth filters. 8ilter coefficients can $e foun' an' the response can $e plotte'. P'&/'AM! " fs ) 1@@@, =pn ) + 1 =p A fs, =?n ) + 1 =? A fs, * n =n 0 ) $uttor'( =pn& =?n& rp& sp ) * $ a 0 ) $utter( n& =n ) * h = 0 ) fre?B( $& a& 1+/), plot( (=Api) 1 ( fsA+ )& a$s(h) ) RESULT2 A 4(tter/ort$ ,P< i! de!igned and re!"on!e i! "lotted&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

51/52

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

,. IIR C>'b6(>'. F"l)'$ D'("<n


A M!" To 'esign 55E Che$%she( 'igital filters. #$%&'(! " 55E filters can $e expan'e' as infinite impulse response filters. 5n 'esigning 55E filters& cutoff fre?uencies of the filters shoul' $e mentione'. The or'er of the filter can $e estimate' using Che$%she( pol%nomial =ith the help of cutoff fre?uencies an' the gain at that fre?uencies. That2s =h% the filters are name' as Che$%she( filters. 8ilter coefficients can $e foun' an' the response can $e plotte'. P'&/'AM! " =p ) +@@, =? ) 3@@, rp ) +, sp ) -@, fs ) 1@@@, =pn ) + 1 =p A fs, =?n ) + 1=? A fs , * n =n 0 ) che$1or'(=pn& =?n& rp& sp ) * $ a 0 )che$%1(n& rp& =n ), * h = 0 ) fre?B($& a& 1+/ ), plot( =Api& a$s(h) ) RESULT2 A C$eby!$ev ,P< i! de!igned and re!"on!e i! "lotted&

2008

Private Engineering College, Affiliated to JNTU, Hyderabad

52/52

www.jntuworld.com

You might also like