Digital Signal Processing Reference
In-Depth Information
Task 4
Now listen to a single-tone test audio signal saved as ''stone'' (e.g., 440 Hz sound
from
http://www.mediacollege.com/audio/tone/download/
). Find its sampling
frequency
fs
(it is 44.1k Hz). Read the signal as x. Add Gaussian noise n (of
power =-20 dB) to the signal and write the result as
s
=
x+n
in your directory
as an audio signal using
wavwrite(s,fs,'stonen.wav')
. Listen to the
corrupted signal and compare with the original one. Plot the time signals
x
and
s
with their spectra versus the normalized frequency ranges
fn
=
f/fs
and
fN
=
f/(fs/2)
. Now design a digital filter (LPF Butterworth) of order 10 and
normalized cut-off frequency
wcr=wc/(fs/2)
, where wcr is the cut-off fre-
quency which should be chosen carefully to reduce noise. Plot the frequency
response of the digital filter using freqz. Then filter the discrete signal
s
to get the
signal
y
. Plot
y
and its spectrum
Y
, then compare with the original and noisy
signals.
Experiment # 5: A Sinusoidal Digital Oscillator
Introduction
A digital oscillator is a system that generates an output waveform (like a sinusoid)
without a need for an input signal, except for a D.C. supply and perhaps a trigger
(like a delta function) at the starting time. The theory of operation is based on the
fact that a digital system with poles on the circumference of the unit circle in the z-
plane is neither stable nor divergent, but oscillatory (or, marginally stable).
To design a digital sinusoidal oscillator, we need a transfer function in the z-
domain whose impulse response is a sinusoid. Using Tables we can reach at the
following z-transform pair:
sin
ð
b
Þ
z
2
z
2
2cos
ð
b
Þ
z
þ
1
h
ð
n
Þ¼
sin
½ð
n
þ
1
Þ
b
Z
H
ð
z
Þ¼
ð
1
Þ
Since n represents the time count, b would represent the normalized radian
frequency X
o
¼
x
o
T
s
,
hence
the
frequency
of
oscillation
is
f
o
¼
x
o
=
2p
¼
ð
b
=
T
s
Þ=
2p
¼ð
b
=
2p
Þ
f
s
Hz
;
and we should have
j
b
j
\p.
Note that the two poles of this system are the roots of z
2
- 2cos (b)z +1= 0,
which are given by:
p
1
;
2
¼
cos
ð
b
Þ
p
¼
cos
ð
b
Þ
jsin
ð
b
Þ¼
e
jb
cos
2
ð
b
Þ
1
ð
2
Þ
Hence, the poles are exactly on the circumference of the unit circle, and the system
is neither stable nor unstable (oscillatory). Figure
D.6
shows the implementation
Search WWH ::
Custom Search