Maker Pro
Maker Pro

Analog Filter Design from Data Points?

Hello again, SEDers.

(I hate to "expose my ignorance" like this, but...)

I have a very-occasional need to design an analog filter, given a small
set of data points (e.g. ratio of input and output voltages for a
half-dozen frequencies).

I am looking for design-methods or procedures, and/or software tool(s),
that will facilitate or automate the design process.

I am not really even sure what the "standard" design procedure might
be, in this case. Currently, I use what I can remember from my basic
EE courses and try to roughly approximate in my mind what combination
of lowpass and highpass RC sections might be able to be combined in
series and/or parallel, to come close to the desired transfer function,
and then calculate very-approximate cutoff frequencies and amplitude
combinations, and then draw a schematic in LTSPice and tweak the
component values and architecture until the response matches the data
points. That last step can be quite tedious, which is mostly what has
driven me to make this request for help.

For example, below are the data points for a filter that I am currently
working on (which is for a filter that will help produce the correct
current levels (1 mA to 0.125 mA) versus frequency, for a
current-controlled resistance that will cause an audio-frequency ramp
generator to give a contant output-amplitude versus frequency):

60 Hz: 1.00v, 200 Hz: 1.20v, 750 Hz: 0.660v, 4.5kHz: 0.297v, 12 kHz:
0.178v, 22kHz: 0.125v.

I need to have the response at the data points above be accurate within
1%, but don't care what the response is like in between and outside the
data points' frequencies. [So, I realize that, for the six data points
above, I could just use six separate bandpass filters and sum their
outputs. But I think it "should" usually be able to be made more
parts-count-efficient (And board space is limited.). For the example
dataset above, for example, I came up with two parallel/summed
sections, each with three cascaded simple RC sections, i.e. a total of
six caps and six resistors, plus four opamps (for i/o buffering of each
parallel cascade), and one opamp and four resistors for summing, and a
couple of resistors for a voltage divider for the output of one of the
cascades (which could all change, somewhat, if I convert it to an
active-filter architecture), which is not yet optimized for component
count or performance, etc, etc.]

Actually, I can usually come up with the "rough approximation" for the
filter architecture and component values fairly quickly/easily. The
tedium usually lies in tweaking the component values, and possibly the
architecture, to get the response down from, say, 5% or 10% accuracy,
to 1% or less at every data point.

Since I currently use LTSpice for that "tweaking", I'm also looking
into being able to use LTSpice's features to automate that portion of
the process. I'm hoping that there is some good way to have it vary the
component values and stop when the response matches at the given data
points. (Anyone here know about that? I'm also posting a question about
that to the LT-Spice discussion group at www.yahoogroups.com.)

If anyone cares to offer any ideas, methods, procedures, advice,
software titles, websites, references, et al, I will truly appreciate
it.

Regards,

Tom Gootee
 
J

Jim Thompson

Hello again, SEDers.

(I hate to "expose my ignorance" like this, but...)

I have a very-occasional need to design an analog filter, given a small
set of data points (e.g. ratio of input and output voltages for a
half-dozen frequencies).
[snip]

If anyone cares to offer any ideas, methods, procedures, advice,
software titles, websites, references, et al, I will truly appreciate
it.

Regards,

Tom Gootee

No simple answers, but I find "Synthesis of Filters", Herrero and
Willoner, Prentice-Hall, 1966, very useful for the math necessary to
fit arbitrary shapes.

...Jim Thompson
 
D

Don Lancaster

Hello again, SEDers.

(I hate to "expose my ignorance" like this, but...)

I have a very-occasional need to design an analog filter, given a small
set of data points (e.g. ratio of input and output voltages for a
half-dozen frequencies).

I am looking for design-methods or procedures, and/or software tool(s),
that will facilitate or automate the design process.

I am not really even sure what the "standard" design procedure might
be, in this case. Currently, I use what I can remember from my basic
EE courses and try to roughly approximate in my mind what combination
of lowpass and highpass RC sections might be able to be combined in
series and/or parallel, to come close to the desired transfer function,
and then calculate very-approximate cutoff frequencies and amplitude
combinations, and then draw a schematic in LTSPice and tweak the
component values and architecture until the response matches the data
points. That last step can be quite tedious, which is mostly what has
driven me to make this request for help.

