![]() When i decrease sample data length to about 3000 samples, filtered result is so bad because of number of filter's coefficients is about 4097. That is a great result for me, and filtered signal is :ġ- my sample data length is 60000 bytes, in other hand by sampling rate at 1000Hz, I wait for 60 Seconds for gathering data, and that is too long time!!! % Calculate the coefficients using the FIR1 function.ī = fir1(N, Wn, TYPE, kaiser(N+1, BETA), flag) Īnd filter amplitude for 20 iteration and random noise signal is : max(yfilter(40000:50000)) % Calculate the order from the parameters using KAISERORD. My filter is KAISER ( FIR Badpass filter ) : Fs = 1000 % Sampling Frequencyįstop1 = 14.2 % First Stopband Frequencyįpass1 = 14.6 % First Passband Frequencyįstop2 = 15.2 % Second Stopband Frequencyĭstop1 = 1e-06 % First Stopband Attenuationĭpass = 0.057501127785 % Passband Rippleĭstop2 = 1e-06 % Second Stopband Attenuation So, I Solve problem by decrease sample rate and increase sample data by this code: ( as Matt was Said ) Fs = 1000 % Sampling frequency If my sample rate be 8000Hz and I can buffered only 20000 samples, how can Designing a narrow bandpass filter? ![]() in this case,how can i use or choose the best filtering algorithm? What is the best sample rate for 50Hz signal? and very important question! in real world, like balancing system, the main signal is about 20Hz and environment is very too noisy and filtering by my solution does not give a correct answer. I'm doing something wrong in this simulation?.Why is this filter unable to extract the 50Hz signal?.Here is my code to design the filter: function Hd = HannFilter1ī = fir1(N, /(Fs/2), 'bandpass', win, flag) Īfter that, I do filtering using filter like this: yfilter = filter(Hd.Numerator,1,y) Now I want to extract the 50Hz signal by bandpass window filtering using a Hanning window. I wrote a signal with 3 different frequencies: Fs = 8000 %// Sampling frequency I'm working on signal filtering in MATLAB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |