I'm trying to create and implement a 100-300 Hz bandpass filter as described in a signal processing research article. Specifically, the paper states, "A finite impulse-response Kaiser filter was used with 30-dB minimal-frequency attenuation in the stop-band, 30 dB maximal frequency loss in the pass-band, and 10 Hz lower/upper transition width."
After a great deal of searching and experimenting, I tried the following:
d = designfilt('bandpassfir', 'StopbandFrequency1', 90, 'PassbandFrequency1', 100, 'PassbandFrequency2', 300, 'StopbandFrequency2', 310, 'StopbandAttenuation1', 30, 'PassbandRipple', 30, 'StopbandAttenuation2', 60, 'SampleRate', 1000, 'DesignMethod', 'kaiserwin');
This "seems" to work insofar as I applied the filter to a random signal, and plotted the magnitude of the Fourier Transform of the result, which was essentially zero for frequencies outside the 100-300 Hz range.
Question 1: Does this appear to be a correct implementation of the approach described in my article?
Question 2: If the answer to (1) is yes, does the designfilt command automatically determine the optimal filter order, n, and parameter, beta, associated with the filter, or should I first estimate these quantities, using the kaiserord function?