For example, below are the data points for a filter that I am currently
working on (which is for a filter that will help produce the correct
current levels (1 mA to 0.125 mA) versus frequency, for a
current-controlled resistance that will cause an audio-frequency ramp
generator to give a contant output-amplitude versus frequency):

60 Hz: 1.00v, 200 Hz: 1.20v, 750 Hz: 0.660v, 4.5kHz: 0.297v, 12 kHz:
0.178v, 22kHz: 0.125v.

I need to have the response at the data points above be accurate within
1%, but don't care what the response is like in between and outside the
data points' frequencies. [So, I realize that, for the six data points
above, I could just use six separate bandpass filters and sum their
outputs. But I think it "should" usually be able to be made more
parts-count-efficient (And board space is limited.). For the example
dataset above, for example, I came up with two parallel/summed
sections, each with three cascaded simple RC sections, i.e. a total of
six caps and six resistors, plus four opamps (for i/o buffering of each
parallel cascade), and one opamp and four resistors for summing, and a
couple of resistors for a voltage divider for the output of one of the
cascades (which could all change, somewhat, if I convert it to an
active-filter architecture), which is not yet optimized for component
count or performance, etc, etc.]

Actually, I can usually come up with the "rough approximation" for the
filter architecture and component values fairly quickly/easily. The
tedium usually lies in tweaking the component values, and possibly the
architecture, to get the response down from, say, 5% or 10% accuracy,
to 1% or less at every data point.

Since I currently use LTSpice for that "tweaking", I'm also looking
into being able to use LTSpice's features to automate that portion of
the process. I'm hoping that there is some good way to have it vary the
component values and stop when the response matches at the given data
points. (Anyone here know about that? I'm also posting a question about
that to the LT-Spice discussion group at www.yahoogroups.com.)

If anyone cares to offer any ideas, methods, procedures, advice,
software titles, websites, references, et al, I will truly appreciate
it.

Regards,

Tom Gootee

Do it digitally, of course.

Analog filters normally have shape factors. For any particular choice of
order and implementation, all points are predetermined.

Further, rude surprises involving phasing and group delay can be
expected with analog filter designs.

Linear phase digital filters are normally specified by selecting the
amplitude at a number of given points. The number of points determines
the number of taps needed.

Digital filters, of course, are smaller and cheaper than analog.

Tutorials at http://www.tinaja.com/glib/muse106.pdf and
http://www.tinaja.com/glib/muse105.pdf

Since the 24kHz response is more than twice the 12 kHz response,
parallel channels involving allpass or highpass summing will be required
with an analog route.

If you must use traditional analog, use my Active Filter Cookbook

http://www.amazon.com/exec/obidos/ISBN=075062986X/donlancastersgurA/103-7550021-8388634

--
Many thanks,

Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email: [email protected]

Please visit my GURU's LAIR web site at http://www.tinaja.com
 
D

Don Lancaster

Don said:
Hello again, SEDers.

(I hate to "expose my ignorance" like this, but...)

I have a very-occasional need to design an analog filter, given a small
set of data points (e.g. ratio of input and output voltages for a
half-dozen frequencies).

I am looking for design-methods or procedures, and/or software tool(s),
that will facilitate or automate the design process.

I am not really even sure what the "standard" design procedure might
be, in this case. Currently, I use what I can remember from my basic
EE courses and try to roughly approximate in my mind what combination
of lowpass and highpass RC sections might be able to be combined in
series and/or parallel, to come close to the desired transfer function,
and then calculate very-approximate cutoff frequencies and amplitude
combinations, and then draw a schematic in LTSPice and tweak the
component values and architecture until the response matches the data
points. That last step can be quite tedious, which is mostly what has
driven me to make this request for help.

For example, below are the data points for a filter that I am currently
working on (which is for a filter that will help produce the correct
current levels (1 mA to 0.125 mA) versus frequency, for a
current-controlled resistance that will cause an audio-frequency ramp
generator to give a contant output-amplitude versus frequency):

60 Hz: 1.00v, 200 Hz: 1.20v, 750 Hz: 0.660v, 4.5kHz: 0.297v, 12 kHz:
0.178v, 22kHz: 0.125v.

