Reply by crashbangwallop February 22, 20112011-02-22
>On Feb 21, 1:04=A0pm, "crashbangwallop" ><lewisluyken@n_o_s_p_a_m.hotmail.com> wrote: >> Hi >> >> I am trying to apply a bessel filter in C to data I pull from an >> oscilliscope. This is my first attempt at signal processing so excuse
any
>> idiocy that might follow. > >Why a Bessel filter? Those are quirky. > >> Is this the correct method; >> >> Take Z transform of data and find poles and zeros as its a discrete
time
>> signal >> >> Transfer to S domain >> >> Apply filter >> >> Transfer back to Z domain >> >> Inverse Z transform >> >> Result > >No. > >If you deal with digital filters that have analog prototypes, >the Z <--> s domain transforms has already been taken >care of when computing the Z domain filter coefficients >(look up 'pre warp' and 'bilinear transform'). > >In z domain you can do something like > >1) FFT signal >2) FFT filter coefficients or filter impulse response >3) Apply filter in frequency domain (details depend > on exactly what you did in step 2) >4) IDFT result back to time > >Rune >
Rune & Tim Thanks both for your advice. Tim you're spot on I want a linear phase response and I will be applying the filter to batches of data. I will go away and have a play with the fft method you suggest get back to you Best regards Lewis
Reply by Rune Allnor February 22, 20112011-02-22
On Feb 21, 1:04&#4294967295;pm, "crashbangwallop"
<lewisluyken@n_o_s_p_a_m.hotmail.com> wrote:
> Hi > > I am trying to apply a bessel filter in C to data I pull from an > oscilliscope. This is my first attempt at signal processing so excuse any > idiocy that might follow.
Why a Bessel filter? Those are quirky.
> Is this the correct method; > > Take Z transform of data and find poles and zeros as its a discrete time > signal > > Transfer to S domain > > Apply filter > > Transfer back to Z domain > > Inverse Z transform > > Result
No. If you deal with digital filters that have analog prototypes, the Z <--> s domain transforms has already been taken care of when computing the Z domain filter coefficients (look up 'pre warp' and 'bilinear transform'). In z domain you can do something like 1) FFT signal 2) FFT filter coefficients or filter impulse response 3) Apply filter in frequency domain (details depend on exactly what you did in step 2) 4) IDFT result back to time Rune
Reply by Tim Wescott February 21, 20112011-02-21
On 02/21/2011 04:04 AM, crashbangwallop wrote:
> Hi > > I am trying to apply a bessel filter in C to data I pull from an > oscilliscope. This is my first attempt at signal processing so excuse any > idiocy that might follow. Is this the correct method; > > Take Z transform of data and find poles and zeros as its a discrete time > signal > > Transfer to S domain > > Apply filter > > Transfer back to Z domain > > Inverse Z transform > > Result > > Cheers for any advice
Nope. You really don't want to mess with taking the z transform of data -- the z transform is really nice for analysis, but not nice at all for dealing with real-world data. If you could somehow do so, you wouldn't want to go into the s domain and back, either. Unless you're trying to do your analysis to some standard or prior experiment which demands that you use a Bessel filter, I suspect that what you really want to do is to just low-pass filter the data with something that is linear phase, doesn't ring too much, or both. If you're doing the work in batch mode (i.e. you get a big swath of data out of the o-scope, then process it), you probably want to: * Zero pad the data (or window it and zero-pad) * Take its FFT * Multiply the FFT by the filter's frequency-domain response * Take the inverse FFT * Enjoy the results. Note that you'll want to use a finite impulse response filter and zero pad the data by twice the filter length. If you're working on continuous data then what's best varies: you may still want to use an FFT method (although life gets more complex), you may want to use an infinite impulse response filter that's executed continuously (although a PC is not really suited for this), or you may want to use an FIR filter, doing the convolution continuously. Tell us more, we'll tell you more. -- 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 crashbangwallop February 21, 20112011-02-21
Hi

I am trying to apply a bessel filter in C to data I pull from an
oscilliscope. This is my first attempt at signal processing so excuse any
idiocy that might follow. Is this the correct method;

Take Z transform of data and find poles and zeros as its a discrete time
signal

Transfer to S domain

Apply filter

Transfer back to Z domain

Inverse Z transform

Result

Cheers for any advice
lewis