As differentiation in the time domain corresponds to multiplication by s in the Laplace domain, it seems reasonable (to me) in terms of the Bilinear transform that multiplying the same digitized transfer function by 1-z^�� ------ 1+z^�� should give the same desired effect in discrete case. But why doesn't this work? (If I, however, just multiply by 1-z�� it ofcourse corresponds to a finite difference in the time domain.) Thanks _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?

# Differentiating impulse response

Started by ●May 8, 2007

Posted by ●May 8, 2007

gkn wrote:> As differentiation in the time domain corresponds to multiplication by s =in> the Laplace domain, it seems reasonable (to me) in terms of the Bilinear > transform that multiplying the same digitized transfer function by > > 1-z^=AF=B9 > ------ > 1+z^=AF=B9 > > should give the same desired effect in discrete case. But why doesn't this > work? (If I, however, just multiply by 1-z=AF=B9 it ofcourse corresponds =to a> finite difference in the time domain.)Multiplying with the above term makes a stable transfer function unstable (due to the pole at Nyquist). Differentiators are usually approximated with FIR filters. The approximation that works for you depends strongly on the band which you want to differentiate. First difference, second difference, antisymmetric difference etc. are all simple approximations to the ideal differentiator. Regards, Andor

Posted by ●May 8, 2007

>gkn wrote: >> As differentiation in the time domain corresponds to multiplication bys =>in >> the Laplace domain, it seems reasonable (to me) in terms of theBilinear>> transform that multiplying the same digitized transfer function by >> >> 1-z^=AF=B9 >> ------ >> 1+z^=AF=B9 >> >> should give the same desired effect in discrete case. But why doesn'tthis>> work? (If I, however, just multiply by 1-z=AF=B9 it ofcoursecorresponds =>to a >> finite difference in the time domain.) > >Multiplying with the above term makes a stable transfer function >unstable (due to the pole at Nyquist). > >Differentiators are usually approximated with FIR filters. The >approximation that works for you depends strongly on the band which >you want to differentiate. First difference, second difference, >antisymmetric difference etc. are all simple approximations to the >ideal differentiator. > >Regards, >Andor > >Thank you, Andor. Suppose the filter is just a simple one-pole resonator, is it possible to make a better differentiator (in this narrow passband) than just by multiplication with 1-z��? Thanks again _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?

Posted by ●May 8, 2007

On 8 Mai, 11:24, "gkn" <gei...@ii.uib.no> wrote:> >gkn wrote: > >> As differentiation in the time domain corresponds to multiplication by > s =3D > >in > >> the Laplace domain, it seems reasonable (to me) in terms of the > Bilinear > >> transform that multiplying the same digitized transfer function by > > >> 1-z^=3DAF=3DB9 > >> ------ > >> 1+z^=3DAF=3DB9 > > >> should give the same desired effect in discrete case. But why doesn't > this > >> work? (If I, however, just multiply by 1-z=3DAF=3DB9 it ofcourse > corresponds =3D > >to a > >> finite difference in the time domain.) > > >Multiplying with the above term makes a stable transfer function > >unstable (due to the pole at Nyquist). > > >Differentiators are usually approximated with FIR filters. The > >approximation that works for you depends strongly on the band which > >you want to differentiate. First difference, second difference, > >antisymmetric difference etc. are all simple approximations to the > >ideal differentiator. > > >Regards, > >Andor > > Thank you, Andor. Suppose the filter is just a simple one-pole resonator, > is it possible to make a better differentiator (in this narrow passband) > than just by multiplication with 1-z=AF=B9?Is a one-pole resonator a filter of the form H(z) =3D b0 + b1 z^-1 + b2 z^-2 / (1 - 2 cos(w0) z^-1 + z^-2) ? If so, you can apply a simple two-coefficient FIR filter that has a gain of w0 at w0 and a phase of 90=B0 at w0 (these two values completely specify the FIR). If I didn't screw it up, the filter h=3D[w0 cot(w0) -w0 csc(w0)] should have the required frequency response. Regards, Andor

Posted by ●May 9, 2007

