Digital Signal Processing Reference
In-Depth Information
(b) h = (
0 . 1 n ) 0.9 n u
[
n
]
0 . 1 n ))0.9 n u
(c) h =(1+(
]
(d) h = 0.5*exp(j*pi/2).ˆ(0:8) + 0.5*exp(-j*pi/2).ˆ(0:8)
17. Write the m-code for the script
[
n
LV xMatchedF ilter(NoiseAmp, T stSeqLen, F lipI mpResp)
that generates a test signal of length T stSeqLen consisting of a chirp of a given length (less than
T stSeqLen ) immersed in noise having amplitude NoiseAmp and length T stSeqLen which can be
convolved with either the chirp of given length itself or a time-reversed version of it, according to the
input argument FlipImpResp , which can assume the value 0 to use the non-time-reversed chirp as a filter
impulse response or 1 to use the time-reversed chirp as the filter impulse response. Plot the impulse
response being used and the test signal, poised to begin convolution, on a single plot, and the convolution
sequence on a second plot. The function specification is as follows:
function LVxMatchedFilter(NoiseAmp,TstSeqLen,FlipImpResp)
% Forms a test impulse response, a chirp having a length equal
% to half of TstSeqLen, then builds a test sequence having
% length TstSeqLen and containing the chirp and noise of
% amplitude NoiseAmp. The test signal is then convolved with
% either the chirp or a time-reversed version of the chirp, and
% the results plotted to demonstrate the principle of matched
% filtering.
% FlipImpResp: Use 1 for Time-reversed, 0 for not time-reversed
% impulse response.
% Test calls:
% LVxMatchedFilter(0.5,128,0) % imp resp not time reversed
% LVxMatchedFilter(0.5,128,1) % imp resp time reversed
18. Write the m-code for the script
LVxTestReconSineVariablePhase(k 1 ,N,PhaseDeg)
receives a frequency k 1 and length N to be used to construct three sinusoids, which are 1) a sine wave
of arbitrary phase PhaseDeg and frequency k 1, and 2) a test correlator sine of frequency k 1 and 3) a
test correlator cosine of frequency k 1. Compute the correlation coefficients using Eqs. (4.7) and (4.8),
and then reconstruct the sine wave of arbitrary phase PhaseDeg and frequency k 1 using Eqs. (4.9)
and (4.10). Plot the test sine wave, the two correlators, and the reconstructed test sine wave. The function
specification is as follows:
function LVxTestReconSineVariablePhase(k1,N,PhaseDegrees)
% Performs correlations at the zeroth lag between
% test cosine and sine waves of frequency k1, having N samples,
% and a sinusoid having a phase of PhaseDegrees, and then
% reconstructs the original sinusoid of phase equal to
% PhaseDegrees by using the CZL values and the test sine
% and cosine.
%Test calls:
% LVxTestReconSineVariablePhase(1,32,45)
Search WWH ::




Custom Search