If
the system in Figure 1 is an ideal sampling rate converter , when the input
x[n]
is a unit impulse
],
[
n
δ
the output
y[n]
has a Fourier transform
( )
ω
j
e
Y
which corresponds to an ideal lowpass filter with
a cutoff frequency at
ω
c
=
(11,025/ 24,000
)
π
.
For an equivalent system which you are to implement,
when the input
x[n]
is a unit impulse
]
[
n
δ
,
the output
y[n]
must have a Fourier transform
( )
ω
j
e
Y
which is
an approximation of a lowpass filter, and meets the specifications shown below in Table 1.
Passband Cutoff (
ω
p
)
000
,
24
025
,
11
π
Passband Ripple
±
0.1 dB or less
Stopband Frequency (
ω
s
)
1.2
ω
p
Stopband Attenuation
70 dB or more
Phase Constraints
|max grpdelay
‐
min grpdelay|
≤
720 in the passband
Table 1
If your sampling rate conversion system functions properly, you should meet the specifications in Table
1, and when you play the output audio signal at 24,000 Hz, it should sound the same as the input audio
signal played at 11,025 Hz.
You should get a rough estimate of the efficiency of your design by determining how much computation
was required to perform the sampling rate conversion on the
Wagner.wav
signal. The method which
you will use to count the number of operations will be described shortly.
You are to write a MATLAB function
srconvert
such that the command
srconvert(in)
takes the
input signal
in
with an associated sampling rate of 11,025 Hz, and returns an output signal at a
sampling rate of 24,000 Hz. (See the section on writing MATLAB functions.) Once your function
srconvert.m
is finalized, run the command
y=srconvert([1 zeros(1,3000)]);
. This will
produce a vector
y
which contains the response of your system to a unit impulse. Then call
verify(y)
to verify that your design meets the design specification.
The Files
The project zip file contains the audio files and MATLAB functions which you will need for this project.
To access the zip file, click on the link below where you found this file on the web site.
In testing your system, you may find it helpful to first use a unit impulse as input to your system and
then later try using real audio signals as inputs and listening to the outputs. To load a sound file into a
vector
x
, type
x=wavread(
′
filename.wav
′
);
. To write a sound file for the MATLAB vector
x
into
the current directory, type
wavwrite(x,sampfreq,
′
filename.wav
′
)
. You may test your
system using any of the audio signals, although you should use the
Wagner.wav
signal to benchmark
your system performance.
f1997