[ADOL-C] Can ADOL-C handle FFTs?

Kshitij Kulshreshtha kshitij at math.upb.de
Wed Apr 8 10:19:18 EDT 2015


Hello,

FFTs involve complex numbers, so one must do complex differentiation.
This is a complicated subject in algorithmic differentiation due to the
addition of Cauchy-Riemann equations in the picture. ADOL-C by itself
does not handle complex numbers or complex differentiation. You could
use std::complex<adouble> as your complex type but the side-effects are
unforseeable.

Of course it also depends on how the FFT is being computed. If you're
using a library like FFTW then ADOL-C or any tool cannot know about the
internals of this FFT library.

Analytically one could use a second Fourier Transform to compute the
derivative of the first one. As

F(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} f(y) e^{i y x} dy

assuming that this integral exists and is convergent

dF(x)/dx = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} f(y) i y e^{i y
x} dy

So if F(x) = FT(f(y)) then dF(x)/dx = FT(i y f(y)).

The same holds for inverse Fourier transform. The discrete FFT is
written as a sum but should have the same property.

You could use the external function interface to handcode your
derivative of an FFT in this way, if you can safely ignore the complex
differentiation problem above.

Best wishes
Kshitij

On 2015-04-07 22:32, Ralf Juengling wrote:
> I would like to use ADOL-C for a problem Y = C(X) where the
> implementation of C uses FFT routines and I want ADOL-C to give me the
> gradient of C wrt X.
> 
>  
> 
> I did a quick trial using the pyadolc Python wrapper and that failed.
> Before I play around further, could someone tell me if ADOL-C can handle
> FFTs at all? If not, can any automatic differentiation tool do this?
> 
>  
> 
> Thanks,
> Ralf
> 
>  
> 
> 
> 
> _______________________________________________
> ADOL-C mailing list
> ADOL-C at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/adol-c
> 

-- 
Dr. Kshitij Kulshreshtha

Institut für Mathematik,
Universität Paderborn,
Warburger Straße 100,
33098 Paderborn.

Büro: TP21.1.21
Besucheradresse:
Technologiepark 21
33098 Paderborn.

Privatanschrift:
Arnikaweg 62
33100 Paderborn.


More information about the ADOL-C mailing list