>On 8 Mai, 11:24, "gkn" <gei...@ii.uib.no> wrote: >> >gkn wrote: >> >> As differentiation in the time domain corresponds to multiplicationby>> s =3D >> >in >> >> the Laplace domain, it seems reasonable (to me) in terms of the >> Bilinear >> >> transform that multiplying the same digitized transfer function by >> >> >> 1-z^=3DAF=3DB9 >> >> ------ >> >> 1+z^=3DAF=3DB9 >> >> >> should give the same desired effect in discrete case. But whydoesn't>> this >> >> work? (If I, however, just multiply by 1-z=3DAF=3DB9 it ofcourse >> corresponds =3D >> >to a >> >> finite difference in the time domain.) >> >> >Multiplying with the above term makes a stable transfer function >> >unstable (due to the pole at Nyquist). >> >> >Differentiators are usually approximated with FIR filters. The >> >approximation that works for you depends strongly on the band which >> >you want to differentiate. First difference, second difference, >> >antisymmetric difference etc. are all simple approximations to the >> >ideal differentiator. >> >> >Regards, >> >Andor >> >> Thank you, Andor. Suppose the filter is just a simple one-poleresonator,>> is it possible to make a better differentiator (in this narrowpassband)>> than just by multiplication with 1-z=AF=B9? > >Is a one-pole resonator a filter of the form > >H(z) =3D b0 + b1 z^-1 + b2 z^-2 / (1 - 2 cos(w0) z^-1 + z^-2) > >? > >If so, you can apply a simple two-coefficient FIR filter that has a >gain of w0 at w0 and a phase of 90=B0 at w0 (these two values completely >specify the FIR). If I didn't screw it up, the filter > >h=3D[w0 cot(w0) -w0 csc(w0)] > >should have the required frequency response. > >Regards, >Andor > >Do you have any references? I need to understand this in detail.. thank you! _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?

Posted by ●May 9, 2007

On 9 Mai, 09:53, "gkn" <gei...@ii.uib.no> wrote:> >On 8 Mai, 11:24, "gkn" <gei...@ii.uib.no> wrote: > >> >gkn wrote: > >> >> As differentiation in the time domain corresponds to multiplication > by > >> s =3D > >> >in > >> >> the Laplace domain, it seems reasonable (to me) in terms of the > >> Bilinear > >> >> transform that multiplying the same digitized transfer function by > > >> >> 1-z^=3DAF=3DB9 > >> >> ------ > >> >> 1+z^=3DAF=3DB9 > > >> >> should give the same desired effect in discrete case. But why > doesn't > >> this > >> >> work? (If I, however, just multiply by 1-z=3DAF=3DB9 it ofcourse > >> corresponds =3D > >> >to a > >> >> finite difference in the time domain.) > > >> >Multiplying with the above term makes a stable transfer function > >> >unstable (due to the pole at Nyquist). > > >> >Differentiators are usually approximated with FIR filters. The > >> >approximation that works for you depends strongly on the band which > >> >you want to differentiate. First difference, second difference, > >> >antisymmetric difference etc. are all simple approximations to the > >> >ideal differentiator. > > >> >Regards, > >> >Andor > > >> Thank you, Andor. Suppose the filter is just a simple one-pole > resonator, > >> is it possible to make a better differentiator (in this narrow > passband) > >> than just by multiplication with 1-z=AF=B9? > > >Is a one-pole resonator a filter of the form > > >H(z) =3D b0 + b1 z^-1 + b2 z^-2 / (1 - 2 cos(w0) z^-1 + z^-2) > > >? > > >If so, you can apply a simple two-coefficient FIR filter that has a > >gain of w0 at w0 and a phase of 90=B0 at w0 (these two values completely > >specify the FIR). If I didn't screw it up, the filter > > >h=3D[w0 cot(w0) -w0 csc(w0)] > > >should have the required frequency response. > > >Regards, > >Andor > > Do you have any references? I need to understand this in detail..Is this filter what you were looking for? Do we agree on what a "one pole resonator" is? What exactly don't you understand? I don't have any references, I calculated the filter coefficients while replying to your post. Regards, Andor

Posted by ●May 9, 2007

