Butterworth, Bessel, Chebychev, and sinc low-pass filters are used in various cases where there are different tradeoffs between having a uniformly-decreasing frequency response, a uniform phase response, a steep cutoff, or "brick-wall" response. I believe all such filters can, in some cases, can have overshoot on their step response, meaning their impulse response is in some places negative.

What would be the optimal frequency response, or what types of frequency responses would be available, in a filter whose only constraint was that the impulse response could not be negative anyplace? Certainly it's possible to have a low-pass filter meeting such a constraint, since a basic RC filter will do so (though the response of such a filter is a bit crummy). Would the optimal impulse response be a normal distribution curve, or something else?

  • 1
    \$\begingroup\$ @supercat, if you include digital filtering, it is pretty amazing how brick wall a response you can get without overshoot. \$\endgroup\$ – Kortuk May 8 '11 at 1:29
  • 2
    \$\begingroup\$ @Kortuk: Really? I would think it would be hard to avoid overshoot, since a brick-wall-filtered square wave has little spikes whose width approaches zero as the cutoff frequency rises but whose amplitude does not. What would be a good reference? \$\endgroup\$ – supercat May 8 '11 at 1:34
  • 2
    \$\begingroup\$ You say "non-causal" in the question, but all your examples are causal. Which do you mean? Non-causal requires you to record the entire waveform and then apply the filter to the recording. (Or, perhaps, the use of flux capacitors and large power sources.) \$\endgroup\$ – endolith May 9 '11 at 19:22
  • 1
    \$\begingroup\$ @endolith: What would be the optimum filter, assuming it's not required to be causal. \$\endgroup\$ – supercat May 9 '11 at 19:59
  • 1
    \$\begingroup\$ @Kortuk: Clipping the signal at zero is going to totally annihilate any benefits of filtering. And while I'm posting in DSP, I'm also curious about things like audio film recorders (from an intellectual rather than practical aspect admittedly) where one can make whatever non-negative impulse function one wants, subject to a width constraint. \$\endgroup\$ – supercat May 10 '11 at 13:51

I'm going to list of bunch of "filters that don't overshoot". I hope you'll find this partial answer better than no answer at all. Hopefully people looking for "a filter that doesn't overshoot" will find this list of such filters helpful. Perhaps one of these filters will work adequately in your application, even if we haven't found the mathematically optimum filter yet.

first and second order LTI causal filters

The step response of a first order filter ("RC filter") never overshoots.

The step response of a second order filter ("biquad") can be designed such that it never overshoots. There are several equivalent ways of describing this class of second-order filter that doesn't overshoot on a step input:

  • it is critically damped or it is overdamped.
  • it is not underdamped.
  • the damping ratio (zeta) is 1 or more
  • the quality factor (Q) is 1/2 or less
  • the decay rate parameter (alpha) is at least the undamped natural angular frequency (omega_0) or more

In particular, a unity gain Sallen–Key filter topology with equal capacitors and equal resistors is critically damped: Q = 1/2 , and therefore does not overshoot on a step input.

A second-order Bessel filter is slightly underdamped: Q = 1/sqrt(3) , so it has a little overshoot.

A second-order Butterworth filter is more underdamped: Q = 1/sqrt(2) , so it has more overshoot.

Out of all possible first-order and second-order LTI filters that are causal and do not overshoot, the one with the "best" (steepest) frequency response are the "critically damped" second-order filters.

higher-order LTI causal filters

The most commonly-used higher-order causal filter that has an impulse response that is never negative (and therefore never overshoots on a step input) is the "running average filter", also called the "boxcar filter" or the "moving average filter".

Some people like to run data through one boxcar filter, and the output from that filter into another boxcar filter. After a few such filters, the result is a good approximation of the Gaussian filter. (The more filters you cascade, the closer the final output approximates a Gaussian, no matter what filter you start with -- boxcar, triangle, first-order RC, or any other -- because of the central limit theorem).

Practically all window functions have an impulse response that is never negative, and so in principle can be used as FIR filters that never overshoot on a step input. In particular, I hear good things about the Lanczos window, which is the central (positive) lobe of the sinc() function (and zero outside that lobe). A few pulse shaping filters have an impulse response that is never negative, and so can be used as filters that never overshoot on a step input.

I don't know which of these filters is the best for your application, and I suspect the mathematically optimum filter may be slightly better than any of them.

non-linear causal filters

The median filter is a popular non-linear filter that never overshoots on a step-function input.

EDIT: LTI noncausal filters

The function sech(t) = 2/( e^(-t) + e^t ) is its own Fourier transform, and I suppose could be used as a kind of non-causal low-pass LTI filter that never overshoots on a step input.

The non-causal LTI filter that has the (sinc(t/k))^2 impulse response has a "abs(k)*triangle(k*w)" frequency response. When given a step input, it has a lot of time-domain ripple, but it never overshoots the final settling point. Above the high-frequency corner of that triangle, it gives perfect stop-band rejection (infinite attenuation). So in the stop band region, it has better frequency response than a Gaussian filter.

