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.
Digital Bessel filter problem
57 ビュー (過去 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');
0 件のコメント
採用された回答
その他の回答 (1 件)
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 件のコメント
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 Center および File Exchange で Analog Filters についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!