I need to have the response at the data points above be accurate within
1%, but don't care what the response is like in between and outside the
data points' frequencies. [So, I realize that, for the six data points
above, I could just use six separate bandpass filters and sum their
outputs. But I think it "should" usually be able to be made more
parts-count-efficient (And board space is limited.). For the example
dataset above, for example, I came up with two parallel/summed
sections, each with three cascaded simple RC sections, i.e. a total of
six caps and six resistors, plus four opamps (for i/o buffering of each
parallel cascade), and one opamp and four resistors for summing, and a
couple of resistors for a voltage divider for the output of one of the
cascades (which could all change, somewhat, if I convert it to an
active-filter architecture), which is not yet optimized for component
count or performance, etc, etc.]

Actually, I can usually come up with the "rough approximation" for the
filter architecture and component values fairly quickly/easily. The
tedium usually lies in tweaking the component values, and possibly the
architecture, to get the response down from, say, 5% or 10% accuracy,
to 1% or less at every data point.

Since I currently use LTSpice for that "tweaking", I'm also looking
into being able to use LTSpice's features to automate that portion of
the process. I'm hoping that there is some good way to have it vary the
component values and stop when the response matches at the given data
points. (Anyone here know about that? I'm also posting a question about
that to the LT-Spice discussion group at www.yahoogroups.com.)

If anyone cares to offer any ideas, methods, procedures, advice,
software titles, websites, references, et al, I will truly appreciate
it.

Regards,

Tom Gootee

Do it digitally, of course.

Analog filters normally have shape factors. For any particular choice of
order and implementation, all points are predetermined.

Further, rude surprises involving phasing and group delay can be
expected with analog filter designs.

Linear phase digital filters are normally specified by selecting the
amplitude at a number of given points. The number of points determines
the number of taps needed.

Digital filters, of course, are smaller and cheaper than analog.

Tutorials at http://www.tinaja.com/glib/muse106.pdf and
http://www.tinaja.com/glib/muse105.pdf

Since the 24kHz response is more than twice the 12 kHz response,
parallel channels involving allpass or highpass summing will be required
with an analog route.

If you must use traditional analog, use my Active Filter Cookbook

http://www.amazon.com/exec/obidos/ISBN=075062986X/donlancastersgurA/103-7550021-8388634

Oops. Shoulda been http://www.tinaja.com/glib/muse107.pdf not 106.

Determinent stuff in 106 has been superceeded by later Gauss Jordan
tutorials as well.

--
Many thanks,

Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email: [email protected]

Please visit my GURU's LAIR web site at http://www.tinaja.com
 
For example, below are the data points for a filter that I am currently
working on (which is for a filter that will help produce the correct
current levels (1 mA to 0.125 mA) versus frequency, for a
current-controlled resistance that will cause an audio-frequency ramp
generator to give a contant output-amplitude versus frequency):

For this problem, I would be tempted to use a circuit measure the
amplitude at *any* frequency as it is being generated and use that information
to supply a current to the attenuator that would adjust the amplitude so that it
becomes constant. That's a type of negative feedback also called a "servo".
The advantage would be that you wouldn't have to figure out anything in advance
and if the frequency ramp generator's output changed for any reason, the output
would remain constant.

Another way to do it, this time without feedback, would be to take the
ramp that controls the frequency and pass it through a piecewise-linear function
generator that would output the correct current for each desired data point.
The function generator could be as simple as a string of diodes and resistors.
The advantage here would be that you could use a variable resistor, pot, for
each frequency of interest and twidle it to get exactly the amplitude you
wanted.

Jim
 
J

Joerg

Hello Tom,
60 Hz: 1.00v, 200 Hz: 1.20v, 750 Hz: 0.660v, 4.5kHz: 0.297v, 12 kHz:
0.178v, 22kHz: 0.125v.

I need to have the response at the data points above be accurate within
1%, but don't care what the response is like in between and outside the
data points' frequencies. ...

In that case, why not build six simple bandpasses and run their outputs
into a summing node? The resistors into that summing node would be set
so you get exactly the desired amplitude for each.

A regular filter would not likely yield 1% accuracy. Except for very
elaborate digital ones.

Regards, Joerg
 
Don,

Gee, I wasn't expecting such well-known heavyweights to comment on my
little question. (Many thanks to you and Jim Thompson and the others,
for taking the time.)

Thanks for the pointers! I wasn't going to consider using digital, on
this board. But you just had to go and say the magic words, "smaller
and cheaper". So, my next stop will be at http://www.tinaja.com , to
check out your muses 105 and 107. Thanks again.

Regards,

Tom Gootee
tomgATfullnet.com
http://www.fullnet.com/u/tomg
 
Don,

