Assistance Needed with FIR Comb Peak and Notch Filter Design in MATLAB
Ältere Kommentare anzeigen
Hello,
I am working with a sampling frequency Fs=10Fs = 10Fs=10 MHz and a fundamental frequency of 0.5 MHz. I need to design two types of FIR comb filters in MATLAB, but I’m unsure how to write the code for these filters manually. Previously, I used IIR filters generated with filterDesigner, but I encountered phase distortion issues, which may lead to errors in my data analysis. I now want to switch to FIR filters to avoid this phase distortion.
Here’s what I’m looking to implement:
- Comb Peak Filter (1-3 MHz): This filter should capture higher harmonic components at 1 MHz, 1.5 MHz, 2 MHz, 2.5 MHz, and 3 MHz, each with a bandwidth of 0.1 MHz.
- Comb Notch Filter (3-4 MHz): This filter should isolate four wideband noise bands (not including subharmonic or superharmonic components) centered around:
- 3-3.2 MHz
- 3.3-3.45 MHz
- 3.55-3.7 MHz
- 3.8-4 MHz
I’d like to create these FIR filters but am unsure how to set up the design parameters or write the code manually. Any guidance or sample code on how to implement these filters as FIR filters would be greatly appreciated.
Thank you very much for your help!
4 Kommentare
Mathieu NOE
am 5 Nov. 2024
hello
you want to switch to FIR filters to have a linear phase vs frequency ?
轶凡
am 5 Nov. 2024
William Rose
am 5 Nov. 2024
@轶凡, yes filtfilt() will eliminate the phase distroption of an IIR filter.
If you want to use IIR filters and filtfilt, then, for the comb peak filter, you can make 4 bandpass filters and pass the input through all 4 in pranllel, then add the outputs to get the combined output:
y=filt1(x)+filt2(x)+filt3(x)+filt4(x)
where filt1(), etc. represents an IIR filter implemented with filtfilt().
The trouble I anticipate with this plan is that you may need a high order IIR filter to acheive the narrow bands you desire. filtfilt() requires you to work with the [b,a] specification of filters. Unfortunately the [b,a] representation of filters is numerically less stable than second order secotions or z,p,k. So you may not be able to get the performance you want with filtfilt(). If so, then you will use FIR. You will have to experiment to find out.
轶凡
am 6 Nov. 2024
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Vibration Analysis finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!