>On 9 Mai, 09:53, "gkn" <gei...@ii.uib.no> wrote: >> >On 8 Mai, 11:24, "gkn" <gei...@ii.uib.no> wrote: >> >> >gkn wrote: >> >> >> As differentiation in the time domain corresponds tomultiplication>> by >> >> s =3D >> >> >in >> >> >> the Laplace domain, it seems reasonable (to me) in terms of the >> >> Bilinear >> >> >> transform that multiplying the same digitized transfer functionby>> >> >> >> 1-z^=3DAF=3DB9 >> >> >> ------ >> >> >> 1+z^=3DAF=3DB9 >> >> >> >> should give the same desired effect in discrete case. But why >> doesn't >> >> this >> >> >> work? (If I, however, just multiply by 1-z=3DAF=3DB9 it ofcourse >> >> corresponds =3D >> >> >to a >> >> >> finite difference in the time domain.) >> >> >> >Multiplying with the above term makes a stable transfer function >> >> >unstable (due to the pole at Nyquist). >> >> >> >Differentiators are usually approximated with FIR filters. The >> >> >approximation that works for you depends strongly on the bandwhich>> >> >you want to differentiate. First difference, second difference, >> >> >antisymmetric difference etc. are all simple approximations to the >> >> >ideal differentiator. >> >> >> >Regards, >> >> >Andor >> >> >> Thank you, Andor. Suppose the filter is just a simple one-pole >> resonator, >> >> is it possible to make a better differentiator (in this narrow >> passband) >> >> than just by multiplication with 1-z=AF=B9? >> >> >Is a one-pole resonator a filter of the form >> >> >H(z) =3D b0 + b1 z^-1 + b2 z^-2 / (1 - 2 cos(w0) z^-1 + z^-2) >> >> >? >> >> >If so, you can apply a simple two-coefficient FIR filter that has a >> >gain of w0 at w0 and a phase of 90=B0 at w0 (these two valuescompletely>> >specify the FIR). If I didn't screw it up, the filter >> >> >h=3D[w0 cot(w0) -w0 csc(w0)] >> >> >should have the required frequency response. >> >> >Regards, >> >Andor >> >> Do you have any references? I need to understand this in detail.. > >Is this filter what you were looking for? Do we agree on what a "one >pole resonator" is? > >What exactly don't you understand? I don't have any references, I >calculated the filter coefficients while replying to your post. > >Regards, >Andor > >Well, I am not experienced with this, so I guess I should read some introductory material about differentiators. Do you know where to look? Anyway, my filter is actually a two (repeated) pole complex resonator with the digital transferfunction b0� H(z) = ---------- (1-a1*z��)� a1 can be chosen to be a1 = R*y = exp(-pi*df*T)*exp(2*pi*i*fc*T) where df is the bandwidth in Hz, and fc is the center frequency in Hz, and T is the sampling period. So yes, the filter is of the form you assumed (by choosing some of the coefficients to be zero). Now, is it easy to explain how you came up with your coefficients using this filter instead? Regards, GK _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?

Posted by ●May 9, 2007

On 9 Mai, 11:59, "gkn" <gei...@ii.uib.no> wrote:> >On 9 Mai, 09:53, "gkn" <gei...@ii.uib.no> wrote: > >> >On 8 Mai, 11:24, "gkn" <gei...@ii.uib.no> wrote: > >> >> >gkn wrote: > >> >> >> As differentiation in the time domain corresponds to > multiplication > >> by > >> >> s =3D3D > >> >> >in > >> >> >> the Laplace domain, it seems reasonable (to me) in terms of the > >> >> Bilinear > >> >> >> transform that multiplying the same digitized transfer function > by > > >> >> >> 1-z^=3D3DAF=3D3DB9 > >> >> >> ------ > >> >> >> 1+z^=3D3DAF=3D3DB9 > > >> >> >> should give the same desired effect in discrete case. But why > >> doesn't > >> >> this > >> >> >> work? (If I, however, just multiply by 1-z=3D3DAF=3D3DB9 it ofco=urse> >> >> corresponds =3D3D > >> >> >to a > >> >> >> finite difference in the time domain.) > > >> >> >Multiplying with the above term makes a stable transfer function > >> >> >unstable (due to the pole at Nyquist). > > >> >> >Differentiators are usually approximated with FIR filters. The > >> >> >approximation that works for you depends strongly on the band > which > >> >> >you want to differentiate. First difference, second difference, > >> >> >antisymmetric difference etc. are all simple approximations to the > >> >> >ideal differentiator. > > >> >> >Regards, > >> >> >Andor > > >> >> Thank you, Andor. Suppose the filter is just a simple one-pole > >> resonator, > >> >> is it possible to make a better differentiator (in this narrow > >> passband) > >> >> than just by multiplication with 1-z=3DAF=3DB9? > > >> >Is a one-pole resonator a filter of the form > > >> >H(z) =3D3D b0 + b1 z^-1 + b2 z^-2 / (1 - 2 cos(w0) z^-1 + z^-2) > > >> >? > > >> >If so, you can apply a simple two-coefficient FIR filter that has a > >> >gain of w0 at w0 and a phase of 90=3DB0 at w0 (these two values > completely > >> >specify the FIR). If I didn't screw it up, the filter > > >> >h=3D3D[w0 cot(w0) -w0 csc(w0)] > > >> >should have the required frequency response. > > >> >Regards, > >> >Andor > > >> Do you have any references? I need to understand this in detail.. > > >Is this filter what you were looking for? Do we agree on what a "one > >pole resonator" is? > > >What exactly don't you understand? I don't have any references, I > >calculated the filter coefficients while replying to your post. > > >Regards, > >Andor > > Well, I am not experienced with this, so I guess I should read some > introductory material about differentiators. Do you know where to look? > Anyway, my filter is actually a two (repeated) pole complex resonator with > the digital transferfunction > > b0=B2 > H(z) =3D ---------- > (1-a1*z=AF=B9)=B2 > > a1 can be chosen to be > > a1 =3D R*y =3D exp(-pi*df*T)*exp(2*pi*i*fc*T) > > where df is the bandwidth in Hz, and fc is the center frequency in Hz, and > T is the sampling period. > > So yes, the filter is of the form you assumed (by choosing some of the > coefficients to be zero). Now, is it easy to explain how you came up with > your coefficients using this filter instead?The exact filter doesn't matter. What matters is that you want an approximation of a differentiator over a narrow band centered at w0. If you decide for a two-tap FIR, then you have two degrees of freedom to define the frequency response of the FIR filter. In general, the frequency response of a real two- tap FIR is H(w) =3D h1 + h2 exp(-j w). If you want H(w0) =3D w0 exp(j pi/2) (which is the response of the differentiator at w0), then you have w0 exp(j pi/2) =3D h1 + h2 exp(-j w0) from which you can determine h1 and h2 using Euler's identites: w0 cos(pi/2) =3D 0 =3D h1 + h2 cos(-w0) w0 sin(pi/2) =3D w0 =3D h2 sin(-w0) This gives you the coefficient values that I posted. Regards, Andor

