I am using octave/matlab to get the coefficient of numerator and denominator of a filter with filter command such as butter or cheby1.

I just want to learn how do you convert this coeffecient to the value of passive components of Inductors and Capacitors?

For example, a second order butterworth filter with cutoff frequency 1000 Hz sample at 3000 Hz with the following command gives the following b and a coefficients of numerator and denominator respectively,

b=0.46554, 0.93108, 0.46554
a=1, 0.62147, 0.24069

How can we transform this into the value of passive inductors and capacitors?

  • 1
    \$\begingroup\$ Is this a 6th order butterworth filter you are describing? If it is you might want to consider using op-amps if the frequencies involved are not ultra RF because it's easier to achieve a practical solution because there are no interactions between 2nd order stages. \$\endgroup\$ – Andy aka Aug 4 '16 at 14:48
  • \$\begingroup\$ No it is a second order filter with a normalized cutoff frequency of 3k. Since you mentioned op-amp, why do we need them for higher order? \$\endgroup\$ – ezE Aug 5 '16 at 7:55
  • \$\begingroup\$ No - you do not need opamps for higher order. You always can select between passive and active filters (using opamps or other active devices). \$\endgroup\$ – LvW Aug 5 '16 at 9:01
  • \$\begingroup\$ ok cool. can you tell me the difference between op-amp and DSP audio chip? Do they do they perfrome the same function one is with the physical dievice the other with code? \$\endgroup\$ – ezE Aug 5 '16 at 9:44

For a second-order network it is rather simple:

Compare the coefficients of both transfer functions: (1) The generalized function with the factors a and b, resp. and (2) the function applicable to the chosen circuit configuration (involving L an C).

Of course, both functions must have the same form (polynominal in numerator and denomonator). From this comparison, you get (at least) two equations for calculating the parts values.

| improve this answer | |
  • \$\begingroup\$ Do you agree i need to move from Z-domain to s-domain for comparing the coeffecient with the chosen circuit transfer function? \$\endgroup\$ – ezE Aug 5 '16 at 8:25
  • \$\begingroup\$ Why do you suddenly speak about Z-domain? \$\endgroup\$ – LvW Aug 5 '16 at 9:01
  • \$\begingroup\$ I beg your pardon i thought the b and a coeffecient returned by filter are only for z domain but infact the b and a coeffecient can be used in s domain too. So it should be simple to compare the coeffecient of the analog filter circuit \$\endgroup\$ – ezE Aug 5 '16 at 13:30

There are a many implementations of op-amp filters and each has there own transfer function. Your job when realizing a filter you want to design is to find a transfer function or group of transfer functions for an analog op amp realization of the desired filter. For example when designing with sallen-key topologies of op-amps the transfer function looks like this $$ H(s)=\frac{V_{out}}{V_{in}} = \frac{Z_3*Z_4}{Z_1*Z_2+Z_3*(Z_1+Z_2)+Z_3*Z_4} $$ The choices for Z are \$ Z=R \$, \$Z=L*s\$ or \$ Z = \frac{1}{C*s} \$

the topology looks like this: enter image description here

In matlab you can seperate the filter designed by butter into biquads with tf2sos (second order sections) and then use a sallen key topology. (I'll let you do this) then find components (caps and resistors) that will match the transfer function values. $$ H_{total}(s)=H_{SOS1}(s)H_{SOS2}(s)... $$

There are also other op amp topological that have different transfer functions and different advantages too much to describe here, but here is a link. Keep in mind that real world implementations vary from the ideal transfer function models with opamps having limited bandwidth and components having parasitics. Since opamps have a dynamic range some filter implementations are better than others at preventing railing and improving noise. Simulate the filters with opamp models in spice to get an idea of how the filter will preform, with an AC analysis.

| improve this answer | |
  • \$\begingroup\$ What i understand is function tf2sos convert's from Z domain to series of second order Z domain(with a additional 1 in the coeffecient of denominator)?. For example with the above example of second order butterworth filter i get. sos=[1 2 1 1 0.62 0.24], g=0.4654. So i just need to use this coeffecient to convert it into s-domain and compare the coeffecient with the topology of analog circuit? \$\endgroup\$ – ezE Aug 5 '16 at 8:19
  • \$\begingroup\$ Yes the [sos,g] = tf2sos(b,a) needs b and a coefficents, then convert the second order sections back into the continuous domain. G is just a gain term that can be multiplied by \$H_{total}(s) \$ Double check your passband after you convert it back. Actually, I remember a much easier way if you know what your design specs are, just use TI's tool ti.com/tool/… I think Analog Devices makes one also. \$\endgroup\$ – Voltage Spike Aug 8 '16 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.