i have data from a movement analysis system and i want to filter the data for noise, the best which i want is a lowpass filter of chebyshev ,but i dont know how to choose the wp,ws,Rp,Rs for my filter ,my sampling frequency is 960Hz from my platform data which are (GRFML,GRFV,GRFAp,COP,Torque) and 120Hz for my optoelectronic sy which are (Markers name) I think the Cut-off freq of 4 could be good I will really appriciate your help thanks a lot
MATLAB: Best amount for the special chebyshef filter?
chebyshev filter function and wp
Related Solutions
I have absolutely no idea what ‘2.01’, ‘2.02’ and ‘2.03’mean.
Here is a prototype bandstop filter design that you can change to produce the filter you want:
Fs = 900; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
Wp = [48 52]/Fn; % Stopband Frequency (Normalised)
Ws = [0.9 1.1].*Wp; % Passband Frequency (Normalised)
Rp = 1; % Passband Ripple
Rs = 90; % Passband Ripple (Attenuation)
[n,Wp] = ellipord(Wp,Ws,Rp,Rs); % Elliptic Order Calculation
[z,p,k] = ellip(n,Rp,Rs,Wp,'stop'); % Elliptic Filter Design: Zero-Pole-Gain
[sos,g] = zp2sos(z,p,k); % Second-Order Section For Stability
figurefreqz(sos, 2^18, Fs) % Filter Bode Plot
set(subplot(2,1,1), 'XLim',[0 Fs/5]) % Optional
set(subplot(2,1,2), 'XLim',[0 Fs/5]) % Optional% signal_filt = filtfilt(sos, g, signal); % Filter Signal
Un-comment the filtfilt line to filter your signal.
I prefer to design my own filters, so try this:
Fs = 44100; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency (Hz)
Wp = ([-5 5]+2.2E+3)/Fn; % Stopband Frequency (Normalised)
Ws = ([-10 10]+2.2E+3)/Fn; % Passband Frequency (Normalised)
Rp = 1; % Passband Ripple (dB)
Rs = 50; % Stopband Ripple (dB)
[n,Ws] = cheb2ord(Wp,Ws,Rp,Rs); % Filter Order
[z,p,k] = cheby2(n,Rs,Ws,'stop'); % Filter Design, Sepcify Bandstop
[sosn,gn] = zp2sos(z,p,k); % Convert To Second-Order-Section For Stability
figure(3)freqz(sosn, 2^16, Fs) % Filter Bode Plot
filtered_signal = filtfilt(sosn, gn, original_signal); % Filter Signal
Best Answer