How do I eliminate multiple 60Hz harmonics within 1 set of data in an ECG
조회 수: 11 (최근 30일)
이전 댓글 표시
I have an ECG signal and I'm trying to filter out the 60 Hz harmonics at 60, 120, 180 etc. I am currently using a digital biquad filter. I am currently running into the problem that they are not within one data set so when I plot them with the ECG singal it's not plotting one graph with both 60 AND 120 minimized, it's plotting 1 graph with 60 Hz minimized and 1 graph with 120 Hz minimized on top of each other. I've tried a for loop and just rewriting the code using hold on to continue to plot. How do I get them so that they are all in within the same set of data and not different plots on top of each other for each? Here is some of my current code that is showing JUST the 60 Hz harmonic minimized:
dz= .0005; % d = 1/Q
dp= 0.3;
w= 2*pi*(60); % notch frequency in radians/sec
B =[1 dz*w w^2];
A =[1 dp*w w^2];
h = tf(B,A);
hd =c2d(h,1/Fs,'tustin'); %Fs= 2000 Hz
filter_x = filter(hd.Numerator{1},hd.Denominator{1},x);
plot(filter_x)
댓글 수: 0
채택된 답변
Star Strider
2019년 6월 13일
The Signal Processing Toolbox is best for this. See: Remove the 60 Hz Hum from a Signal (link). You’ll need to design a separate filter for each harmonic.
If you have R2018a or later, the bandstop (link) function makes such filter design and implementation easy.
댓글 수: 4
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Single-Rate Filters에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!