Aim Theory Procedure
Aim Theory Procedure
AIM:
To find circular convolution of two sequence by TMS320C6713 DSP it usin! code co"#oser studio
REQUIREMENT
CCS v 3$3
TMS320C6713 KIT
%S& Cable
'( )da#ter
Circular convolution b conc!ntric circl! "!t#o$:
1$ *ra#+ , sa"#les of -1.n/ as equally s#aced #oints around an outer circle in counter clocwise direction$
2$ Start at t+e sa"e #oint as -1.n/ !ra#+ , sa"#les of -2.n/ as equally s#aced #oints around an inner circle in
clocwise direction
3$ Multi#ly corres#ondin! sa"#les on t+e 2 circles and su" t+e #roducts to #roduce out#ut
0$ 1otate t+e inner circle one sa"#le at a ti"e in counter clocwise direction$ )nd !oto to ste#3 to obtain ne-t value
of out#ut$
'$ 1e#eat ste# 0 until t+e inner circle 1
st
sa"#le lines u# wit+ t+e 1
st
sa"#le on e-terior circle once a!ain$
%R&CE'URE:
2#en Code Co"#oser Studio3 "ae sure t+e DSP it is turned on$
Start a new #ro4ect usin! 5Pro4ect6new 5 #ull down "enu3 save it in a se#arate directory.c78ti8"y#ro4ects/ wit+
na"e cir conv()*t(
)dd t+e source files Circular Convolution(C to t+e #ro4ect usin! 5Pro4ect add files to #ro4ect9 #ull down "enu$
)dd t+e liner co""and file #!llo(c"$ $.Pat+7 c78ti8tutorial8ds67138+ello18+ello$c"d/
)dd t+e run ti"e su##ort library file rt+6700(lib .Pat+7 c78ti8c60008c!tools8lib8rts6700$lib/
Co"#ile t+e #ro!ra" usin! t+e 5Pro4ect6co"#ile9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side
of #ro!ra" window$
&uild t+e #ro!ra" usin! t+e 5Pro4ect6&uild9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side of
#ro!ra" window$
:oad t+e #ro!ra".cir conv$out/ in #ro!ra" "e"ory of DSP c+i# usin! t+e 5;ile6load #ro!ra"9 #ull down "enu$
C&NC,USI&N
T+us t+e circular convolution out#ut sequence is obtained usin! DSP c+i# TMS320C6713 usin!
code co"#oser studio
AUTOCORRELATION
AIM
To #erfor" t+e Auto Corr!lation of a !iven discrete sequence inTMS320C6713 KIT(
REQUIREMENT
CCS v 3$3
TMS320C6713 KIT
%S& Cable
'( )da#ter
T-E&R.
Auto corr!lation is t+e cross correlation of a si!nal wit+ itself$ <nfor"ally3 it is t+e si"ilarity between observations as a
function of t+e ti"e se#aration between t+e"$ <t is a "at+e"atical tool for findin! re#eatin! #atterns3 suc+ as t+e #resence
of a #eriodic si!nal w+ic+ +as been buried under noise3 or identifyin! t+e "issin! funda"ental frequency in a si!nal
i"#lied by its +ar"onic frequencies$ <t is often used in si!nal #rocessin! for analy=in! functions or series of values3 suc+
as ti"e do"ain si!nals$
<n an autocorr!lation3 w+ic+ is t+e cross6correlation of a si!nal wit+ itself3 t+ere will always be a #ea at a la! of =ero
unless t+e si!nal is a trivial =ero si!nal$
*iven a si!nal f (t) 3 t+e continuous autocorr!lation R ff (T) is "ost often defined as t+e continuous cross6correlation
inte!ral of wit+ itself3 at la! $
w+ere f re#resents t+e co"#le- con4u!ate and re#resents convolution$ ;or a real function3 f =f $
%R&CE'URE:
2#en Code Co"#oser Studio3 "ae sure t+e DSP it is turned on$
Start a new #ro4ect usin! 5Pro4ect6new 5 #ull down "enu3 save it in a se#arate directory.c78ti8"y#ro4ects/ wit+
na"e autocorr()*t(
)dd t+e source files autocorr(C to t+e #ro4ect usin! 5Pro4ect add files to #ro4ect9 #ull down "enu$
)dd t+e liner co""and file #!llo(c"$ $.Pat+7 c78ti8tutorial8ds67138+ello18+ello$c"d/
)dd t+e run ti"e su##ort library file rt+6700(lib .Pat+7 c78ti8c60008c!tools8lib8rts6700$lib/
Co"#ile t+e #ro!ra" usin! t+e 5Pro4ect6co"#ile9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side
of #ro!ra" window$
&uild t+e #ro!ra" usin! t+e 5Pro4ect6&uild9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side of
#ro!ra" window$
:oad t+e #ro!ra".autocorr$out/ in #ro!ra" "e"ory of DSP c+i# usin! t+e 5;ile6load #ro!ra"9 #ull down "enu$
C&NC,USI&N
T+us t+e autocorrelation out#ut sequence is obtained usin! DSP c+i# TMS320C6713 usin! code
co"#oser studio
CROSS CORRELATION
AIM
To #erfor" t+e Cro++ Corr!lation o/ t0o 1iv!n $i+cr!t! +!2u!nc! in TMS320C6713 3it$
REQUIREMENT
CCS v3$3
TMS320C6713 KIT
%S& Cable
'( )da#ter
T-E&R.
<n si!nal #rocessin!3 cro++4corr!lation is a "easure of si"ilarity of two wavefor"s as a function of a ti"e6la! a##lied to
one of t+e"$ T+is is also nown as a slidin! dot #roduct or slidin! inner6#roduct$ <t is co""only used for searc+in! a
lon!6duration si!nal for a s+orter3 nown feature$ <t also +as a##lications in #attern reco!nition3 sin!le #article analysis3
electron to"o!ra#+ic avera!in!3 cry#tanalysis3 and neuro#+ysiolo!y$
;or continuous functions3 f and !3 t+e cro++4corr!lation is defined as>7
?+ere f @ denotes t+e co"#le- con4u!ate of f$
Si"ilarly3 for discrete functions3 t+e cro++4corr!lation is defined as7
T+e cro++4corr!lation is si"ilar in nature to t+e convolution of two functions$
ss
<n an auto corr!lation3 w+ic+ is t+e cro++4corr!lation of a si!nal wit+ itself3 t+ere will always be a #ea at a la! of =ero
unless t+e si!nal is a trivial =ero si!nal$
%R&CE'URE:
2#en Code Co"#oser Studio3 "ae sure t+e DSP it is turned on$
Start a new #ro4ect usin! 5Pro4ect6new 5 #ull down "enu3 save it in a se#arate directory.c78ti8"y#ro4ects/ wit+
na"e cro++corr()*t(
)dd t+e source files Cro++corr(C to t+e #ro4ect usin! 5Pro4ect add files to #ro4ect9 #ull down "enu$
)dd t+e liner co""and file #!llo(c"$ $.Pat+7 c78ti8tutorial8ds67138+ello18+ello$c"d/
)dd t+e run ti"e su##ort library file rt+6700(lib .Pat+7 c78ti8c60008c!tools8lib8rts6700$lib/
Co"#ile t+e #ro!ra" usin! t+e 5Pro4ect6co"#ile9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side
of #ro!ra" window$
&uild t+e #ro!ra" usin! t+e 5Pro4ect6&uild9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side of
#ro!ra" window$
:oad t+e #ro!ra".crosscorr$out/ in #ro!ra" "e"ory of DSP c+i# usin! t+e 5;ile6load #ro!ra"9 #ull down "enu$
C&NC,USI&N
T+us t+e crosscorrelation out#ut sequence is obtained usin! DSP c+i# TMS320C6713 usin! code
co"#oser studio
GENERATION OF SQUARE WAVE
AIM
To *enerate a S2uar! 0av! /or" u+in1 TMS320C6713 'S% KIT$
REQUIREMENT
CCS v0
TMS320C6713 KIT
%S& Cable
'( )da#ter
T-E&R.
S2uar! 0av!+ +ave an interestin! "i- of #ractice and t+eory$ <n #ractice3 t+ey are e-tre"ely si"#le$ <n t+eir si"#lest
for"3 t+ey consist of an alternatin! sequence of a"#litudesA e$!$ +i!+Blow or 1>s and 0>s$
T+e sa"e +i!+ B low lo!ic +ere we i"#lented in e-#eri"ent$ ;or #articular duration t+e +i!+ state is out 3 t+en low state is
out$ ;inally square wave is !enerated and #lotted in code co"#oser studio *ra#+$
%R&CE'URE:
2#en Code Co"#oser Studio3 "ae sure t+e DSP it is turned on$
Start a new #ro4ect usin! 5Pro4ect6new 5 #ull down "enu3 save it in a se#arate directory.c78ti8"y#ro4ects/ wit+
na"e +2uar!()*t(
)dd t+e source files +2uar!(C to t+e #ro4ect usin! 5Pro4ect add files to #ro4ect9 #ull down "enu$
)dd t+e liner co""and file #!llo(c"$ $.Pat+7 c78ti8tutorial8ds67138+ello18+ello$c"d/
)dd t+e run ti"e su##ort library file rt+6700(lib .Pat+7 c78ti8c60008c!tools8lib8rts6700$lib/
Co"#ile t+e #ro!ra" usin! t+e 5Pro4ect6co"#ile9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side
of #ro!ra" window$
&uild t+e #ro!ra" usin! t+e 5Pro4ect6&uild9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side of
#ro!ra" window$
:oad t+e #ro!ra".square$out/ in #ro!ra" "e"ory of DSP c+i# usin! t+e 5;ile6load #ro!ra"9 #ull down "enu$
C&NC,USI&N
T+us a square wave is !enerated usin! DSP c+i# TMS320C6713 usin! code co"#oser studio
LINEAR CONVOLUTION
AIM
To #erfor" t+e ,in!ar Convolution of two !iven discrete sequence inTMS320C6713 KIT$
REQUIREMENT
CCS v0
TMS320C6713 KIT
%S& Cable
'( )da#ter
T-E&R.
Convolution is a for"al "at+e"atical o#eration3 4ust as "ulti#lication3 addition3 and inte!ration$ )ddition taes two
nu"bers and #roduces a t+ird nu"ber3 w+ile convolution taes two si!nals and #roduces a t+ird si!nal$ Convolution is
used in t+e "at+e"atics of "any fields3 suc+ as #robability and statistics$ <n linear syste"s3 convolution is used to
describe t+e relations+i# between t+ree si!nals of interest7 t+e in#ut si!nal3 t+e i"#ulse res#onse3 and t+e out#ut si!nal$
<f t+e in#ut and i"#ulse res#onse of a syste" are -CnD and +CnD res#ectively3 t+e convolution is !iven by t+e e-#ression3
56n7 8 #6n7 9 : 5637 #6n437
?+ere ran!es between 6E and E
<f3 -.n/ is a M6 #oint sequence
+.n/ is a , F #oint sequence
t+en3 y.n/ is a .MG,61/ F #oint sequence$
<n t+is equation3 -./3 +.n6/ and y.n/ re#resent t+e in#ut to and out#ut fro" t+e syste" at ti"e n$ Here we could see t+at
one of t+e in#uts is s+ifted in ti"e by a value every ti"e it is "ulti#lied wit+ t+e ot+er in#ut si!nal$ :inear Convolution is
quite often used as a "et+od of i"#le"entin! filters of various ty#es$
%R&CE'URE:
2#en Code Co"#oser Studio3 "ae sure t+e DSP it is turned on$
Start a new #ro4ect usin! 5Pro4ect6new 5 #ull down "enu3 save it in a se#arate directory.c78ti8"y#ro4ects/ wit+
na"e lconv()*t(
)dd t+e source files ,in!arConvolution(C to t+e #ro4ect usin! 5Pro4ect add files to #ro4ect9 #ull down "enu$
)dd t+e liner co""and file #!llo(c"$ $.Pat+7 c78ti8tutorial8ds67138+ello18+ello$c"d/
)dd t+e run ti"e su##ort library file rt+6700(lib .Pat+7 c78ti8c60008c!tools8lib8rts6700$lib/
Co"#ile t+e #ro!ra" usin! t+e 5Pro4ect6co"#ile9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side
of #ro!ra" window$
&uild t+e #ro!ra" usin! t+e 5Pro4ect6&uild9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side of
#ro!ra" window$
:oad t+e #ro!ra".lconv$out/ in #ro!ra" "e"ory of DSP c+i# usin! t+e 5;ile6load #ro!ra"9 #ull down "enu$
C&NC,USI&N
T+us t+e linear convolution out#ut sequence is obtained usin! DSP c+i# TMS320C6713 usin!
code co"#oser studio
DFT
AIM
To #erfor" t+e ; )oint '<T )roc!++ /ro" a 1iv!n $i+cr!t! +!2u!nc! in TMS320C6713 KIT$
REQUIREMENT
CCS v3$3
TMS320C6713 KIT
%S& Cable
'( )da#ter
T-E&R.
T+e sequence of , co"#le- nu"bers -03 $$$3 -,I1 is transfor"ed into anot+er sequence of , co"#le- nu"bers accordin!
to t+e '<T for"ula
<t transfor"s one function into anot+er3 w+ic+ is called t+e frequency do"ain re#resentation3 or si"#ly t+e '<T3 of t+e
ori!inal function .w+ic+ is often a function in t+e ti"e do"ain/$
T+e '<T requires an in#ut function t+at is discrete$ Suc+ in#uts are often created by sa"#lin! a continuous function3 suc+
as a #erson>s voice$ T+e discrete in#ut function "ust also +ave a li"ited .finite/ duration3 suc+ as one #eriod of a #eriodic
sequence or a windowed se!"ent of a lon!er sequence$ %nlie t+e discrete ti"e ;ourier transfor" .'T<T/3 t+e '<T only
evaluates enou!+ frequency co"#onents to reconstruct t+e finite se!"ent t+at was analy=ed$ T+e inverse '<T cannot
re#roduce t+e entire ti"e do"ain3 unless t+e in#ut +a##ens to be #eriodic$ T+erefore it is often said t+at t+e '<T is a
transfor" for ;ourier analysis of finite6do"ain discrete6ti"e functions$
%R&CE'URE:
2#en Code Co"#oser Studio3 "ae sure t+e DSP it is turned on$
Start a new #ro4ect usin! 5Pro4ect6new 5 #ull down "enu3 save it in a se#arate directory.c78ti8"y#ro4ects/ wit+
na"e $/t()*t(
)dd t+e source files $/t(C to t+e #ro4ect usin! 5Pro4ect add files to #ro4ect9 #ull down "enu$
)dd t+e liner co""and file #!llo(c"$ $.Pat+7 c78ti8tutorial8ds67138+ello18+ello$c"d/
)dd t+e run ti"e su##ort library file rt+6700(lib .Pat+7 c78ti8c60008c!tools8lib8rts6700$lib/
Co"#ile t+e #ro!ra" usin! t+e 5Pro4ect6co"#ile9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side
of #ro!ra" window$
&uild t+e #ro!ra" usin! t+e 5Pro4ect6&uild9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side of
#ro!ra" window$
:oad t+e #ro!ra".dft$out/ in #ro!ra" "e"ory of DSP c+i# usin! t+e 5;ile6load #ro!ra"9 #ull down "enu$
C&NC,USI&N
T+us t+e D;T out#ut sequence is obtained usin! DSP c+i# TMS320C6713 usin! code co"#oser
studio
IDFT
AIM
To #erfor" t+e I'<T fro" a !iven discrete sequence in TMS320C6713 KIT$
REQUIREMENT
CCS v3$3
TMS320C6713 KIT
%S& Cable
'( )da#ter
T-E&R.
T+e inverse '<T of an ,6#oint sequence J./ 3 K 0313 23 $ $ $ $ $3 ,61 is defined as
%R&CE'URE:
2#en Code Co"#oser Studio3 "ae sure t+e DSP it is turned on$
Start a new #ro4ect usin! 5Pro4ect6new 5 #ull down "enu3 save it in a se#arate directory.c78ti8"y#ro4ects/ wit+
na"e I$/t()*t(
)dd t+e source files I'<T(C to t+e #ro4ect usin! 5Pro4ect add files to #ro4ect9 #ull down "enu$
)dd t+e liner co""and file #!llo(c"$ $.Pat+7 c78ti8tutorial8ds67138+ello18+ello$c"d/
)dd t+e run ti"e su##ort library file rt+6700(lib .Pat+7 c78ti8c60008c!tools8lib8rts6700$lib/
Co"#ile t+e #ro!ra" usin! t+e 5Pro4ect6co"#ile9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side
of #ro!ra" window$
&uild t+e #ro!ra" usin! t+e 5Pro4ect6&uild9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side of
#ro!ra" window$
:oad t+e #ro!ra".<dft$out/ in #ro!ra" "e"ory of DSP c+i# usin! t+e 5;ile6load #ro!ra"9 #ull down "enu$
C&NC,USI&N
T+us t+e <D;T out#ut sequence is obtained usin! DSP c+i# TMS320C6713 usin! code co"#oser
studio$
IMPULSE RESPONSE
AIM
To #erfor" t+e I")ul+! R!+)on+! of a !iven discrete sequence inTMS320C6713 KIT(
REQUIREMENT
CCS v 3$3
TMS320C6713 KIT
%S& Cable
'( )da#ter
T-E&R.
T+e i")ul+! r!+)on+! is t+e si!nal t+at e-its a syste" w+en a delta function .unit i"#ulse/ is t+e in#ut$ <f two syste"s are
different in any way3 t+ey will +ave different i"#ulse res#onses$ Lust as t+e in#ut and out#ut si!nals are often called -CnD
and yCnD3 t+e i"#ulse res#onse is usually !iven t+e sy"bol3 +CnD $ 2f course3 t+is can be c+an!ed if a "ore descri#tive
na"e is available3 for instance3 fCnD "i!+t be used to identify t+e i"#ulse res#onse of a filter$
)ny i"#ulse can be re#resented as a s+ifted and scaled delta function$ Consider a si!nal3 aCnD3 co"#osed of all =eros
e-ce#t sa"#le nu"ber M3 w+ic+ +as a value of 63$ T+is is t+e sa"e as a delta function s+ifted to t+e ri!+t by M sa"#les3
and "ulti#lied by 63$ <n equation for"7 aCnD K 63NCn6MD$ Mae sure to understand t+is notation3 it is used in nearly all DSP
equations$
<f t+e in#ut to a syste" is an i"#ulse3 suc+ as 63NCn6MD3 w+at is t+e syste">s out#utO T+is is w+ere t+e #ro#erties of
+o"o!eneity and s+ift invariance are used$ Scalin! and s+iftin! t+e in#ut results in an identical scalin! and s+iftin! of t+e
out#ut$ <f NCnD results in +CnD3 it follows t+at 63NCn6MD results in 63+Cn6MD$ <n words3 t+e out#ut is a version of t+e i"#ulse
res#onse t+at +as been s+ifted and scaled by t+e sa"e a"ount as t+e delta function on t+e in#ut$ <f we now a syste">s
i"#ulse res#onse3 we can i""ediately now +ow it will react to any i"#ulse$
%R&CE'URE:
2#en Code Co"#oser Studio3 "ae sure t+e DSP it is turned on$
Start a new #ro4ect usin! 5Pro4ect6new 5 #ull down "enu3 save it in a se#arate directory.c78ti8"y#ro4ects/ wit+
na"e i")ul+!=r!+)on+!()*t(
)dd t+e source files i")ul+!=r!+)on+!(C to t+e #ro4ect usin! 5Pro4ect add files to #ro4ect9 #ull down "enu$
)dd t+e liner co""and file #!llo(c"$ $.Pat+7 c78ti8tutorial8ds67138+ello18+ello$c"d/
)dd t+e run ti"e su##ort library file rt+6700(lib .Pat+7 c78ti8c60008c!tools8lib8rts6700$lib/
Co"#ile t+e #ro!ra" usin! t+e 5Pro4ect6co"#ile9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side
of #ro!ra" window$
&uild t+e #ro!ra" usin! t+e 5Pro4ect6&uild9 #ull down "enu or by clicin! t+e s+ortcut icon on t+e left side of
#ro!ra" window$
:oad t+e #ro!ra".i"#ulsePres#onse$out/ in #ro!ra" "e"ory of DSP c+i# usin! t+e 5;ile6load #ro!ra"9 #ull
down "enu$
C&NC,USI&N
T+us t+e i"#ulse res#onse out#ut sequence is obtained usin! DSP c+i# TMS320C6713 usin!
code co"#oser studio