Digital Signal Processing Reference
In-Depth Information
2
0
−2
0
10
20
30
40
50
60
(a) Sample
2
0
−2
0
10
20
30
40
50
60
(b) Sample
2
0
−2
0
10
20
30
40
50
60
(c) Sample
Figure 2.16:
(a) The sequence 2cos(2
πt
) where
t
= [0:1:63]/64; (b) The sequence -cos(2
πt
), delayed by
one sample; (c) The sum or superposition of the sequences at (a) and (b).
where the test signal
x
is a linear chirp, sampled at 1000 Hz, of one second duration, that changes
frequency linearly from 0 to 500 Hz.
[
n
]
We can use the script
LV_LTIofX
with the following call
[yC,nC] = LV_LTIofX([0.1,-1,1,-0.1],...
chirp([0:1:999]/1000,0,1,500));stem(nC,yC)
the results of which are shown in Fig. 2.17. We see that the simple four-sample LTI system has been able
to process a chirp in such a way as to progressively emphasize higher frequencies. Thus this simple LTI
system functions as a highpass filter.
The script (see exercises below)
LV xLinearab(a, b, f
1
,f
2
,N,Del,LTICoeff)
uses code similar to that above to compute
x
1
[
n
]
,
y
1
[
n
]
,
x
2
[
n
]
,
y
2
[
n
]
,
ax
1
[
n
]
+
bx
2
[
n
]
,
ay
1
[
n
]
+
by
2
[
n
]
,
and
LT I
[
ax
1
[
n
]
+
bx
2
[
n
]]
, where
LT I
represents the system defined by
LTICoeff
just as for the script
LV_LTIofX
. Test signal
x
1
[
n
]
is a cosine of frequency
f
1, and test signal
x
2
[
n
]
is a sine of frequency
f
2,