DSPRelated.com
Forums

derivative (chain rule) in DFT?

Started by Peter Mairhofer July 9, 2014
Hi,

I have a DTFT function Y(w) which is also a function of a: Y(w,a) (it's
actually a sum with a as coefficient)

Another function Yl(w) is the l-fold convolution of Y:

Yl(omega) = Y(w) * ... * Y(w)
             \             /
                 l-times

Now I want to take the derivative wrt. c, so I do:

dYl(w)/dc = dYl(w)/dY(w) * dY(w)/dc

Y and Yl are continuous functions, so the derivative operator is well
defined (given it exists, of course!)

However, now I have an N-periodic signal and therefore want to use the DFT.

The equation then becomes (w=pi2k/N):

dYr[k]/dc = dYr[k]/dY[k] * dY[k]/dc

While "dY[k]/dc" is trivial, I don't know how to deal with
"dYr[k]/dY[k]" - obviously this does not really make sense.

But there must be a way to generalize this also for the DFT!

Thanks
Peter

Hi,

I am still in big hope that someone has an idea about this.
Additional comments:

First: In my post below I used both "a" and "c" for the coefficient.
That's a mistake, there is just one coefficient (i.e., "a" and "c" are
the same).

Second: Meanwhile I tried two approaches.

1.)

dYr[k]/dY[k] = dYr[k]/dk * (dY[k]/dk)^-1
             = DFT{-j*n*yr[n])}/DFT{-j*n*y[n]}
             = DFT{n*yr[n])}/DFT{n*y[n]}

What's problematic here is that I just apply the differentiation as if
"k" would be a continous variable, i.e. I do as if I would use the DTFT.
[1] suggests this should work.

On the other hand, if I pretend that y[n] and yr[n] are infinite but
periodic signals and I write it using the DTFT and do the math I get

               Sum_{-infty}^infty -j n y[n] e^(-jwn)

which is not periodic any more, so I can't go back to DFT.

2.) Based on the first line I do the approximation

dY[k]/dk \approx (Y[k+1] - Y[k])/(k+1-k) = Y[k+1] - Y[k]

Then the result is (differently from above):

dYr[k]/dY[k] \approx (Yr[k+1] - Yr[k])/(Y[k+1] - Y[k])


Unfortunately both approaches do not get me to the expected result and
from these two (2) even less.

Thanks,
Peter


[1]
http://www.tricki.org/article/Use_Fourier_transforms_to_calculate_derivatives

On 2014-07-08 23:35, Peter Mairhofer wrote:
> I have a DTFT function Y(w) which is also a function of a: Y(w,a) (it's > actually a sum with a as coefficient) > > Another function Yl(w) is the l-fold convolution of Y: > > Yl(omega) = Y(w) * ... * Y(w) > \ / > l-times > > Now I want to take the derivative wrt. c, so I do: > > dYl(w)/dc = dYl(w)/dY(w) * dY(w)/dc > > Y and Yl are continuous functions, so the derivative operator is well > defined (given it exists, of course!) > > However, now I have an N-periodic signal and therefore want to use the DFT. > > The equation then becomes (w=pi2k/N): > > dYr[k]/dc = dYr[k]/dY[k] * dY[k]/dc > > While "dY[k]/dc" is trivial, I don't know how to deal with > "dYr[k]/dY[k]" - obviously this does not really make sense. > > But there must be a way to generalize this also for the DFT! > > Thanks > Peter >
On Tue, 08 Jul 2014 23:35:03 -0700, Peter Mairhofer wrote:

> Hi, > > I have a DTFT function Y(w) which is also a function of a: Y(w,a) (it's > actually a sum with a as coefficient) > > Another function Yl(w) is the l-fold convolution of Y: > > Yl(omega) = Y(w) * ... * Y(w) > \ / > l-times > > Now I want to take the derivative wrt. c, so I do: > > dYl(w)/dc = dYl(w)/dY(w) * dY(w)/dc > > Y and Yl are continuous functions, so the derivative operator is well > defined (given it exists, of course!)
Actually, I don't think that what you're trying to do is "fair". Yl(c, w) is not a function of Y(c, w) at w -- it is a function of Y(c, w) over all w. I think you'd be much better served by writing out the convolution integral for Yl, then investigating the effects of taking the derivative w.r.t c. It may be a "you can't get there from here" thing.
> However, now I have an N-periodic signal and therefore want to use the > DFT. > > The equation then becomes (w=pi2k/N): > > dYr[k]/dc = dYr[k]/dY[k] * dY[k]/dc > > While "dY[k]/dc" is trivial, I don't know how to deal with > "dYr[k]/dY[k]" - obviously this does not really make sense. > > But there must be a way to generalize this also for the DFT!
Again, your Yr(c, k) isn't a function of just Y(c, k) at k -- it's for all k. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On 2014-07-09 16:34, Tim Wescott wrote:
> On Tue, 08 Jul 2014 23:35:03 -0700, Peter Mairhofer wrote: > [...] > Again, your Yr(c, k) isn't a function of just Y(c, k) at k -- it's for > all k.
Hi Tim, Really great, thank you! You fixed it. I worked it out using the convolution integral and everything makes sense. Regards, Peter