# Overshoot when using Bessel filter

Here is simple code to illustrate overshoot using bessel filter:

sig = (np.random.rand(300)-0.5)*2
b, a = signal.bessel(5, np.asarray([10e3, 400e3])/(0.5*1e6), btype='bandpass')
sig_f = signal.filtfilt(b, a, sig)
print(np.amax(sig_f))
plt.plot(sig, label='input')
plt.plot(sig_f, label='filtered')
plt.legend()


I need a zero phase bandpass filter. I want to reduce overshoot as much as possible, that's why I'm using Bessel filter. But I still have some overshoot in some cases.

In this example, I would like to understand which parameters of my input signal/filter are closely related to overshoot. In my case, is it related to sharp transition in my signal? How can I prevent overshoot?

If it were a low-pass filter, I would say you need to turn the resonance (or $$Q$$) down enough that both poles are real.
but there are zeros for BPF also. one at DC and another at Nyquist. so maybe you have to turn down the $$Q$$ to $$\frac12$$ so that no pole is "ringing".
• yeah @Ben , i started figuring that out. $Q<\frac12$ is such a filter, but i would still call it "resonant", but maybe that's the wrong word for it. – robert bristow-johnson Apr 16 at 1:45