Gee, I wasn't expecting such well-known heavyweights to comment on my
little question. (Many thanks to you and Jim Thompson and the others,
for taking the time.)

Thanks for the pointers! I wasn't going to consider using digital, on
this board. But you just had to go and say the magic words, "smaller
and cheaper". So, my next stop will be at http://www.tinaja.com , to
check out your muses 105 and 107. Thanks again.

Regards,

Tom Gootee
tomgATfullnet.com
http://www.fullnet.com/u/tomg
 
Jim,

The servo loop is an excellent suggestion. Thanks! To be honest, I
had already thought of doing that. And it is attractive, in my case,
since I already know HOW do do that, and recently designed a similar
one, for a different purpose, that used the output of a peak detector
and a feedback control loop to set and maintain the output amplitude of
a power amplifier that pushes a test signal into a device under test
(for the same unit for which I was thinking about the filter design
being discussed in this thread). Works perfectly. I may just do the
same thing, here, rather than spending any more time trying to get a
good-enough "pre-determined" filter designed. It might perform
better, overall, too, since it should be able to automatically correct
for certain types of circuit variations, etc.

Thanks again.

Regards,

Tom Gootee
 
Joerg,

Thanks for responding. I have read many of your posts, in the past,
and have learned a lot from them.

I did mention, in the next sentence after the one you quoted, that I
realized that I could just use six separate bandpass filters and sum
their outputs. And at least that's mathematically possible to do, with
the required accuracy.

If I don't decide to just use a servo loop, instead, or maybe a digital
filter, as Don Lancaster mentioned, then I will probably just use the
six separate bandpass filters, instead of spending any more time trying
to tweak a smaller-component-count filter architecture, to try to coax
it to within the required 1% response accuracy at the six frequencies.

Thanks again.

Regards,

Tom Gootee
 
J

Joerg

Hello Tom,
I did mention, in the next sentence after the one you quoted, that I
realized that I could just use six separate bandpass filters and sum
their outputs. And at least that's mathematically possible to do, with
the required accuracy.

Sorry, didn't see that. I responded in a break while moving an upright
piano, to lay tile where it was. Whew, you get pretty tired doing that
kind of stuff.
If I don't decide to just use a servo loop, instead, or maybe a digital
filter, as Don Lancaster mentioned, then I will probably just use the
six separate bandpass filters, instead of spending any more time trying
to tweak a smaller-component-count filter architecture, to try to coax
it to within the required 1% response accuracy at the six frequencies.

I think the separate filters may be the easiest solution. You really
don't want anything but resistors in the equations since caps under 5%
are rare and expensive.

For an active filter solution you would only need a few quad opamps of
the 10 Cent class. LM324 or something like that. Since you said space is
a concern many opamps come in TSSOP. Of course, if it is likely that the
frequencies and ratios might change a lot in the future then a digital
solution would be easier in the long run.

Switched-capacitor filters are another option. However, they never
really made a big splash in the market place so other than a few chips
from LTC and National there ain't much available. They are great though.
I have used them a lot in the early 90's.

If you are at liberty to say what this is all intended for there may be
other solutions, who knows.

Regards, Joerg
 
B

Ban

Joerg,

Thanks for responding. I have read many of your posts, in the past,
and have learned a lot from them.

I did mention, in the next sentence after the one you quoted, that I
realized that I could just use six separate bandpass filters and sum
their outputs. And at least that's mathematically possible to do,
with the required accuracy.

If I don't decide to just use a servo loop, instead, or maybe a
digital filter, as Don Lancaster mentioned, then I will probably just
use the six separate bandpass filters, instead of spending any more
time trying to tweak a smaller-component-count filter architecture,
to try to coax it to within the required 1% response accuracy at the
six frequencies.

Thanks again.

Regards,

Tom Gootee

Tom, if you want to make "inverse" filters, also the phase response is
necessary to design an appropriate compensation filter. The final response
will only be OK, if the dynamic behaviour is compensated for as well. If you
make bandpass filters, their Q-factor will cause a delayed overshoot since
the input is not static. When you want 1% accuracy the only approach is via
digital.
The appropriate software tools can be found on the net. I use Adobe Audition
with the Aurora plugins http://pcfarina.eng.unipr.it/aurora/download/
for this purpose, but you can also do it with Matlab or similar. These
progs will output an appropriate FIR-filter, which can be implemented
easily. You can do it in realtime on a PC, so there is no need to make
hardware to test it.
 

Similar threads

Top