Posted by ●May 9, 2007

On May 8, 3:42 am, "gkn" <gei...@ii.uib.no> wrote:> As differentiation in the time domain corresponds to multiplication by s =in> the Laplace domain, it seems reasonable (to me) in terms of the Bilinear > transform that multiplying the same digitized transfer function by > > 1-z^=AF=B9 > ------ > 1+z^=AF=B9 > > should give the same desired effect in discrete case. But why doesn't this > work? (If I, however, just multiply by 1-z=AF=B9 it ofcourse corresponds =to a> finite difference in the time domain.) > > Thanks > > _____________________________________ > Do you know a company who employs DSP engineers? > Is it already listed athttp://dsprelated.com/employers.php?I wasn't sure exactly what you were after by you after by your post, but just in case you are looking for a method to perform differentiation in real time, there are other means to perform this function. Specifically, there are methods that calculate a real time derivative based on the difference between successive samples and the accuracy depends on the 'order' of your differences. As an example of what I mean by order, if you take the difference between two samples, this first order and the difference of these (first order) differences is second order and so on. If you are interested, Jack Crenshaw's book on Math Programming for real time systems goes into the subject in great detail.

Posted by ●May 15, 2007

>On May 8, 3:42 am, "gkn" <gei...@ii.uib.no> wrote: >> As differentiation in the time domain corresponds to multiplication bys =>in >> the Laplace domain, it seems reasonable (to me) in terms of theBilinear>> transform that multiplying the same digitized transfer function by >> >> 1-z^=AF=B9 >> ------ >> 1+z^=AF=B9 >> >> should give the same desired effect in discrete case. But why doesn'tthis>> work? (If I, however, just multiply by 1-z=AF=B9 it ofcoursecorresponds =>to a >> finite difference in the time domain.) >> >> Thanks >> >> _____________________________________ >> Do you know a company who employs DSP engineers? >> Is it already listed athttp://dsprelated.com/employers.php? > >I wasn't sure exactly what you were after by you after by your post, >but just in case you are looking for a method to perform >differentiation in real time, there are other means to perform this >function. Specifically, there are methods that calculate a real time >derivative based on the difference between successive samples and the >accuracy depends on the 'order' of your differences. As an example of >what I mean by order, if you take the difference between two samples, >this first order and the difference of these (first order) differences >is second order and so on. If you are interested, Jack Crenshaw's >book on Math Programming for real time systems goes into the subject >in great detail. > > >Hi again. You said that the discretized filter becomes unstable when using the bilinear transform on the new zero (by the differentiation). What I then find confusing is that there are many analog prototypes which have a zero like this. And the BLT of a stable filter is also a stable filter, so what's wrong here? _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?