+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Full Member level 3
    Points: 1,342, Level: 8

    Join Date
    Dec 2011
    Posts
    172
    Helped
    4 / 4
    Points
    1,342
    Level
    8

    Need help with the IIR fitler design to filter pulse signals

    Hello,

    I already used an FIR lowpass fitler as shown below with a fc=4Hz and sampling freq=100Hz for the data attached

    Code:
    Hf = fdesign.lowpass('N,Fc',31,4,100);
    Hd =design (Hf);
    Coeff= Hd.Numerator;
    data3= filtfilt(Hd.Numerator,1,a);
    But, I now I want to design the IIR fitler for the same to check the difference between the both implementation with the microcontroller.

    can someone help with the better lowpass IIR filter design in matlab for the input pulse signal (data attached) if the needed fc=4Hz and sampling freq=100Hz.

    pulse_data5000.txt


    Thanks.

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 248,101, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    43,152
    Helped
    13128 / 13128
    Points
    248,101
    Level
    100

    Re: Need help with the IIR fitler design to filter pulse signals

    Read the Matlab help aboit IIR design methods. fdesign.lowpass('N,Fc',...) is only valid for FIR.

    Apart from this point I don't agree with your assumption about "better lowpass IIR filter". FIR is basically good, although order of 31 is insufficient for a good lowpass filter with fc/fs = 4/100.



    •   AltAdvertisment

        
       

  3. #3
    Full Member level 3
    Points: 1,342, Level: 8

    Join Date
    Dec 2011
    Posts
    172
    Helped
    4 / 4
    Points
    1,342
    Level
    8

    Re: Need help with the IIR fitler design to filter pulse signals

    I guess you misunderstood me.
    Sorry, its my fault for not explaining this clearly "design the IIR fitler for the same".
    I mean I want use the same data for designing the IIR filter but not the same method of FIR.

    1)you said"although order of 31 is insufficient for a good lowpass filter with fc/fs = 4/100."
    Waht is the formual used to calculate the best or sufficient order for requirements.

    2)can I get some help with the IIR filter design implementation like with selection of type(chebyshev type I or type II or butterworth or any other method) and order to be used for my requirement.
    Thanks.
    Last edited by patan.gova; 1st March 2014 at 18:52.



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 248,101, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    43,152
    Helped
    13128 / 13128
    Points
    248,101
    Level
    100

    Re: Need help with the IIR fitler design to filter pulse signals

    I understood you well. The answer is in the Matlab help. You have to review the required fdesign syntax for IIR filter.

    A 5th order butterworth filter can be e.g. requested

    Hf = fdesign.lowpass('N,F3dB',5,4,100);
    Hd =design (Hf,'butter');



  5. #5
    Full Member level 3
    Points: 1,342, Level: 8

    Join Date
    Dec 2011
    Posts
    172
    Helped
    4 / 4
    Points
    1,342
    Level
    8

    Re: Need help with the IIR fitler design to filter pulse signals

    FvM : Thanks and you said "although order of 31 is insufficient for a good lowpass filter with fc/fs = 4/100."
    can I know how to get (or know) the best or sufficient order for requirements.



--[[ ]]--