question archive Matched Filters Matched filters are commonly employed in practical applications of signals and systems to detect the presence of specific signal patterns in an observed signal corrupted by additive noise
Subject:Computer SciencePrice:23.99 Bought3
Matched filters are commonly employed in practical applications of signals and systems to detect the presence of specific signal patterns in an observed signal corrupted by additive noise. If the signal pattern to be detected is p(t), the matched filter is an LTI system with impulse response h(t) = p(−t). If an observed signal x(t) contains one or more instances of p(t), these can be found by determining the time instants at which the matched filter output y(t) = x(t) ∗ h(t) shows a peak (∗ denotes convolution). −1 1 1 t p(t) Figure A1-1 (a) [3 points] Consider p(t), shown in Fig. A1-1, which is the pattern to be detected. Determine the impulse response of the matched filter, h(t), for this pattern, and sketch p(t) ∗ h(t). Note when p(t) ∗ h(t) is maximised. (b) [3 points] The matched filter in (a) is not a causal system. To make it causal, one can shift h(t) to obtain h(t − t0). Sketch w(t) = p(t) ∗ h(t − t0) for an appropriate t0 that makes the matched filter causal, and find t = tm at which w(t) is maximised. What is the relationship between tm and t0? 1 Figure A1-2 (c) [3 points] Matched filters find an important application in radar systems to detect the target echo of a radar pulse in the radar return signal (see Fig. A1-2). Consider a discretetime matched filter with impulse response h[n] = p[−n]. Assume that p[n] is given by p[n] = sin(πn/8)(u[n] − u[n − 32]) Write a MATLAB code to determine where p[n] occurs in a noisy radar return signal x[n] provided on the course website (download MATLAB file x.mat). The position of p[n] in x[n] indicates the delay it has undergone and is proportional to the distance of the target from the radar. This delay is used to estimate the distance of the target. First, plot the received signal x[n], the transmit pulse p[n] and the impulse response of the matched filter h[n]. Then, compute y[n] as the convolution of x[n] and h[n]. Plot y[n] making sure that the time-index is appropriately adjusted. Finally, identify any peaks in y[n] and write down the number and positions (i.e., time-delays) of these peaks. To convolve two vectors in Matlab you can use the conv command: y = conv (x , h) ; 2 2 Echo Cancellation Figure A2: Illustration of acoustic echoes. An important application of inverse systems is to remove signal distortion. Echo cancellation in acoustic signals is a good example of this. The multipath environment in a room causes multiple delayed and scaled versions (echoes) of sound before it is picked up by a microphone, as illustrated in Fig. A2. After appropriate digitisation the multipath environment can be modelled as a discrete-time LTI system with impulse response: h[n] = X∞ k=0 hkδ[n − kN]. (1) The room echo impulse response h[n] is assumed to be made up of shifted and scaled unit impulses. In particular, hk is the gain factor of the kth impulse that occurs at the kth multiple of N. The acoustic echoes create a linear combination of delayed and scaled copies of the original sound at the microphone. This creates undesirable distortion. The LTI system with impulse response h[n], given by (1), is invertible. In other words, we can find an inverse system with impulse response g[n] such that h[n] ∗ g[n] = δ[n] and y[n] ∗ g[n] = x[n] Thus, we can recover the original signal x[n] from the distorted signal y[n] by passing y[n] through the inverse system, thereby removing the echoes. (a) [3 points] Assume that the LTI system representing the room echo response has the following impulse response h0 = 1, h1 = −0.9, h2 = (−0.9)2 , hk = 0 for k > 2, with N = 500 (2) For this system, the inverse system to remove the echoes can be expresses as y[n] = a y[n − N] + b y[n − 2N] + x[n] (3) 3 Determine the coefficients a and b. One way to do this is to write the echo response as y[n] = x[n] ∗ h[n] = h0x[n] + h1x[n − N] + h2x[n − 2N] and then swap x[n] and y[n]. Assuming the condition of initial rest, find the impulse response of the inverse system. Show that this is an infinite impulse response (IIR) system. (b) [3 points] Write a MATLAB code to remove acoustic echoes in a recorded speech signal. The speech signal x[n] is distorted by the echo impulse response in (2). The distorted signal y[n] is available on the course website as a wave file (y.wav). The MATLAB code should implement the inverse system (3). Because the inverse system is IIR, the convolution sum is not feasible as it would require infinite memory. MATLAB enables the implementation of recursive input-output relation in (3) using the filter command: y = f i l t e r ( 1 , [ 1 , z e r o s ( 1 ,N−1),−a , z e r o s ( 1 ,N−1),−b ] , x ) ; Note that the parameters of the filter command above are −a and −b and not a and b. The example MATLAB code below shows how to read and play audio files. Listen to the distorted and recovered speech signals to check if your echo removal system is working. %re ad d i s t o r t e d speech i n t o y [ n ] [ y , Fs ] = a u di o r e a d ( ’ y . wav ’ ) ; %pl a y d i s t o r t e d speech on PC s p e a k e r s s ound sc (y , Fs) ; Assessment: Submit your brief answers including plots and MATLAB codes as a single document, preferably in pdf format, to the course learnonline website before the deadline.
Please download the answer file using this link
https://drive.google.com/file/d/1GTsdjHk87b6j8RsAoqmn1o7ITB5HEpHM/view?usp=sharing