DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Nov 1: register now to lock in today's rate
Register Now →

Calculate better derivative of an signal?

Started by Lox ●April 20, 2011
On Apr 26, 12:30&#4294967295;pm, Randy Yates <ya...@ieee.org> wrote:
> On 04/25/2011 10:44 PM, Vladimir Vassilevsky wrote: > > > > > Randy Yates wrote: > > >> The analytical, discrete-time derivative has impulse response > > >> h[n] = cos(n*pi) / n [proakis] > > > But this is simply wrong. > > > How about the signal x(n) = n ? > > Ha! Good point (again) Vlad! I tried analyzing this > and got a series that doesn't converge. > -- > Randy Yates &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% "So now it's getting late, > Digital Signal Labs &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% &#4294967295; &#4294967295;and those who hesitate > mailto://ya...@ieee.org &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;% &#4294967295; &#4294967295;got no one..."http://www.digitalsignallabs.com% 'Waterfall', *Face The Music*, ELO
Randy, the formula you stated is basically correct except that h[0] = 0. Since the formula for a derivative filter is based on the Fourier transform, I suspect it only works on input sequences for which a Fourier Transform exist. Unfortunately the Fourier transform (Discrete or Continuous) of Vlad's test signal does not exist. Cheers, David
On 04/26/2011 02:23 PM, Dave wrote:
> On Apr 26, 12:30 pm, Randy Yates<ya...@ieee.org> wrote: >> On 04/25/2011 10:44 PM, Vladimir Vassilevsky wrote: >> >> >> >>> Randy Yates wrote: >> >>>> The analytical, discrete-time derivative has impulse response >> >>>> h[n] = cos(n*pi) / n [proakis] >> >>> But this is simply wrong. >> >>> How about the signal x(n) = n ? >> >> Ha! Good point (again) Vlad! I tried analyzing this >> and got a series that doesn't converge. >> -- >> Randy Yates % "So now it's getting late, >> Digital Signal Labs % and those who hesitate >> mailto://ya...@ieee.org % got no one..."http://www.digitalsignallabs.com% 'Waterfall', *Face The Music*, ELO > > Randy, the formula you stated is basically correct except that h[0] = > 0.
Hi Dave, Yes, I saw that oversight after I posted it - thanks for pointing out the correction.
> Since the formula for a derivative filter is based on the Fourier > transform, I suspect it only works on input sequences for which a > Fourier Transform exist.
Well now that's an interesting conjecture. How do you arrive at it?
> Unfortunately the Fourier transform (Discrete or Continuous) of > Vlad's test signal does not exist.
Yes, I had realized that too (it's an infinite-energy, and non-periodic, signal). But I don't see the connection between this fact and the fact that the filter response to such a signal isn't what you'd expect. Proakis et al. simply start in the frequency domain, specifying the ideal differentiator as H(Omega) = j*Omega, -pi <= Omega <= +pi. Then they take the inverse z-transform to obtain the impulse response. I don't see anywhere in these steps an explanation for why this signal doesn't work. -- Randy Yates % "So now it's getting late, Digital Signal Labs % and those who hesitate mailto://yates@ieee.org % got no one..." http://www.digitalsignallabs.com % 'Waterfall', *Face The Music*, ELO

Dave wrote:

> On Apr 26, 12:30 pm, Randy Yates <ya...@ieee.org> wrote: > >>On 04/25/2011 10:44 PM, Vladimir Vassilevsky wrote: >> >> >> >> >>>Randy Yates wrote: >> >>>>The analytical, discrete-time derivative has impulse response >> >>>>h[n] = cos(n*pi) / n [proakis] >> >>>But this is simply wrong. >> >>>How about the signal x(n) = n ? >> >>Ha! Good point (again) Vlad! I tried analyzing this >>and got a series that doesn't converge.
> Randy, the formula you stated is basically correct except that h[0] = > 0. Since the formula for a derivative filter is based on the Fourier > transform, I suspect it only works on input sequences for which a > Fourier Transform exist.
Besides, it is based on assumption that the sampling theorem condition is satisfied. Which is not necessary in this case. VLV
On 04/26/2011 05:54 PM, Vladimir Vassilevsky wrote:
> [...] > Besides, it is based on assumption that the sampling theorem > condition is satisfied. Which is not necessary in this case.
Vlad, are you saying that an analog "ramp" signal violates the sampling theorem condition? If so, I agree. However... So what? The signal x[n] = n is a perfectly valid digital signal (at least in the analytical domain). By definition, it comes from some suitably-filtered analog signal - if you put it through an ideal DAC, you'd get *some* analog signal (perhaps not an analog ramp). If an algorithm calls itself a digital differentiator, I would expect it to operate correctly on any _digital_ input signal. If this signal is one (of possibly many) pathological signals that fail with the algorithm, while others are handled correctly, there must be a reason or condition on the input signal that can be expressed in the digital domain. I see no such reason or condition (yet). So you've brought up a quandary for me (so far)... -- Randy Yates % "So now it's getting late, Digital Signal Labs % and those who hesitate mailto://yates@ieee.org % got no one..." http://www.digitalsignallabs.com % 'Waterfall', *Face The Music*, ELO
On Apr 27, 10:43&#4294967295;am, Randy Yates <ya...@ieee.org> wrote:
> On 04/26/2011 05:54 PM, Vladimir Vassilevsky wrote: > > > [...] > > Besides, it is based on assumption that the sampling theorem > > condition is satisfied. Which is not necessary in this case. > > Vlad, are you saying that an analog "ramp" signal violates the > sampling theorem condition? If so, I agree.
Not the sampling condition, but the finite-sum-of-squares (of finite energy) condition.
> However... So what? The signal x[n] = n is a perfectly valid digital > signal (at least in the analytical domain). By definition, it comes > from some suitably-filtered analog signal - if you put it through an > ideal DAC, you'd get *some* analog signal (perhaps not an analog > ramp). > > If an algorithm calls itself a digital differentiator, I would expect > it to operate correctly on any _digital_ input signal.
Nope. Only those with finite 'energy'.
> If this signal is one (of possibly many) pathological signals that > fail with the algorithm, while others are handled correctly, there > must be a reason or condition on the input signal that can be > expressed in the digital domain. I see no such reason or condition > (yet). > > So you've brought up a quandary for me (so far)...
Well, the devil's in the details... Rune
On 04/27/2011 06:28 AM, Rune Allnor wrote:
> On Apr 27, 10:43 am, Randy Yates<ya...@ieee.org> wrote: >> On 04/26/2011 05:54 PM, Vladimir Vassilevsky wrote: >> >>> [...] >>> Besides, it is based on assumption that the sampling theorem >>> condition is satisfied. Which is not necessary in this case. >> >> Vlad, are you saying that an analog "ramp" signal violates the >> sampling theorem condition? If so, I agree. > > Not the sampling condition, but the finite-sum-of-squares > (of finite energy) condition.
What finite-sum-of-squares condition are you referring to?
>> However... So what? The signal x[n] = n is a perfectly valid digital >> signal (at least in the analytical domain). By definition, it comes >> from some suitably-filtered analog signal - if you put it through an >> ideal DAC, you'd get *some* analog signal (perhaps not an analog >> ramp). >> >> If an algorithm calls itself a digital differentiator, I would expect >> it to operate correctly on any _digital_ input signal. > > Nope. Only those with finite 'energy'.
Why? I realize there is a finite-energy condition on signals for which we wish to compute a Fourier transform, or Discrete Time Fourier Transform, but we're doing neither of those operations. -- Randy Yates % "So now it's getting late, Digital Signal Labs % and those who hesitate mailto://yates@ieee.org % got no one..." http://www.digitalsignallabs.com % 'Waterfall', *Face The Music*, ELO
On Apr 27, 1:04&#4294967295;pm, Randy Yates <ya...@ieee.org> wrote:
> On 04/27/2011 06:28 AM, Rune Allnor wrote: > > > On Apr 27, 10:43 am, Randy Yates<ya...@ieee.org> &#4294967295;wrote: > >> On 04/26/2011 05:54 PM, Vladimir Vassilevsky wrote: > > >>> [...] > >>> Besides, it is based on assumption that the sampling theorem > >>> condition is satisfied. Which is not necessary in this case. > > >> Vlad, are you saying that an analog "ramp" signal violates the > >> sampling theorem condition? If so, I agree. > > > Not the sampling condition, but the finite-sum-of-squares > > (of finite energy) condition. > > What finite-sum-of-squares condition are you referring to? > > >> However... So what? The signal x[n] = n is a perfectly valid digital > >> signal (at least in the analytical domain). By definition, it comes > >> from some suitably-filtered analog signal - if you put it through an > >> ideal DAC, you'd get *some* analog signal (perhaps not an analog > >> ramp). > > >> If an algorithm calls itself a digital differentiator, I would expect > >> it to operate correctly on any _digital_ input signal. > > > Nope. Only those with finite 'energy'. > > Why? I realize there is a finite-energy condition on signals for > which we wish to compute a Fourier transform, or Discrete Time > Fourier Transform, but we're doing neither of those operations.
Sorry, I read your first post where you cited Proakis a bit too quickly. I interpreted it as some Fourier domain operation. I can't see why you need a cos expression for differentiation in time domain. Rune