Analog Filter Design

Ryan J Kari
Innovating Resourcefully
8 min readDec 4, 2020

The satisfaction of filter design

Filter design is an area I have always enjoyed. The concepts are just a bit esoteric but can still be grasped when considering practical applications. Similarly, when first perusing a book or reference associated with filter design the implementation and terminology used often feels just out of grasp. However, with work and study these concepts turn into something that is both easily measurable and observable, which is a satisfying combination.

Engineers working with signals must dive into aspects of filter implementation, design, and execution periodically. A typical process involves:

  • studying the requirements for the application that requires filtering, such as determining how much attenuation is required at a particular frequency,
  • reviewing filter topologies, which is effectively choosing the combination of passive components and op-amps that will be used to implement the filter,
  • becoming familiar with resources associated with filter design, such as web-design tools and filter design handbooks,
  • and then carrying out an iterative feedback loop of designing a filter, simulating it, checking the results versus the requirements, and then iterating again.

Speaking from my experiences, at the end of this process, I feel very fluent in filter-design. However once the filter is designed, I do not have a reason to practice these skills until another project comes along for a year or more. At that point, I am not as fluent resulting in great inefficiencies when having to carry out a new design.

Getting up to speed

The following publication describes a step-by-step guide to designing a filter, focused on a notch filter that uses an analog Bainter filter topology. The same approach and methods can be applied to other filter types and topologies.

The approach I like to use is outlined in the Analog Devices Linear Circuit Design Handbook, Chapter 8. The overview of the approach is to start by defining the requirements for the filter, which allows the filter response to be defined. Within the “Linear Circuit Design Handbook” the filter tables that are provided, which represent the filter responses, are specifically for low-pass filters. Other types of filters such as high-pass, notch, and pass-band filters, can be designed by carrying out a filter transformation using the values provided from the filter tables. The result of the filter-transformation provides the values that define the frequencies and damping factors for each stage of the filter. When combined with a particular filter topology (e.g., Bainter, Sallen-Key, etc.), equations associated with the filter topology can be used to convert these frequencies and damping factors into the components required to create the filter.

What is useful about this approach outlined, is the filter response can be easily calculated for each filter stage. This is useful for choosing and optimizing component values, understanding the simulation results, and debugging the circuit. This information is available within circuit simulations, but it is often useful to have the pure theoretical simulation to serve as a baseline to compare with the simulation.

To make the process openly available and transparent, the Python Jupyter repository link to GitHub is located here, which can be cloned to be used for your own work. I thought making these tools and work available might be useful to our collective community.

Define the requirements

Filter responses of increasing filter order versus “brick wall”

The first step in designing a filter is to define the requirements for the filter, which means defining what frequencies or frequency ranges need to be ‘filtered’ defined by how much attenuation is required at these specific frequencies. It is important to recognize that no filter is a ‘brick wall.’ Even the best analog filter has a transition range between the passband (where frequency is not attenuated) and the stopband (where the frequency is attenuated for practical purposes). As demonstrated by the following image, I have always been surprised just how far away from a ‘brick wall’ filters are, and how difficult it is to only attenuate the frequency range of interest without interfering with other frequencies.

Even the definition of passband is quite imperfect, as it is typical that -3dB of attenuation defines the corner of the passband. In practice, this is the ratio of the output to the input of 0.707, which means that ~30% change in the output signal is accepted. As demonstrated by the previous image of attenuation versus normalized frequency, notice the deviation of the actual filter response versus the ideal response within the pass-band region.

An additional factor that is not inherently obvious is the flatness of the passband, as often 0.5 to 1dB of ripple are allowed throughout the pass-band region. The designer needs to consider that 0.5dB is ~5% change in the output to the input with 1dB a 10% change. For an engineer concerned with signal integrity, this might be a very alarming issue and needs to be carefully considered.

Choose a filter shape

Once the requirements have been defined, determine how many orders the filter requires and what type of filter response will meet these requirements. This can be estimated by considering the requirements and specifically how wide the filter transition region can be along with how much attenuation is required.

