12

Why do people say that the fast Fourier transform (FFT) “views”, or “interprets”, or “assumes” its input sequence is periodic? I ask this question because the activities of viewing, interpreting, and assuming can only be performed by a living creature with a brain.

Richard Lyons
  • 5,777
  • 13
  • 25
  • Probably slight projecting. Performing an FFT might be considered an extension to one's self, so personal attributes may sneak in. Or maybe it makes it less impersonal when explaining it to someone and, thus, the meaning becomes "you can't view or interpret, etc, because..". Just a guess. – a concerned citizen Apr 25 '21 at 22:32
  • 1
    Take a look at this answer to the same question. It's because the FFT is just a fast or optimized method to compute the DFT. And the DFT is precisely the same math as the DFS, the Discrete Fourier Series. And Fourier Series is about periodic functions. – robert bristow-johnson Apr 26 '21 at 01:36
  • At risk of engaging in a semantic debate, what it means to me when I’m thinking it in my head is that the DFT and IDFT are periodic when evaluated outside the range 0 -> N-1. Anything beyond that and I usually have an application in mind with additional context. I have a hard time seeing what all the fuss is about. – Dan Szabo Apr 27 '21 at 17:42

5 Answers5

7

It's not the DFT/FFT algorithm "who" views (or "assumes", or "interprets") it's input being periodic, rather it's the "mathematician's mindset" that assumed periodic signals at the input of the algorithm, and designed the algorithm that way.

It's exactly on par with saying that "Newton's laws assume that space & time are absolute..."; laws of mechanics do not have a "brain" to assume such a thing, rather Newton himself made that assumption that the time & space were absolute, and then formulated his laws accordingly, which compute dynamical quantities based on that assumption.

Today we know (believe) that those assumptions are not valid (Special Relativity), yet if you use Newton's laws to compute high-speed phenomena, you may end up objects having speeds larger than speed of light; this inconsistency is due to fact that the "assumptions of the law" are not validated. Here the assumptions are reflected into the mathematical structure of the formulation of the law.

Moving to DSP; in essence, Discrete Fourier Transform (DFT) is by definition one period of the Discrete Fourier Series (DFS); and very naturally DFS works with periodic sequences. I don't know who defined it that way, but it's the case.

So, you cannot compute the DFS of a single rectangular pulse, for example. If you try to find the DFS/DFT coefficients of such a nonperiodic pulse, internally, the mathematical algorithm treats it as if it were periodically extended, and computes the coefficients that way; by fitting periodic sine waves to the periodically extending waveform. Then, when you want to synthesize back the input waveform with the given DFT/DFS coefficients, and evaluating the formula for all n, then you will get not a single pulse but a periodic extension of that pulse. So the zeros outside of the pulse duration are not naturally generated by the inverse DFS/DFT (synthesis) formula.

You must externally force your output to be zero for those out of duration samples. And that's typically what's done with the DFT block length definition.

Fat32
  • 28,152
  • 3
  • 24
  • 50
  • 1
    Re: "I don't know who defined it that way..." That would be the "F" in DFT, FFT and any FT, Joseph Fourier. – RBarryYoung Apr 26 '21 at 13:14
  • @RBarryYoung Thank you, I understand that you're referring to the periodicity of the input being defined by J.Fourier, but when I said I don't know who defined it that way..., I was referring to the definition: "DFT is by definition one period of DFS" (previous line), and I wanted to say I didn't know who defined it so, and (afaik) it's not J.Fourier who defined DFT as one period of DFS... Anyway thanks again ;-)) – Fat32 Apr 26 '21 at 23:14
  • @Fat32, it's not who "defined" the DFT to be the DFS, it's who *identified* the DFT as the DFS. if you have two objects A and B, if all of the elements of Object A are identical to the elements of Object B and vise versa, then Object A and Object B are identical. they might even be different labels for the very same single object. – robert bristow-johnson Apr 27 '21 at 04:28
2

