NameSectio
LaboratoryExercise2
DISCRETETIMESYSTEMSTIMEDOMAINREPRESENTATION
21SIMULATIONOFDISCRETETIMESYSTEMS
Project21TheMovi
gAverageSystem
AcopyofProgramP2_1isgive
below
ProgramP2_1Simulatio
ofa
Mpoi
tMovi
gAverageFilterGe
eratethei
putsig
al
0100s1cos2pi005
Alowfreque
cysi
usoids2cos2pi047
Ahighfreque
cysi
usoidxs1s2Impleme
tatio
ofthemovi
gaveragefilterMi
putDesiredle
gthofthefilter
umo
es1Myfilter
um1xMDisplaythei
puta
doutputsig
alsclfsubplot221plot
s1axis010022xlabelTimei
dex
ylabelAmplitudetitleSig
al1subplot222plot
s2axis010022xlabelTimei
dex
ylabelAmplitudetitleSig
al2subplot223plot
xaxis010022xlabelTimei
dex
ylabelAmplitudetitleI
putSig
alsubplot224plot
yaxis010022xlabelTimei
dex
ylabelAmplitudetitleOutputSig
alaxis
1
fA
swers
Q21
Theoutputseque
cege
eratedbyru
i
gtheaboveprogramforM2withx
s1
s2
asthei
putisshow
below
Thecompo
e
tofthei
putx
suppressedbythediscretetimesystemsimulatedbythisprogramiss2
Q22ProgramP2_1ismodifiedtosimulatetheLTIsystemy
05x
x
1a
dprocessthei
putx
s1
s2
resulti
gi
theoutputseque
ceshow
below
s3cos2pi005
1s4cos2pi047
1zs3s4y05xz
2
fTheeffectofcha
gi
gtheLTIsystemo
thei
putis
Project22Optio
alASimpleNo
li
earDiscreteTimeSystem
AcopyofProgramP2_2isgive
below
ProgramP2_2
Ge
erateasi
usoidali
putsig
al
clf
0200
xcos2pi005
Computetheoutputsig
al
x1x00
x1
x
1
x20x0
x2
x
x300x
x3
x
1
yx2x2x1x3
yy2202
Plotthei
puta
doutputsig
als
subplot211
plot
x
xlabelTimei
dex
ylabelAmplitude
titleI
putSig
al
subplot212
plot
y
xlabelTimei
dex
ylabelAmplitude
titleOutputsig
al
3
fA
swers
Q25
Thesi
usoidalsig
alswiththefollowi
gfreque
ciesasthei
putsig
alswereusedtoge
erate
theoutputsig
als
Theoutputsig
alsge
eratedforeachoftheabovei
putsig
alsaredisplayedbelow
Theoutputsig
alsdepe
do
thefreque
ciesofthei
putsig
alaccordi
gtothefollowi
grules
Thisobservatio
ca
beexplai
edmathematicallyasfollows
Project23Li
eara
dNo
li
earSystems
AcopyofProgramP2_3isgive
below
ProgramP2_3Ge
eratethei
putseque
cesclf
040a2b3x1cos2pi01
x2cos2pi04
xax1bx2
um224032490822403de
104075
4
fic00Setzeroi
itialco
ditio
sy1filter
umde
x1icComputetheoutputy1
y2filter
umde
r