Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
340 views144 pages

Ds..... P Lab Manual

The document discusses the architecture of the TMS320C6713 digital signal processor. It describes the key components of the CPU including the program fetch unit, instruction dispatch unit, and two data paths with functional units. It also outlines the memory architecture including the level 1 program and data caches, level 2 memory cache, and external memory interface. Several peripheral options are listed such as DMA controllers, expansion buses, serial ports, I2C ports, and timers. The goal is to study various addressing modes of the processor using simple programming examples.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
340 views144 pages

Ds..... P Lab Manual

The document discusses the architecture of the TMS320C6713 digital signal processor. It describes the key components of the CPU including the program fetch unit, instruction dispatch unit, and two data paths with functional units. It also outlines the memory architecture including the level 1 program and data caches, level 2 memory cache, and external memory interface. Several peripheral options are listed such as DMA controllers, expansion buses, serial ports, I2C ports, and timers. The goal is to study various addressing modes of the processor using simple programming examples.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 144

Vi Institute of Technology Dept.

of ECE
EXP NO: 1 STUDY O V!"IOUS !DD"ESSIN# $ODES O DSP%T$S&'(C)*1&
P"OCESSO"+ USIN# SI$P,E P"O#"!$$IN# EX!$P,ES
!I$ :
To Study the various addressing modes of DSP (TMS320C6713 Processor using sim!"e
e#am!"e !rogrammes$
1.1. !"C-ITECTU"E
The TMS320C6713 is a 32 %it f"oating !oint !rocessor& o!erating at 22'M() *hich
de"ivers u! to 13'0 mi""ion f"oating+!oint o!erations !er second (M,-.PS and
1/00 mi""ion instructions !er second (M0PS$ The C6713 uses a t*o+"eve" cache+
%ased architecture and has a !o*erfu" and diverse set of !eri!hera"s$ The "eve"1
!rogram cache (-1P is a 12+%yte direct+ma!!ed cache and the "eve"1 data cache
(-1P is a 12+3yte 2+*ay set+associative cache$ The "eve" 2 memory4cache (-2
consists of a 2'62+3yte memory s!ace that is shared %et*een !rogram and data
s!ace$ The C6713 has a rich !eri!hera" set that inc"udes t*o mu"tichanne" 5udio
Seria" Ports (Mc3SPs& t*o 0nter+0ntegrated Circuit (0
2
C %uses& one dedicated
6enera"+Pur!ose 0n!ut4.ut!ut(6P0. modu"e& t*o genera"+!ur!ose timers& a host+
!ort interface ((P0& and a e#terna" memory interface (7M0, ca!a%"e of interfacing
to SD85M& S3S85M& and asynchronous !eri!hera"s$
1.'. CENT"!, P"OCESSIN# UNIT %CPU+
The CP9 contains:
+ Program fetch unit
+ 0nstruction dis!atch unit& advanced instruction !ac;ing (C61 on"y
+ 0nstruction decode unit
+ T*o data !aths& each *ith four functiona" units
+ 32+%it registers& Contro" registers& Contro" "ogic
+ Test& emu"ation& and interru!t "ogic
The !rogram fetch& instruction dis!atch& and instruction decode units can de"iver
u! to eight 32+%it instructions to the functiona" units every CP9 c"oc; cyc"e$
The !rocessing of instructions occurs in each of the t*o data !aths (5 and 3&
each of *hich contains four functiona" units ($-& $S& $M& and $D and 16 32+%it
genera"+!ur!ose registers for the C6713$ 5 contro" register fi"e !rovides the means
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1
Vi Institute of Technology Dept. of ECE
to configure and contro" various !rocessor o!erations$
E
$
I

$
c
!
S
P
1
$
c
!
S
P
(
$
c
/
S
P
1
$
c
/
S
P
(
I
'
C
1
I
'
C
(
T
i
0
e
1

(
T
i
0
e
1

1

E
n
h
2
n
c
e
3





D
$
!

C
o
n
t
1
o
l
l
e
1
%
1
)

c
h
2
n
n
e
l
+
#
P
I
O
-
P
I





,
'
$
e
0
o
1
y


1
4
'
5


/
y
t
e
s

,
'

C
2
c
h
e

6


$
e
0
o
1
y


7

/
2
n
8
s
)
7
5

/
y
t
e
s


T
o
t
2
l
%
U
p

t
o

7
.
9
2
y
+
Pin $ultiple:ing
I
n
t
e
1
1
u
p
t
s


C
o
n
t
1
o
l
I
n
.
c
i
1
c
u
i
t
E
0
u
l
2
t
i
o
n
D
2
t
2

p
2
t
h

/
D
2
t
2

p
2
t
h

!
T
e
s
t
C
o
n
t
1
o
l


l
o
g
i
c
D
1
$
1
S
1
,
1
"
e
g
i
s
t
e
1

f
i
l
e

!
C
o
n
t
1
o
l
1
e
g
i
s
t
e
1
s
I
n
s
t
1
u
c
t
i
o
n

D
e
c
o
3
e
I
n
s
t
1
u
c
t
i
o
n

D
i
s
p
2
t
c
h

I
n
s
t
1
u
c
t
i
o
n

e
t
c
h
D
'
$
'
S
'
,
'
"
e
g
i
s
t
e
1

f
i
l
e

!




,
1
P

C
2
c
h
e
D
i
1
e
c
t

$
2
p
p
e
3

7
5

/
y
t
e
s

T
o
t
2
l
C
)
*
1
&

D
i
g
i
t
2
l

S
i
g
n
2
l

P
1
o
c
e
s
s
o
1
,
1
D

C
2
c
h
e

'
.
9
2
y



S
e
t

!
s
s
o
c
i
2
t
i
;
e






7
5

/
y
t
e
s


C
l
o
c
8

#
e
n
e
1
2
t
o
1

O
s
c
i
l
l
2
t
o
1
<

2
n
3

P
,
,

:
7

t
h
1
o
u
g
h

:

'
=

$
u
l
t
i
p
l
i
e
1

6
1









t
h
1
o
u
g
h

6
&
'

D
i
;
i
3
e
1
s
P
o
9
e
1

.

D
o
9
n





,
o
g
i
c
C
)
*

:



C
P
U
T
$
1
)
&
'
igu1e 1.1. T$S&'(C)*1& /loc8 Di2g120
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ '
Vi Institute of Technology Dept. of ECE
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &
Vi Institute of Technology Dept. of ECE
1.& INTE"N!, $E$O"Y
0t is a !art of 32+%it& %yte+addressa%"e address s!ace$ 0nterna" (on+chi!
memory is organi)ed in se!arate data and !rogram s!aces$ <hen off+chi! memory
is used& these s!aces are unified on most devices to a sing"e memory s!ace via the
e#terna" memory interface (7M0,$ The C6713 has t*o 32+%it interna" !orts to access
interna" data memory$ 3esides there is a sing"e interna" !ort to access interna"
!rogram memory& *ith an instruction+fetch *idth of 2'6 %its$
1.7 $E$O"Y !ND PE"IP-E"!, OPTIONS
5 variety of memory and !eri!hera" o!tions are avai"a%"e for the C6713 DSP:
= Memories
+ -arge on+chi! 85M& u! to 7M %its
+ Program cache
+ 2+"eve" caches
+ 32+%it e#terna" memory interface su!!orts SD85M& S3S85M& S85M& and
other asynchronous memories for a %road range of e#terna" memory
re>uirements and ma#imum system !erformance$
= DM5 Contro""er transfers data %et*een address ranges in the memory ma!
*ithout intervention %y the CP9$ There are four !rogramma%"e channe"s and a
fifth au#i"iary channe" inside the DM5 %"oc;$
= 7DM5 Contro""er !erforms the same functions as the DM5 contro""er and is
e>ui!!ed *ith 16 !rogramma%"e channe"s& as *e"" as a 85M s!ace to
ho"d mu"ti!"e configurations for future transfers$
= (P0 is a !ara""e" !ort through *hich a host !rocessor can direct"y access the
CP9?s memory s!ace$ The host device has easy access %ecause it is the master
of the interface$ The host and the CP9 can e#change information via interna"
or e#terna" memory$ 0n addition& the host has direct access to memory+
ma!!ed !eri!hera"s$
= 7#!ansion %us is a re!"acement for the (P0& as *e"" as an e#!ansion of the
7M0,$ The e#!ansion !rovides t*o distinct areas of functiona"ity (host !ort
and 04. !ort *hich can co+e#ist in a system$ The host !ort of the e#!ansion
%us can o!erate in either asynchronous s"ave mode& simi"ar to the
(P0& or in synchronous master4s"ave mode$ This a""o*s the device to
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 7
Vi Institute of Technology Dept. of ECE
interface to a variety of host %us !rotoco"s$ Synchronous ,0,.s and
asynchronous !eri!hera" 04. devices may interface to the e#!ansion %us$
= The t*o Mc5SP interface modu"es each su!!ort one transmit and one receive
c"oc; )one$ There are eight seria" data !ins in each Mc5SP& *hich can %e
individua""y a""ocated to any of the t*o )ones$ The seria" !ort su!!orts time+
division mu"ti!"e#ing on each !in from 2 to 32 time s"ots$ The C6713 has
sufficient %and*idth to su!!ort a"" 16 seria" data !ins transmitting a 1@2 ;()
stereo signa"$ Seria" data in each )one may %e transmitted and received on
mu"ti!"e seria" data !ins simu"taneous"y and formatted in a mu"titude of
variations on the Phi"i!s inter+0C sound (02S format$
= Mc3SP (mu"tichanne" %uffered seria" !ort is %ased on the standard seria"
!ort interface found on the TMS320C2000 and C'000 !"atform devices$ 0n
addition& the !ort can %uffer seria" sam!"es in memory automatica""y
*ith the aid of the DM547DA5 contro""er$ 0t a"so has mu"tichanne"
ca!a%i"ity com!ati%"e *ith the T1& 71& SCS5& and MB0P net*or;ing
standards$
= The t*o 02C !orts on the TMS320C6713 a""o* the DSP to easi"y contro"
!eri!hera" devices& %oot from a seria" 77P8.M& and communicate *ith a host
!rocessor$
= Timers in the C6713 devices are t*o 32+%it genera"+!ur!ose timers used for
these functions:
= Time events
= Count events
= 6enerate !u"ses
= 0nterru!t the CP9
= Send synchroni)ation events to the DM547DM5 contro""er$
There are t*o signa"ing mode that can %e "oaded %y an interna" or interna"
source$ The timers inherit an in!ut !in and out!ut !in& *hich can %e
configured for genera" !ur!ose in!ut and out!ut res!ective"y$ The in!ut and
out!ut !ins (T
0AP
& T
.9T
can function in timer c"oc; in!ut and c"oc; out!ut$
= Po*er+do*n "ogic a""o*s reduced c"oc;ing to reduce !o*er consum!tion$
Most of the o!erating !o*er of CM.S "ogic dissi!ates during circuit s*itching
from one "ogic state to another$ 3y !reventing some or a"" of the chi!?s "ogic
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ =
Vi Institute of Technology Dept. of ECE
from s*itching& you can rea"i)e significant !o*er savings *ithout "osing any
data or o!erationa" conte#t$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ )
Vi Institute of Technology Dept. of ECE
1.= #ENE"!,.PU"POSE "E#ISTE" I,ES
There are t*o genera"+!ur!ose register fi"es (5 and 3 in the C6713 data
!aths$ 7ach of these fi"es contains si#teen 32+%it registers (50+51' for fi"e 5 and
30+ 31' for fi"e 3$ The genera"+!ur!ose registers can %e used for data& data
address !ointers or condition registers$ The C6713 genera"+!ur!ose register fi"es
su!!ort data ranging in si)e from !ac;ed 16+%it data through 10+%it fi#ed+!oint
and 61+%it f"oating !oint data$
Values larger than 32 bits, such as 40-bit long and 64-bit float quantities
are stored in register pairs. In these the 32 LSs of data are placed in an e!en-
nu"bered register and the re"aining # or 32 $Ss in the ne%t upper register
&'hich is al'a(s an odd- nu"bered register). *he +64% register file e%tends
this b( additionall( supporting pac,ed #-bit t(pes and 64-bit fi%ed-point data
t(pes. *he pac,ed data t(pes store either four #-bit !alues or t'o -6-bit !alues
in a single 32-bit register, or four -6-bit !alues in a 64-bit register pair. *here are
-6 !alid register pairs for 40-bit and 64-bit data in the +6.-3 cores, and 32 !alid
register pairs for 40-bit and 64-bit data in the +64% core, as sho'n in *able. In
asse"bl( language s(nta%, a colon bet'een the register na"es denotes the
register pairs, and the odd-nu"bered register is specified first.
8egister ,i"es 5!!"ica%"e Devices
5 3
51:50 31:30
53:52 33:32
5':51 3':31
57:56 37:36
5@:5/ 3@:3/
511:510 311:310
513:512 313:312
51':511 31':311
C62#4C61#4C67#
517:516 317:316
51@:51/ 31@:31/
521:520 321:320
523:522 323:322
52':521 32':321
527:526 327:326
52@:52/ 32@:32/
531:530 331:330
C61# .A-C
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ *
Vi Institute of Technology Dept. of ECE
T2>le 1.1. 7(./it6)7./it "egiste1 P2i1s
,igure 1+2 i""ustrates the register storage scheme for 10+%it "ong data$
.!erations re>uiring a "ong in!ut ignore the 21 MS3s of the odd+num%ered
register$ .!erations !roducing a "ong resu"t )ero+fi"" the 21 MS3s of the odd+
num%ered register$ The even+ num%ered register is encoded in the o!code$
&1 ODD "E#ISTE" ? * &1 ( EVEN "E#ISTE" (
I#NO"ED
"E!D "O$
"E#ISTE"S
&' &1 &4
7( . /IT D!T!
(
EVEN "E#ISTE" ( ODD "E#ISTE"
@"ITE TO
"E#ISTE"S
&4 &' &1
7( . /IT D!T! AE"O.I,,ED
igu1e 1.'. Sto12ge Sche0e fo1 7(./it D2t2 in 2 "egiste1 P2i1
1.) UNCTION!, UNITS
The eight functiona" units in the C6713 data !aths can %e divided into t*o grou!s
of fourD each functiona" unit in one data !ath is a"most identica" to the
corres!onding unit in the other data !ath$ The functiona" units are descri%ed in
Ta%"e 1+2$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ?
Vi Institute of Technology Dept. of ECE
unction2l
Unit
i:e3.Point Ope12tions lo2ting.
Point
Ope12tions
$- unit
($-1&-2
32410+%it arithmetic and com!are o!erations
32+%it "ogica" o!erations
-eftmost 1 or 0 counting for 32 %its norma"i)ation
count for 32 and 10 %its
3yte shifts
Data !ac;ing4un!ac;ing
'+%it constant generation
Dua" 16+%it arithmetic o!erations Euad /+%it
arithmetic o!erations Dua" 16+%it min4ma# o!erations
Euad /+%it min4ma# o!erations
5rithmetic o!erations
DP6S!& 0AT6DP&
0AT6SP conversion
o!erations
$S unit
($S1&$S2
32+%it arithmetic o!erations
32410 %it shifts and 32+%it %it+fie"d o!erations
32+%it "ogica" o!erations %ranches constant generation
8egister transfers to from contro" register fi"e ($S2
on"y
3yte Shifts& Data !ac;ing4un!ac;ing
Dua" 16+%it com!are o!erations
Euad /+%it com!are o!erations
Dua" 16+%it saturated arithmetic o!erations
Com!are 8eci!roca"
and reci!roca" s>uare+
root o!erations
5%so"ute va"ue
o!erations S P 6DP
c o n ve r s i o n
o!erations
$M unit ($M1&
$M2
16#16 mu"ti!"y o!erations
16#32 mu"ti!"y o!erations
Euad /#/ mu"ti!"y o!erations Dua" 16#16 mu"ti!"y
o!erations Dua"16#16 mu"ti!"y *ith add4su%tract
o!erations
Euad /#/ mu"ti!"y *ith add o!eration
3it e#!ansion
3it inter"eaving4de+inter"eaving Baria%"e shift
o!erations 8otation
6a"ois ,ie"d Mu"ti!"y
32+%it add& su%tract "inear and circu"ar address
ca"cu"ation
32#32+%it fi#ed+
!oint mu"ti !"y
o! e r a ti ons
f"oating+!oint
mu"ti!"y o!erations
$D unit ($D1&
$D2
-oads and stores *ith '+%it constant offset
-oads and stores *ith 1'+%it constant offset (D2
on"y
-oads and store dou%"e *ords *ith '+%it constant
-oad and store non+a"igned *ords and dou%"e *ords
'+%it constant generation
32+%it "ogica" o!erations
-oad dou%"e *ord
*ith '+%it constant
offset
T2>le 1.'. unction2l Units 2n3 Ope12tions Pe1fo10e3
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 4
Vi Institute of Technology Dept. of ECE
Most data "ines in the CP9 su!!ort 32+%it o!erands& and some su!!ort "ong
(10+%it and dou%"e *ord (61+%it o!erands$ 7ach functiona" unit incor!orates its
o*n 32+%it *rite !ort into a genera"+!ur!ose register fi"e (8efer to ,igure 2+3$
The units ending in 1 (for e#am!"e& $-1 *rite to register fi"e 5& and a"" units
ending in 2 *rite to register fi"e 3$ 7ach functiona" unit has t*o 32+%it read !orts
for source o!erands src1 and src2$ 5n e#tra /+%it+*ide !ort for 10+%it "ong *rites&
as *e"" as an /+%it in!ut for 10+%it "ong reads are avai"a%"e in ,our units( -1& -2&
S1& and S2$ 0n vie* of the fact that there is a 32+%it *rite !ort in each unit& *hen
!erforming 32+%it o!erations a"" eight units can %e used in !ara""e" every cyc"e$
1.* T$S&'(C)*1& CONT"O, "E#ISTE" I,E
.ne unit ($S2 can read from and *rite to the contro" register fi"e& as sho*n in
this section$ Ta%"e 1$3 "ists the contro" registers contained in the contro" register
fi"e and descri%es each$ 0f more information is avai"a%"e on a contro" register& the
ta%"e "ists *here to "oo; for that information$ 7ach contro" register is
accessed %y the MBC instruction$
5dditiona""y& some of the contro" register %its are s!ecia""y accessed in other
*ays$ ,or e#am!"e& arriva" of a mas;a%"e interru!t on an e#terna" interru!t !in&
0ATm& triggers the setting of f"ag %it 0,8m$ Su%se>uent"y& *hen that
interru!t is !rocessed& this triggers the c"earing of 0,8m and the c"earing of the
g"o%a" interru!t ena%"e %it& 607$ ,ina""y& *hen that interru!t !rocessing is
com!"ete& the 3 08P instruction in the interru!t service routine restores the
!re+interru!t va"ue of the 607$ Simi"ar"y& saturating instructions "i;e S5DD
set the S5T (saturation %it in the CS8 (Contro" Status 8egister$
!>>1e;i2tion "egiste1 N20e Desc1iption
5M8
CS8
0,8
0S8
5ddressing mode
register
Contro" status register
0nterru!t f"ag register
0nterru!t set register
S!ecifies *hether to use "inear or circu"ar
addressing for each of eight registers a"so contains
si)es for circu"ar addressing$
Contains the g"o%a" interru!t ena%"e %it& cache
contro" %its and other misce""aneous contro" and
status %its$
Dis!"ays status of interru!ts
5""o*s manua""y setting !ending interru!ts
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1(
Vi Institute of Technology Dept. of ECE
0C8
078
0STP
08P
A8P
PC71
0nterru!t c"ear register
0nterru!t ena%"e
register
0nterru!t service ta%"e
!ointer
0nterru!t return !ointer
Aonmas;a%"e interru!t
return !ointer
Program counter& 70
!hase
5""o*s manua""y c"earing !ending interru!ts
5""o*s ena%"ing4disa%"ing of individua" interru!ts
Points to the %eginning of the interru!t service
ta%"e$
Contains the address to %e used to return from a
mas;a%"e interru!t
Contains the address to %e used to return from a
nonmas;a%"e interru!t
Contains the address of the fetch !ac;et that is in
the 71 !i!e" "ine stage$
T2>le 1.& Cont1ol "egiste1s
1.? PIPE,INE OPE"!TION OVE"VIE@
The !i!e"ine !hases are divided into three stages:
= ,etch
= Decode
= 7#ecute
5"" instructions in the C67# instruction set f"o* through the fetch& decode&
and e#ecute stages of the !i!e"ine$ The fetch stage of the !i!e"ine has four
!hases for a"" instructions& and the decode stage has t*o !hases for a""
instructions$ The e#ecute stage of the !i!e"ine re>uires a varying num%er of
!hases& de!ending on the ty!e of instruction$ The stages of the C67# !i!e"ine are
sho*n in ,igure 1+3$
igu1e 1.&. lo2ting.Point Pipeline St2ges
1.?.1 etch
The fetch !hases of the !i!e"ine are:
P# : Program address generate
PS : Program address send
P@ : Program access ready *ait
P" : Program fetch !ac;et receive
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 11
Vi Institute of Technology Dept. of ECE
The C6713 uses a fetch !ac;et (,P of eight instructions$ 5"" eight of the
instructions !roceed through fetch !rocessing together& through the P6& PS& P<&
and P8 !hases$ ,igure 1+1(a sho*s the fetch !hases in se>uentia" order from "eft
to right$ ,igure 1+ 1(% sho*s a functiona" diagram of the f"o* of instructions
through the fetch !hases$ During the P6 !hase& the !rogram address is generated in
the CP9$ 0n the PS !hase& the !rogram address is sent to memory$ 0n the P<
!hase& a memory read occurs$ ,ina""y& in the P8 !hase& the fetch !ac;et is received
at the CP9$ ,igure 1+1(c sho*s fetch !ac;ets f"o*ing through the !hases of the
fetch stage of the !i!e"ine$ 0n ,igure 1+1(c& the first fetch !ac;et (in P8 is made u!
of four e#ecute !ac;ets& and the second and third fetch !ac;ets (in P< and PS
contain t*o e#ecute !ac;ets each$ The "ast fetch !ac;et (in P6 contains a sing"e
e#ecute !ac;et of eight sing"e+cyc"e instructions$
,D@ ,D@ $V5 !DD S-, ,D@ ,D@ $V5
$V5 / S$PY S$PY- $V $V5,- ,D@ ,D@
,D@ ,D@ S$PY- S$PY S!DD S!DD / $V5
NOP $V S$P-Y S$PY- S-" S-" ,D@ ,D@
Deco3e
'=)
P# PS P@ P"
unction2l
Units
"egiste1s
P#
$e0o1y
P@
%2+
%>+
etch
CPU
P"
PS
%c+
P#
PS
P@
P"
igu1e 1.7. etch Ph2ses of the Pipeline
1.?.' Deco3e
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1'
Vi Institute of Technology Dept. of ECE
The decode !hases of the !i!e"ine are:
DP : 0nstruction dis!atch
DC : 0nstruction decode
0n the DP !hase of the !i!e"ine& the fetch !ac;ets are s!"it into e#ecute
!ac;ets$ 7#ecute !ac;ets consist of one instruction or from t*o to eight !ara""e"
instructions$ During the DP !hase& the instructions in an e#ecute !ac;et are
assigned to the a!!ro!riate functiona" units$ 0n the DC !hase& the source
registers& destination registers& and associated !aths are decoded for the e#ecution
of the instructions in the functiona" units$ ,igure 1+'(a sho*s the decode !hases
in se>uentia" order from "eft to right$ ,igure 1+ '(% sho*s a fetch !ac;et that
contains t*o e#ecute !ac;ets as they are !rocessed through the decode stage of
the !i!e"ine$ The "ast si# instructions of the fetch !ac;et(,P are !ara""e" and form
an e#ecute !ac;et (7P$ This 7P is in the dis!atch !hase (DP of the decode stage$
The arro*s indicate each instruction?s assigned functiona" unit for e#ecution
during the same cyc"e$
The NOP instruction in the eighth s"ot of the ,P is not dis!atched to a functiona"
unit %ecause there is no e#ecution associated *ith it$ The first t*o s"ots of the fetch
!ac;et re!resent an e#ecute !ac;et of t*o !ara""e" instructions that *ere
dis!atched on the !revious cyc"e$ This e#ecute !ac;et contains t*o $PY
instructions that are no* in decode (DC one cyc"e %efore e#ecution$ There are
no instructions decoded for the $-& $S& and $D functiona" units for the situation
i""ustrated$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&
Vi Institute of Technology Dept. of ECE
,1 S1
$PY-
$1 D1 ,' S' $' D'
unction2l
units
DC
!DD !DD ST@
ST@
!DD5 NOP1 DP
&' &' &' &' &' &' &' &'
Deco3e
%>+
%2+
DP DC
1 NOP is not 3ispl2che3 to 2 function2l unit
$PY-
igu1e 1.=. Deco3e Ph2ses of the Pipeline
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 17
Vi Institute of Technology Dept. of ECE
1.?.& E:ecute
The e#ecute !ortion of the f"oating+!oint !i!e"ine is su%divided into ten !hases
(71+ 710& as com!ared to the fi#ed+!oint !i!e"ine?s five !hases$ The different
ty!es of instructions re>uire different num%ers of these !hases to com!"ete
their e#ecution$ These !hases of the !i!e"ine !"ay an im!ortant ro"e in your
understanding the device state at CP9 cyc"e %oundaries$
Pipeline E:ecution of Inst1uction Types.
,igure 1+6(a sho*s the e#ecute !hases of the !i!e"ine in se>uentia"
order from "eft to right$ ,igure 1+6(% sho*s the !ortion of the functiona" %"oc;
diagram in *hich e#ecution occurs$
E1 E' E& E7 E= E) E* E? E4 E1(
E:ecute
S!DO
,1 S1
/ S$PY
$1 D1
ST-
1= 17 1& 1' 11 1( 4 ? * ) = 7 & ' 1 1 ' & 7 = ) * ? 4 1( 11 1' 1& 17 1=
S!DD
,' S'
SU/ S$PY-
$' D'
ST-
D2t2 0e0o1y inte1f2ce cont1ol
( 1 ' & 7 = ) *
4 ?
D2t2 2331ess 1 D2t2 2331ess '
&' &'
&' &'
&'
E1
Inte1n2l 32t2 0e0o1y
%>yte 2331ess2>le+
1)
1)
1) 1)
"egiste1 file ! "egiste1 file /
%2+
%>+
( (
D2t2 1 D2t2 '
igu1e 1.) E:ecute Ph2ses of the Pipeline 2n3 unction2l /loc8 Di2g120 of the
T$S&'(C)*1&
E:20ple P1og120
<rite an 5rithmetic -ogic Program for the %e"o* mentioned e>uation& %y using 6713
instruction set and functiona" units$ (5ddressing modes
Y a x
n n
n

1
1 0
0n this e#!eriment A F 10 Tota" Ao of 0n!uts (varia%"e
a
n
F ,irst in!ut array& #
n
F Second in!ut array
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1=
Vi Institute of Technology Dept. of ECE
Memory Data Memory add Data
5'GG /0001000 a
0
56G
G
/0001100
H0
/0001001 a
1
/0001101 #
1
$
$
$
$
$
$
$
$
$
$
$
$
/00010@C a
n
/00011@C #
n
P"O#"!$
MB2 $S1 10& 52 D 52 F 10& "oo! count
MB2 $S1 0& 51 D Set 51 8egister shou"d %e 0
MB2 $S1 0#/0001000& =5' D a
n
0n!ut va"ues
MB2 $S1 0#/0001100& =56 D #
n
0n!ut va"ues
"oo!: -D( $D1 =5'GG& 50 D 50 F a(n
-D( $D1 =56GG& 51 D 51 F #(n
MPC $M1 50& 51& 53 D 53 F a(n = #(n
5DD $-1 53& 51& 51 D C F C G 53
S93 $-1 52& 1& 52 D decrement "oo! count
I52J 3 $S1 "oo! D if 52 F 0& %ranch
ST( $D1 51& =57 D =57 F C
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1)
Vi Institute of Technology Dept. of ECE
STEPS:
1$ 0nitia""y "oad A (10 va"ue to 8egister 52& use $S1 (see Ta%"e 3 and get in!ut
va"ues (a
n&
#
n
from memory address to register 5'& 56$
2$ Then get t*o in!ut va"ues from 8egister 5' to 50 and 56 to 51 and use the $D1
functiona" unit$
3$ Ae#t mu"ti!"y the va"ues using $M functiona" unit$
1$ Then add the mu"ti!"ied va"ue into !assed mu"ti!"ied va"ue and 9se the $-1
functiona" unit$
'$ Then "oo! o!eration is used to e#ecute the !rogram in A (10 num%er of times$
9se $S1 functiona" unit$
6$ ,ina""y store the fina" out!ut in register 57 (use $D1 function unit$
"ESU,T:
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1*
Vi Institute of Technology Dept. of ECE
Thus the Study of various addressing modes of DSP(TMS320C6713 Processor using sim!"e
!rogramming e#am!"es has %een studied$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1?
Vi Institute of Technology Dept. of ECE
EX.NO:' I$P,E$ENT!TION O ,INE!" B CI"CU,!" CONVO,UTION
!I$:
To *rite a KC? !rogram for "inear L circu"ar convo"ution of t*o in!ut se>uences using
TMS320C6713 ;it
!PP!"!TUS "ECUI"ED
1$ TMS320C6713 ;it
2$ Bi de%ugger (6713
3$ CCS soft*are
!,#O"IT-$:
,ine21 Con;olution:
1$ ,irst dec"are the t*o 0n!uts (Hn L (n and one .ut!ut memory (Cout&
Dec"are the varia%"es (i& ;& n& "& m for "oo! o!eration$
2$ Dec"are the t*o in!ut se>uences "ength (Hn"en L (n"en$
3$ Move the in!ut se>uence "ength data into t*o varia%"es ("& m$
1$ C"ear the 0n!ut& .ut!ut and se>uence "ength memories$
'$ Dec"are the outer for "oo! of varia%"e n is initia""y )ero to formu"ae ("Gm+1$
6$ Ae#t dec"are the inner for "oo! of varia%"e ; is initia""y )ero to outer "oo! of
varia%"e n$
7$ ,ina""y dec"are the "inear convo"ution formu"ae into a "oo! o!eration$
P"O#"!$
Minc"udeNfastmath67#$hO
Minc"udeNmath$hO
void main(
P
int =Hn&=(n&=.ut!utD
int =Hn-ength&=(n-engthD
int i&;&n&"&mD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 14
Vi Institute of Technology Dept. of ECE
HnF(int =0#/0001000D
(nF(int =0#/0001100D
Hn-engthF(int =0#/0001200D
(n-engthF(int =0#/0001201D
.ut!utF(int =0#/0002000D
"F=Hn-engthD
mF=(n-engthD
for(iF0DiN("Gm+1DiGG
P
.ut!utIiJF0D
HnI"GiJF0D
(nImGiJF0D
Q
for(nF0DnN("Gm+1DnGG
P
for(;F0D;NFnD;GG
P
.ut!utInJ F.ut!utInJ G (HnI;J=(nIn+;JD
Q
Q
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ '(
Vi Institute of Technology Dept. of ECE
S!$P,E INPUT B OUTPUT
,irst in!ut + Hn F P1& 2& 3& 1Q& Hn-ength F 1
Second in!ut + (n F P1& 2& 0& 0Q& (n-ength F 1
Hn F 0#/0001000 F P1& 2& 3& 1Q
(n F 0#/0001100 F P1& 2& 0& 0Q
Hn-ength F 0#/0001200 F 1
(n-ength F 0#/0001201 F 1
Cout F 0#/0002000 F P1& 1& 7& 10& /& 0& 0Q
$2nu2l c2lcul2tion:
1 ' ( (
1 1 ' ( (
' ' 7 ( (
& & ) ( (
7 7 ? ( (
yout F P1&1&7&10&/&0&0Q
!,#O"IT-$ :
Ci1cul21 Con;olution:
1$ ,irst dec"are the t*o 0n!ut varia%"es (Hn L (n and one .ut!ut varia%"e (Cout&
Dec"are the varia%"es (i& n& m& n1& " for "oo! o!eration$
2$ Dec"are the t*o in!ut se>uences "ength$ (Hn"en L (n"en
3$ Chec; *hether the Hn "ength is greater or (n "ength is greater$ Ta;e the greater
num%er that is the "ength of the circu"ar convo"ution "ength (A$
1$ Do the memory c"ear o!eration$
'$ Perform the convo"ution o!eration to t*o in!ut se>uences$ ,or (n In R ;J out!ut
is "esser than 0 means add A ((nIn+; G AJ& this is !erform shifting o!eration of
second se>uence$
6$ Then store the out!ut in to out!ut memory "ocation$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ '1
Vi Institute of Technology Dept. of ECE
P"O#"!$:
Minc"udeNfastmath67#$hO
Minc"udeNmath$hO
void main(
P
int =Hn&=(n&=Cout&=Hn"en&=(n"enD
int i& n& m& a& %& "D
HnF(int =0#/0001000D
(nF(int =0#/0001100D
CoutF(int =0#/0002000D
Hn-engthF(int =0#/0001200D
(n-engthF(int =0#/0001201D
aF=Hn"enD
%F=(n"enD
if(a N %
A F %D
e"se
A F aD
,or (iF0DiNADiGG44 Memory C"ear
P
yIiJF0D
HnIaGiJF0D
(nI%GiJF0D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ''
Vi Institute of Technology Dept. of ECE
Q
for(nF0DnNADnGG
P
for(mF0DmNADmGG
P
"Fn+mD
if("N0
"F"GAD
yInJFyInJG(HnImJ=(nI"JD
Q
Q
Q
S!$P,E INPUT B OUTPUT
,irst in!ut + Hn F P1& 2& 3& 1Q& Hn-ength F 1
Second in!ut + (n F P1& 2& 0& 0Q& (n-ength F 1
Hn F 0#/0001000 F P1& 2& 3& 1Q
(n F 0#/0001100 F P1& 2& 0& 0Q
Hn-ength F 0#/0001200 F 1
(n-ength F 0#/0001201 F 1
Cout F 0#/0002000 F P@& 1& 7& 10Q
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ '&
Vi Institute of Technology Dept. of ECE
$2nu2l c2lcul2tion:
$2t1i: 0ultiplic2tion $etho3:
hn :n yout
1 ( ( ' 1 1 D ( D ( D ? 4
' 1 ( ( '
E
' D ' D ( D (
E
7
( ' 1 ( & ( D 7 D & D ( *
( ( ' 1 7 ( D ( D ) D 7 1(
"ESU,T:
Thus the "inear L circu"ar convo"ution *as !erformed and the resu"t has %een
successfu""y verified$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ '7
Vi Institute of Technology Dept. of ECE
EX.NO:& S!$P,IN# O INPUT SI#N!, !ND DISP,!Y
!I$:
To *rite a C !rogram for sam!"ing the in!ut signa" and dis!"ay the out!ut using
TMS320C6713 ;it$
!PP!"!TUS "ECUI"ED
1$ TMS320C6713 2it
2$ Bi De%ugger (6713
3$ CCS Soft*are< .ut to 5SC
1$ PC& ,6& C8.
T-EO"Y
The signa"s *e use in the rea" *ord& such as our voice are ca""ed Sana"og signa"T$ To
!rocess these signa"s in com!uters& *e need to convert the signa"s to digita" form *hi"e an
ana"og signa" in continuous in %oth time and am!"itude& a digita" signa" in discrete in %oth
time and am!"itude$ To convert a signa" from continuous time to discrete time& the !rocess is
ca""ed sam!"ing$ The va"ue of the signa" is measured at certain interna" in time$ 7ach
measurement is referred to as a sam!"es$
0f the signa"s contain high fre>uency com!onents *e need to sam!"e at a higher rate
to avoid "osing information that is in the signa"$ 0n genera" to !reserve the fu"" information in
the signa"$ This is ;no*n as the Ay>uist rate$ The sam!"ing theorem states that a signa" can
%e e#act"y re!roduced if it is sam!"ed at a fre>uency ,& *here , is in greater than t*ice the
ma# fre>uency in the signa"$
!,#O"IT-$:
1$ ,irst initia"i)e a"" in!ut& out!ut and varia%"es to !articu"ar data ty!e$
2$ Set the memory address *hich is used to store the in!ut and out!ut va"ues$
3$ Set SocBa"ue (address R 0#@001000C to Soc8ead& The Soc8ead function is used
to start the 5DC o!eration$
1$ Store the converted (5na"og to Digita" out!ut out!ut in the varia%"e K5dc.ut?&
then a!!"y the "ogica" o!eration (5AD& .8$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ '=
Vi Institute of Technology Dept. of ECE
5AD(0#0fff R 0t is used to ta;e 2?s com!"ement of 5DC out!ut& its
convert 16 %it va"ue to 12 %it va"ue$
.8(0#0/00 R 0t is used to offset the out!ut va"ue (Gve offset
'$ Store the out!ut va"ue in D5C memory address (0#@001000/$
P"O#"!$
Minc"ude Nfastmath67#$hO
Minc"udeNmath$hO
void main(
P
int =SocBa"ueD
int =5dcBa"ueD
int =DacBa"ueD
int Soc8eadD
unsigned short 5dc.utD
unsigned char =-edD
int De"ayCountD
SocBa"ue F (int = 0#@001000CD
5dcBa"ue F (int = 0#@001000/D
DacBa"ue F (int = 0#@001000/D
-ed F (unsigned char = 0#@0010016D
<hi"e (1
P
Soc8ead F =SocBa"ueD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ')
Vi Institute of Technology Dept. of ECE
5dc.ut F =5dcBa"ueD
5dc.ut LF 0#0fffD
5dc.ut UF 0#0/00D
for(De"ayCount F 0D De"ayCount N '00D De"ayCountGGD
=DacBa"ue F 5dc.utD
=-ed F 1D
Q
Q
"ESU,T
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ '*
Vi Institute of Technology Dept. of ECE
Thus the in!ut signa" is sam!"ed and out!ut *as dis!"ayed using TMS320C6713 ;it$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ '?
Vi Institute of Technology Dept. of ECE
EX.NO:7 @!VEO"$ #ENE"!TION
!I$ :
To *rite a C !rogram for generating the Sine& Cos& Triangu"ar and Sa*tooth
*aveforms using TMS320C6713 ;it$
!PP!"!TUS "ECUI"ED
1$ TMS320C6713 2it
2$ Bi De%ugger (6713
3$ CCS Soft*are< .ut to 5SC
1$ PC& ,6& C8.
!,#O"IT-$:
Sine 92;e #ene12tion:
1$ Create a ne* !roVect and initia"i)e header fi"e& in!ut& out!ut and varia%"es to the
!articu"ar data ty!e$
2$ Set the memory address *hich is used to store the in!ut and out!ut va"ues$
3$ The out!ut va"ues (rea" time are stored in the D5C channe" 1 memory address
(0#@001000/$
1$ Then set the sam!"ing fre>uency (,sam! and in!ut fre>uency (,in to find the
num%er of sam!"es (Asam! and Sam!"ing time (Tsam!$
Asam! F,sam! 4,in: Tsam! F 14,sam!
'$ 9sing trigonometric formu"a find out the sine out!ut$ This out!ut va"ues come
across +1 to 1$ This gain is not enough to dis!"ay the sine *ave& so increase the
gain %y mu"ti!"ying *ith 201/$
6$ 3it*ise 7H+.8 o!eration is used to offset the sine va"ues (Gve offset$
7$ Then move the gain increased va"ue to D5C memory address$
/$ Simu"ation out!ut is dis!"ayed in 6ra!h *indo* L 8ea" time out!ut in C8.$
@$ 6ra!h <indo* settings
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ '4
Vi Institute of Technology Dept. of ECE
1$ 3uffer Si)e F 12'(0t is de!ends on the Asam! Ba"ue
2$ Data Si)e F 12' or 2'0 (it is no of cyc"e
3$ Data Ty!e F 32 3it Signed int (Dec"ared data ty!e
1$ Set 5uto Sca"e mode
P"O#"!$
Minc"ude Nfastmath67#$hO
Minc"ude Nmath$hO
Mdefine P0 3$11
void main(
P
int CountD
int Asam!D
int De"ayCountD
int ,in F 1000D 44 0n!ut Signa" ,re>uency in ()
const f"oat ,sam! F 12'000$0D
f"oat Tsam!D
dou%"e angD
short =SinW.utD 44out!ut array$
int =DacBa"ueD
SinW.ut F (short =0#/0010000D
DacBa"ue F (int =0#@001000/D 44 ,irst D5C channe"
Asam! F ,sam! 4 ,inD 44num%er of sam!"es in one cyc"e$
Tsam! F 1 4 ,sam!D
for (Count F 0D Count N Asam!D Count GG
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &(
Vi Institute of Technology Dept. of ECE
P
ang F (2 = P0 = ,in = Tsam! = CountD
=(SinW.ut G Count F sin(ang = 201/D
Q
*hi"e(1
P
for(Count F 0D Count N Asam!D CountGG
P
DacBa"ueICountJ F =(SinW.ut G Count U 0#/00D
for (De"ayCount F 0D De"ayCount N ''D De"ayCountGGD
Q
Q
Q
OUTPUT:
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &1
Vi Institute of Technology Dept. of ECE
!,#O"IT-$ :
Cosine 92;e #ene12tion:
1$ Create a ne* !roVect and initia"i)e header fi"e& in!ut& out!ut and varia%"es to the
!articu"ar data ty!e$
2$ Set the memory address *hich is used to store the in!ut and out!ut va"ues$
3$ The out!ut va"ues (rea" time are stored in the D5C channe" 1 memory address
(0#@001000/$
1$ Then set the sam!"ing fre>uency (,sam! and in!ut fre>uency (,in to find the
num%er of sam!"es (Asam! and Sam!"ing time (Tsam!$
Asam! F,sam! 4,in: Tsam! F 14,sam!
'$ 9sing trigonometric formu"a find out the cos out!ut$ This out!ut va"ues come
across +1 to 1$ This gain is not enough to dis!"ay the cos *ave& so increase the
gain %y mu"ti!"ying *ith 201/$
6$ 3it*ise 7H+.8 o!eration used to offset the cos va"ues (Gve offset$
7$ Then move gain increased va"ue to D5C memory address$
/$ Simu"ation out!ut is dis!"ayed in 6ra!h *indo* L 8ea" time out!ut in C8.$
@$ 6ra!h <indo* settings
1$ 3uffer Si)e F 12'(0t is de!ends on the Asam! Ba"ue
2$ Data Si)e F 12' or 2'0 (it is no of cyc"e
3$ Data Ty!e F 32 3it Signed int (Dec"ared data ty!e
1$ Set 5uto Sca"e mode
P"O#"!$
Minc"ude Nfastmath67#$hO
Minc"ude Nmath$hO
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &'
Vi Institute of Technology Dept. of ECE
Mdefine P0 3$11
void main(
P
int CountD
int Asam!D
int De"ayCountD
int ,in F 1000D 44 0n!ut Signa" ,re>uency in ()
const f"oat ,sam! F 12'000$0D
f"oat Tsam!D
dou%"e angD
short =CosW.utD 44out!ut array$
int =DacBa"ueD
CosW.ut F (short =0#/0010000D
DacBa"ue F (int =0#@001000/D 44 ,irst D5C channe"
Asam! F ,sam! 4 ,inD 44num%er of sam!"es in one cyc"e$
Tsam! F 1 4 ,sam!D
for (Count F 0D Count N Asam!D Count GG
P
ang F (2 = P0 = ,in = Tsam! = CountD
=(CosW.ut G Count F cos(ang = 201/D
Q
*hi"e(1
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &&
Vi Institute of Technology Dept. of ECE
P
for(Count F 0D Count N Asam!D CountGG
P
DacBa"ueICountJ F =(CosW.ut G Count U 0#/00D
for (De"ayCount F 0D De"ayCount N ''D De"ayCountGGD
Q
Q
Q
OUTPUT:
!,#O"IT-$:
T1i2ngul21 92;e #ene12tion:
1$ Create a ne* !roVect and initia"i)e header fi"e& in!ut& out!ut and varia%"es to the
!articu"ar data ty!e$
2$ Set the memory address *hich is used to store the in!ut and out!ut va"ues$
3$ The out!ut va"ues (rea" time are stored in the D5C channe" 1 memory address
(0#@001000/$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &7
Vi Institute of Technology Dept. of ECE
1$ The tota" si)e of the triangu"ar *ave is 10@6$ The increment order starts from
+1021 u! to 1021 and decrement order starts from 1021 u! to +1021 (tota""y
10@6$
'$ The first SforT "oo! is used for increment order and second SforT "oo! is used for
decrement order$ This is used for simu"ation out!ut$ The *hi"e "oo! is used to get
rea" time out!ut$
6$ Simu"ation out!ut is dis!"ayed in 6ra!h *indo* L 8ea" time out!ut in the C8.$
7$ 6ra!h <indo* settings
1$ 3uffer Si)e F 10@6(0t is de!ends on the Asam! Ba"ue
2$ Data Si)e F 10@6 or /1@2 (it is no of cyc"e
3$ Data Ty!e F 16 3it Signed int (Dec"ared data ty!e
1$ Set 5uto Sca"e mode
P"O#"!$
Minc"udeNfastmath67#$hO
Minc"udeNmath$hO
void main(
P
short Count&.ut&Ba"D
short =Triangu"ar.ut&=Dac.utD
Triangu"ar.ut F (short =0#/0010000D
Dac.ut F (short =0#@001000/D
.ut F 0D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &=
Vi Institute of Technology Dept. of ECE
for (Count F +1021D Count N 1021D CountGG
P
=(Triangu"ar.ut G .ut F CountD
.utGGD
Q
.ut F 201/D
for (Count F 1023D Count OF +1021D Count++
P
=(Triangu"ar.ut G .ut F CountD
.utGGD
Q
*hi"e(1
P
for(Count F 0D Count N 10@6D CountGG
P
Ba" F =(Triangu"ar.ut G Count U 0#0/00 D
=Dac.ut F Ba"D
Q
Q
Q
OUTPUT:
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &)
Vi Institute of Technology Dept. of ECE
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &*
Vi Institute of Technology Dept. of ECE
!,#O"IT-$:
S29tooth 92;e #ene12tion:
1$ Create a ne* !roVect and initia"i)e header fi"e& in!ut& out!ut and varia%"es to the
!articu"ar data ty!e$
2$ Set the memory address *hich is used to store the in!ut and out!ut va"ues$
3$ The out!ut va"ues (rea" time are stored in the D5C channe" 1 memory address
(0#@001000/$
1$ The tota" si)e of the sa*tooth *ave is 10@6$ The increment order start from +1021
u! to 1021 and decrement order start from 1021 u! to +1021 (tota""y 10@6$
'$ The first SforT "oo! is used for increment order and second SforT "oo! is used for
decrement order$ This is used for simu"ation out!ut$ The *hi"e "oo! used to get
rea" time out!ut$
6$ Simu"ation out!ut is dis!"ayed in 6ra!h *indo* L 8ea" time out!ut in C8.$
7$ 6ra!h <indo* settings
1$ 3uffer Si)e F 10@6(0t is de!ends on the Asam! Ba"ue
2$ Data Si)e F 10@6 or /1@2 (it is no of cyc"e
3$ Data Ty!e F 16 3it Signed int (Dec"ared data ty!e
1$ Set 5uto Sca"e mode
P"O#"!$
Minc"udeNmath$hO
void main(
P
int i&.utD
short =out&=testD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &?
Vi Institute of Technology Dept. of ECE
short tem!D
test F (short =0#/0010000D
outF(short =0#@001000/D
.ut F 0D
for(i F +201/D i N 2017D iGG
P
testI.utJ F iD
.utGGD
Q
*hi"e(1
P
for(iF+201/DiN2017DiGG
P
tem! F +iD
tem!UF0#0/00D
=outFtem!D
Q
Q
Q

EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ &4
Vi Institute of Technology Dept. of ECE
OUTPUT:
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 7(
Vi Institute of Technology Dept. of ECE
"ESU,T:
Thus the Sine& Cos& Triangu"ar L Sa* tooth *aveforms *ere generated successfu""y using
TMS320C6713 ;it$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 71
Vi Institute of Technology Dept. of ECE
EX.NO:= I$P,E$ENT!TION O I" I,TE"
!I$:
To *rite a C !rogram for the design L 0m!"ementation of ,08 fi"ters for the given cutoff
fre>uency using fre>uency sam!"ing method$
!PP!"!TUS "ECUI"ED
1$ TMS320C6713 2it
2$ Bi De%ugger (6713
3$ CCS Soft*are
T-EO"Y
0n this e#!eriment the ,08 fi"ters are im!"emented %y using the cutoff fre>uency& sam!"ing
fre>uency and .rder of the fi"ter A$ 0n ,08 fi"ter is finite no of order and it?s has four ty!es
of fi"ters$
ilte1 Type B EFu2tions
0n ,08 fi"ter !erform -o* Pass& (igh Pass& 3and Pass& 3and 8eVect o!eration to the
in!ut fre>uency$ The fi"ter ty!e e>uations are given %e"o*
i+ ,o9 P2ss ilte1
The "o* !ass fi"ter e>uation is
H d
F c n
W n n n n n
n
c
(
s i n ( 4 4 4


< <

'

2 0
2 2
ii+ -igh P2ss ilte1
The (igh !ass fi"ter e>uation is
H d n
F c n
W n n n n n
c
(
s i n ( 4 4 4


< <

'

1 2 0
2 2
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 7'
Vi Institute of Technology Dept. of ECE
iii+ /2n3 P2ss ilte1
The %and Pass fi"ter e>uation is
H d n
F c F c n
W c n W c n n n n n
(
(
s i n ( s i n ( 4 4 4


< <

'

2 2 1 0
2 2 2 2
i;+ /2n3 "eGect ilte1
The %and reVect fi"ter e>uation is
H d n
F c F c n
W c n W c n n n n n
(
(
s i n ( s i n ( 4 4 4


< <

'

2 1 2 0
1 2 2 2

<here& ,c F ,cut 4 ,sam!
,c1 F ,!s 4 ,sam!
,c2 F ,st 4 ,sam!
<c F 2X,c
<c1 F 2Xc1 L <c2 F2X,c2
The fi"ter coefficients are ca"cu"ated using these formu"a?s for SRn42 to n42T and the va"ues
are stored in ne* memory *ith S0T u! to SnT$
!,#O"IT-$:
1$ ,irst initia"i)e header fi"e& in!ut& out!ut and varia%"es to the !articu"ar data ty!e$
2$ 5ssign Sam!"ing fre>uency and A va"ue$ Set cutoff fre>uency for design "o*
fi"ter and high fi"ter& set %and !ass and %and sto! fre>uency for %and !ass fi"ter
L %and sto! fi"ter (use various cutoff fre>uency or Pass L sto! %and fre>uency
va"ues see the out!ut variations$
3$ Set the memory address *hich is used to store the in!ut and out!ut va"ues$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 7&
Vi Institute of Technology Dept. of ECE
1$ 0nitia""y set the Soc va"ue is used to start 5DC o!eration$ Then a!!"y function
generator in!ut to the 5DC channe"1& the va"ues are stored in 5DC channe"1
memory address (0#@001000/$
'$ Then use fi"ter formu"a to find fi"ter coefficient& and store the fi"ter coefficient
va"ue in the memory address$ The fi"ter coefficient is ca"cu"ated from RA42 to
A42$ Memory addresses a"so increment from RA42 to A42$ 0f use this method the
memory start %efore initia"i)e address (0nitia"i)e address R 0#/0010000 %ut
memory start form %efore A42 va"ue$
6$ So the fi"ter coefficients transfer to another memory and the memory address start
from 0 to A$
7$ Then in!ut signa" get from function generator and a!!"y to 5DC$ Set SocBa"ue
(address to Soc8ead& The Soc8ead function is used to start the 5DC o!eration$
/$ The converted (5na"og to Digita" out!ut out!ut is stored to varia%"e K5dc.ut?&
then a!!"y "ogica" o!eration (K5AD? L ? .8?$$
5AD R 0t is used to ta;e 2?s com!"ement of 5DC out!ut& its convert
16 %it va"ue to 12 %it va"ue$
.8 R 0t is used to offset the out!ut va"ue (Gve offset
@$ Then mu"ti!"y fi"ter coefficient *ith 5DC out!ut va"ue$
10$ Move mu"ti!"ied va"ue to D5C memory (out!ut memory$
11$ Then move the 5DC va"ue to ne#t memory "ocation or increment the memory
"ocation$
12$ -ed is used to identify if the !rogram is running or not$
P"O#"!$
,O@ P!SS I,TE"
Minc"udeNfastmath67#$hO
Minc"udeNmath$hO
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 77
Vi Institute of Technology Dept. of ECE
Mdefine P0 3$11
void main(
P
const f"oat ,sam! F 10000D
int ,cut F 1000D
int A F 10D
f"oat ,c F ,cut4,sam!D
f"oat <c F 2 = P0 = ,cD
int =SocBa"ue&=5dcBa"ueD
int Soc8ead&=5dcStoreD
int =Dac.utD
short 5dc.utD
int .utBa"ue& Count&0ncD
f"oat =(d&=(mD
f"oat Ba"D
unsigned char =-edD
SocBa"ue F (int =0#@001000cD
5dcBa"ue F (int =0#@001000/D
5dcStore F (int =0#/0000000D
(d F (f"oat =0#/0010000D
(m F (f"oat =0#/0030000D
Dac.ut F (int =0#@001000/D
-ed F (unsigned char =0#@0010016D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 7=
Vi Institute of Technology Dept. of ECE
for(Count F +2 = AD Count N 2 = AD CountGG
P
5dcStoreI Count J F 0D
(dI Count J F 0D
(mI Count J F 0D
Q
for(Count F +A42D Count N A42D CountGG
P
if(Count FF 0
(dICountJ F 2 = ,cD
e"se
P
Ba" F sin(<c = CountD
(dICountJ F Ba" 4 (Count = P0D
Q
Q
0ncF0D
for(Count F +A42D Count N A42D CountGG
P
(mI0ncJ F (dICountJD
0ncGGD
Q
*hi"e(1
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 7)
Vi Institute of Technology Dept. of ECE
P
Soc8ead F =SocBa"ueD
5dc.ut F =5dcBa"ueD
5dc.ut LF 0#0fffD
5dc.ut UF 0#0/00D
=5dcStore F 5dc.utD
.utBa"ue F 0D
for(Count F 0D Count N AD CountGG
.utBa"ue GF (=(5dcStore G Count = =((m G CountD
for(Count F (A+1D Count OF 0D Count++
=(5dcStore G Count G 1 F =(5dcStore G CountD
=Dac.ut F .utBa"ueD
=-ed F 1D
Q
Q
P"O#"!$ . -I#- P!SS I,TE"
Minc"udeNfastmath67#$hO
Minc"udeNmath$hO
Mdefine P0 3$11
void main(
P
const f"oat ,sam! F 10000D
int ,cut F 2000D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 7*
Vi Institute of Technology Dept. of ECE
int A F 3'D
f"oat ,c F ,cut4,sam!D
f"oat <c F 2 = P0 = ,cD
int =SocBa"ue&=5dcBa"ueD
int Soc8ead&=5dcStoreD
int =Dac.utD
short 5dc.utD
int .utBa"ue& Count&0ncD
f"oat =(d&=(mD
f"oat Ba"D
unsigned char =-edD
SocBa"ue F (int =0#@001000cD
5dcBa"ue F (int =0#@001000/D
5dcStore F (int =0#/0000000D
(d F (f"oat =0#/0010000D
(m F (f"oat =0#/0030000D
Dac.ut F (int =0#@001000/D
-ed F (unsigned char =0#@0010016D
for(Count F +2 = AD Count N 2 = AD CountGG
P
5dcStoreI Count J F 0D
(dI Count J F 0D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 7?
Vi Institute of Technology Dept. of ECE
(mI Count J F 0D
Q
,or (Count F +A42D Count N A42D CountGG
P
if(Count FF 0
(dICountJ F 1 + (2 = ,cD
e"se
P
Ba" F (+1 = sin(<c = CountD
(dICountJ F Ba" 4 (Count = P0D
Q
Q
0ncF0D
for(Count F +A42D Count N A42D CountGG
P
(mI0ncJ F (dICountJD
0ncGGD
Q
*hi"e(1
P
Soc8ead F =SocBa"ueD
5dc.ut F =5dcBa"ueD
5dc.ut LF 0#0fffD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 74
Vi Institute of Technology Dept. of ECE
5dc.ut UF 0#0/00D
=5dcStore F 5dc.utD
.utBa"ue F 0D
for(Count F 0D Count N AD CountGG
.utBa"ue GF (=(5dcStore G Count = =((m G CountD
for(Count F (A+1D Count OF 0D Count++
=(5dcStore G Count G 1 F =(5dcStore G CountD
.utBa"ue GF 0#0/00D
=Dac.ut F .utBa"ueD
=-ed F 1D
Q
Q
P"O#"!$ H /!ND P!SS I,TE"
Minc"udeNfastmath67#$hO
Minc"udeNmath$hO
Mdefine P0 3$11
void main(
P
const f"oat ,sam! F 12000D
int ,!s F 1'00D
int ,st F 2'00D
int A F 30D
f"oat ,c1 F ,!s4,sam!D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ =(
Vi Institute of Technology Dept. of ECE
f"oat ,c2 F ,st4,sam!D
f"oat <c1 F 2 = P0 = ,c1D
f"oat <c2 F 2 = P0 = ,c2D
int =SocBa"ue&=5dcBa"ueD
int Soc8ead&=5dcStoreD
int =Dac.utD
short 5dc.utD
int .utBa"ue&Count&0ncD
f"oat =(d&=(mD
f"oat Ba"D
unsigned char =-edD
SocBa"ue F (int =0#@001000cD
5dcBa"ue F (int =0#@001000/D
5dcStore F (int =0#/0000000D
(d F (f"oat =0#/0010000D
(m F (f"oat =0#/0030000D
Dac.ut F (int =0#@001000/D
-ed F (unsigned char =0#@0010016D
for(Count F +2 = AD Count N 2 = AD CountGG
P
5dcStoreI Count J F 0D
(dI Count J F 0D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ =1
Vi Institute of Technology Dept. of ECE
(mI Count J F 0D
Q
for(Count F +A42D Count N A42D CountGG
P
if(Count FF 0
(dICountJ F 2 = (,c2 + ,c1D
e"se
P
Ba" F sin(<c2 = Count + sin(<c1 = CountD
(dICountJ F Ba" 4 (Count = P0D
Q
Q
0ncF0D
for(Count F +A42D Count N A42D CountGG
P
(mI0ncJ F (dICountJD
0ncGGD
Q
*hi"e(1
P
Soc8ead F =SocBa"ueD
5dc.ut F =5dcBa"ueD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ='
Vi Institute of Technology Dept. of ECE
5dc.ut LF 0#0fffD
5dc.ut UF 0#0/00D
=5dcStore F 5dc.utD
.utBa"ue F 0D
for(Count F 0D Count N AD CountGG
.utBa"ue GF (=(5dcStore G Count = =((m G CountD
for(Count F (A+1D Count OF 0D Count++
=(5dcStore G Count G 1 F =(5dcStore G CountD
.utBa"ue GF0#0/00D
=Dac.ut F .utBa"ueD
=-ed F 1D
Q
Q
P"O#"!$ H /!ND STOP I,TE"
Minc"udeNfastmath67#$hO
Minc"udeNmath$hO
Mdefine P0 3$11
void main(
P
const f"oat ,sam! F 11000D
int ,!s F '00D
int ,st F 2000D
int A F 3'D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ =&
Vi Institute of Technology Dept. of ECE
f"oat ,c1 F ,!s4,sam!D
f"oat ,c2 F ,st4,sam!D
f"oat <c1 F 2 = P0 = ,c1D
f"oat <c2 F 2 = P0 = ,c2D
int =SocBa"ue&=5dcBa"ueD
int Soc8ead&=5dcStoreD
int =Dac.utD
short 5dc.utD
int .utBa"ue&Count&0ncD
f"oat =(d&=(mD
f"oat Ba"D
unsigned char =-edD
SocBa"ue F (int =0#@001000cD
5dcBa"ue F (int =0#@001000/D
5dcStore F (int =0#/0000000D
(d F (f"oat =0#/0010000D
(m F (f"oat =0#/0030000D
Dac.ut F (int =0#@001000/D
-ed F (unsigned char =0#@0010016D
for(Count F +2 = AD Count N 2 = AD CountGG
P
5dcStoreI Count J F 0D
(dI Count J F 0D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ =7
Vi Institute of Technology Dept. of ECE
(mI Count J F 0D
Q
,or (Count F +A42D Count N A42D CountGG
P
if(Count FF 0
(dICountJ F 1 + (2 = (,c2 + ,c1D
e"se
P
Ba" F sin(<c1 = Count + sin(<c2 = CountD
(dICountJ F Ba" 4 (Count = P0D
Q
Q
0ncF0D
for(Count F +A42D Count N A42D CountGG
P
(mI0ncJ F (dICountJD
0ncGGD
Q
*hi"e(1
P
Soc8ead F =SocBa"ueD
5dc.ut F =5dcBa"ueD
5dc.ut LF 0#0fffD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ==
Vi Institute of Technology Dept. of ECE
5dc.ut UF 0#0/00D
=5dcStore F 5dc.utD
.utBa"ue F 0D
for(Count F 0D Count N AD CountGG
.utBa"ue GF (=(5dcStore G Count = =((m G CountD
for(Count F (A+1D Count OF 0D Count++
=(5dcStore G Count G 1 F =(5dcStore G CountD
=Dac.ut F .utBa"ueD
=-ed F 1D
Q
Q
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ =)
Vi Institute of Technology Dept. of ECE
"ESU,T
Thus the design L 0m!"ementation of ,08 ,i"ter (-P,& (P,& 3P,& 3S, for the given cut off
fre>uency C !rogram *as !erformed$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ =*
Vi Institute of Technology Dept. of ECE
STUDY O $!T,!/ *.1(
!I$:
To study a%out M5T-53 7$10 (2010a
$!T,!/:
M5T-53Y is a high !erformance "anguage for technica" com!uting$ 0t integrates
com!utation& visua"i)ation and !rogramming in an easy to use environment *here !ro%"ems
and so"utions are e#!ressed in fami"iar mathematica" notations$
The name M5T-53 stands for M5T80H -53.85T.8C$ Today& M5T-53 engines
incor!orate the -5P5C2 and 3-5S -i%raries& em%edding the state of the art in soft*are for
matri# com!utation$
USES:
Ty!ica" uses inc"ude&
Math and com!utation
5"gorithm deve"o!ment
Data ac>uisition
Mode"ing& simu"ation and !rototy!ing
Data ana"ysis& e#!"oration and visua"i)ation
Scientific and engineering gra!hics
5!!"ication deve"o!ment& inc"uding gra!hica" user interface %ui"ding$
T-E $!T,!/ SYSTE$ :
The M5T-53 system consists of ' main !arts:
DES5TOP TOO,S B DEVE,OP$ENT ENVI"ON$ENT:
This is the set of too"s and faci"ities that he"! you use M5T-53 functions and fi"es$
Many of these too"s are gra!hica" user interface$
T-E $!T,!/ $!T-E$!TIC!, UNCTION ,I/"!"Y:
This is a vast co""ection of com!utationa" a"gorithms ranging from e"ementary
functions "i;e sum& sine& cosine L com!"e# arithmetic to more so!histicated functions "i;e
matri# inverse& matri# reign va"ues& 3esse" functions and ,,T$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ =?
Vi Institute of Technology Dept. of ECE
T-E $!T,!/ ,!N#U!#E:
This is a high "eve" matri# 4 array "anguage *ith contro" f"o* statement& functions& data
structures& i4!& o4! and o%Vect oriented !rogramming features$
#"!P-ICS:
M5T-53 has e#tensive faci"ities for dis!"aying vectors and matrices as grou!s as *e"" as
annotating and !rinting these gra!hs$
T-E $!T,!/ e:te1n2l inte1f2ce 6 !PI :
This is a "i%rary to *rite C L ,ortran !rograms that interact *ith M5T-53$ 0t inc"udes
faci"ities for ca""ing routines from M5T-53$
$!T"ICES !ND !""!YS :
Matrices and Magic s>uares
7#!ressions
Contro""ing the command *indo*
EXP"ESSIONS :
The %ui"ding %"oc;s of e#!ressions are
Baria%"es
Aum%ers
.!erators
,unctions
V!"I!/,ES :
M5T-53 does not re>uire any ty!e of dec"arations or dimensions *hen it encounters a ne*
varia%"e name$ 0t automatica""y creates the varia%"e and a""ocates a!!ro!riate memory$
7#am!"e : numWstud F 2'
NU$/E"S :
M5T-53 uses conventiona" decima" notation& *ith an o!tiona" decima" !oint$ 0t uses K7? to
s!ecify a !o*er of ten$ 0maginary no?s used either i or V as a suffi#$
7#am!"e : 3& +@@& 1i& 3e'i
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ =4
Vi Institute of Technology Dept. of ECE
OPE"!TO"S :
G : add
+ : su%tract
= : mu"ti!"y
4 : division
Z : "eft division
U : Po*er
? : com!"e# conVugate trans!ose
UNCTIONS :
M5T-53 !rovides a "arge no$of standard functions inc"uding a%s& s>rt& e#! and stn$
SCAT5H: a%s : y F a%s(#
% F s>rt(#
y F e#!(#
c F sin(5
TOO, /OXES :
There are a no$of too" %o#es avai"a%"e in M5T-53 some of them are:
Communication too"%o#
Contro" system too"%o#
Data ac>uisition too"%o#
Data %ase too"%o#
Data ,eed too"%o#
,i"ter design too"%o#
,u))y "ogic too"%o#
Signa" !rocessing too"%o#
0mage !rocessing too"%o#
.PC too" %o#
<ave"et too"%o#
8, too"%o#
CO$$UNIC!TION TOO,/OX:
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ )(
Vi Institute of Technology Dept. of ECE
The communication too"%o# e#tends the M5T-53 technica" com!uting environment *ith
functions& !"ot as a gra!hica" user interface$
The too"%o# he"!s you to create a"gorithms for commercia" and defense *ire"ess s4m?s$
UNCTIONS :
Signa" Sources: Sources of random signa"s Performance eva"uation : ana"ysing and
visua"i)ing !erformances of a communication s4m$
Source coding :>uanti)ation& com!anders and other ;ind of source coding$
7rror contro" coding : 3"oc; and convo"ution coding$
0nter"eaving 4 De inter"eaving:3"oc; and convo"ution inter"eaving$
S!ecia" fi"ters: raised cosine and (i"%ert fitters
690: 3it error rate ana"ysis too"$
I,TE" DESI#N TOO,/OX:
The fi"ter design too"%o# is a co""ection of too"s that !rovides advanced techni>ues for
designing simu"ation and ana"ysing digita" fi"ters$
SI#N!, P"OCESSIN# TOO,/OX:
The signa" !rocessing too"%o# is a co""ection of too"s %ui"t on the M5T-53 numeric
com!uting environment$ The too"%o# su!!orts a *ide range of signa" !rocessing o!erations
from *ave generation to fi"ter design and im!"ementation$
CO$$!ND ,INE UNCTIONS:
ana"og and digita" fi"ters ana"ysis
digita" fi"ter im!"ementation
,08 L 008 digita" fi"ter design
5na"og fi"ter design
ce!stra" ana"ysis
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ )1
Vi Institute of Technology Dept. of ECE
I$!#E P"OCESSIN# TOO,/OX:
The image !rocessing too"%o# is a co""ection of functions that e#tend the ca!a%i"ity of
M5T-53 numeric com!uting environment$ The too"%o# su!!orts a *ide range of image
!rocessing o!erations inc"uding$
S!atia" image transformations
Mor!ho"ogica" o!erations
Transforms
De%"urring
0mage registration
SI$U,IN5 :
Simu"in; is a soft*are !ac;age for mode"ing& simu"ating and ana"ysing dynamic systems$ 0t
su!!orts "inear and non+"inear s4ms& mode"ed in continuous time& sam!"ed time& or a hy%rid
of the t*o systems may a"so have different !arts that are sam!"ed at different rates
(mu"tirated$
"ESU,T:
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ )'
Vi Institute of Technology Dept. of ECE
Thus the M5T-53 and M5T-53 too"s *ere studied$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ )&
Vi Institute of Technology Dept. of ECE
EX.NO:) #ENE"!TION O SI#N!,S USIN# $!T,!/
!I$
To *rite a M5T-53 !rogram to generate the fo""o*ing standard in!ut signa"s and !"ot the
res!onse$
1$ 9nit ste!&
2$ 9nit im!u"se&
3$ 9nit ram!&
1$ 7#!onentia" signa"
'$ Sinusoida" signa"&
6$ Cos signa"
7$ Triangu"ar *ave&
/$ Sa* tooth *ave
!PP!"!TUS "ECUI"ED
SOT@!"E : M5T-53 7$10 (.8 (igh version
UNIT STEP SECUENCE
The unit ste! se>uence is a signa" that is )ero every*here e#ce!t at n OF 0 *here its
va"ue is unity$ 0n other*ise integra" of the im!u"se function is a"so a singu"arity function and
is ca""ed the unit ste! function$
$!T-E$!TIC!, ECU!TION
u(n F 1 for n OF 0
F 0 for n N 0
!,#O"IT-$
1$ Start the !rogram
2$ 6et the dimension of SnT
3$ Discrete out!ut is o%tained for nOF 0 and )eros for a"" other va"ues$
1$ .ut!ut is generated in stem format
'$ Terminate the !rocess
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ )7
Vi Institute of Technology Dept. of ECE
P"O#"!$
[ !rogram to generate unit ste! se>uence
n F +10:10D
s F I)eros(1&10 1 ones(1&10JD
stem (n&sD
tit"e (\unit ste! se>uence\D
#"a%e" (\time inde# n\D
y"a%e" (\am!"itude\D
OUTPUT:
UNIT I$P,U,SE SECUENCE
The unit im!u"se (sam!"e se>uence is a signa" that is )ero every*here e#ce!t at nF0
*here it is unity$ This signa" sometime is referred to as the unit im!u"se$
$!T-E$!TIC!, ECU!TION
] (n F 1 for n F 0
F 0 for n ^ 0
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ )=
Vi Institute of Technology Dept. of ECE
!,#O"IT-$
1$ Start the !rogram
2$ 6et the dimension of SnT
3$ Discrete out!ut is o%tained for n F 0 and )eros for a"" other va"ues$
1$ .ut!ut is generated in stem format
'$ Terminate the !rocess
P"O#"!$
[!rogram to generate im!u"se se>uence
n F +20:20D
s F I)eros(1&20 1 )eros(1&20JD
stem (n& sD
tit"e (\unit im!u"se se>uence\D
#"a%e" (\time\D
y"a%e" (\am!"itude\D
OUTPUT
UNIT "!$P SECUENCE
This unit ram! se>uence is signa" that gro*s "inear"y *hen nOF0& other*ise it is )ero$
$!T-E$!TIC!, ECU!TION
9r (n F n for n OF 0
F 0 for nN 0
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ))
Vi Institute of Technology Dept. of ECE
!,#O"IT-$
1$ Start the !rogram
2$ 6et the dimension of SnT
3$ Discrete out!ut is o%tained for nOF0 and )eros for a"" other va"ues
1$ .ut!ut is generated in stem format
'$ Terminate the !rocess
P"O#"!$
[!rogram to generate unit ram! se>uence
C"ear a""D
n F0:10D
s FnD
stem (n&sD
tit"e (\unit ram! se>uence\D
#"a%e" (\time inde#\D
y"a%e" (\am!"itude\D
OUTPUT
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ )*
Vi Institute of Technology Dept. of ECE
EXPONENTI!, SECUENCE
<hen the va"ues of aO1& the se>uence gro*s e#!onentia""y and *hen the va"ue is
0NaN1& the se>uence decay e#!onentia""y$
$!T-E$!TIC!, ECU!TION
H (n F a
n
for a"" Kn?
!,#O"IT-$
1$ Start the !rogram
2$ 6et the dimension of SnT
3$ discrete out!ut is o%tained for nOF 0 and )eros for a"" other va"ues
1$ .ut!ut is generated in stem(!"ot format
'$ Terminate the !rocess
P"O#"!$
[!rogram to generate e#!onentia" se>uence
c"fD
nF0:10D
sFe#!(0$3=nD
figure(1D
stem(n&sD
gridD
tit"e(\7#!onentia" se>uence\D
#"a%e"(\time\D
y"a%e"(\am!"itude\D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ )?
Vi Institute of Technology Dept. of ECE
OUTPUT
SINUSOID!, SECUENCE
The sine function out!ut is ca"cu"ate %y the fo""o*ing e>uation
6enera" e>uation n E sin %' I pi I f I t+
The modified sine *ave e>uation is
X%t+ E sin %' Ipi I in I Ts20p I t+
<here& ,in F 0n!ut ,re>uency in (ert)&
Tsam!(Sam!"ing Time F 1 4 ,sam!&
Asam! F ,sam! 4 ,in
t F Ao of Sam!"es vary from 0 to Asam!+1(0t is generate sing"e *ave$ 0ncrease *ave means
to mu"ti!"y that no into Asam!$ 7# generate t*o cyc"es means mu"ti!"y 2 into Asam!$
$!T-E$!TIC!, ECU!TION
X%n+ E ! sin %' I pi I f I t+
<here f R fre>uency in ()& t R time in sec& 5 + 5m!"itude
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ )4
Vi Institute of Technology Dept. of ECE
!,#O"IT-$
1$ 0nitia"i)e in!ut ,re>uency and sam!"ing fre>uency& these fre>uencies are very
im!ortant to generate the sine *aveform$ 0n!ut fre>uency is dec"ared as ,in (this
is generating fre>uency range in (ert)& Sam!"ing fre>uency is dec"ared as
,sam!$ Sam!"ing fre>uency must %e t*ice of the in!ut fre>uency$
2$ ,ind Sam!"ing Time using sam!"ing ,re>uency (T F 1 4 ,& Tsam! F 1 4 ,sam!
3$ ,ind Ao of cyc"e to generate the out!ut& it de!ends on the Aum%er of sam!"es !er
cyc"e (Asam!$ 0t is ca"cu"ated %y using ,sam! L ,in& (Asam! F ,sam! 4 ,in$
1$ 6enerate sing"e cyc"e out!ut& use A va"ue from 0 to Asam! R 1$ Then generate
mu"ti!"e out!ut cyc"e using A va"ues from 0 to no of cyc"e = Asam! R 1(no of
cyc"e F 2& 3_$etc_
'$ 5!!"y the va"ues into a genera" formu"a$
6$ Ae#t & !"ot the out!ut *aveform into gra!h *indo*& using plot function for
continuous out!ut and use ste0 function for 3isc1ete out!ut$ To !"ot more than
one figure in sing"e gra!h *indo* su>plot function is used$ Synta# of su%!"ot is
i$ su%!"ot(a& %& c
<here& a F 8o*& % F Co"umn& c F no of fig
7$ 9se the tit"e function to give the name to the *aveform$
/$ 9se #"a%e" and y"a%e" to find the unit for # and y a#is$
P"O#"!$
[!rogram to generate sine se>uence
c"ear a""D
,in F 1000D
,sam! F @00000D
Tsam! F 1 4 ,sam!D
Asam! F ,sam!4 ,inD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ *(
Vi Institute of Technology Dept. of ECE
A F 0:' = Asam!+1D
#Fsin(2=!i=,in=Tsam!=AD
!"ot(#D
tit"e (\Sine <ave\D
#"a%e"(\Time ++ O?D
y"a%e"(\5m!"itude++ O\D
OUTPUT
COSINE SECUENCE
The cosine function out!ut is ca"cu"ate %y the fo""o*ing e>uation
6enera" e>uation n E cos%' I pi I f I t+
The modified cos *ave e>uation is
X%t+ E cos %' I pi I in I Ts20p I t+
<here& ,in F 0n!ut ,re>uency in (ert)&
Tsam!(Sam!"ing Time F 1 4 ,sam!&
Asam! F ,sam! 4 ,in
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ *1
Vi Institute of Technology Dept. of ECE
t F Ao of Sam!"es vary from 0 to Asam!+1(0t is generate sing"e *ave$ 0ncrease *ave means
to mu"ti!"y that no into Asam!$ 7# generate t*o cyc"es means mu"ti!"y 2 into Asam!$
$!T-E$!TIC!, ECU!TION
H(n F 5 cos (2 = !i = f = t
<here f R fre>uency in ()& 5 + 5m!"itude
!,#O"IT-$
1$ 0nitia"i)e in!ut ,re>uency and sam!"ing fre>uency& these fre>uencies are very
im!ortant to generate the cosine *aveform$ 0n!ut fre>uency is dec"ared as ,in
(this is generating fre>uency range in (ert)& Sam!"ing fre>uency is dec"ared as
,sam!$ Sam!"ing fre>uency must %e t*ice that of the in!ut fre>uency$
2$ ,ind Sam!"ing time using sam!"ing fre>uency (T F 1 4 ,& Tsam! F 1 4 ,sam!
3$ ,ind num%er of cyc"es to generate the out!ut& it de!ends on Aum%er of sam!"e
!er cyc"e (Asam! and is ca"cu"ated %y using ,sam! L ,in& (Asam! F ,sam! 4 ,in$
1$ 6enerate sing"e out!ut cyc"e *hich uses A va"ue from 0 to Asam! R 1$ Then
generate mu"ti!"e out!ut cyc"e *hich uses A va"ue from 0 to no of cyc"e = Asam!
R 1(no of cyc"e F 2& 3_$etc_
'$ 5!!"y the va"ues into genera" formu"a$
6$ P"ot the out!ut *aveform into gra!h *indo*& use the !"ot function *hich uses
continuous out!ut for ana"og and use the stem function for discrete out!ut$ To
!"ot more than one figure in sing"e gra!h *indo* su%!"ot function is used$
Synta# of su%!"ot is
i$ su%!"ot(a& %& c
<here& a F 8o*& % F Co"umn& c F >uadrant
7$ The tit"e function used to give the name to the *aveform$
/$ Then #"a%e" L y"a%e" is used to find the unit for # L y a#is$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ *'
Vi Institute of Technology Dept. of ECE
P"O#"!$
[!rogram to generate sine se>uence
c"ear a""D
,in F 1000D
,sam! F @00000D
Tsam! F 1 4 ,sam!D
Asam! F ,sam!4 ,inD
A F 0:Asam!+1D
#Fcos(2=!i=,in=Tsam!=AD
!"ot(#D
tit"e(\cosine <ave\D
#"a%e"(\Time ++ O?D
y"a%e"(\5m!"itude++ O\D
OUTPUT
T"I!N#U,!" @!VE
The triangu"ar function out!ut is ca"cu"ate %y the fo""o*ing e>uation
6enera" e>uation n E s29tooth %%' I pi I f I t+<(.=+
The modified Triangu"ar *ave e>uation is
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ *&
Vi Institute of Technology Dept. of ECE
X%t+ E s29tooth%%' I pi I in I Ts20p+<(.=+
<here& ,in F 0n!ut ,re>uency in (ert)&
Tsam!(Sam!"ing Time F 1 4 ,sam!&
Asam! F ,sam! 4 ,in
t F Ao of Sam!"es vary from 0 to Asam!+1(0t is generate sing"e *ave$ 0ncrease *ave
means to mu"ti!"y that no into Asam!$ 7# generate t*o cyc"es means mu"ti!"y 2 into
Asam!$ The 0$' va"ue is used for triangu"ar *ave sa!!ing va"ue$
!,#O"IT-$
1$ 0nitia"i)e in!ut ,re>uency and sam!"ing fre>uency& these fre>uencies are very
im!ortant to generate the Triangu"ar *aveform$ 0n!ut fre>uency is dec"ared as ,in
(this is generating fre>uency range in (ert)& Sam!"ing fre>uency is dec"ared as
,sam!$ Sam!"ing fre>uency must %e t*ice of the in!ut fre>uency$
2$ ,ind Sam!"ing time using sam!"ing fre>uency (T F 1 4 ,& Tsam! F 1 4 ,sam!
3$ ,ind num%er of cyc"es to generate the out!ut& it de!ends on Aum%er of sam!"e
!er cyc"e (Asam! and ca"cu"ated %y using ,sam! L ,in& (Asam! F ,sam! 4 ,in$
1$ 6enerate sing"e out!ut cyc"e *hich uses A va"ue from 0 to Asam! R 1$ Then
generate mu"ti!"e out!ut cyc"e *hich uses A va"ue from 0 to no of cyc"e = Asam!
R 1(no of cyc"e F 2& 3_$etc_
'$ 5!!"y the va"ues into genera" formu"a$
6$ P"ot the out!ut *aveform into gra!h *indo*& use the !"ot function *hich uses
continuous out!ut for ana"og and use the stem function for discrete out!ut$ To
!"ot more than one figure in sing"e gra!h *indo* su%!"ot function is used$
Synta# of su%!"ot is
i$ su%!"ot(a& %& c
<here& a F 8o*& % F Co"umn& c F >uadrant
7$ The tit"e function used to give the name to the *aveform$
/$ Then #"a%e" L y"a%e" is used to find the unit for # L y a#is$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ *7
Vi Institute of Technology Dept. of ECE
P"O#"!$
[ Triangu"ar *ave
c"ear a""D
,in F 1000D
,sam! F @00000D
Asam ! F ,sam! 4 ,inD
Tsam! F 1 4 ,sam!D
n F 0: 2= Asam!+1D
#Fsa*tooth(2 = !i = ,in = Tsam! = n&0$'D
!"ot(#D
tit"e(\Triangu"ar <ave\D
#"a%e"(\Time + O\D
y"a%e"(\5m!"itude+ + O\D
OUTPUT
S!@TOOT- @!VE
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ *=
Vi Institute of Technology Dept. of ECE
The sa*tooth function out!ut is ca"cu"ate %y the fo""o*ing e>uation
6enera" e>uation n E s29tooth %' I pi I f I t+
The modified sa*tooth *ave e>uation is
X%t+ E s29tooth %' I pi I in I Ts20p+
<here& ,in F 0n!ut ,re>uency in (ert)&
Tsam! (Sam!"ing Time F 1 4 ,sam!&
Asam! F ,sam! 4 ,in
t F Ao of Sam!"es vary from 0 to Asam!+1(0t is generate sing"e *ave$
0ncrease *ave means to mu"ti!"y that no into Asam!$ 7# generate t*o cyc"es means
mu"ti!"y 2 into Asam!$ The 0$' va"ue is used for triangu"ar *ave sa!!ing va"ue$
!,#O"IT-$
1$ 0nitia"i)e in!ut ,re>uency and sam!"ing fre>uency& these fre>uencies are very
im!ortant to generate the sa*tooth *aveform$ 0n!ut fre>uency is dec"ared as
,in (this is generating fre>uency range in (ert)& Sam!"ing fre>uency is
dec"ared as ,sam!$ Sam!"ing fre>uency must %e t*ice that of the in!ut
fre>uency$
2$ ,ind Sam!"ing time using sam!"ing fre>uency (T F 1 4 ,& Tsam! F 1 4 ,sam!
3$ ,ind num%er of cyc"es to generate the out!ut& it de!ends on Aum%er of sam!"e
!er cyc"e (Asam! and is ca"cu"ated %y using ,sam! L ,in& (Asam! F ,sam! 4
,in$
1$ To generate sing"e out!ut cyc"e *hich use A va"ue from 0 to Asam! R 1$ Then
generate mu"ti!"e out!ut cyc"e *hich use A va"ue from 0 to no of cyc"e =
Asam! R 1(no of cyc"e F 2& 3_$etc_
'$ 5!!"y the va"ues into genera" formu"a$
6$ P"ot the out!ut *aveform into gra!h *indo*& use the !"ot function *hich uses
continuous out!ut for ana"og and use the stem function for discrete out!ut$ To
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ *)
Vi Institute of Technology Dept. of ECE
!"ot more than one figure in sing"e gra!h *indo* su%!"ot function is used$
Synta# of su%!"ot is
ii$ su%!"ot(a& %& c
<here& a F 8o*& % F Co"umn& c F >uadrant
7$ The tit"e function used to give the name to the *aveform$
/$ Then #"a%e" L y"a%e" is used to find the unit for # L y a#is$
P"O#"!$
[ sa*tooth se>uence
c"ear a""D
,in F 1000D
,sam! F @00000D
Asam! F ,sam! 4 ,inD
Tsam! F 1 4 ,sam!D
n F 0: 3 = Asam!+1D
#Fsa*tooth(2 = !i = ,in = Tsam! = nD
!"ot(#D
tit"e(\Sa*Tooth <ave\D
#"a%e"(\Time+ + OD
y"a%e"(\5m!"itude+ + OD
OUTPUT
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ **
Vi Institute of Technology Dept. of ECE
"ESU,T
Thus the M5T-53 !rograms for unit ste!& unit im!u"se& unit ram!& sinusoida" signa"
sa*tooth & Triangu"ar *ave &e#!onentia" signa"s *ere generated and their res!onses *ere
!"otted in discrete and continuous time domain successfu""y$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ *?
Vi Institute of Technology Dept. of ECE
EX.NO:* ,INE!" B CI"CU,!" CONVO,UTION
!I$
To *rite a M5T-53 !rogram to o%tain the "inear L circu"ar convo"ution %et*een t*o finite
duration se>uences #(n and h(n$
T-EO"Y
Convo"ution is a !o*erfu" *ay of characteri)ing the in!ut+out!ut re"ationshi! of time R
invariant "inear systems$ Convo"ution finds its a!!"ication in !rocessing signa"s es!ecia""y
ana"y)ing the out!ut of the system$
The res!onse or out!ut y(n of a -T0 system for any ar%itrary in!ut is given %y convo"ution
of in!ut and the im!u"se res!onse h(n of the system$
y n x k h n k
k
( I ( ( J


___ (1

0f the in!ut has K-? sam!"es and the im!u"se res!onse h(n has KM? sam!"es then the out!ut
se>uence y(n *i"" %e a finite duration se>uence consisting of -G M+1 sam!"es$ The
convo"ution resu"ts in a non+!eriodic se>uence$ (ence this convo"ution is a"so ca""ed a
!eriodic convo"ution$
The convo"ution re"ation of e>uation (1 can a"so %e e#!ressed as
y(n F #(n
=
h(n F h(n
=
#(n
*here the sym%o"
=
indicates convo"ution o!eration$
!,#O"IT-$
1$ 0nitia"i)e the t*o in!ut se>uences$
2$ ,ind the "ength of first and second in!ut se>uences use the fo""o*ing synta#
Jlength %: +K.
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ *4
Vi Institute of Technology Dept. of ECE
<here& # R in!ut se>uence
3$ ,ind out the "inear convo"ution out!ut "ength using first se>uence "ength and
Second se>uence "ength (A F #Gh+1$
1$ ,ind -inear convo"ution of t*o in!ut se>uence using the Jcon;%:<h+K command$
The Lcon;M !erform "inear convo"ution o!eration$
<here& # R ,irst in!ut se>uence
h R Second in!ut se>uence
'$ 9se the su%!"ot L stem function to dis!"ay the in!ut L out!ut in a sing"e gra!h
*indo*$ 7"se use figure( function to dis!"ay the in!ut Lout!ut in se!arate
*indo*$
i$ su%!"ot(a& %& c
<here& a F 8o*& % F Co"umn& c F >uadrant
6$ The tit"e function is used to give the name to the *aveform$
7$ The #"a%e" L y"a%e" is used to find the unit for # L y a#is$
P"O#"!$
[!rogram to find "inear convo"ution of t*o finite duration se>uences
c"ear a""D
Hn F I1&2&1&1JD
(n F I1&1&1JD
#F"ength(HnD
h F "ength((nD
A F # G h + 1D
Cn F conv(Hn&(nD
su%!"ot(2&2&1D
stem(HnD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ?(
Vi Institute of Technology Dept. of ECE
tit"e(\,irst 0n!ut Se>uence\D
#"a%e"(\-ength of ,irst 0n!ut Se>uence\D
y"a%e"(\0n!ut Ba"ue\D
su%!"ot(2&2&2D
stem((nD
tit"e(\Second 0n!ut Se>uence\D
#"a%e"(\-ength of Second 0n!ut Se>uence\D
y"a%e"(\0n!ut Ba"ue\D
su%!"ot(2&2&3D
stem(CnD
tit"e(\-inear Convo"ution .ut!ut Se>uence\D
#"a%e"(\-ength of .ut!ut Se>uence\D
y"a%e"(\.ut!ut Ba"ue\D
INPUT B OUTPUT
7nter the in!ut se>uence #(n F I1&2&1&1J
7nter the in!ut se>uence h(n F I1&1&1J
Convo"uted out!ut y(n F 1& 3& 1& 1& 2& 1
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ?1
Vi Institute of Technology Dept. of ECE
CI"CU,!" CONVO,UTION
!,#O"IT-$
1$ 0nitia"i)e the t*o in!ut se>uences$
2$ ,ind the "ength of first and second in!ut se>uences use the fo""o*ing synta#
Jlength %X +K.
<here& # R in!ut se>uence
3$ ,ind out the circu"ar convo"ution out!ut "ength using ,irst se>uence "ength and
Second se>uence "ength (A F ma#(#&h$
1$ ,ind circu"ar convo"ution of t*o in!ut se>uence using the Jccon;K function$ The
Lccon;M !erform circu"ar convo"ution o!eration$
'$ 9se the su%!"ot L stem function to dis!"ay the in!ut L out!ut in a sing"e gra!h
*indo*$ 7"se use figure( function to dis!"ay the in!ut Lout!ut in se!arate
*indo*$
i$ su%!"ot(a& %& c
*here& a F 8o*& % F Co"umn& c F >uadrant
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ?'
Vi Institute of Technology Dept. of ECE
6$ The tit"e function is used to give the name to the *aveform$
7$ The #"a%e" L y"a%e" is used to find the unit for # L y a#is$
P"O#"!$
c"ear a""D
Hn F I1&2&1&1JD
(n F I1&1&1JD
#F"ength(HnD
h F "ength((nD
A F ma#(#&hD
Cn F cconv(Hn&(n&AD
su%!"ot(2&2&1D
stem(HnD
tit"e(\,irst 0n!ut Se>uence\D
#"a%e"(\-ength of ,irst 0n!ut Se>uence\D
y"a%e"(\0n!ut Ba"ue\D
su%!"ot(2&2&2D
stem((nD
tit"e(\Second 0n!ut Se>uence\D
#"a%e"(\-ength of Second 0n!ut Se>uence\D
y"a%e"(\0n!ut Ba"ue\D
su%!"ot(2&2&3D
stem(CnD
tit"e(\Circu"ar Convo"ution .ut!ut Se>uence\D
#"a%e"(\-ength of .ut!ut Se>uence\D
y"a%e"(\.ut!ut Ba"ue\D
INPUT B OUTPUT
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ?&
Vi Institute of Technology Dept. of ECE
7nter the in!ut se>uence #(n F I1&2&1&1J
7nter the in!ut se>uence h(n F I1&1&1J
Convo"uted out!ut y(n F 3& 1& 1& 1
"ESU,T
Thus the M5T-53 !rogram for -inear L Circu"ar convo"ution *as generated and
their res!onses *ere !"otted in discrete time domain successfu""y$
EX.NO:? S!$P,IN# B EECT O !,I!SIN#
!I$
To !erform sam!"ing o!eration and vie* the a"iasing effect$
T-EO"Y
5 ;ey ste! in any digita" !rocessing of rea" *or"d ana"og signa"s is converting the ana"og
signa"s into digita" form$ <e sam!"e continuous data and create a discrete signa"$
9nfortunate"y& sam!"ing can introduce a"iasing& a non"inear !rocess *hich shifts fre>uencies$
5"iasing is an inevita%"e resu"t of %oth sam!"ing and sam!"e rate conversion.
The Ay>uist sam!"ing theorem defines the minimum sam!"ing fre>uency to com!"ete"y
re!resent a continuous signa" *ith a discrete one$ 0f the sam!"ing fre>uency is at "east t*ice
the highest fre>uency in the continuous %ase%and signa"& the sam!"es can %e used to e#act"y
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ?7
Vi Institute of Technology Dept. of ECE
reconstruct the continuous signa"$ 5 sine *ave can %e descri%ed %y at "east t*o sam!"es !er
cyc"e (consider dra*ing t*o dots on a !icture of a sing"e cyc"e& then try and dra* a sing"e
cyc"e of a different fre>uency that !asses through the same t*o dots$ Sam!"ing at s"ight"y
"ess than t*o sam!"es !er cyc"e& ho*ever& is indistinguisha%"e from sam!"ing a sine *ave
c"ose to %ut %e"o* the origina" fre>uency$ This is a"iasing + the transformation of high
fre>uency information into fa"se "o* fre>uencies that *ere not !resent in the origina" signa"$
The Ay>uist fre>uency& a"so ca""ed the fo"ding fre>uency& is e>ua" to ha"f the sam!"ing
fre>uency f& and is the demarcation %et*een fre>uencies that are correct"y sam!"ed and those
that *i"" cause a"iases$ 5"iases *i"" %e \fo"ded\ from the Ay>uist fre>uency %ac; into the
usefu" fre>uency range$
!,#O"IT-$
1$ 0nitia"i)e in!ut ,re>uency& sam!"ing fre>uency and num%er of sam!"e va"ues
(Asam!$ Sam!"ing fre>uency must %e t*ice the in!ut fre>uency$
2$ Then t*o different sinusoida" signa"s are sam!"ed at the same sam!"ing
fre>uency$
3$ Sam!"e the second signa" at "o* sam!"ing fre>uency$ 5ccording to sam!"ing
theorem the sam!"ing fre>uency va"ue is t*ice the in!ut fre>uency$ So a"iasing
*i"" occur in second signa"$
1$ Due to a"iasing effect t*o signa"s are !"otted in same *ave$
'$ The difference %et*een these t*o sine *ave signa"s is !li2sing Effect.
6$ Ae#t !"ot the out!ut *aveform into gra!h *indo*& use the !"ot function *hich
uses the continuous function for ana"og out!ut and use the stem function for
discrete out!ut$ To !"ot more than one figure in sing"e gra!h *indo* su%!"ot
function is used$ Synta# of su%!"ot is
iii$ su%!"ot(a& %& c
<here& a F 8o*& % F Co"umn& c F no of fig
7$ The title function is used to give name to the *ave form$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ?=
Vi Institute of Technology Dept. of ECE
/$ Then :l2>el L yl2>el are used to find unit of # L y a#is$
P"O#"!$
[ Sam!"ing and effect of a"iasing
,sam! F 10000D
,in F 1000D
Asam! F 100D
A F 0 : (Asam! + 1D
; F 1D
Ha F sin(2 = !i = (,in 4 ,sam! = AD
H% F sin(2 = !i = (,in G (; = ,sam!4 ,sam! = AD
su%!"ot(2& 1& 1D
!"ot(A& HaD
su%!"ot(2& 1& 2D
!"ot(A& H%D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ?)
Vi Institute of Technology Dept. of ECE
OUTPUT
"ESU,T
Thus the sam!"ing o!eration and effect a"iasing is !erformed$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ?*
Vi Institute of Technology Dept. of ECE
EX.NO:4 DESI#N O I" I,TE" USIN# $!T,!/
!I$
To *rite a M5T-53 !rogram for the design of ,08 ,i"ter for the given cutoff fre>uency
using *indo*ing techni>ue$ 5"so !"ot the magnitude and !hase res!onses for the same$
T-EO"Y
The fi"ters designed %y using finite num%er of sam!"es of im!u"se res!onse are ca""ed ,08
fi"ters$ These finite num%er of sam!"es are o%tained from the infinite duration desired
im!u"se res!onse h
d
(n$ (ere h
d
(nis the inverse ,ourier transform of (
d
(`& *here (
d
(` is
the idea" (desired fre>uency res!onse$ The various methods of designing ,08 fi"ters are (i$
,ourier Series method& (ii$ <indo* method& (iii$ ,re>uency Sam!"ing method& (iv .!tima"
fi"ter design method$ (ere *e discuss a%out *indo* method on"y$
I,TE" TYPES
1$ -o* Pass ,i"ter
2$ (igh Pass ,i"ter
3$ 3and Pass ,i"ter
1$ 3and 8eVect ,i"ter
1. ,O@ P!SS I,TE"
The "o* !ass fi"ter e>uation is
H d
F c n
W n n n n n
n
c
(
s i n ( 4 4 4


< <

'

2 0
2 2
'. -I#- P!SS I,TE"
The (igh !ass fi"ter e>uation is
H d n
F c n
W n n n n n
c
(
s i n ( 4 4 4


< <

'

1 2 0
2 2
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ??
Vi Institute of Technology Dept. of ECE
&. /!ND P!SS I,TE"
The %and Pass fi"ter e>uation is
H d n
F c F c n
W c n W c n n n n n
(
(
s i n ( s i n ( 4 4 4


< <

'

2 2 1 0
2 1 2 2
7. /!ND "ENECT I,TE"
The %and reVect fi"ter e>uation is
H d n
F c F c n
W c n W c n n n n n
(
(
s i n ( s i n ( 4 4 4


< <

'

2 1 2 0
1 2 2 2
<here& ,c F ,cut 4 ,sam!
,c1 F ,!s 4 ,sam!
,c2 F ,st 4 ,sam!
<c F 2X,c
<c1 F2X,c1 L <c2 F2X,c2
DESI#N O I" I,TE"S USIN# @INDO@S
The desired fre>uency res!onse (
d
(e
V`
of a fi"ter is !eriodic in fre>uency and can %e
e#!anded in a ,ourier series$ The resu"tant series is given %y
H e h n e
d
j w
d
j w n
n
( ( J

_$$
__(1


<here
h n H e e d
d
j w j w n
( 4 (

1 2

____(2
5nd ;no*n as ,ourier coefficients having infinite "ength$ .ne !ossi%"e *ay of o%taining ,08
fi"ter is to truncate the infinite ,ourier series at nF a (A+142& *here A is the "ength of the
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ ?4
Vi Institute of Technology Dept. of ECE
desired se>uence$ 3ut a%ru!t truncation of the ,ourier series resu"ts in osci""ation in the !ass
%and and sto! %and$ These osci""ations are due to s"o* convergence of the ,ourier series and
this effect is ;no*n as the 6i%%s !henomenon$ To reduce these osci""ations& the
,ourier coefficients of the fi"ter are modified %y mu"ti!"ying the infinite im!u"se res!onse
*ith a finite *eighing se>uence ` (n ca""ed a *indo*$
<here
` (n F ` (+n ^ 0 for bnb c (A+142
F 0 for bnb O (A+142

5fter mu"ti!"ying *indo* se>uence *(n *ith (ed(n& *e get a finite duration se>uence h(n
that satisfies the desired magnitude res!onse&
h(n F h
d
(n`(n for a"" bnb c (A+142
F 0 for bnb O (A+142

The fre>uency res!onse ((e
V`
of the fi"ter can %e o%tained %y convo"ution of (
d
(e
V`
and
<(e
V`
given %y
H e h n e
d
j w
d
j w n
n
( ( J


___ (1
H e H e e d
j
d
j j w
( 4 (
(

1 2
/ ((e
V`

=
<(e
V`


___ (2

3ecause %oth (
d
(e
V`
and <(e
V`
are !eriodic function& the o!eration often ca""ed as !eriodic
convo"ution$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 4(
Vi Institute of Technology Dept. of ECE
@INDO@ TYPES
"ect2ngul21 9in3o9
8ectangu"ar *indo* function can %e found %y the fo""o*ing e>uation
r e c n
f o r N n N
O t h e r w i s e
(
( 4 ( 4

< <

'

1 1 2 1 2
0
-200ing 9in3o9
(amming *indo* function is ca"cu"ated %y the given e>uation


h m n
n N f o r N n N
O t h e r w i s e
(
$ $ c o s ( 4 ( ( 4 ( 4

+ < <

'

0 ' 1 0 1 6 2 1 1 2 1 2
0
-2nning 9in3o9
(anning *indo* function is ca"cu"ated %y the given e>uation


h n n
n N f o r N n N
O t h e r w i s e
(
$ $ c o s ( 4 ( ( 4 ( 4

+ < <

'

0 ' 0 ' 2 1 1 2 1 2
0
/l2c802n 9in3o9
3"ac;man *indo* function is ca"cu"ated %y fo""o*ing e>uation


b n
n N n N
f o r N n N
O t h e r w i s e
1
0 1 2 0 ' 2 1 0 0 / 1 1
1 2 1 2
0
(
$ $ c o s ( 4 ( $ c o s ( 4 (
( 4 ( 4
+ +
< <

'

<here A F order of the fi"ter


EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 41
Vi Institute of Technology Dept. of ECE
!,#O"IT-$
1$ 0nitia"i)e the cutoff fre>uency& sam!"ing fre>uency and .rder of the fi"ter for "o*
!ass and high !ass fi"ter$ Then s!ecify the Pass %and and sto! fre>uency for %and
!ass L %and sto! fi"ter$
2$ Dec"are the five fi"ter ty!es ("o* !ass& high !ass& 3and !ass& 3and 8eVect& *ith
the a%ove s!ecification$
1$ -o* !ass F fdesign$"o*!ass(KA&fc?&A&,cut&,sam!
2$ (igh !ass F fdesign$high!ass(KA&fc?&A&,cut&,sam!
3$ 3and !ass F fdesign$%and!ass(\A&fc1&fc2\& A&,!ass& ,sto!&
,sam!
1$ 3and sto! F fdesign$%andsto!(\A&fc1&fc2\& A&,!ass& ,sto!&
,sam!
3$ S!ecify the *indo* ty!e to do the *indo* function $
i$ 3art"ett *indo* + d%art"ett
ii$ 3"ac;man *indo* + d%"ac;man
iii$ (amming *indo* + dhamming
iv$ (anning *indo* + dhann
v$ 2aiser *indo* + d;aiser
vi$ 8ectangu"ar *indo* + drect*in
vii$ Triangu"ar *indo* + dtriang
1$ Then use the Kfvtoo"? for dis!"ay the fi"ter res!onse out!uts (fvtoo" R fi"ter
visua"i)ation too"$
P"O#"!$H -200ing @in3o9
,o9 P2ss ilte1
c"ear a""D
,cut F 1000D
,sam! F 7'00D
A F 60D [ .rder of the fi"ter
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 4'
Vi Institute of Technology Dept. of ECE
dFfdesign$"o*!ass(\A&fc\&A&,cut&,sam!D
(dF*indo*(d&\*indo*\&dhammingD
fvtoo"((dD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 4&
Vi Institute of Technology Dept. of ECE
Si0ul2tion Output @in3o9
-igh P2ss ilte1
c"ear a""D
,cut F 1000D
,sam! F 7'00D
A F 60D [ .rder of the fi"ter
dF fdesign$high!ass(KA&fc?&A&,cut&,sam!
(dF*indo*(d&\*indo*\&dhammingD
fvtoo"((dD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 47
Vi Institute of Technology Dept. of ECE
Si0ul2tion Output @in3o9
/2n3 P2ss ilte1
,!ass F 1000D
,sto! F 2000D
A F 60D
f F fdesign$%and!ass(\A&fc1&fc2\& A&,!ass& ,sto!& ,sam!D
(e F *indo*(f&\*indo*\&dhammingD
fvtoo"((eD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 4=
Vi Institute of Technology Dept. of ECE
Si0ul2tion Output @in3o9
/2n3 Stop ilte1
,!ass F 1000D
,sto! F 2000D
A F 60D
f F fdesign$%and!ass(\A&fc1&fc2\& A&,!ass& ,sto!& ,sam!D
(e F *indo*(f&\*indo*\&dhammingD
fvtoo"((eD
Si0ul2tion Output @in3o9
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 4)
Vi Institute of Technology Dept. of ECE
"ESU,T
hus the ,08 fi"ters *ere designed using various *indo*ing techni>ues in M5T-53 and the
out!ut has %een verified$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 4*
Vi Institute of Technology Dept. of ECE
EX.NO:1( DESI#N O II" I,TE" USIN# $!T,!/
!I$
To *rite a M5T-53 !rogram to design 3utter*orth L Che%ychev "o* !ass& high !ass&
%and !ass and %and sto! digita" 008 fi"ter from the given s!ecifications$
T-EO"Y
The fi"ters designed %y considering a"" the infinite sam!"es of im!u"se res!onse are ca""ed
008 fi"ters$ 008 fi"ters are of recursive ty!e& *here%y the !resent out!ut sam!"e de!ends on
the !resent in!ut& !ast in!ut sam!"es and out!ut sam!"es$
!,#O"IT-$
1$ 0nitia"i)e the !ass %and ri!!"e& sto! %and attenuation and sam!"ing fre>uency$
2$ ,ind the fi"ter order& it de!ends on fi"ter design ty!e$
1$ 3utter*orth R %uttord
2$ Che%ychev1 R che%1ord
3$ Che%ychev2 R che%2ord
3$ S!ecify the fi"ter ty!e$
1$ 3utter*orth R %utter
2$ Che%ychev1 R che%y1
3$ Che%ychev2 R che%y2
1$ Dec"are the five fi"ter ty!es ("o* !ass& high !ass& 3and !ass& 3and 8eVect& *ith
the a%ove s!ecification$ 0t is on"y for %utter*orth fi"ter$
1$ I%& aJ F %utter(n& *n&\"o*\D
2$ I%& aJ F %utter(n& *n&?high?D
3$ I%& aJ F %utter(n& *n&\!ass%and\D
1$ I%& aJ F %utter(n& *n&\sto!\D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 4?
Vi Institute of Technology Dept. of ECE
'$ The Che%ychev fi"ter ty!e can %e dec"are as
1$ I%& aJ F che%y1(n&r!& *n&\"o*\
2$ I%& aJ F che%y1(n&r!& *n& ?high?
3$ I%& aJ F che%y1(n&r!& *n&\!ass%and\
1$ I%& aJ F che%y1(n&r!& *n&\sto!\
6$ Then use Kfvtoo"? for dis!"ay the fi"ter res!onse out!uts (fvtoo" R fi"ter
visua"i)ation too"$
P"O#"!$
[Design of 3utter*orth fi"ter
[ -o* Pass ,i"ter
r! F 3D [ !ass%and ri!!"e
rs F 60D [ sto!%and attenuation
fs F 20000D [ sam!"ing fre>uency
*! F 1200 4 10000D
*s F '000 4 10000D
In& *nJ F %uttord(*!& *s& r!& rsD
I%& aJ F %utter(n& *n&\"o*\D [ Ca"cu"ate fi"ter coefficients
fvtoo"(%& aD
SI$U,!TION OUTPUT @INDO@
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 44
Vi Institute of Technology Dept. of ECE
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1((
Vi Institute of Technology Dept. of ECE
O -I#- P!SS I,TE"
r! F 3D [ !ass%and ri!!"e
rs F 60D [ sto!%and attenuation
fs F 20000D [ sam!"ing fre>uency
*! F 1200 4 10000D
*s F '000 4 10000D
In& *nJ F %uttord(*!& *s& r!& rsD
I%& aJ F %utter(n& *n& \high\D [ Ca"cu"ate fi"ter coefficients
fvtoo"(%& aD
SI$U,!TION OUTPUT @INDO@
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1(1
Vi Institute of Technology Dept. of ECE
O /!ND P!SS I,TE"
r! F 3D [ !ass%and ri!!"e
rs F 60D [ sto!%and attenuation
fs F 20000D [ sam!"ing fre>uency
*! F I2'00 3'00J 4 10000D
*s F I2000 1000J 4 10000D
In& *nJ F %uttord(*!& *s& r!& rsD
I%& aJ F %utter(n& *n&\%and!ass\D [ Ca"cu"ate fi"ter coefficients
fvtoo"(%& aD
SI$U,!TION OUTPUT @INDO@
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1('
Vi Institute of Technology Dept. of ECE
O /!ND STOP I,TE"
r! F 3D [ !ass%and ri!!"e
rs F 60D [ sto!%and attenuation
fs F 20000D [ sam!"ing fre>uency
In& *nJ F %uttord(*!& *s& r!& rsD
I%& aJ F %utter(n& *n&\sto!\D [ Ca"cu"ate fi"ter coefficients
fvtoo"(%& aD
SI$U,!TION OUTPUT @INDO@
"ESU,T
Thus the M5T-53 !rograms for the design of 3utter*orth L Che%ychev -P,& (P,& 3P,
and 3S, *ere designed and a"so their magnitude res!onses has %een !"otted successfu""y$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1(&
Vi Institute of Technology Dept. of ECE
EX.NO:11 C!,CU,!TION O T O SI#N!,
!I$
To *rite a !rogram for ca"cu"ating ,ast ,ourier Transform of given in!ut signa" using
M5T-53 soft*are !ac;age$
T-EO"Y
T
The im!"ementation of D,T through digita" com!uters re>uires the memory to store #(n and
va"ues of coefficients <
;n
A
$ The amount of accessing and storing of data in com!utation is
direct"y !ro!ortiona" to the num%er of arithmetic o!erations invo"ved$ Therefore& for direct
com!utation of A+ !oint D,T the amount com!utation and com!utation time is !ro!ortiona"
to A
2
$ ,rom e>uation (1 o%serve that the direct ca"cu"ation of the D,T re>uires A
2
com!"e#
mu"ti!"ications and A (A+1 com!"e# additions$ Direct com!utation of D,T is %asica""y
inefficient& !rimari"y %ecause it does not e#!"oit the symmetry and !eriodicity !ro!erties of
the t*idd"e or !hase factor <
A
$
5s the va"ue of A increases& the direct com!utation of D,T %ecomes a time ta;ing and
com!"e# !rocess& *hich a"so "eads to very high memory ca!acity re>uirements$
The com!utationa""y efficient a"gorithms& ;no*n co""ective"y as ,ast ,ourier Transform
(,,T a"gorithms e#!"oit the symmetry and !eriodicity !ro!erties of the t*idd"e or !hase
factor <
A
$ 0n !articu"ar& these t*o !ro!erties are:
<
;GA42
A
F +<
;
A
<
;GA
A
F <
;
A
The ,,T is a method for com!uting the D,T *ith reduced num%er of ca"cu"ations$ The
com!utationa" efficiency is achieved if *e ado!t a divide and con>uer a!!roach$ This
a!!roach is %ased on the decom!osition of an A+ !oint D,T into sma""er D,Ts$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1(7
Vi Institute of Technology Dept. of ECE
0n an A+!oint se>uence& if A can %e e#!ressed as AF r
m
& then the se>uence can %e decimated
into r+ !oint se>uences$ ,or each r+ !oint se>uence& r+ !oint D,T can %e com!uted$ ,rom the
resu"ts of r+!oint D,T& r
2
+!oint D,Ts are com!uted$ ,rom the resu"ts of r
2
+!oint D,Ts& the r
3
+
!oint D,Ts are com!uted and so on& unti" *e get rm+!oint D,T$ 0n com!uting A+!oint D,T
%y this method a num%er of stages of com!utation *i"" %e m times$ The num%er is ca""ed
8adi# of the ,,T a"gorithm$
"!DIX H' T !,#O"I-$
,or !erforming radi#+2 ,,T& the va"ue of A shou"d %e such that& AF2
m
$ (ere the decimation
can %e !erformed m times& *here mF"og A$ 0n direct com!utation of A+!oint D,T& the tota"
num%er of com!"e# additions are A (A+1 and the tota" num%er of com!"e# mu"ti!"ications is
A
2
$ 0n radi#+2 ,,T& the tota" num%er of com!"e# additions are reduced to A$"og
2
A and tota"
num%er of com!"e# mu"ti!"ications are reduced to (A42$ "og
2
A$
DECI$!TION IN TI$E !,#O"IT-$
The D0T R,,T a"gorithm decom!ose the D,T %y se>uentia""y s!"itting #(n in time domain
into sets of sma""er and sma""er su%se>uences and then forms a *eighted com%ination of the
D,Ts of these se>uences$
DECI$!TION IN "ECUENCY !,#O"IT-$
The D0, R,,T a"gorithm decom!oses the D,T %y recursive"y s!"itting the se>uence
e"ements H (; in the fre>uency domain into sets of sma""er and sma""er su%se>uences$
C!,CU,!TION O $!#NITUDE !ND P-!SE "ESPONSE
Magnitude res!onse of H (;can %e o%tained as&
H (; F I H
8
(;J
2
G I H
0
(; J
2
Phase res!onse of H (; can %e o%tained as&
H(; F tan
R1
I H
0
(; 4 H
8
(; J

EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1(=
Vi Institute of Technology Dept. of ECE
!,#O"IT-$
1$ 0nitia"i)e the varia%"e KHn?$ Then find the "ength of the in!ut se>uence (Hn and
store the va"ue into varia%"e KA?$ 0t is the ,,T order (1& /& 16& _$$ !oint fft$
2$ ,ind the ,,T for the given in!ut se>uence and use the function Jfft %Xn< N+K. N
refers the order of ,,T$
3$ The ,,T out!ut is in com!"e# form& so the out!ut contains 8ea" and 0maginary
va"ues$ 9se ste0 %1e2l%:++ to !"ot 8ea" va"ues and ste0%i02g%:++ is used to !"ot
the imaginary va"ues$
1$ Then use the su%!"ot and stem function to dis!"ay the in!ut and out!ut in a sing"e
gra!h *indo*$ 7"se use figure( function to dis!"ay the in!ut L out!ut in
se!arate *indo*$
'$ The tit"e function is used to give the name to the *aveform$
6$ The #"a%e" L y"a%e" is used to find the unit for # L y a#is$
P"O#"!$
[ 0""ustration of fft Com!utation
c"ear a""D
Hn F I1& 1& 0& 0JD
A F "ength (HnD
# F fft (Hn& AD
su%!"ot(2&2&1D
stem(HnD
tit"e(\0n!ut se>uence \D
#"a%e"(\-ength of 0n!ut Se>uence\D
y"a%e"(\0n!ut Ba"ues\D
su%!"ot(2&2&2D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1()
Vi Institute of Technology Dept. of ECE
stem(rea"(#D
tit"e(\.ut!ut rea" se>uence \D
#"a%e"(\8ea" .ut!ut -ength\D
y"a%e"(\8ea" Ba"ues\D
su%!"ot(2&2&3D
stem(imag(#D
tit"e(\.ut!ut imag se>uence \D
#"a%e"(\0mag .ut!ut -ength\D
y"a%e"(\0mag Ba"ues\D
INPUT
7nter the in!ut se>uence : 1& 1& 0& 0
OUTPUT
8ea" .ut!ut F 2 1 0 1
0maginary .ut!ut F 0 +1 0 1
"ESU,T
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1(*
Vi Institute of Technology Dept. of ECE
Thus the ca"cu"ation of ,ast ,ourier Transform of in!ut signa" *as verified and 8ea" L
imaginary va"ues are !"otted$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1(?
Vi Institute of Technology Dept. of ECE
EX.NO:1' DECI$!TION /Y PO,YP-!SE DECO$POSITION
!I$
To !erform Decimation %y !o"y!hase decom!osition of the given in!ut signa" using
M5T-53 soft*are !ac;age$
T-EO"Y
Do9n s20pling
The !rocess of reducing the sam!"ing rate of a signa" is ca""ed decimation (Sam!"ing rate
com!ression$ Decimation is a"so ;no*n as do*n sam!"ing$
The decimated signa" is given %y
y (nF #(Mn & *here M %e the integer sam!"ing rate reduction factor$
The genera" re!resentation of decimation !rocess can %e
# (n *(n y(n
, , , ,
1
F,4M
Decimator
!,#O"IT-$
1$ Start the !rogram$
2$ 0nitia"i)e the Decimation factor va"ue (M$
3$ 9se the firdecim function to decimate the in!ut signa" using fir fi"ter$
1$ 9se the sam!"ing fre>uency and in!ut fre>uency to generate the in!ut signa"$
Aum%er of sam!"e va"ue is 200$
'$ Then a!!"y the in!ut signa" L firdecim out!ut to fi"ter$ This is to reduce the
sam!"ing rate de!ends on decimation factor va"ue$
6$ ,ina""y dis!"ay the in!ut and out!ut signa"
P"O#"!$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1(4
h &n) $
Vi Institute of Technology Dept. of ECE
M F 2D [ decimation factor
(m F mfi"t$firdecim(MD [ fir decimation using !o"y!hase method
,sam! F 1/000D [ sam!"ing fre>uency
,in F 1000D [0n!ut ,re>uency
Asam! F 200D
A F 0 : (Asam! + 1D
Hn F sin(2 = !i = (,in 4 ,sam! = AD
Cn F fi"ter((m& HnD
su%!"ot(2& 1& 1D
stem(Hn(1:1/D
tit"e(\1/2() in!ut Sinusoida" Signa"\D
su%!"ot(2&1&2D
stem(Cn(13 : 36D
tit"e(\Decimated .ut!ut Signa"\D
OUTPUT
"ESU,T
Thus the Decimation %y !o"y!hase decom!osition of the given in!ut signa" has %een
!erformed$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 11(
Vi Institute of Technology Dept. of ECE
Practical Implementation of Z-
Transform of 1
st
& 2
nd
Order RC Low
Pass Filters in Matlab & !P Processor
"eri#ation$ Matlab !im%lin& Modelin'$
C Pro'rams For TM!(2)C*+1( Trainer,
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 111
Vi Institute of Technology Dept. of ECE
P"!CTIC!, DE$ONST"!TION O AHT"!NSO"$ "C I,TE"
%"C i1st O13e1 B Secon3 O13e1 ,o9 P2ss ilte1+
0t is !ro!osed to deve"o! a mathematica" mode" of first and second order "o* !ass 8C
fi"ter in S transform and e transform on a M5T-53 !"atform and im!"ement the same using
DSP Processor (TMS320C6713 Trainer$
E:20ple 1
$2the02tic2l C2lcul2tions fo1 i1st o13e1 "C ,o9 P2ss ilte1
"
0
1
P
%V +
out C
"oo!1
V
in
5!!"ying 2B- to the "oo!:
V t I t R
C
I t d t
i n
( ( ( +

1
Ao*& re>uired out!ut vo"tage is the vo"tage across the ca!acitor& so
V t
C
I t d t
o u t
( (

1
5!!"ying -a!"ace transform for (1
V S I S R
I S
S C
i n
( (
(
+
V S I S R
S C
i n
( ( +

1
]
1
1
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 11'
Vi Institute of Technology Dept. of ECE
5!!"ying -a!"ace transform for (2
V S
I S
S C
o u t
(
(

V S
V S
I S S C
I S R
S C
o u t
i n
(
(
( 4
(

1
]
1
1

+
1
1
S C
R S C 4

_
,

1
1
4 S C
S S R
C

_
,

+
1
1
1
1
4 4
( 4
C
R S
C R
C R
S C R
-et a F
1
R C
Therefore
V
V
a
S a
o u t
i n

+
<e ;no* 8C
R C
f c

1
2
<here
fC is the 3 d3 cut+off fre>uency 3
The e transform is needed for digita" fi"tering as given %y ) F eST & *hich *e ta;e& in a
sim!"ified form as

s !

1
1
in terms of s the a%ove e>uation can %e re!resented as
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 11&
Vi Institute of Technology Dept. of ECE
S
"
!



1
1
T is the time %et*een sam!"es of in!ut signa"$
Ao*
V
V
a
s a
a

!
a
o u t
i n

+

_
,
+

1
1

a
a !
!
( 1
1

+

a !
a ! ( 1
1

+
+

_
,

a !
a !

a !
( 1 1
1
1

_
,

a ! a !

a !
4 ( 1
1
1
1
0n e>uation (1
-et
#
a !
a !
$
a !

+

+ 1
1
1
D
Therefore the e>uation (1 %ecomes
V "
V "
#
$ "
i
0
1
1
(
(


.n sim!"ifying the a%ove e>uation *e get
V " # V " $ V " "
O % ! i n O % !
( ( ( +
1
0n terms of sam!"es&
V n # V n $ V n
i 0 0
1 ( ( ( +
%ecause e
+1
means one sam!"e de"ay$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 117
Vi Institute of Technology Dept. of ECE
The e>uation can %e rea"i)ed as sho*n %e"o* resu"ting in a sim!"e "o* !ass im!"ementation
$2gnitu3e B 1eFuency "esponse
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 11=
Vi Institute of Technology Dept. of ECE
E:20ple
"e2liP2tion in $2tl2>6Si0ulin8
<e can rea"i)e the diagram given a%ove in Simu"in;$
-et the sam!"ing ,re>uency %e 10000()
Therefore sam!"ing time T F 100fs
-et cut off fre>uency fc %e '00()
8C F 142fc F 14(2 # '00 F 0$00031/
0f 8 F 1; then C F 3$1/:,
a F 148C F 2fc F 3111$6'
2 F aT4(1 G aT F 0$23@23
M F 14(1GaT F 0$76076'
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 11)
Vi Institute of Technology Dept. of ECE
The input 2n3 output 92;efo10s fo1 '&=-P input sign2l
The input 2n3 output 92;efo10s fo1 7((-P input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 11*
Vi Institute of Technology Dept. of ECE
The input 2n3 output 92;efo10s fo1 =((-P %cut.off 1eFuency+ input sign2l
The input 2n3 output 92;efo10s fo1 ?((-P input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 11?
Vi Institute of Technology Dept. of ECE
P"!CTIC!, I$P,E$ENT!TION O I"ST O"DE" "C I,TE" %II" ilte1+
O/NECTIVE
To im!"ement the first order fi"ters on a DSP Target and to verify and com!are their
attenuation "eve"s on the in!ut signa"$
TOO,S USED
-!"D@!"E
.ne TMS320C6713 DSP %ased deve"o!ment %oard (Mode" Aum%er: BS2 R 6713
.ne ,unction 6enerator and one C8.
.ne PC
SOT@!"E
Code Com!oser Studio 0D7
Bi De%ugger for BS2+ 6713
,!N#U!#ES USED
C& 5ssem%"y
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 114
Vi Institute of Technology Dept. of ECE
I$P,E$ENT!TION
The im!"ementation is done using a C !rogram *hich reads the in!ut sam!"es from the 5DC
channe"& !erforms first order fi"tering and sends the out!ut to the D5C channe"$ 5DC
channe" 1 is used for the in!ut$ The sam!"ing fre>uency and the cut R off fre>uency for the
fi"ters have to %e s!ecified %y the user in the !rogram$ 5 de"ay is used in the !rogram& *hich
matches the rate at *hich the 5DC sam!"es are read %y the !rogram *ith the sam!"ing
fre>uency set %y the user in the !rogram$ The fina" fi"ter e>uations derived ear"ier and given
%e"o* are im!"emented in the !rogram$
The !rogram is *ritten and com!i"ed using the Code Com!oser Studio 0D7$ 0t is then
converted and do*n"oaded into the %oard through the on R %oard seria" !ort& *hich su!!orts
the 8S R 232 seria" interfaces$ The 5DC and D5C are connected through a !ara""e" interface
*ith the CP-D *hich is in R turn interfaced *ith the C6713 DSP$ The CP-D in this case is
used for the chi! se"ection& channe" se"ection and data transfer$ This is achieved using a
!rogram& *hich is stored in the CP-D$ This !rogram e#ecutes continuous"y inside the CP-D
*hen the %oard is !o*ered on$ The user cannot a"ter this !rogram$
UNCTION!, /,OC5 DI!#"!$
CP,D
D!C !DC
T$S&'(C)*1& DSP
SE"I!, PO"T
UNCTION
#ENE"!TO"
C"O
PC
Ch2nnel 1 Ch2nnel 1
P212llel Inte1f2ce P212llel Inte1f2ce
I,TE" SPECIIC!TION %Cutoff 1eFuency fc E =((-P+
-et the sam!"ing ,re>uency %e 10000()
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1'(
Vi Institute of Technology Dept. of ECE
Therefore sam!"ing time T F 100fs
-et cut off fre>uency fc %e '00()
8C F 142fc F 14(2 # '00 F 0$00031/
0f 8 F 1; then C F 3$1/:,
a F 148C F 2fc F 3111$6'
2 F aT4(1 G aT F 0$23@23
M F 14(1GaT F 0$76076'
P"O#"!$
"C i1st o13e1 ,o9 P2ss ilte1
Mdefine P0 3$11
Minc"ude Nstdio$hO
ty!edef unsigned int 9int32D
ty!edef short 0nt16D
ty!edef unsigned char 9char/D
int !o*erCa"c(int& intD
int main(void
P
9int32 =socBa"ueD
9int32 =adcBa"ueD
9int32 =dacBa"ueD
9int32 soc8eadD
9int32 countD
9int32 v.utD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1'1
Vi Institute of Technology Dept. of ECE
0nt16 adc.utD
0nt16 v0nD
0nt16 coeff2D
0nt16 coeffMD
f"oat aD
f"oat tSam!D
9int32 fre>Cut.ffD
9char/ ="edD
socBa"ue F (9int32 =0#@001000cD
adcBa"ue F (9int32 =0#@001000/D
dacBa"ue F (9int32 =0#@001000/D
"ed F (9char/ =0#@0010016D
v.ut F 0D
fre>Cut.ff F 1'00D
a F 2 = P0 = fre>Cut.ffD
tSam! F 0$0001D
coeff2 F (0nt16(((a = tSam! 4 (1 G (a = tSam! = !o*erCa"c(2& 1'D
coeffM F (0nt16((1 4 (1 G (a = tSam! = !o*erCa"c(2& 1'D
*hi"e(1
P
soc8ead F =socBa"ueD
adc.ut F =adcBa"ueD
adc.ut LF 0#0fffD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1''
Vi Institute of Technology Dept. of ECE
adc.ut UF 0#0/00D
44adc.ut +F 0#0/00D
v0n F adc.utD
v.ut F coeff2 = v0n G coeffM = v.utD
v.ut OOF 1'D
for(count F 0D count N 7'0D countGGD
44v.ut GF 0#0/00D
=dacBa"ue F v.utD
44=dacBa"ue F v0nD
Q
="ed F 1D
return 0D
Q
int !o*erCa"c(int %ase& int e#!
P
int !o*er.ut!utD
int countD
!o*er.ut!ut F 1D
for(count F 0D count N e#!D countGG
!o*er.ut!ut F !o*er.ut!ut = %aseD
return !o*er.ut!utD
Q
"e2l Ti0e Output Of 1
st
O13e1 "C lo9 p2ss filte1Q
1. The input 2n3 output 92;efo10s fo1 '&=-P input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1'&
Vi Institute of Technology Dept. of ECE
'. Output "esponse 92;efo10s fo1 7((-P input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1'7
Vi Institute of Technology Dept. of ECE
&. Output "esponse 92;efo10s fo1 =((-P %Cutoff f1eFuency+ input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1'=
Vi Institute of Technology Dept. of ECE
7. Output "esponse 92;efo10s fo1 *((-P input sign2l
=. Output "esponse 92;efo10s fo1 1(((-P input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1')
Vi Institute of Technology Dept. of ECE
1eFuency Vs Output Volt2ge
S$Ao ,re>uency(() .ut!ut vo"tage(B
1$
2$
3$
1$
'$
6$
7$
/$
@$
10$
11$
12$
13$
'0
100
1'0
200
23'
300
100
'00
600
700
/00
@00
1000
1$02
1$01
1$01
1$00
3$//
3$12
2$/2
2$61
2$30
2$0'
1$@1
1$7'
1$'6
#"!P-:
1
1(( '(( &(( 7(( =(( )(( *(( ?(( 4(( 1(((
'
&
7
=
)
O
u
t
p
u
t

V
o
l
t
2
g
e
%
V
+
1eFuency%-P+
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1'*
Vi Institute of Technology Dept. of ECE
E:20ple '
$2the02tic2l C2lcul2tions fo1 Secon3 O13e1 "C ,o9 P2ss ilte1
0ts !ro!osed to deve"o! a mathematica" mode" of 00 order 8C "o* !ass fi"ter in e transform
on M5T-53 simu"ation L im!"ement the same using DSP (TMS320C6713$
" "
0
1 '
1
in
V %V +
out '
C C
1
'
0
"oo!1 "oo!2
Then it is im!"emented in M5T-534S0M9-0A2 and further it is im!"emented in a DSP
Processor (TMS320C6713$
5!!"ying 2B- in "oo! 1:
V t I t R
C
I t I t d t
i n
( ( I ( ( J +
1 1
1
1 2
1
5!!"ying -a!"ace transform for the a%out e>uation&
V S I S R
S C
I S I S
i n
( ( I ( ( J +
1 1
1
1 2
1
V S I S R
S C
I S
S C
i n
( (
(
+

1
]
1

1 1
1
2
1
1
5!!"ying 2B- in "oo! 2
0
1 1
2 1 2 2
2
2
+ +

C
I t I t d t I t R
C
I t I ( ( J ( (
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1'?
Vi Institute of Technology Dept. of ECE
5!!"y "a!"ace Transform
0
1 1
2
1
2
2
1
1
+ +

1
]
1
I S
S C
R
S C
I S
S C
(
(
0
2 1
1
2 2
2
1


+ +
I S I S
S C
R I S
I S
S C
( (
(
(
I S
S C S C
R
S C
I S
1
1 1
2
2
2
1 1 (
( + +

1
]
1
Su%stitute (3 in (1 *e get
I S
S C
S C R
C
C
I S
1
1
1 2
1
2
2
1
(
( + +

1
]
1
V S S C R
C
C
R
S C
I S
I S
S C
i n
( (
(
+ +

_
,
+

_
,
1
1
1 2
1
2
1
1
2
2
1
+ + + + +

_
,
R S C R R
R C
C S C
R
S C
I S
I S
S C
1 1 1 2
1 1
2 1
2
2
2
2
1
1 1
(
(
+ + + + + +

_
,
R S C R R
R C
C S C
R
S C S C
I S
1 1 1 2
1 1
2 1
2
2 1
2
1 1 1
(
+ + + +

_
,
R S C R R
R C
C
R
S C
I S
1 1 1 2
1 1
2
2
2
2
1
(
V S
S R C S C C R R S R C S R C
S C
I S
i n
( (
+ + + +

1
]
1
1 2 1 2 1 2 1 1 2 2
2
2
1
Bout is the vo"tage across the ca!acitor C2
So
V t
C
I t d t
o u t
( (

1
2
2
5!!"ying "a!"ace transform
V S
I S
S C
o u t
(
(

2
2
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1'4
Vi Institute of Technology Dept. of ECE
Su%stitute (' in (1& *e get
( ) V S S R R S C C R R S R C S R C V S
i n o u t
( ( + + + +
1 2
2
1 2 1 2 1 1 2 2
1

+ + + +
V S
V S S C C R R S R R S R C S R C
o u t
i n
(
(
1
1
2
1 2 1 2 1 2 1 1 2 2
( ) ( )
V S
V S
R R C C S R C R C R C S
o u t
i n
(
(

+ + + +
1
1
1 2 1 2
2
1 1 1 2 2 2
5ssume 81 F 82 F 8 D C1 F C2 F CD

+ + + +
1
1
2 2 2
R C S R C R C R C S I J

+ +
1
3 1
2 2 2
S R C R C S
V
V S R C S R C
O % !
I N

+ +
1
3 1
2 2
( (

+ +

1
]
1
1
3 1
2 2
2
(
(
R C S
S
R C R C
5ssume a
R C
f c
1
2
fC is the 3 d3 cut+off fre>uency$
V
V
a
S S a a
O % !
I N

+ +

1
]
1
2
2 2
3
Su%stitute
S

!



1
1
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&(
Vi Institute of Technology Dept. of ECE
6enera" form is&
( )
V
V
a

!
a
!
a
o
i

_
,
+

+

2
1
2
1
1 3 1

+
+

+

a

!
a a
!
a
2
1 2
2
1
2
1 2 3 3

+ + +

a !
a ! a ! a a !
2 2
1 2 1 2
1 2 3 3 (

+ + + +

a !
a ! a ! a !
2 2
2 1 2
3 1 2 3 I ( J (
V
V
a !
a ! a !
a ! a !
a !
a ! a !

o
i

+ +
+ +

+
+ +

1
]
1
+

1
]
1
1
1
1

2 2
2 2
2 2
1
1 3
1
1 3
2 3
1 3
1
(
( (
5ssume #
a !
a ! a !

+ +
(
(
2
2
1 3
$
a !
a ! a !

+
+ +
2 3
1 3
2
(
&
a ! a !

+ +
1
1 3
2
(
V
V
#
& " $ "
O % !
I N

+
2 1
1
V & " V $ " V # V
O % ! O % ! O % ! I N

+
2 1
V # V V & " $ "
O % ! I N O % !


(
2 1
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&1
Vi Institute of Technology Dept. of ECE
0n terms of sam!"es&
V n # V n & V n $ V n
o i o o
( ( ( ( + 2 1
This can %e rea"i)ed as sho*n %e"o*
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&'
Vi Institute of Technology Dept. of ECE
E:20ple
"e2liP2tion in $2tl2>6Si0ulin8
<e can rea"i)e the diagram given a%ove in Simu"in;$
-et the sam!"ing ,re>uency ,s %e 10000()
Therefore sam!"ing time T F 100fs
-et cut off fre>uency fc %e '00()
8C F 142fc F 14(2 # '00 F 0$00031/
0f 8 F 1; then C F 3$1/:,
a F 148C F 2fc F 3111$6'
#
a !
a ! a !

+ +

(
(
$
2
2
1 3
0 0 6 6 1
$
a !
a ! a !

+
+ +

2 3
1 3
1 3 6 2 6
2
(
$
&
a ! a !

+ +

1
1 3
0 1 2 / 7 6
2
(
$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&&
Vi Institute of Technology Dept. of ECE
Input 2n3 output 92;efo10s 2t '&=-P input sign2l
Input 2n3 output 92;efo10s 2t 7((-P input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&7
Vi Institute of Technology Dept. of ECE
Input 2n3 output 92;efo10s 2t the =((-P %cut.off f1eFuency+ input sign2l
Input 2n3 output 92;efo10s 2t the ?((-P input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&=
Vi Institute of Technology Dept. of ECE
I,TE" SPECIIC!TION %Cutoff 1eFuency fc E =((-P+
-et the sam!"ing ,re>uency ,s %e 10000()
Therefore sam!"ing time T F 100fs
-et cut off fre>uency fc %e '00()
8C F 142fc F 14(2 # '00 F 0$00031/
0f 8 F 1; then C F 3$1/:,
a F 148C F 2fc F 3111$6'
#
a !
a ! a !

+ +

(
(
$
2
2
1 3
0 0 6 6 1
$
a !
a ! a !

+
+ +

2 3
1 3
1 3 6 2 6
2
(
$
&
a ! a !

+ +

1
1 3
0 1 2 / 7 6
2
(
$
P"O#"!$
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&)
Vi Institute of Technology Dept. of ECE
"C Secon3 o13e1 ,o9 P2ss ilte1
Mdefine P0 3$11
Minc"ude Nstdio$hO
ty!edef unsigned int 9int32D
ty!edef short 0nt16D
ty!edef unsigned char 9char/D
int !o*erCa"c(int& intD
int main(void
P
9int32 =socBa"ueD
9int32 =adcBa"ueD
9int32 =dacBa"ue1D
9int32 soc8eadD
9int32 countD
9int32 v.utSecondD
9int32 v.utSecond2D
0nt16 adc.utD
0nt16 v0nD
0nt16 second2D
0nt16 secondMD
0nt16 second-D
f"oat aD
f"oat tSam!D
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&*
Vi Institute of Technology Dept. of ECE
f"oat mTermD
9int32 fre>Cut.ffD
9char/ ="edD
socBa"ue F (9int32 =0#@001000cD
adcBa"ue F (9int32 =0#@001000/D
dacBa"ue1 F (9int32 =0#@001000/D
"ed F (9char/ =0#@0010016D
v.utSecond F 0D
v.utSecond2 F 0D
fre>Cut.ff F '00D
a F 2 = P0 = fre>Cut.ffD
tSam! F 0$0001D
mTerm F a = tSam!D
second2 F (0nt16(((mTerm = mTerm 4 (1 G (3 = mTerm G (mTerm = mTerm =
!o*erCa"c(2& 12D
secondM F (0nt16(((2 G (3 = mTerm 4 (1 G (3 = mTerm G (mTerm = mTerm =
!o*erCa"c(2& 12D
second- F (0nt16((1 4 (1 G (3 = mTerm G (mTerm = mTerm = !o*erCa"c(2& 12D
*hi"e(1
P
soc8ead F =socBa"ueD
adc.ut F =adcBa"ueD
adc.ut LF 0#0fffD
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&?
Vi Institute of Technology Dept. of ECE
adc.ut UF 0#0/00D
44adc.ut +F 0#0/00D
v0n F adc.utD
v.utSecond F (second2 = v0n G (secondM = v.utSecond + (second- = v.utSecond2D
v.utSecond OOF 12D
v.utSecond2 F v.utSecondD
for(count F 0D count N 1000D countGGD
44v.ut GF 0#0/00D
44=dacBa"ue1 F v0nD
=dacBa"ue1 F v.utSecondD
="ed F 1D
Q
Q
int !o*erCa"c(int %ase& int e#!
P
int !o*er.ut!utD
int countD
!o*er.ut!ut F 1D
for(count F 0D count N e#!D countGG
!o*er.ut!ut F !o*er.ut!ut = %aseD
return !o*er.ut!utD
Q
"e2l Ti0e Output Of '
n3
O13e1 "C lo9 p2ss filte1
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 1&4
Vi Institute of Technology Dept. of ECE
1. The input 2n3 output 92;efo10s fo1 '&=-P input sign2l
'. The input 2n3 output 92;efo10s fo1 &((-P input sign2l

&. Output "esponse 92;efo10s fo1 7((-P input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 17(
Vi Institute of Technology Dept. of ECE
7. Output "esponse 92;efo10s fo1 =((-P%Cutoff f1eFuency+ input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 171
Vi Institute of Technology Dept. of ECE
=. Output "esponse 92;efo10s fo1 *((-P input sign2l
). Output "esponse 92;efo10s fo1 1(((-P input sign2l
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 17'
Vi Institute of Technology Dept. of ECE
1eFuency Vs Output Volt2ge
S$Ao ,re>uency(() .ut!ut vo"tage(B
1$
2$
3$
1$
'$
6$
7$
/$
@$
10$
11$
12$
'0
100
1'0
23'
300
100
'00
600
700
/00
@00
1000
1$0'
1$01
1$03
1$01
3$71
3$3'
3$0'
2$6@
2$3/
2$21
2$01
1$/1
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 17&
Vi Institute of Technology Dept. of ECE
#"!P-:
1(( '(( &(( 7(( =(( )(( *(( ?(( 4(( 1(((
1eFuency %-P+
O
u
t
p
u
t

V
o
l
t
2
g
e
%
V
+
&
'.=
'
1.=
1
(.=
&.=
7
7.=
=
E:pe1i0ent2l Setup %VS5 . )*1& 5it+
EC'&().DI#IT!, SI#N!, P"OCESSIN# ,!/ 177

You might also like