Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

DFT - can't evaluate components in -negative time

  1. Dec 25, 2006 #1
    DFT - can't evaluate components in -negative time!!

    hey guys - if you look at the definition/equation of discrete fourier transform, you will see that we can only evaluat values from n=0 to N (see http://en.wikipedia.org/wiki/Discrete_Fourier_transform, to view the equation).....but what have we have a discrete time signal that appears on the negative time axis as well???? according to the equation, we neglect all the negative parts and only start from n =0!!!!
    please can someone give me an explanation as this has been bugging me for some time now!!

    thanks very much!!!

  2. jcsd
  3. Dec 25, 2006 #2


    User Avatar
    Science Advisor
    Gold Member

    The DFT works on sequences, where n is the index number. What time you start at is irrelevant to the DFT itself. In fact there is no absolute zero time (do you take it at the big bang?), it is defined by your problem and application. In other words you can define n=0 to correspond to a "negative time" if you want.

    For that matter, the DFT is not limited to time sequences, the sequence can be spatial (the second most common choice) or even abstract (in linear algebra the eigenvectors of a circulant matrix are given by the DFT).

    The Shift Theorem d(described in the link you listed) tells you what happens when you shift the sequence. Changing the "zero" point (shifting the sequence) corresponds to multiplying the transform by a linear phase shift.
  4. Dec 25, 2006 #3
    "In other words you can define n=0 to correspond to a "negative time" if you want."....
    how could you possibly do this???
    we know t= nT (when we sample)
    if n=0 then obviously time will have to be 0!!
  5. Dec 25, 2006 #4


    User Avatar
    Science Advisor
    Gold Member

    t=nT still refers to discrete time samples in a sequence. Whenever you take the first sample (10:23 am on 12/25, for instance) is up to you.
  6. Dec 25, 2006 #5
    ok - say i have:
    x(t) = t
    now i sample so i get: x[n] = n (assuming Ts =1, where Ts is sampling period)

    when i do this i will get values at negative discrete times.
    E.g. x[-1] = -1.
    so how could i possibly make this start from n=0 (without ignoring all the other information where n<0), so that i can apply the DFT?? im so confused!!!

    thanks for your help
  7. Dec 25, 2006 #6
    You have to realize that DFT (as defined in the given link) applies only on finite-length sequences. The key word here is finite, and most of the time, the sequence which is DFTed is one cycle of a certain periodic signal.

    Therefore, this means that you can't form the DFT for sequences like x[n] = n, for all n, since it is clearly not finite-length. You could, however, obtain the DFT for the sequence x[n] = n, where n = A, ..., B. In this case, it doesn't really matter whether the endpoints A and B are positive or not.

    Btw, that should have been n = 0 to n = N-1, or if you prefer, n = A to n = B where N = B-A+1.
  8. Dec 26, 2006 #7
    ok fine i agreee with the whole 'finite' concept.

    then lets say i had i signal such as:

    x[-1] = 4
    x[0] = 8
    x[1] =12
    x[2] = 16

    there guys - how would i evaluate this because there is a value on the negative axis of my discrete time signal!! see, to me , it looks like the DTF becomes invalid - so to use the DFT i would have to shift the entire signal to the right by one unit so that it starts from n=0.....

  9. Dec 26, 2006 #8


    User Avatar
    Science Advisor
    Gold Member

    Correct, your sequence is labeled from n=0.
  10. Dec 26, 2006 #9
    but that shift will cause a change in my frequency domain!!
    i mean surely i can't just shiftthe signal - somthing else has to also change.

    are you telling me that the following two signals will produce the same results?:
    signal 1:
    x[-1] = 4
    x[0] = 8
    x[1] =12
    x[2] = 16

    signal 2:
    x[0] = 4
    x[1] = 8
    x[2] =12
    x[3] = 16
  11. Dec 26, 2006 #10
    by the way - thanks for reply
  12. Dec 26, 2006 #11


    User Avatar
    Science Advisor
    Gold Member

    No, they produce the same transform because the DFT only works on a sequence of numbers and has no idea what times they refer to or whether they are even times. (As I said earlier, they can be spatial positions, abstract symbol streams in telecommunications, or a sequence of pure numbers in some math applications.) Your number sequences are the same, so your DFT transforms are the same.

    You are confusing the sampled sequence with some notion of a "real" source signal that extends forward and back in time. The DFT doesn't work on that, but on the number samples you give it. If you want to think about the "real" signal, then you can relate the transform of signal 2 to that of signal 1 by multiplying term by term by a phase shift. That's it!

    If, as in most practical cases, you are interested in the power spectrum of your sequence, then you take the absolute value squared of the transform. In this case the phase shift disappears and the power spectra are identical too.

    EDIT: suggest you get a book on Fourier Transforms so you can understand the relations between the two domains (time and frequency, e.g.) and between waveforms and sampled sequences. Standard books are those by Bracewell (or Brigham for Fast Fourier Transform).
    Last edited: Dec 26, 2006
  13. Dec 26, 2006 #12


    User Avatar
    Science Advisor
    Homework Helper

    Delaying the signal in time is the same as changing the phase of each frequency component in proportion to its frequency (i.e. if you phase shift the 100Hz component by 10 degrees, you shift the 200 Hz component by 20 degrees).

    But since there's no absolute origin for measuring either time or phase, this doesn't much matter in practical applications, provided you are consistent.
  14. Dec 26, 2006 #13
    thanks very much guys.

    marcusl >>> ok - i'm starting to get it ( i think)...but what i don't like about the two signals yielding the same results is: when i do inverse discrete transform i will get the same signal (obviously!) always starting from n=0!!
    so for a signal like "signal 1" in my post (negative time values) once i perfom a DF transform on it - i won't be able to get back to the orignal signal...ever!!!!!!
    i think im missing some fundemental aspect about a discrete signal (like negative discrete values of n are not equavalent to negative values of time, t) - probably that stuff you said about the "real" signal - not sure what you meant.... could you elaborate...
    thanks very much i really appreciate this!!!
  15. Dec 26, 2006 #14


    User Avatar
    Science Advisor
    Gold Member

    You're welcome! I'm not sure I can do much better explanation in these short posts, suggest you look at far better explanations from books written by professional teachers. Will be happy to ansewr questions back here as they come up.
  16. Dec 27, 2006 #15
    thanks ill give it some thought and get back to you
  17. Dec 27, 2006 #16


    User Avatar
    Science Advisor
    Homework Helper

    No. You are doing a DFT on a sequence of numbers. When you do the inverse DFT you get back the same numbers.

    To slightly misquote quote Lewis Carrol, you are confusing the thing (the signal, i.e. the set of 4 numbers) with the name of the thing (x_0 to x_3, or z_1 to z_4, or any other notation you feel like using today).
  18. Dec 27, 2006 #17
    but isn't it more correct to say that its a sequence of numbers within a specific time range????? because then you guys are telling me that signal 1 is equal to signal 2!!! bu they're not - the one is a shifted version of the other!!

    OK - look i'm writing a supplementary exam in about two weeks so can i just ALWAYS assume the following - it doesn't necessary make sense to me right now - but ill just accept it (for now):

    - no matter what range my discrete time signal lies in, on the time axis( it could be from n = -100 to n =-50 or from n=-10 to n=100), taking a DFT will ALWAYS yield a frequency sginal between -ws/2 and ws/2 (where ws is my sampling frequency) which will be symmetric.
    - if i wish to take the inverse DFT i will ALWAYS take the points from 0 to ws (in my frequency domain) and this will give me a graph from 0 to N-1 in my time domain.

    can i ever go wrong by adhering to the above two statements?

    thanks you all so much!!!
  19. Apr 4, 2010 #18
    Re: DFT - can't evaluate components in -negative time!!

    The same problem concerning negative time values has puzzled me for a while.
    I found the best answer answer here: http://www.mathworks.com/support/solutions/en/data/1-15JW7/index.html?product=SG&solution=1-15JW7

    The tricky thing is the following: over N samples of the spectrum, the first N/2 represent the positive frequencies and the remaining N/2 represent the negative frequencies (assuming N even for simplicity).

    As far as I understand, there is a duality in the time domain: the first N/2 samples in time domain represent the positive time instants, whereas the remaining N/2 values should represent the negative time instants. I gave it a few tries and it works, it proves to be consistent.

    Is everything clear up to this point?

    Ok, so here comes my doubt: If I have a signal of the sort x[n] = exp(-n), n= 0, ..., N-1

    should I think that the DFT (and FFT) interpret the first N/2 values as corresponding with positive time values, and the remaining N/2 NONZERO values as corresponding with negative time values?
  20. Apr 4, 2010 #19


    User Avatar
    Science Advisor
    Gold Member

    Re: DFT - can't evaluate components in -negative time!!

    That's one way to look at it, where the basic spectrum extends from -pi/Ts to +pi/Ts. Engineers don't have a name for this fundamental section of a sampled and replicated spectrum, but physicists do--it's the first Brillouin zone. You could also define it from 0 to 2pi with equal correctness, in which case they are all positive.

    Yes you can look at it this way, or not--reread the previous posts. The FFT is a pure mathematical operation that works on a sequence of numbers. How you assign attributes to those numbers is up to you.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: DFT - can't evaluate components in -negative time
  1. DFT of sine function (Replies: 5)

  2. Dft of cos function (Replies: 5)

  3. DFT example (Replies: 9)