Most objectively, it depends on how we view it. There's those who insist on viewing the Discrete Fourier Transform as a "special case" of the continuous Fourier Transform - and interpret all input/output behavior in terms of continuous FT "with a brickwall". Then there's those who view it as a standalone transform that operates on finite observations - a tool to directly "communicate" with reality. I go deeper here and here.

I'm in the latter camp; I've learned much since writing these Q&A's, and haven't budged a bit. Continuous FT is useful for predicting certain DFT behaviors, but also enables flaws in not only mathematical but physical reasoning if one's not careful.

The one and only thing that DFT "assumes", without dispute, is that the input is finite (in length and values). Nothing else is required for it to produce valid results.

OverLordGoldDragon
  • 8,912
  • 5
  • 23
  • 74
  • 2
    You wrote, "Nothing else is required for it to produce valid results." Well said! I completely agree with you. – Richard Lyons Apr 26 '21 at 09:34
  • "Nothing else is required for it to produce valid results." --- $$ $$ it's a falsehood. the DFT is not just any old one-to-one transform. it's a one-to-one transform in which the basis functions are all periodic with period $N$. – robert bristow-johnson Apr 27 '21 at 04:31
  • Hi Robert. I believe OverLordGoldDragon’s comment, “Nothing else is required for it to produce valid results” was referring to the DFT’s input sequence and not to the DFT’s basis functions. I believe he was saying the only restrictions on DFT input sequences are that (1) the input sample values must be finite in amplitude and (2) finite in length. Thus any input sequence that meets those two restrictions can be applied to the DFT algorithm to produce valid spectral results. – Richard Lyons Apr 27 '21 at 11:09
  • @robertbristow-johnson They're periodic in extension, yes. But that's an imposition; the algorithm itself does not demand it be extended. Nor is it extended in much practice, which'd be akin to claiming the DFT of N points describes something beyond those N points. There's nice mathematics for describing what happens if we do extend, but it doesn't change these facts. – OverLordGoldDragon Apr 27 '21 at 14:23
  • //" I believe he was saying the only restrictions on DFT input sequences are that (1) the input sample values must be finite in amplitude and (2) finite in length"// Yes, but @RichardLyons, the claim //"Nothing else is required for it to produce valid results."// is still wrong. This will go exactly the same way as the fights we had on comp.dsp about it, even a quarter century later. – robert bristow-johnson Apr 27 '21 at 14:48
  • @robertbristow-johnson It's never getting resolved because each side tries to shortcut and talks past the other. The "sides" are but parts of a whole the speaker prefers. -- I've read what you've linked; it is, as expected, a continuist imposition. – OverLordGoldDragon Apr 27 '21 at 17:00
1

I thank everyone for their comments and Answers. And the links given herein are very interesting. I confess that I did not word my question as well as I should have. I wasn’t asking why people believe that DFT input sequences were periodic. I was asking why people insist on personifying the DFT algorithm. (Personification: the act of giving human characteristics to animals or objects.)

I believe that it is incorrect to write that the DFT views, or interprets, or assumes anything because the DFT cannot perform mental activities. (Square root algorithms don't pass judgement, trigonometric algorithms don't form opinions, and the DFT algorithm does not make assumptions.)

