+ Reply to Thread
Results 1 to 8 of 8

Thread: Digital Filters In Matlab

  1. #1
    Mortalo Newbie
    Join Date
    Dec 2007
    Posts
    26

    Default Digital Filters In Matlab

    Sup yall !

    Does any of you know how can i make a digital low pass filter in mat lab 6.5
    or know of any page or tutorial where i can do that ?
    Thanks for your time.


  2. #2
    speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent
    Join Date
    May 2007
    Location
    USA
    Posts
    1,414

    Default

    Hello Mortalo,

    I am (or at least once was) an expert at digital filter design in Matlab. Do you have the signal processing toolkit installed with Matlab, or do you just have the basic installation?

  3. #3
    Mortalo Newbie
    Join Date
    Dec 2007
    Posts
    26

    Default

    hi speakerguy !
    that's good to hear.
    i guess just have the basic installation.
    Can you tell me which are those toolkits you're talking about ?

  4. #4
    speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent
    Join Date
    May 2007
    Location
    USA
    Posts
    1,414

    Default

    Type "help butter" in matlab. If you get the help for the M file then you have the toolkit.

    If not, then you either need to buy or find someone that has it.
    Last edited by speakerguy79; 5th July 2008 at 08:33 PM.

  5. #5
    speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent
    Join Date
    May 2007
    Location
    USA
    Posts
    1,414

    Default

    Actually, I have some formulae I derived that will translate analog (op-amp) based filters into their digital equivalents based on sampling period, resistor, capacitor, and inductor values. It uses the bilinear transform method.

    These should help you if you can design a lowpass filter in PSPICE or a similar program.

    http://www.hayenga.com/mark/NON-WEBP...econd_page.bmp

    http://www.hayenga.com/mark/NON-WEBP...third_page.bmp
    Last edited by speakerguy79; 5th July 2008 at 08:35 PM.

  6. #6
    silvarblade Good silvarblade Good
    Join Date
    Feb 2007
    Location
    The Motor city,USA
    Posts
    266

    Default

    you want to make filters in Matlab i-e simulate them or make practical circuit figures??
    I just cant come up with a good one!

  7. #7
    Mortalo Newbie
    Join Date
    Dec 2007
    Posts
    26

    Default

    hi !
    Sorry for the delay, ive been working and studying and when i get home all i want is to sleep.

    well im supposed to do a low pass filter in matlab 1st or 2nd order with a cutoff frecuency of 1k for example, but to tell you the truth i dont even know how to begin because i dont know how to use simulink and my man speakerguy79 was saying that i need a butter toolkit that i dont have.

    The diagram that speakerguy79 posted about the formulae, what do i do with that ? should i convert it to the Z transform ?

    Im very confused and thats my real problem right now.
    Last edited by Mortalo; 13th July 2008 at 06:06 PM.

  8. #8
    speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent speakerguy79 Excellent
    Join Date
    May 2007
    Location
    USA
    Posts
    1,414

    Default

    It is the conversion to the Z transform. It uses the bilinear transform to transfer H(s) to H(z). If you can design an op amp low pass filter like in the diagrams, then use the final formula at the end to get the H(z) coefficients. All values are in terms of ohms, farads, and henries. Td is the sampling interval. It will NOT be perfect, it will deviate a little bit at the ends of your frequency range. I can whip up in matlab whatever you want, or just give you the M file(s) for the butterworth function.

    Go here:

    http://www.daycounter.com/Filters/Sa...lculator.phtml

    and design a 2nd order lowpass filter with a -3dB frequency of 1000Hz. Give it a nice round resistor value of 1000 or so. Then have it calculate the capacitor values.

    Plug the resistor values, the capacitor values, and 1 / Fs = Td into the last equation on page 3. It will give you the H(z) coefficients of a 2nd order digital lowpass filter at 1000Hz.

    I'm sure there are calculators online for doing this directly into digital though.
    Last edited by speakerguy79; 13th July 2008 at 06:28 PM.

+ Reply to Thread

Similar Threads

  1. about Matlab
    By afesheir in forum General Electronics Chat
    Replies: 3
    Latest: 5th May 2008, 09:35 PM
  2. Need Help In Matlab
    By vicky877 in forum General Electronics Chat
    Replies: 2
    Latest: 23rd November 2007, 09:23 AM
  3. MATLAB
    By declan in forum General Electronics Chat
    Replies: 1
    Latest: 24th April 2006, 11:12 AM
  4. matlab
    By tigercotter in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 3rd March 2005, 04:08 PM
  5. matlab txt code
    By tigercotter in forum Electronic Projects Design/Ideas/Reviews
    Replies: 3
    Latest: 22nd February 2005, 01:31 PM

Tags for this Thread