Digital Signal Processing Reference
In-Depth Information
27. Write the m-code for the script LVxPhaseShiftViaDFT as illustrated and described in the text and
below:
function LVxPhaseShiftViaDF T
% Creates a signal having the harmonic spectrum of a square
% wave, but with random phases, then resets all phases to 0
% degrees initially using the DF T/IDF T, resulting in a cusped
% waveform, which is shown in the second subplot; thereafter,
% the phase of each bin is shifted a small amount via DF T every
% time any key is pressed. Eventually, all frequencies in the
% cusped waveform are shifted 90 degrees, and the cusped
% waveform is converted in a square wave. The third subplot
% is always a 90 degree phase-shifted version of the waveform
% in the second plot, and thus starts out as a square wave and is
% gradually converted into a cusped waveform as the cusped
% waveform in the second subplot is converted into
% a square wave
28. Write a short script that verifies or illustrates that the DFT of the product of two time domain
sequences is 1 /N times the circular convolution of the DFTs of each, i.e.,
1
N (X 1 [ k ] X 2 [ k ] )
DFT (x 1 [ n ] x 2 [ n ] ) =
29. In this project, we'll write a script that can detect the frequency of an interfering sinusoid mixed with
an audio signal. To do this, the audio signal is partitioned into small time windows or frames, and the
DFT of each is obtained so that the spectrum is available over small durations throughout the signal.
We'll use a finite signal of five seconds' duration, but this procedure (dividing a signal into short frames)
would be mandated, for example, when processing an audio signal (in real time) of indefinite duration. For
purposes of illustration, we'll compare the DFT of the entire signal to the spectrogram (i.e., spectrum over
time) of the signal created by taking the DFT of many short duration frames of the signal. To enhance
the detectability of the interfering sinusoid, we'll also analyze a subset of the frames, those having very
low mean bin magnitude, which correspond to the relative periods of silence between uttered words in
the audio file 'drwatsonSR8K.wav' . We'll use several methods to attempt to detect which bin or bins are
indicative of a persistent sinusoid, as might occur, for example, in a public address system or the like due
to feedback.
We'll use the script created in this project to identify one or more interfering sinusoids. Later in
the series, in the chapters on FIR filtering and IIR filtering, found in Volume III, and LMS adaptive
filtering, found in Volume IV, we'll use the script created in this exercise to identify an interfering tone
and then filter the signal to remove it. In this project, we'll concentrate on breaking the signal into frames
arrayed as columns of a matrix, obtaining the DFT of each frame, and identifying one or more persistent
frequencies. We'll also reconstruct the test signal from the DFTs of the frames. A simple modification
of this technique (doubling the length of each frame using trailing zeros), will be used when we revisit
this script in the filtering chapters of Volume III and will allow us to not only perform the interfering
or persistent tone identification analysis, but to then use frequency domain filtering (i.e., convolution
via DFT multiplication) to remove the persistent tone, and then construct the filtered test signal from
the filter-modified frames. This is a useful technique because real-time systems, for example, must work
frame-by-frame, often having no more than a few frames of recent history available for analysis, filtering,
and signal reconstruction.
Search WWH ::




Custom Search