In some applications that i am using, i need only the limit of 200Hz. That's why i am confused.
How can i design a correct lowpass filter with the Filter Design Assistant?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi! I try to design a simple lowpass filter to keep only the frequencys below 200Hz.
d1 = designfilt('lowpassiir', 'PassbandFrequency', XXX, 'StopbandFrequency', XXX, 'PassbandRipple', XXX, 'StopbandAttenuation', XXX, 'SampleRate', 1000);
My sampling ratio is 1000.
What should be my inputs at:
-PassbandFrequency
-StopbandFrequency
-StopbandAttenuation
-PassbandRipple
I only want to keep the 0-200Hz.
Any instructions?
1 Kommentar
Antworten (1)
Star Strider
am 9 Aug. 2019
It is actually straightforward to design your filter using the various functions:
Fs = 1000; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
Wp = 200/Fn; % Passband Normalised
Ws = 250/Fn; % Stopband Normalised
Rp = 1; % Passband Ripple (Irrelevant in Butterworth)
Rs = 50; % Stopband Attenuation
[n,Wn] = buttord(Wp,Ws,Rp,Rs); % Order Calculation
[z,p,k] = butter(n,Wn); % Zero-Pole-Gain
[sos,g] = zp2sos(z,p,k); % Second-Order Section For Stability
figure
freqz(sos, 2^16, Fs) % Filter Bode Plot
I prefer elliptical filters that here would be designed as:
Fs = 1000; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
Wp = 200/Fn; % Passband Normalised
Ws = 210/Fn; % Stopband Normalised
Rp = 1; % Passband Ripple (Irrelevant in Butterworth)
Rs = 50; % Stopband Attenuation
[n,Wp] = ellipord(Wp,Ws,Rp,Rs); % Order Calculation
[z,p,k] = ellip(n,Rp,Rs,Wp); % Zero-Pole-Gain
[sos,g] = zp2sos(z,p,k); % Second-Order Section For Stability
figure
freqz(sos, 2^16, Fs) % Filter Bode Plot
Elliptic discrete filters are much more computationally efficient than other designs.
2 Kommentare
Siehe auch
Kategorien
Mehr zu Filter Design and Analysis finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!