2. In the lab we discussed filtering 60 Hz power-line noise from ECG signal usin
ID: 2249743 • Letter: 2
Question
2. In the lab we discussed filtering 60 Hz power-line noise from ECG signal using a digital (signal processing) filter. Now let's try to an analog (circuit) filter approach to remove the 60 Hz line-noise. Following is an active twin-T notch filter with transfer function: 2R 2R Here m is the ration of the two feedback resistance which determines the gain and quality for the filter. The drop frequency of this twin-T notch filter is fdrop-1/4 RC. For designing a 60 Hz drop filter, let's use R-10 k and C=133 nF. (a) For m={ 0 . 9 , 0·99} plot the magnitude and phase response of H(W) with a range mR 2C of f=w/2= [ 0, 200 Hz]. (b) Consider the ECG signal used during the class (ecg signal.mat) as the input (X t-ecg ) of a 60 Hz twin-T notch filter with m=0 . 9. Using the functions fft() and ifft( ), determine the X(w),E(o),and z (t ) . Plot x( t ) , X(f), Z (f), and z (t) in a 4xl subplot for the range of -250 s fs250 and 0 sts2.5 [Please pay attention to the proper use of fftshift () andifftshift() while solving this problem.]Explanation / Answer
% efr.m - frequency/phase response computation in Matlab/Octave
% Example filter:
g1 = 1; B = [0.9 0.99]; % Feedforward coeffs
g2 = 1; A = [0 200]; % Feedback coefficients
Nfft = 1024; % FFT size
Nspec = 1+Nfft/2; % Show only positive frequencies
f=[0:Nspec-1]/Nfft; % Frequency axis
Xnum = fft(B,Nfft); % Frequency response of FIR part
Xden = fft(A,Nfft); % Frequency response, feedback part
X = Xnum ./ Xden; % Should check for divide by zero!
clf; figure(1); % Matlab-compatible plot
plotfr(X(1:Nspec),f);% Plot frequency response
cmd = 'print -deps ../eps/efr.eps'; disp(cmd); eval(cmd);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.