Digital Signal Processing Reference
In-Depth Information
29. Write a script that encodes the audio files drwatsonSR8K.wav and whoknowsSR8K.wav on
orthogonal sinusoidal carriers of the same frequency, creates a single signal by taking the difference
between the two modulated carriers to create a transmission signal, and then decodes the transmission
signal to produce the first audio signal, the second audio signal, or a combination of the two, according
to the value of a decoding phase parameter supplied in the function call, according to the specification
below. The script should play the decoded audio signal through the computer's sound card. The file
whoknowsSR8K.wav is much longer than the file drwatsonSR8K.wav , so it should be truncated after
reading to the same length as drwatsonSR8K.wav .
The script should create plots as shown and described in Fig. 4.41:
function LVxOrthogAudio(DecodePhi)
% Creates cosine and sine carriers of equal frequency,
% modulates each by a corresponding audio file,
% drwatsonSR8K.wav or whoknowsSR8K.wav, takes
% the difference to create a transmission signal, then
% decodes the transmission signal to produce one or the
% other of the encoded audio signals, according to the
% value of the variable DecodePhi in the function call.
% DecodePhi is the phase angle of the decoding carrier,
% and should be between 0 and pi/2; 0 will decode the sine
% carrier's audio, pi/2 will decode the cosine carrier's audio,
% and numbers in between 0 and pi/2 will cause a proportional
% mixture of the two audio audio signals to be decoded.
% Test calls:
% LVxOrthogAudio(0)
% LVxOrthogAudio(pi/2)
% LVxOrthogAudio(pi/4)
30. Derive the 2-point impulse responses [1,1] (lowpass) and [1,-1] (highpass) using 2-point
cosines. What are the frequencies of the correlators present in each impulse response? Use the script
LVFreqResp ( tstSig, NoFreqs ) to evaluate the frequency response of each impulse response at 500 points.
31. Derive the 3-point impulse responses [1,0,-1] (bandpass) and [1,0,1] (bandstop) using cosines
of length 4. What are the frequencies of the correlators present in each impulse response? Use the script
LVFreqResp ( tstSig, NoFreqs ) to evaluate the frequency response of each impulse response at 500 points.
32. Develop the script LVxConvolution2PtLPF ( Freq ) as described below, and which creates
Fig. 4.42, which shows, in subplot (a), the position of the test signal as it moves sample-by-sample
from left to right over the two point impulse response, computing the convolution sequence one sample
at a time, and displaying the convolution sequence in subplot (b). Observe and explain the results from
the two sample calls given below.
LVxConvolution2PtLPF(Freq)
% Freq is the frequency of the test sinusoid of length 16 which
% will be convolved with the 2-point impulse response [1, 1].
% Values of Freq up to 8 will be nonaliased.
% Test calls:
% LVxConvolution2PtLPF(0)
% LVxConvolution2PtLPF(8)
33. Develop the script LVxConvolution2PtHPF ( Freq ) as described below, and which creates a
figure similar to Fig. 4.42, (except that the impulse response is [1,-1] rather than [1,1]), which shows,
Search WWH ::




Custom Search