A second consideration is the requirements for the pass-band. If a flat pass-band is desired, a filter such as a Butterworth or Bessel is likely to be appropriate. If more attenuation is required at the expense of transient behavior within the pass-band, the Chebyshev filters often provide a good compromise. For the most aggressive filter, the Elliptic filter can be employed; however, in practice the non-linear group delay and ripple in the passband can be a deal-breaker.

I must admit that on the first filter I had designed within a production setting, I was too enamored by the excellent performance in the filter transition region and ability to use less filter orders to achieve the same amount of attenuation. The result was a filter that performed poorly in the pass-band and had several very undesirable characteristics for the application. Although not as ‘sexy,’ the lesson I learned is not to undervalue the performance of the filter within the pass-band.

Carry out the filter transform

If following the approach and the Linear Circuit Design Handbook, the filter response tables provide values for a low-pass filter. This is appropriate if using a low-pass filter, but if using high-pass, pass-band, or notch-filter, the appropriate frequencies and quality factors for each filter stage need to be computed. Equations can be used to convert the low-pass filter into a high pass implementation. The result on this is simply frequencies and quality factors (related to damping) for each stage, in which each stage provides two orders of filtering. These are used as inputs to allow the specific components to be calculated once a filter topology in chosen, such as a Bainter configuration. This is carried out within the Jupyter notebook for a notch filter.

Choosing a filter topology

Choosing a filter topology is a publication-in-itself. To provide a sensible path, it is best to read the summaries of each filter topology within the Linear Circuit Design Handbook. If the choice for your application is not immediately clear, a suitable approach is to explore each option by carrying out a Monte Carlo simulation using different Op-Amps and passives, and considering parameters such as component availability, footprint size, and cost, to determine what topology best meets the requirements for the application.

Not all stages are the same

Each filter stage is configured to provide a specific filter response. A 6th order notch filter has three filter stages. Non-intuitively, each stage provides a different response. If there are an odd number of stages, one stage features overshoot with an underdamped response, another stage features undershoot with an overdamped response, with a final stage symmetric about the notch frequency. An example of this is shown in the following picture for a notch filter centered at 30kHz. The information associated with the characteristics of each stage is captured in the frequencies and quality factors provided by the filter transformation.

Calculate component values

When designing a filter and picking components, part of the process involves choosing several initial values for the passive components. These initial values will scale the subsequent calculated values for the remaining components. Following the calculation, inspect the values for all components. It is considered best practice that all capacitor values remain in the range of 50pF to 10uF and resistors are in the range of 50 ohms to 500,000 ohms. If at the extreme ends of these values, issues associated with the Op-Amps chosen can typically be identified in a circuit simulation.

Convert values into a full system

After each stage is constructed, I find it best practice to calculate the transfer functions of each stage using the component values selected rather than from the frequencies and damping factors identified in the filter transformation. While the frequencies and damping factors can be used, using the component values can allow the values of available components to be used along with their associated tolerances. The influence of this will often be imperceptible when looking at the individual stages, but will be more pronounced when looking at the composite of all stages acting together. Small variations in the frequencies of each stage can make considerable differences on the filter, as the depth of the completed notch filter is dependent upon the alignment of the frequencies of each stage. This can be seen in the image below comparing an ideal response to another with passive values that vary less than 0.5% on a single stage of a three-stage notch filter.

Circuit simulation

A final indispensable validation check can be carried out with a circuit simulator. The Op-Amp characteristics such as gain-bandwidth product and slew-rate can make a considerable difference on the filter characteristics. Comparing differences in the filter response between the theoretical response curves and those from the circuit simulator can provide an extra bit of confidence that the filter can be built into a protoboard or PCB and be successfully released.

Overview

Filter design does not have to be difficult. There is plenty of literature available on the subject and its one of the nice areas in which theory and simulation can elegantly come together. I hope this overview combined with the Jupyter notebook will make life easier and offer some benefits. Thank you for your interest.

--

--

Ryan J Kari
Innovating Resourcefully

Runner. Biker. CTO. Dad. Ever curious. Certainly not in that order.