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
    27 views (last 30 days)
  
       Show older comments
    
    Scott Webster
      
 on 19 Mar 2016
  
    
    
    
    
    Commented: Star Strider
      
      
 on 1 Apr 2016
            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 Comments
Accepted Answer
More Answers (1)
  Star Strider
      
      
 on 19 Mar 2016
        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 Comments
  Star Strider
      
      
 on 1 Apr 2016
				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!
See Also
Categories
				Find more on Analog Filters in Help Center and File Exchange
			
	Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!