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?