Digital Bessel filter problem

76 次查看(过去 30 天)
I'm getting strange results under certain circumstances when using a digital Bessel filter. A minimal working example is shown below. I get similarly weird results using slight variations, such as using bilinear instead of impinvar, or by using the lower level functions rather than besself. The example raw data is simply a line with slope one (black). I expect the filtered signal (red) to be a line with the same slope, slightly delayed from the original. I can achieve this result with a higher cutoff frequency, or by using a different filter, such as Butterworth. Any ideas what it happening here? Thanks! R2015b
numpoints=10000;
data=1:numpoints;
sampling_freq=10;
order=8;
cutoff=0.03;
[b, a] = besself(order,cutoff*2*pi);
[bz, az] = impinvar(b,a,sampling_freq);
filtered=filter(bz,az,data);
plot(data,'k');
hold on
plot(filtered,'r');

采纳的回答

Scott Webster
Scott Webster 2016-3-31
I seem to have solved my problem. It appears that the issue is related to numerical limitations in the transfer function form of the filter. My solution is to use sosfilt instead: a second order sections representation. It appears that perhaps the Bessel transfer function coefficients become problematic at lower orders than for some other filters (for me with an eighth order lowpass filter with "low" cutoff), so it wasn't an immediately obvious concern.

更多回答(1 个)

Star Strider
Star Strider 2016-3-19
Bessel filters are excellent analogue (hardware) designs because of their lack of phase distortion. However the MATLAB documentation says:
  • besself does not support the design of digital Bessel filters.
and my reference (Proakis and Manolakis, Digital Signal Processing, 2007 p. 727) says ‘However, we should emphasize that the linear-phase characteristics of the analog [Bessel] filter are destroyed in the process of converting the filter into the digital domain by means of the transformations described previously.’
So if you want linear-phase filtering, use filtfilt with any filter design.
  8 个评论
Scott Webster
Scott Webster 2016-4-1
Thanks, interesting. Yeah, I am not trying to imply that the oscillations are a "problem" with the Butterworth filter, just that the two filters are, of course, different. And, as you point out, it is perhaps not trivial to try to define two different filter types to have the "same parameters" in the first place, so hard to compare.
Star Strider
Star Strider 2016-4-1
Actually, they don’t have the same parameters. The transfer functions of each are entirely different, as are their pass-bands and stop-bands.
The ‘correct’ filter design depends on what you want to do, and if you want to do it in software (discrete) or hardware (continuous).
Signal processing in any domain is quite definitely not a trivial exercise!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Frequency Transformations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by