Therefore I doubt the Gaussian filter gives the "optimal frequency response".

In the set of all possible "filters that don't overshoot", I suspect there is no one single "optimal frequency response" -- some have better stop-band rejection, while others have narrower transition bands, etc.

| improve this answer | |
  • \$\begingroup\$ Thanks for your reply. I'd neglected to restrict my question to linear filters, though of course characterizing the frequency response of a non-linear filter can be a murky proposition. As noted, cascading the boxcar filter causes it to approach a Gaussian. I was wondering if the Gaussian filter has the optimal frequency response that can be obtained without overshoot. In writing the question, I was thinking about various analogue processes which perform something like a defined impulse-response filter, e.g. blurring camera or display pixels to minimize aliasing. \$\endgroup\$ – supercat Oct 11 '11 at 3:40
  • \$\begingroup\$ It's possible to construct a camera so that each pixel picks up varying amounts of light from various points around the center. Ideally, a camera would filter out everything above Nyquist without blurring anything below, but in practice that's not likely to happen. \$\endgroup\$ – supercat Oct 11 '11 at 4:33
  • 1
    \$\begingroup\$ LTI? You never define it. Adding that it means "linear time-invariant", would probably be helpful. \$\endgroup\$ – Connor Wolf Oct 13 '11 at 5:23
  • 1
    \$\begingroup\$ So Q = 0.5 is critically-damped? For a given order, are there multiple systems that are critically-damped? The biquad with Q = 0.5 is called the LR2 Linkwitz-Riley filter. Looks like higher-order versions of the LR filter have ringing in the step response, though. \$\endgroup\$ – endolith Mar 14 '13 at 19:37
  • \$\begingroup\$ "cascading critically-damped filters will result in another critically-damped filter" So just keep dumping poles at -1 and it will always be critically-damped? (And approach a Gaussian filter response as the number increases?) \$\endgroup\$ – endolith Mar 14 '13 at 20:10

Most of the filters used in the digital world are just sampled version of the analog counterpart. A large reason for this is that there was lots of work done in analog filtering before digital came along, so rather then reinventing the wheel, most just used prior designs. The advantage to digital though is that a higher order filter can be achieved much easier then in the analog world. Just imagine of complex a circuit get every time you add another order to the design.

If you are going for a brick wall type filter the Gaussian curve is a pretty good place to start. If you know about Time Domain <-> Frequency Domain; a Gaussian transforms into a Gaussian in the other domain. As it gets winder in one, it gets narrower in the other. So in order to get a perfect spike in frequency domain you would need an infinite amount of samples.

If you happen to have Matlab available for use, you should check out some of the built in filter design tools. Here is a link talking about Butterworth and Bessel. The design tools allows you to specify certain aspects of the filter. These aspects changes for each filter type, but some examples are Passband, stopband, ripple, etc. If you give the designer the constraints you want, it will either give you an error (meaning it can't make that filter with that filter type) or it will give you a filter with the minimum order required to meet spec.

| improve this answer | |
  • \$\begingroup\$ A Gaussian fits the requirement for a nonnegative impulse response, but it's not much of a brick wall. On the other hand, Butterworth, Bessel, and Chebyshev have sinc-like oscillations in their impulse response, leading to overshoot. Of those the Bessel filter has the least overshoot since it has a nearly flat group delay (linear phase) in the passband. \$\endgroup\$ – Eryk Sun May 11 '11 at 23:11
  • \$\begingroup\$ Other than the Gaussian, these filters are causal. For offline processing, a linear phase NNFIR (nonnegative FIR) would work well, or you can cancel the phase distortion of a causal recursive filter by using the filtfilt technique.... Of course you still need a way to design an NNIR LPF to avoid overshoot/undershoot. Suggestions anyone? References? \$\endgroup\$ – Eryk Sun May 12 '11 at 1:55
  • \$\begingroup\$ @eryksun, as a side note, if it is going to oscillate at 1.05 times the value max, just damp that to stop at 1.00 and your step response will be a little less, like .96 when stable. Problem solved. \$\endgroup\$ – Kortuk Oct 11 '11 at 4:48
  • \$\begingroup\$ @Kortuk: Problem solved in the time domain, but doing that clipping is not only non-linear but also opens certain parts of the frequency domain to pass signal that didn't previously. He wants to the tightest possible pass / no pass filter in frequency without overshoot in the time domain. No time domain overshoot is the same as saying the impulse response is never negative. \$\endgroup\$ – Olin Lathrop Oct 12 '11 at 23:07
  • 1
    \$\begingroup\$ @Kortuk: In some domains, zero is near the midpoint between maximum and minimum, and scaling a signal toward the midpoint will avoid problems with overshoot. In other domains, such as imaging, zero is the minimum, and dynamic range is most important there; it would generally be better to have a "fuzzier" filter that doesn't overshoot than a sharper one that does. \$\endgroup\$ – supercat Jun 16 '15 at 17:50

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.