Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Digital Filters In Matlab

Status
Not open for further replies.

Mortalo

New Member
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.
 
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?
 
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 ?
 
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:
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.

**broken link removed**

**broken link removed**
 
Last edited:
you want to make filters in Matlab i-e simulate them or make practical circuit figures??
 
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:
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:

https://www.daycounter.com/Filters/Sallen-Key-LP-Calculator.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:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top