0
$\begingroup$

according to the definition of the Fourier transformation we have for a real function:

  1. if $F{{(a(t))}}$ = $A(f)$
  2. then $F{{(-a(-t))}}$ = $-A$*$(f)$, with * for conjugate

    import numpy as np
    a= np.array([1, 2, 3,4,5,6,7,8,9,10])
    a_mirrored = np.array(list(-a[::-1]))
    
    A_f = np.fft.fft(a)
    A_f_star = -np.conjugate(np.fft.fft(am))
    

So why is A_f different from A_f_star ? Can anyone tell please? enter image description here

$\endgroup$
  • $\begingroup$ Are you sure you're plotting the exact right thing? I'm severely missing the symmetry of A_f here... $\endgroup$ – Marcus Müller Apr 18 '17 at 17:17
  • $\begingroup$ I am plotting the real part of both, there is no symmetry there. It is strange, that the first element is correct, so equal, but for others it is negated. It should be equal over all. $\endgroup$ – Tassou Apr 18 '17 at 17:19
  • $\begingroup$ I don't know Python. Is there a padding involved? What happens with a power of two length? (1:16) $\endgroup$ – Laurent Duval Apr 18 '17 at 17:23
  • $\begingroup$ The magnitude will be the same but the phase not. Time reversal isn't done properly (see answer) $\endgroup$ – Hilmar Apr 18 '17 at 17:45
0
$\begingroup$

This is occurring because you have not time-reversed the signal properly. The time reversal intended by your identity is for $X[n] = X[(N-n)_N]$ where the notation $(\cdot)_N$ means that you should take the result modulo $N$. In other words $X[0] = X[(N)_N] = X[0]$ doesn't change position.

For your example, you start with the finite-length signal $a = [1, 2, 3, 4, ... 9, 10]$. The true time reversal of $a$ is $a_r = [ 1, 10, 9, 8, ... 3, 2 ]$. But the python code results in simply reversing the order of the components without respect to their indices, thus the result is the signal $a_m = [ 10, 9, 8, 7, ... 2, 1 ]$.

The reason the first entry is the same in both cases is because it is simply the sum of the elements which is equal for all three signals $a$, $a_r$ and $a_m$.

Here is a function that will time reverse your signal.

def time_reverse(x):
    xrev = [ x[0] ]
    xrev.extend(x[-1:0:-1])
    return xrev

So, you can add this function definition to the top of the file and replace the line

a_mirrored = np.array(list(-a[::-1]))

with the line

a_mirrored = -np.array(time_reverse(a))

Then your plots should match up fine.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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