Submit on Brightspace
• Baseline Drift Correction
• Notch Filter (Gain) Exercise • Peaking Filter Exercise
• Ideal Discrete-time Differentiator • Ideal Fractional Delay System
Copyright By PowCoder代写 加微信 powcoder
ECE-GY 6113 – DSP 1
Spring 2024
1) Given the impulse response h(n), the impulse response of a new system is given by g(n) = (-1)^n h(n).
(a) Find a simple expression relating G(z) to H(z). Show your derivation. (b) Find the poles and zeros of G in terms of the poles and zeros of H.
(c) Find a simple expression relating Gf(⍵) to Hf(⍵). Show your derivation. (e) Illustrate (a), (b), (c) with an example LTI system of your choice.
2) Consider the LTI system implemented by the difference equation
y(n) = (1/6) [ x(n) – x(n-1) + x(n-2) – x(n-3) + x(n-4) – x(n-5) ]
Find and sketch the impulse response, the pole-zero diagram, and frequency response. What is the dc gain of this system? Express the frequency response in terms of the digital sinc function. What kind of filter is this (low-pass, high-pass, band-pass, or band-stop filter?)
3) Exercise 3.18 (in “DSP Exercises.pdf”)
Part X [do not submit]
A simple form of signal smoothing can be performed by applying a K-point moving average twice. Let K = 6. Consider a system implemented by running a signal twice through the K-point moving average. That is, the filter consists of two K-point moving average systems in cascade. Find and sketch the impulse response, dc gain, pole-zero diagram, and frequency response.
Baseline Drift Correction
Design and use a dc notch filter to correct the baseline drift in an ECG signal.
Download the accompanying file ecg_lfn.txt containing ECG data, shown in the plot below. The sampling frequency is 1000 samples/second. Design a first-order recursive dc notch filter to remove the baseline drift. The frequency response of the system should have a null at dc (Hf (0) = 0). The transfer function of the filter should have a pole on the positive real axis. Apply your dc notch filter to the ECG data to remove the baseline drift. Try not to distort the ECG signal itself. The output signal should have a baseline value around zero. Evaluate the e↵ectiveness of the filter by overlaying the input and output signal in the same plot. Submit a writeup comprising your description of the filter, plots of the frequency response, pole-zero diagram, impulse response, and input-output signals. Comment on the e↵ect of the pole position.
ECG signal, it has a baseline drift
0 1 2 3 4 5 6 7 8 9 10 Time (sec)
0 0.5 1 1.5 2 2.5 3 Time (sec)
Notch Filter (Gain) Exercise
A second-order recursive notch filter is illustrated in Fig. 1. The filter has a null at the frequency 0.05 cycles/sample (equivalently, 0.1⇡ radians/sample). The poles have a modulus of 0.9. The filter is nor- malized so the dc gain is unity, as evident in the plot. But the gain on the high-frequency side ex- ceeds unity, reaching 1.11.
Task: Design a third-order recursive notch filter with a null at the same frequency. The new fil- ter should have a gain of unity at both f = 0 and f = 0.5 cycles/sample. The di↵erence equation should have real-valued coe cients. There is more than one correct solution. The frequency response magnitude of one solution is illustrated in Fig. 2.
To submit: Mathematical derivation, di↵erence equation coe cients, pole-zero diagram, frequency response magnitude, and Matlab code.
1 0.5 0 −0.5 −1
1.2 1 0.8 0.6 0.4 0.2 0
−1.5 −1 −0.5 0 0.5 1 1.5
0.3 0.4 0.5
Pole/zero diagram
Real Part Magnitude response
Frequency (cycles/sample)
Imaginary Part
Figure 1: Second-order recursive notch filter with notch at 0.05 cycles/sample.
1.2 1 0.8 0.6 0.4 0.2 0
0.3 0.4 0.5
Magnitude response
Frequency (cycles/sample)
Figure 2: Third-order recursive notch filter with unity gain on both sides of the null.
Peaking Filter Exercise
The magnitude response of a second order recursive filter is shown in this figure. The peak is at 0.2 pi radians/sample (0.1 cycles/sample).
This filter is similar to the second order recursive notch filter. But, instead of attenuating a given frequency, this filter amplifies a given frequency. This is a peaking filter. How should the poles and zeros of the notch filter be modified to achieve amplification instead of attenuation?
Design a second-order recursive filter having a frequency response magnitude like the one in the figure. It does not have to be identical, but it should have a peak at 0.1 cycles/samples and it should be relatively flat away from that frequency. In MATLAB, plot the pole/zero diagram, impulse response, and frequency response of your second- order filter.
1 0.8 0.6 0.4 0.2 0
0.3 0.4 0.5
Magnitude response
Frequency (cycles/sample)
Ideal Discrete-time Di↵erentiator
Di↵erentiation can be considered an LTI system. (The derivative of a trans- lated signal is the translation of the derivative of a signal. And the sum of derivatives of two signals is the derivative of their sum.) Therefor, we can consider the frequency response of the di↵erentiator.
The ideal discrete-time di↵erentiator has a frequency response of Hf(!)=j! for |!|<⇡. (1)
1. What is the derivative of the function x(t) = cos(!t)? Based on this and the frequency response concept, explain why the frequency re- sponse of the ideal di↵erentiator is given by equation (1).
2. Without computing the impulse response, determine from Hf (!) if the impulse response is real-valued or not. Explain.
3. Use the inverse discrete-time Fourier transform (DTFT) to derive the impulse response of the ideal di↵erentiator.
4. Sketch the magnitude |Hf(!)| and phase (angle) of the frequency re- sponse Hf (!) of the ideal di↵erentiator for |!| < 2⇡.
5. Can the ideal di↵erentiator be implemented as a di↵erence equation? Explain.
6. Truncate the ideal impulse response to make it FIR. Use Matlab to apply your filter to the following signal. Show your code and plots, and explain your observations.
>> u = @(n) double(n >= 0); % step signal
>> n = -20:500;
>> x = sin(0.001 * n.^2) .* (u(n) – u(n-400));
Ideal Fractional Delay System
The ideal fractional delay system for discrete-time signals is an LTI with frequency response
Hf (!) = e j⌧!, for |!| < ⇡. (1)
This system delays the input signal by ⌧ samples. The value of ⌧ does not have to be an integer.
1. Sketch the frequency response magnitude and phase for |!| < 2⇡.
2. Use the inverse discrete-time Fourier transform (DTFT) to find the impulse response
of the ideal fractional delay system with parameter ⌧.
3. Can the ideal fractional delay system be implemented using a di↵erence equation? Explain.
3.16 Very simple high-pass digital filtering can be performed by the di↵erence equation:
(b) Based on the pole-zero diagram, roughly sketch the frequency response magnitude |H(!)|. Explicitly indicate any frequency response nulls if there are any.
(c) Sketch the impulse response of the filter. (d) What is the dc gain of the filter?
The transfer function H(z) of an FIR filter has zeros in the z-plane as illustrated.
The zeros on the unit circle are at powers of W12. The dc-gain of the filter
( 1)k x(n k)
where x(n) is the signal being filtered. In the following, assume N = 8.
(a) Sketch the impulse response of this high-pass filter.
(b) What is the dc gain of the filter? That means, find Hf(0).
(c) Find the zeros of the transfer function and sketch the pole/zero dia- gram.
(d) Based on the zero diagram in (c), sketch the frequency response am- pltude A(!) (this is a linear-phase FIR filter) and the frequency re- sponse magnitude |Hf (!)|.
3.17 Very simple signal smoothing can be performed by a moving average of N consecutive samples,
Allthepolesareatz=0.
Accurately sketch the impulse response of the filter.
Sketch the frequency response magnitude |H(ej!)|. Accurately indi- cate the nulls of the frequency response.
where x(n) is the input signal. In the following, assume N = 6. Consider a filter implemented by running a signal twice through the N-point moving average. That is, the filter consists of two N-point moving average systems in cascade.
(a) Sketch the impulse response h(n) of the total filter.
(b) What is the dc gain of the total filter? That means, find Hf(0).
(c) Find the zeros of the transfer function and accurately sketch the pole/zero diagram.
(d) Based on the zero diagram in (c), sketch the frequency response mag- nitude |H(!)|.
3.18 Consider a filter implemented using the di↵erence equation, y(n) = x(n) x(n N) + y(n 1)
where x(n) is the signal being filtered.
(a) Find the zeros of the transfer function and sketch the pole/zero dia- gram.
Sketch the phase of the frequency response \H(ej!).
The transfer function H(z) of an FIR filter has 13 zeros in the z-plane as
illustrated.
e x p ( j ⇡6 ) 0.5 2.0
The zeros on the unit circle are at powers of W12. The dc-gain of the filter is unity. All the poles are at z = 0.
(a) Accurately sketch the impulse response of the filter.
(b) Sketch the frequency response magnitude |H(ej!)|. Accurately indi- cate the nulls of the frequency response.
(c) Sketch the phase of the frequency response \H(ej!).
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com