From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to design a digital filter given roll-off in dB/Octave

Solved!
Go to solution

 

I am trying to design a filter in DFD based on the attached image "Filter Criteria". I believe the requirement given by this image is that the filter must lie somewhere between two possible "border" filters. I've convinced myself that the attached filter does not fit this criteria.

 

My thinking now is that this criteria could be met by either a butterworth filter as shown but with the stopband edge frequency at 250Hz instead of 100Hz, or by an elliptical filter with passband edge frequency of 100Hz and stopband edge frequency at 1066Hz, or any filter that lies between those two.

 

I'm looking for clarification on how to input the design criteria directly given the DFD toolkit, so namely whether there is a way to input the rolloff in dB/Octave, or if my alternate interpretation of that roll-off can be used to design a filter as shown.

 

 

Any help is, of course, appreciated.

 

 

Thanks,

Justin

 

Download All
0 Kudos
Message 1 of 3
(3,639 Views)
Solution
Accepted by g0dam0ng1n53ct5

Hi,

 

It looks like you were using the stopband point as your fN instead of putting it out at the corner of the -30dB line and the -9dB/Octave line.

 

If you do that, as well as use the 100Hz point as the edge of your passband, you should find that you can get a nice butterworth filter that is within your specifications. For reference, Here is something I came up with that looks like it fits your requirements:

 

DFD-LP.png

Trevor B.
PSE
National Instruments
Message 2 of 3
(3,564 Views)

I'm accepting your solution - and adding more information on why your filter meets the requirements.

 

My filter also had the additional requirement of using a sample rate of 1000Hz, so I had to change the stopband edge frequency based on that sample rate. I found that the rolloff rate corresponds directly to the order of the filter, and since for Butterworth filters, order 2 corresponds to 12dB/Octave, order 3 to 18dB/Octave, and order 4 to 24dB/Octave, any of those 3 orders of filter will fit my criteria. By adjusting the stopband freqency it's possible to change the order of the filter, so as below the stopband frequency of 327Hz gives an order 3 filter, which should be right in the middle of the acceptable range.

 

 

Thanks,

Justin

0 Kudos
Message 3 of 3
(3,509 Views)