Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.num-analysis.independent

Topic: derivative of discrete fourier transform interpolation
Replies: 8   Last Post: Jun 6, 2013 7:24 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Rusty

Posts: 108
Registered: 6/16/05
Re: derivative of discrete fourier transform interpolation
Posted: Oct 1, 2005 5:35 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


<stevenj@alum.mit.edu> wrote in message
news:1128133526.658039.28980@g44g2000cwa.googlegroups.com...
> Peter Spellucci wrote:
>> the FFT gives a real sin/cos series only for special N and in this case
>> your sum
>> is running from -N/2 to N/2 . the real sin/cos (Fourier ) sum can then be
>> differentiated in the usual manner with no trouble.

>
> Special N?? The DFT of real inputs x_n, for any N, can be interpreted
> as the amplitudes of a real sin/cos series (with real derivatives).
>
> To see this, you pair the output X_k with X_{n-k}=X_k^*, by the
> Hermitian symmetry of the output. Equivalently, you are using the
> aliasing property to think of the X_{n-k} output, for k > n/2, as the
> X_{-k} amplitude (i.e. a negative frequency -k), and so you get
> complex-conjugate pairs of sinusoids. (The k=n/2 Nyquist element, for
> even n, must be treated specially. Since it is purely real, it can be
> thought of as 1/2 k=-n/2 and 1/2 k=+n/2.)
>
> In order to take the derivative, you need to realize that the
> interpolation implied by the DFT, and hence the slope, is not unique
> because of aliasing. Normally, however, you want the interpolation
> corresponding to exactly the aliasing described above: the k > n/2
> outputs are *negative* frequency amplitudes.
>
> This choice means that your frequencies run from -N/2+1 to N/2 (for
> even N). Not only does it guarantee real derivatives from real
> inputs, but it also corresponds to the interpolation with the *minimal*
> mean-square slope.


I was trying to remember the trick with the middle coefficient. Here is the
MatLab code which puts half its amplitude in the upper band and half in the
lower, giving a real valued interpolation. The ripples are a bit excessive
unless the function starts off well band limited, which could be done by
FFT.

PS: why is Matlab alone in not using array indices starting at zero ? It
makes a pigs ear of DFT's
Rusty

N=16

x=(1:N)'

x=x

X=fft(x)

s=0.25

ix=0;

for k=1:N/2

ix=ix+X(k)*exp(2*pi*1i*(k-1)*s/N);

end

for k=1:N/2-1

ix=ix+X(N+1-k)*exp(-2*pi*1i*k*s/N);

end

ix=ix+X(N/2+1)*cos(-2*pi*s/2);

ix=ix/N





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.