Richard Lyons
  • 5,777
  • 13
  • 25
  • 1
    That's fair, but I take it's commonly understood as just a shorthand in speech, like "fit() assumes input is array, not list" in place of "the authors of fit() intend for the input to be an array, not list". – OverLordGoldDragon Apr 26 '21 at 12:09
  • @OverLordGoldDragon. Your example of personification is not too objectionable. But the personification when saying “the DFT assumes its input sequence is periodic” is quite misleading because it’s impossible to compute the N-point DFT of a periodic sequence. (Periodic sequences are, by definition, infinite in length.) – Richard Lyons Apr 26 '21 at 17:31
  • Exactly, there's also that. The "continuist's" idea is, DFT captures a full period of the continuous-time spectrum, which repeats the period infinitely (if input also repeats infinitely), so we don't have to operate on the full infinite input. While true, inserts much optional context, and can mislead. – OverLordGoldDragon Apr 26 '21 at 17:53
  • First, this question probably belongs in https://English.stackexchange.com, not here. Secondly, if you did ask there, I believe that you would discover that this is both entirely valid English and an entirely valid way to use the verb To Assume. – RBarryYoung Apr 26 '21 at 21:04
  • @RBarryYoung. Personification may occasionally be appropriate in English literature to evoke a visual image or emotion in the reader. But I believe it should not be used in technical writing. – Richard Lyons Apr 26 '21 at 21:49
  • @RichardLyons Your question asks nothing about formal technical writing. In fact, it is not asking about writing at all, but about speaking. In spoken technical jargon, including formal speech, this is an acceptable use and is not considered personalization. – RBarryYoung Apr 26 '21 at 21:58
  • Richard, from the comp.dsp daze, you know where I am at. I do anthropomorphize the DFT and I say quite unambiguously that the DFT fits a basis of periodic functions to the finite-lengthed input it is given, That is precisely what is periodic extension. The DFT is "assuming" that the input passed to it is one cycle of a periodic function with period $N$. – robert bristow-johnson Apr 27 '21 at 04:36
  • 1
    @OverLordGoldDragon : " DFT captures a full period of the continuous-time spectrum,"

    $$ $$ no, it doesn't. the DFT "captures" a full period of discrete-time data. the regular-old Fourier Series works on a full period of continuous-time signal.

    – robert bristow-johnson Apr 27 '21 at 04:40
  • @robertbristow-johnson Right, I misspoke there. – OverLordGoldDragon Apr 27 '21 at 14:17
  • @RBarryYoung. In the next technical report you write for your company, include a sentence stating that an inanimate object is capable of mental activity. And then see how well that works out for you. – Richard Lyons Apr 27 '21 at 16:58
  • @RichardLyons I have written numerous technical reports for many companies in which I specified that functions, processes, procedures, models and other conceptual artifacts “assumed” preconditions for their validity. Things worked out great for me because this is entirely valid language in mathematical descriptions and specifications, as well as other technical areas precisely because there is no personification that is implied nor that can be validly inferred. – RBarryYoung Apr 27 '21 at 18:42
  • Hi RBarryYoung. OK, you win. I give up. If you insist that inanimate objects are capable of performing a mental activity, then I can't help you. – Richard Lyons Apr 29 '21 at 02:49
0

Guilty as charged, as I just recently used this sub=optimal phrasing in an answer (which probably triggered the question). :-)

I was asking why people insist on personifying the DFT algorithm.

In my case it was just sloppiness/laziness. Many beginners are not aware of the underlying periodicity and it's implications. It's a very common misconception but it's awkward to write "You are using an FFT. This a specific algorithm to implement the Discrete Fourier Transform which is applicable only to discrete signals. That means your signal is assumed to be discrete in both the time and frequency domain, which in turns means it's also periodic both domains".

Hilmar
  • 44,604
  • 1
  • 32
  • 63
0

I probably am guilty too of using this poor wording. I do think it provides great intuition to realize that the DFT like the Fourier Series Expansion will provide the same result for non-zero values if the waveform is finite or periodic, repeating over the original time interval of interest. A fundamental difference is when the axis extends to infinity in one domain, it will be continuous in the other. So for the case of a periodic discrete time sequence with time that extends to infinity, the frequency axis will be continuous, although having a value zero for all values except at harmonics of the repetition rate in time which can have non-zero values for magnitude and phase. When the discrete sequence only extends for a finite time, as input to the DFT, the results are discrete in frequency and only exist at the harmonics of the duration of the time domain waveform.

So agreed, the DFT doesn't assume anything! The result of the DFT is consistent with the result we would get for the Fourier Transform of a periodic waveform, yes. I concur that concise and accurate wording is important, so thanks Richard for calling us out on that!

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135