2
$\begingroup$

So I'm familiar with how the derivative of an aperiodic, continuous signal can be found by taking its Fourier transform, multiplying by $j \omega$, and then inverse transforming. Great explanation.

I'd like to see the analogous derivation for the DFT, to work with discrete, periodic signals. I gather the answer should be that we multiply by $j \omega_k$ where $\omega_k \in \{\frac{2\pi}{N}k\}, k\in \{0, ... N-1\}$, but, as far as I'm aware, we can no longer do the integration by parts trick in discrete time.

Would we derive the relationship first and then discretize?

$\endgroup$
3
  • 2
    $\begingroup$ Please spell out in detail what you mean by differentiating with respect to $n$. $n$ is not a continuous variable. $\endgroup$ Commented yesterday
  • 1
    $\begingroup$ To echo Dilip's comment: In order to answer the question as asked you need to define what exactly $d\dn$ means for a discrete variable. You cannot proof an identity for something that's undefined in the first place. $\endgroup$
    – Hilmar
    Commented 18 hours ago
  • $\begingroup$ Here is a derivation for discrete derivative beginning with continuous signals. $\endgroup$
    – Ash
    Commented 10 hours ago

2 Answers 2

2
$\begingroup$

I think this is an ill posed question. For continuous signals the derivative is defined as

$$\frac{\partial}{\partial x} f(x) = \lim_{\Delta x \to 0} \frac{f(x+\Delta x)-f(x)}{\Delta x}$$

However this definition doesn't work for discrete signals. $\lim_{\Delta n \to 0}$ is nonsensical if $n \in \mathbb{Z}$. $n$ can be 0 or 1 but it can't be anything in between.

There are various different ways to define a "discrete derivative" but they all have their pros and cons and there is no single "correct" version. Differentiation is an LTI process but it's not bandlimited. It's kind of the opposite since the amplitude rises with frequency. Any discrete implementation of a differentiator needs to manage significant amounts of aliasing.

$\endgroup$
6
  • $\begingroup$ Then give me the version where we take the derivative first and then discretize. We take derivatives of sampled signals all the time. That's the notion by which I mean derivative. I'm trying to take spectral derivatives in a computer, where everything is sampled. But those samples represents a continuous function via some kind of continuous basis functions, like the Fourier basis. $\endgroup$ Commented yesterday
  • $\begingroup$ Take a look at math.stackexchange.com/questions/302160/… $\endgroup$
    – Hilmar
    Commented yesterday
  • $\begingroup$ No, that's finite difference. I am talking about spectral derivatives. $\endgroup$ Commented yesterday
  • $\begingroup$ What do you mean by an LTI process being / not being bandlimited? Is that a property of the impulse response of the process? $\endgroup$ Commented 20 hours ago
  • $\begingroup$ @OlliNiemitalo: Sorry, that's a bit of a sloppy terminology. What I mean is that the magnitude of the transfer function isn't 0 above a certain frequency and hence the impulse response cannot be sampled without aliasing. $\endgroup$
    – Hilmar
    Commented 19 hours ago
1
$\begingroup$

I think I figured it out.

Say we have a discrete signal of length $N$, $y = [y_0, y_1, ... y_{N-1}]$.

The DFT is:

$$ a_k = \sum_{n=0}^{N-1} y_n e^{-j \frac{2\pi}{N}nk}$$ $$ = y_0 e^{-j \frac{2\pi}{N}0k} + y_1 e^{-j \frac{2\pi}{N}k} + ... + y_{N-1}e^{-j \frac{2\pi}{N}(N-1)k}$$

If I take the derivative w.r.t. $n$ right now, I'll end up multiplying by $-j\frac{2\pi}{N}k$, but this should be equivalent to multiplying by a positive due to periodicity:

We're traveling around the unit circle in the negative direction, but we could travel in the positive direction instead, because $ e^{-j \frac{2\pi}{N} n k} = e^{j \frac{2\pi}{N} (-n) k} = e^{j \frac{2\pi}{N} (-n+N) k} = e^{j (\frac{2\pi}{N} (-n) + 2\pi) k}$, and integer offsets of $2\pi$ don't change the value.

Likewise, the values of $y$ repeat, so $y_0 = y_N = y_{-N}$ and $y_{N-1} = y_{N-1-N} = y_{-1}$.

Therefore:

$$ a_k = y_{-N} e^{-j \frac{2\pi}{N}(-N)k} + y_{1-N} e^{-j \frac{2\pi}{N}(-1+N)k} + ... + y_{-1}e^{-j \frac{2\pi}{N}(-1)k} $$ $$ = y_{-N} e^{+j \frac{2\pi}{N}Nk} + y_{1-N} e^{+j \frac{2\pi}{N}(1-N)k} + ... + y_{-1}e^{+j \frac{2\pi}{N}k} $$ $$ = \sum_{n=1}^{N} y_{-n} e^{j \frac{2\pi}{N}nk}$$

Now I can take the derivative w.r.t. $n$ of this thing to get:

$$ \frac{d}{dn} a_k = \frac{d}{dn} \sum_{n=1}^{N} y_{-n} e^{j \frac{2\pi}{N}nk} = \sum_{n=1}^{N} y_{-n} \frac{d}{dn} e^{j \frac{2\pi}{N}nk} $$

because the $y_n$ are constants to the derivative.

$$ = j \frac{2\pi}{N}k \sum_{n=1}^{N} y_{-n} e^{j \frac{2\pi}{N}nk} = j \frac{2\pi}{N}k \cdot a_k$$

$\endgroup$
2
  • 2
    $\begingroup$ The way you wrote this now, it looks like you're taking the derivative with respect to a dummy variable, which is very illegal. I could replace the variable that is summed over with any other variable. $\endgroup$ Commented 15 hours ago
  • $\begingroup$ I really think you should pay attention to what AccidentalTaylorExpansion and what @Hilmar said $\endgroup$ Commented 13 hours ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.