Hi, I want to implement a bessel filter (Digital) (in c++, well but that i can think of my own how to implement it in c++, right now i just want to know how to implement it!!). Can you please guide me? (I'll fetch you further details abt. the filter viz. 4-pole etc. , once i get started). I want basically the following info to get started: 1.> What all consists of a digital bessel filter? I mean what all should the final output GENERALLY show? (given an input signal). 2.> What are the design equations? PS: My input signal will be sampled in time-domain. And yes, i have already developed fourier and bessel functions , if required , for any operations. Thanks & Regards, Raj!

# Bessel Filter (Digital)

Started by ●November 16, 2010

Reply by ●November 16, 20102010-11-16

>Hi, >I want to implement a bessel filter (Digital) (in c++, well but that ican>think of my own how to implement it in c++, right now i just want to know >how to implement it!!). Can you please guide me? (I'll fetch you further >details abt. the filter viz. 4-pole etc. , once i get started). I want >basically the following info to get started: > 1.> What all consists of a digital bessel filter? I mean what all >should the final output GENERALLY show? (given an input signal). > > 2.> What are the design equations? > >PS: My input signal will be sampled in time-domain. And yes, i havealready>developed fourier and bessel functions , if required , for anyoperations.> >Thanks & Regards, >Raj! >You can probably find everything you need along with a working C++ program here: http://www-users.cs.york.ac.uk/~fisher/mkfilter/

Reply by ●November 16, 20102010-11-16

raj malhotra wrote:> Hi, > I want to implement a bessel filter (Digital) (in c++, well but that i can > think of my own how to implement it in c++, right now i just want to know > how to implement it!!). Can you please guide me? (I'll fetch you further > details abt. the filter viz. 4-pole etc. , once i get started). I want > basically the following info to get started: > 1.> What all consists of a digital bessel filter? I mean what all > should the final output GENERALLY show? (given an input signal). > 2.> What are the design equations? > PS: My input signal will be sampled in time-domain. And yes, i have already > developed fourier and bessel functions , if required , for any operations.1. There is no direct digital counterpart to the Bessel filter function defined in analog domain. You can only approximate Bessel filter one way or another. This is neither simple nor elegant. 2. There is generally no need for digital Bessel filters as you can get perfectly linear phase with FIR. 3. Book: D. Schlichtcharlie "Digital Filters". He derives approximations for Bessel filter functions, too. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com

Reply by ●November 16, 20102010-11-16

On 11/16/2010 6:07 AM, Vladimir Vassilevsky wrote:> > > raj malhotra wrote: >> Hi, >> I want to implement a bessel filter (Digital) (in c++, well but that i >> can >> think of my own how to implement it in c++, right now i just want to know >> how to implement it!!). Can you please guide me? (I'll fetch you further >> details abt. the filter viz. 4-pole etc. , once i get started). I want >> basically the following info to get started: >> 1.> What all consists of a digital bessel filter? I mean what all >> should the final output GENERALLY show? (given an input signal). >> 2.> What are the design equations? >> PS: My input signal will be sampled in time-domain. And yes, i have >> already >> developed fourier and bessel functions , if required , for any >> operations. > > > 1. There is no direct digital counterpart to the Bessel filter function > defined in analog domain. You can only approximate Bessel filter one way > or another. This is neither simple nor elegant. > > 2. There is generally no need for digital Bessel filters as you can get > perfectly linear phase with FIR. > > 3. Book: D. Schlichtcharlie "Digital Filters". He derives approximations > for Bessel filter functions, too. > > > Vladimir Vassilevsky > DSP and Mixed Signal Design Consultant > http://www.abvolt.com3) Yes, and they're horrible to work with. I'm not necessarily sure there's blame to be ascribed there; at some point horrible math requires doing horrible math. But even those approximations are really only any good for a cutoff frequency WAY below Nyquist. Unless you've got both a) a very low cutoff frequency ( < 0.1 Fs ) and b) a serious aversion to doing polyphase filtering, the aforementioned FIR filter will make you a much happier person. -- Rob Gaddi, Highland Technology Email address is currently out of order

Reply by ●November 16, 20102010-11-16

On 11/16/2010 06:07 AM, Vladimir Vassilevsky wrote:> > > raj malhotra wrote: >> Hi, >> I want to implement a bessel filter (Digital) (in c++, well but that i >> can >> think of my own how to implement it in c++, right now i just want to know >> how to implement it!!). Can you please guide me? (I'll fetch you further >> details abt. the filter viz. 4-pole etc. , once i get started). I want >> basically the following info to get started: >> 1.> What all consists of a digital bessel filter? I mean what all >> should the final output GENERALLY show? (given an input signal). >> 2.> What are the design equations? >> PS: My input signal will be sampled in time-domain. And yes, i have >> already >> developed fourier and bessel functions , if required , for any >> operations. > > > 1. There is no direct digital counterpart to the Bessel filter function > defined in analog domain. You can only approximate Bessel filter one way > or another. This is neither simple nor elegant. > > 2. There is generally no need for digital Bessel filters as you can get > perfectly linear phase with FIR. > > 3. Book: D. Schlichtcharlie "Digital Filters". He derives approximations > for Bessel filter functions, too.Conclusion: if you're implementing a Bessel filter because you're replicating some creaky old analog thing in digital then you want to re-think what you're doing, and consider a FIR filter. If you know you have good reasons to implement an IIR filter with an approximately* linear phase delay** then feel free to proceed -- but you may have a long row to hoe. * 'cause it'll never be exact. ** I.e., severe processing resource constraints. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html

Reply by ●November 16, 20102010-11-16

On Nov 16, 12:54�pm, Tim Wescott <t...@seemywebsite.com> wrote:> > Conclusion: if you're implementing a Bessel filter because you're > replicating some creaky old analog thing in digital then you want to > re-think what you're doing, and consider a FIR filter. �If you know you > have good reasons to implement an IIR filter with an approximately* > linear phase delay** then feel free to proceed -- but you may have a > long row to hoe. > > * 'cause it'll never be exact. > > ** I.e., severe processing resource constraints. >could we be more clear as to why Bessel seems okay for analog and not with digital? i have never implemented a Bessel filter in either domain, i don't remember even doing it in school. i do remember seeing it and the design equations and such in sections besides that of other filters (Butterworth, Tchebyshev 1 and 2, Elliptical, Gaussian). i remember seeing plots of their group delay were pretty damn flat until well higher than the cutoff frequency (which was pretty sloppy compared to a Butterworth). the phase delay would also be pretty flat. now, i can imagine using the bilinear transform on it, the magnitude response will simply be warped with that tan() function, and the phase response will be similarly warped, but group delay or phase delay is calculated with the warped phase response and the *unwarped* frequency. if it was phase-linear in the analog domain, i wouldn't expect it to be in the digital domain, unless the cutoff frequency was much smaller than Nyquist. is that the essential reason that the discrete-time Bessel is a bitch? or is there something else i hadn't thought of? r b-j

Reply by ●November 16, 20102010-11-16

On 11/16/2010 2:27 PM, robert bristow-johnson wrote:> On Nov 16, 12:54 pm, Tim Wescott<t...@seemywebsite.com> wrote: >> >> Conclusion: if you're implementing a Bessel filter because you're >> replicating some creaky old analog thing in digital then you want to >> re-think what you're doing, and consider a FIR filter. If you know you >> have good reasons to implement an IIR filter with an approximately* >> linear phase delay** then feel free to proceed -- but you may have a >> long row to hoe. >> >> * 'cause it'll never be exact. >> >> ** I.e., severe processing resource constraints. >> > > could we be more clear as to why Bessel seems okay for analog and not > with digital? > > i have never implemented a Bessel filter in either domain, i don't > remember even doing it in school. i do remember seeing it and the > design equations and such in sections besides that of other filters > (Butterworth, Tchebyshev 1 and 2, Elliptical, Gaussian). i remember > seeing plots of their group delay were pretty damn flat until well > higher than the cutoff frequency (which was pretty sloppy compared to > a Butterworth). the phase delay would also be pretty flat. > > now, i can imagine using the bilinear transform on it, the magnitude > response will simply be warped with that tan() function, and the phase > response will be similarly warped, but group delay or phase delay is > calculated with the warped phase response and the *unwarped* > frequency. if it was phase-linear in the analog domain, i wouldn't > expect it to be in the digital domain, unless the cutoff frequency was > much smaller than Nyquist. > > is that the essential reason that the discrete-time Bessel is a > bitch? or is there something else i hadn't thought of? > > r b-j > >The Schlichtcharlie book that VV mentioned has discrete-time Bessel equations that basically prewarp the phase response so as to give an IIR filter with the same sort of mostly linearish phase though the pass band. My results with his equations have been pretty mediocre. What I think is going on is that, since the roll-off on a Bessel is so sloppy, as you start pushing Fc up towards Nyquist, the aliases of the filter response come back into play. Since the Bessel approximation is only linear through the passband, the out-of band alias of the filter response comes back around and delinearizes the higher frequency components until the attenuation finally wins. Either that or my transcription between Pascal and Octave was sloppy. -- Rob Gaddi, Highland Technology Email address is currently out of order

Reply by ●November 16, 20102010-11-16

On Nov 16, 11:54�am, Tim Wescott <t...@seemywebsite.com> wrote:> Conclusion: if you're implementing a Bessel filter because you're > replicating some creaky old analog thing in digital then you want to > re-think what you're doing, and consider a FIR filter. �Alas, the poor Bessel Filter gets no respect. It's not always about (approximately) linear phase, and it's not always about rolloff characteristics. The Bessel Filter is an IIR approximation to a Gaussian Filter. At filter orders greater than six or eight, it's a rather good approximation. A Gaussian Filter has the sometimes very attractive characteristics of zero overshoot and zero ringing in the time domain, as well as exhibiting the smallest duration-bandwidth product of any filter. Most of the time people don't much care about these things, but sometimes they do. When they do care, the Gaussian is the best. A Bessel Filter is very close to a Gaussian Filter in both domains. In the time domain, there's a tiny bit of overshoot and a tiny bit of ringing, but it's a lot better than other classical filter approximations and it's orders of magnitude better than linear-phase filters designed strictly in the frequency domain. Bilinear transform approximations are pretty good when the cutoff frequency is far below the folding frequency. FDLS does a rather nice job of approximation at higher cutoff frequencies, within reason. Greg

Reply by ●November 17, 20102010-11-17

Greg Berchin wrote:> Alas, the poor Bessel Filter gets no respect. > > It's not always about (approximately) linear phase, and it's not > always about rolloff characteristics. The Bessel Filter is an IIR > approximation to a Gaussian Filter. At filter orders greater than six > or eight, it's a rather good approximation. > > A Gaussian Filter has the sometimes very attractive characteristics of > zero overshoot and zero ringing in the time domain, as well as > exhibiting the smallest duration-bandwidth product of any filter. > Most of the time people don't much care about these things, but > sometimes they do. When they do care, the Gaussian is the best.I was surprised to learn that if the task is calculating moving average over the noisy data (using IIR filter), the Bessel filter of the 2nd order is the function to use. Bessel 2nd has the best settling time vs noise bandwidth. Although a simple real pole filter of the 2nd order is not very different from that. In the other words, Bessel response is good for measurement purposes, if the data is corrupt with white noise. Somehow this сommon fact isn't mentioned in EE textbooks.> A Bessel Filter is very close to a Gaussian Filter in both domains. > In the time domain, there's a tiny bit of overshoot and a tiny bit of > ringing, but it's a lot better than other classical filter > approximations and it's orders of magnitude better than linear-phase > filters designed strictly in the frequency domain. > Bilinear transform approximations are pretty good when the cutoff > frequency is far below the folding frequency. FDLS does a rather nice > job of approximation at higher cutoff frequencies, within reason. > > GregVladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com

Reply by ●November 17, 20102010-11-17

>>Hi, >>I want to implement a bessel filter (Digital) (in c++, well but that i >can >>think of my own how to implement it in c++, right now i just want toknow>>how to implement it!!). Can you please guide me? (I'll fetch you further >>details abt. the filter viz. 4-pole etc. , once i get started). I want >>basically the following info to get started: >> 1.> What all consists of a digital bessel filter? I mean what all >>should the final output GENERALLY show? (given an input signal). >> >> 2.> What are the design equations? >> >>PS: My input signal will be sampled in time-domain. And yes, i have >already >>developed fourier and bessel functions , if required , for any >operations. >> >>Thanks & Regards, >>Raj! >> > >You can probably find everything you need along with a working C++program>here: >http://www-users.cs.york.ac.uk/~fisher/mkfilter/Hi, Thanks for replying! I have checked out the link : http://www-users.cs.york.ac.uk/~fisher/mkfilter/ The link contains everything what i want, it contains the c++ source code for bessel filter which i can download. But a little problem which i am facing is that , there are 4 directories listed on the link: http://www-users.cs.york.ac.uk/~fisher/software/mkfilter/ And many files contain the c++ source code for bessel filter (along with butterworth and Chebyshev ). I am pretty ignorant abt. this topic, and thus pretty confused which code i can use out of the many listed there. Could you please help me out in streaming down the c++ code for ONLY bessel filter? Thanks in advance :) Raj!