Hmmmm.... long ago I suggested that we make it clear when we're talking
about theory or practice. I don't think the notion was very well received
and I think the idea was that we'd make it clear.
No such luck in this thread. We read about clear procedures / methods
("theoretical") and then somebody says: "yeah, but you can't reconstruct a
[real world] waveform with it" Hmmmmm....
I wonder if we can't just use a set of (theoretical) identities to make
things clear:
1)
continuous, infinite time <Fourier Transform> continuous, infinite frequency
and its inverse
2)
DISCRETE, infinite time <Fourier Transform> continuous, infinite frequency
and PERIODIC
(regular time intervals) and its inverse
3)
continuous, infinite time <Fourier Transform> DISCRETE, infinite frequency
and PERIODIC and its inverse
4)
DISCRETE, infinite time <Fourier Transform> DISCRETE, infinite frequency
and PERIODIC
and PERIODIC and its inverse
Now, all of these Fourier Transforms work just fine but we can make some
simplifying changes:
A) When a function is PERIODIC, then sums can be taken over a single period.
B) When a function is DISCRETE, then sums can be taken at discrete points.
C) When a function is DISCRETE PERIODIC, then sums can be taken over a
single period at discrete points.
[I will use AF, BF, CF to mean "forward" Fourier Transforms or
time-to-frequency and AI, BI, CI to mean "inverse" Fourier Transforms or
frequency-to-time in case the subtleties are important.....]
This leads to:
2) DISCRETE, infinite time <Fourier Transform> continuous, infinite
frequency and PERIODIC
(regular time intervals) and its inverse
2BF)When a function is DISCRETE, then sums can be taken at discrete points -
so in the "forward transform" we can have a Discrete Time Fourier Transform
(which is still an infinite sum)
2AI) When a function is PERIODIC, then the sums can be taken over a single
period - so in the "inverse transform" we can have a continous, finite
length, transform. This is in the same form as computation of a Fourier
Series but operating in the frequency domain.
It also leads to:
3)
continuous, infinite time <Fourier Transform> DISCRETE, infinite frequency
and PERIODIC and its inverse
3AF) When a function is PERIODIC, then sums can be taken over a single
period. I'm pretty sure that this is the classical Fourier Series
calculation....
3BI) When a function is DISCRETE, then sums can be taken at discrete points.
I'm pretty sure that this is the classical reconstruction from an infinite
set of Fourier Series coefficients.
Now, isn't that interesting? We have not yet said anything about Nyquist at
all and have avoided going into what happens if the infinite sums are
truncated as in Gibbs' phenomenon.
I think that's pretty cool.
Two things (and their duals) remain to talk about (theoretically):
- Discrete/Periodic
- Periodic/Discrete
- Finite time
- Finite frequency
Let's talk about the first dual pair first:
4)
DISCRETE, infinite time <Fourier Transform> DISCRETE, infinite frequency
and PERIODIC
and PERIODIC and its inverse
4BF) When a function is DISCRETE, then sums can be taken at discrete points.
4AF) When a function is PERIODIC, then sums can be taken over a single
period.
So, this leads to a finite sum.
4BI) When a function is DISCRETE, then sums can be taken at discrete points.
4AI) When a function is PERIODIC, then sums can be taken over a single
period.
This also leads to a finite sum.
So, the forward transform can be a Discrete and Finite Time, Fourier
Transform.
And, the inverse transform can be a Discrete and Finite Frequency, Inverse
Fourier Transform.
I think this is normally called the Discrete Fourier Transform (being
discrete in both domains and, correspondingly, periodic in both domains).
OK - still no Nyquist or Gibbs
Now the last dual pair:
- Finite time
- Finite frequency
The first one is the most comfortable to people I think because we just
*know* there isn't any infinite time for us to deal with.
Now we have:
1)
continuous, finite time <Fourier Transform> continuous, infinite frequency
and its inverse
2)
DISCRETE, finite time <Fourier Transform> continuous, infinite frequency
and PERIODIC
(regular time intervals) and its inverse
3) is a contraction in terms..... it can't be both periodic (infinite) and
finite (still theory)
continuous, finite time <Fourier Transform> DISCRETE, infinite frequency
and PERIODIC and its inverse
4) is also a contradiction in terms for the same reason (still theory)
DISCRETE, finite time <Fourier Transform> DISCRETE, infinite frequency
and PERIODIC
and PERIODIC and its inverse
So, other than changing the time domain notation from "infinite" to
"finite", there is no other change in any of these cases. However, there is
a change in how the forward transforms can be dealt with:
1) can use a finite integral
2) can use a finite sum
3) is a contradiction
4) is a contradiction
So, then what's the catch with 3 and 4?
It's that they are contradictions for the functions they describe.
However, if we modify our perspective a little bit then they work. Like
this:
3*) continuous and PERIODIC <Fourier Transform> DISCRETE, infinite
frequency
and its inverse
We have already seen:
3AF) When a function is PERIODIC, then sums can be taken over a single
period. (Fourier Series integral calculation).
So, if the function is periodic then we can do the computation over a finite
time (an integral number of periods).
4*)DISCRETE and PERIODIC <Fourier Transform> DISCRETE, infinite frequency
and PERIODIC
and its inverse
We have already seen:
4AF) When a function is PERIODIC, then sums can be taken over a single
period.
So, if the function is periodic then we can do the sum over a finite time
(an integral number of periods).
Now, turn these observations around. If the sum or integral is over a
finite time AND IF the frequency domain is only calculated on a discrete set
of points, then how do we distinguish the result from one which was done
over a single period of a periodic (infinite) function?
I think the answer is: "you can't". Once the frequency domain is sampled
then the time domain *is* periodic.
[And, temporal aliasing results from only computing the frequency samples at
discrete points. Nyquist].
Finally, finite frequency (lowpass case):
1)
continuous, infinite time <Fourier Transform> continuous, finite frequency
and its inverse
2) is a contradiction
DISCRETE, infinite time <Fourier Transform> continuous, finite frequency
and PERIODIC
(regular time intervals) and its inverse
3)
continuous, infinite time <Fourier Transform> DISCRETE, finite frequency
and PERIODIC and its inverse
4) is a contradiction
DISCRETE, infinite time <Fourier Transform> DISCRETE, finite frequency and
PERIODIC
and PERIODIC and its inverse
Here, frequency was changed from "infinite" to "finite".
Now 2 and 4 are contradictions and the same kind of treatment as was used
for forward transforms in the time domain cases 3 and 4 can be applied to
the inverse transforms for cases 2 and 4.
Skipping the repetition of 2 and 4 with modifications we can make similar
observations about the inverse transforms.
Now, turn these observations around. If the sum or integral is over a
finite frequency AND IF the time domain is only calculated on a discrete set
of points, then how do we distinguish the result from one which was done
over a single spectral period of a periodic (infinite) function of
frequency?
The answer is: "you can't". Once the time domain is sampled then the
frequency domain *is* periodic.
[And, spectral aliasing results from only computing (or measuring) the time
samples at discrete points. Nyquist].
Here is the bottom line:
Until we sample otherwise continuous functions there is no problem in any of
these cases.
As soon as either temporal or spectral sampling (or both) is done, then
there can (or will?) be aliasing.
What we do in practice is to pretend that real world signals are both
bandlimited and time limited. Then we sample in time and frequency alike
and use the DFT. In theory the signals cannot be both bandlimited and time
limited at the same time - that is, the same signal cannot have both
properties.
It's always interested me that we are happy to worry the heck out of
spectral aliasing but don't think much about temporal aliasing. I think
there may be a practical reason for this but I've not articulated one. I do
know that some frequency domain interpolation methods can cause temporal
trillies far removed from abrupt changes (temporal aliasing).
Fred
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →
Zero Padding in radix 2 FFT
Started by ●December 30, 2005
Reply by ●January 3, 20062006-01-03
Reply by ●January 3, 20062006-01-03
Jerry Avins wrote:> robert bristow-johnson wrote: > > Fred Marshall wrote: > > > >>1) the only time there will not be apparent spectral leakage with a pure > >>sinusoid is if the temporal epoch is an integer number of cycles. This > >>includes the zero padding. Otherwise, for general signals there will always > >>be spectral leakage. Windowing can help. Try transforming (M +1/2) cycles > >>of a sinusoid and see what you get. M is an integer. > > > > > > it doesn't have to be a single pure sinusoid. it can be a sum of > > harmonically related sinusoids or, in other words, an arbitrary > > periodic function with period of N (or a sub-multiple of N), the size > > of the DFT/FFT. > > Robert, > > The FFT is a marvelously simplified way to calculate the Fourier series > that represents a particular periodic function f(t).What an DFT/FFT is and what it is used for are two different things. The original poster was asking how to best use an FFT to help interpret data where the periodicity was unknown (and I'd guess in most common usages, unlikely to exactly fit the DFT/FFT transform window). Assuming that, just because an FFT or DFT was involved, the representation must be periodic, is a little like looking for ones lost keys only under the lamp post because that's where there's the most light (in this case Fourier theory and complex analysis). Even the fact that the periodic interpretation allows for reconstruction is a red-herring. If an FFT window truncates ones data stream in a non-periodic manner, often what one wants is not the bandlimited periodic reconstruction interpretation, but something more continuous maybe in more derivatives at the window boundary. (e.g. interpolating from the assumed leakage if it looks like leakage rather than using the assumed leakage energy to reconstruct a waveform far more discontinuous at the window edge). IMHO. YMMV. -- rhn A.T nicholson d.O.t C-o-M
Reply by ●January 3, 20062006-01-03
Fred Marshall wrote:> What we do in practice is to pretend that real world signals are both > bandlimited and time limited. Then we sample in time and frequency > alike and use the DFT.It seems to me that the opposite interpretation would be quite useful. Assume that the signals are not band-limited nor periodic, but find out what the DFT/FFT as a finite non-periodic vector transform tool tells us about those signals anyway.> It's always interested me that we are happy to worry the heck out of > spectral aliasing but don't think much about temporal aliasing. I think > there may be a practical reason for this but I've not articulated one. > I do know that some frequency domain interpolation methods can cause > temporal trillies far removed from abrupt changes (temporal aliasing).I think some of the temporal aliasing comes from assuming that reconstruction from the frequency domain must be linear and linear phase. There are other methods, although not as cleanly or mathematically tractable. IMHO. YMMV. -- rhn A.T nicholson d.O.t C-o-M
Reply by ●January 3, 20062006-01-03
Ron N. wrote:> Jerry Avins wrote:...>>The FFT is a marvelously simplified way to calculate the Fourier series >>that represents a particular periodic function f(t). > > > What an DFT/FFT is and what it is used for are two different things. > The original poster was asking how to best use an FFT to help > interpret data where the periodicity was unknown (and I'd guess > in most common usages, unlikely to exactly fit the DFT/FFT > transform window). > > Assuming that, just because an FFT or DFT was involved, the > representation must be periodic, is a little like looking for ones > lost keys only under the lamp post because that's where there's the > most light (in this case Fourier theory and complex analysis). > > Even the fact that the periodic interpretation allows for > reconstruction is a red-herring. If an FFT window truncates ones > data stream in a non-periodic manner, often what one wants is not > the bandlimited periodic reconstruction interpretation, but something > more continuous maybe in more derivatives at the window boundary. > (e.g. interpolating from the assumed leakage if it looks like > leakage rather than using the assumed leakage energy to reconstruct > a waveform far more discontinuous at the window edge).I don't disagree. I wrote later that the way one looks at something can't change what it is, but it can change what one does with it. Engineering and "found art" have at least that in common. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 3, 20062006-01-03
Fred Marshall wrote, and am I glad he did! I wouldn't have had the patience to put it all together so cogently. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 3, 20062006-01-03
Jerry Avins wrote:> Beating a dead horse into dog food: > > John Monro wrote: > >> Jerry, >> Yes, on checking back before this sub-thread you did indeed say, >> referring to the components of the DFT: >> "All the integrals are the coefficients a_n and b_n in the series >> a_n*sin(nwt)f(t)dt + b_n*cos(nwt)f(t)dt. " >> This doses of course infer that the DFT and the Fourier series are >> related but different. > > > My sentence that you quoted also says that the integrations also > determine only the coefficients of the Fourier series. It seems to me > that makes the integrations entirely equivalent to a DFT.Jerry, It seems to me that you are maintaining that if something is part of a whole then it is the same as the whole. Tell me this is not true! My contribution to this sub-thread was just this: if the coefficients (as obtained from the DFT output are only part of the Fourier Series then DFT is not the Fourier Series itself. Regards, John> >> It seemed to me that in the more recent postings in this sub-thread >> there were two issues being discussed, but they were not clearly >> separated: >> They were: >> 1. Whether the DFT is a Fourier series or not >> 2. Whether the DFT coefficients allow you to is a good approximation >> of a Fourier series. >> >> I thought that it would be useful to make the point more strongly that >> the the DFT is not the Fourier series. > > > I'm sure it was. As long as we're here, another equivalence might be > interesting. To determine the harmonic content of a proposed amplifier > design, we used to plot its transfer function from the published tube > characteristics, input a sine, and do a harmonic analysis of the output, > all graphically. For the analysis, we selected a number of uniformly > spaced points along the output curve (usually 24 for a whole cycle) and > worked with the numbers picked off the plot. We were digitizing long > before the word itself was invented. > > Jerry
Reply by ●January 3, 20062006-01-03
John Monro wrote:> robert bristow-johnson wrote: > > > > well, it isn't the same as a Fourier series of a periodic > > continuous-time function, but the DFT most certainly is the same as the > > Fourier series of a periodic discrete-time function. the DFT maps a > > discrete periodic function in one domain (call it the "time domain") of > > period N, to another discrete periodic function in the reciprocal > > domain (call that the "frequency domain") of the same period length, N. > > both discrete periodic functions are fully defined by N complex > > numbers and the DFT maps the N numbers from one to the N numbers of the > > other. > > While I agree that the DFT can be used to find the Fourier series, and > that this can be done accurately under the conditions you describe,I > don't agree that this makes the DFT the same as the Fourier series. > > The essential difference is that the Fourier series is a function of > time, and the DFT isn't.time, schmime! the math doesn't care if the "n" in x[n] is a function of time, or location (say on a digital photo), or a probability density function (in which you might be interested in the "characteristic function"). it doesn't matter. what we are doing is fitting a bunch of sinusoids (expressed in complex exponential form) to a given set of N equally spaced data points: N-1 x[n] = SUM{ X[k] * exp(j*2*pi*n*k/N) } k=0 where the X[k] are simply the coefficients of the N sinusoids. (here is where the inherent periodic extension of x[n] is apparent.) then when you solve for the N coefficients, you get N-1 X[k] = (1/N) * SUM{ x[n] * exp(-j*2*pi*n*k/N) } n=0 (i realize that the 1/N factor is moved from the common DFT definition. that is simply an issue of convention where i am not following the most common convention here. doesn't change the main point.)> I know this is obvious to all concerned, but > we are talking about definitions here, I think.definitions are sometimes in the eye of the definer. whether someone defines it this way or not, at its most fundamental, the DFT maps a discrete infinite and periodic sequence in one domain (call it "time" if you like) of period N to another infinite and periodic sequence in the reciprocal domain (call it "frequency" if you like) of period N in an invertable fashion according to the equations above (except perhaps where the scaling factor is).> As I see it the DFT > provides the coefficients, but this set of coefficients becomes a > Fourier series only when you attach all the appropriate cos and sin > functions.but we *do* attach it to these sinusoidal functions. i ain't dealing with the sines and the cosines. maybe Jerry is, but i ain't. but i would call exp(j*theta) a "sinusoidal function" of sorts. r b-j
Reply by ●January 3, 20062006-01-03
robert bristow-johnson wrote:> John Monro wrote:> > I know this is obvious to all concerned, but > > we are talking about definitions here, I think. > > definitions are sometimes in the eye of the definer. whether someone > defines it this way or not, at its most fundamental, the DFT maps a > discrete infinite and periodic sequence in one domain (call it "time" > if you like) of period N to another infinite and periodic sequence in > the reciprocal domain (call it "frequency" if you like) of period N in > an invertable fashion according to the equations above (except perhaps > where the scaling factor is).I have to agee with RBJ here. I prefer the formulation of the DFT as a basis shift operator in a avector space. If x' = DFT{x} where x' and x are N by 1 column vectors and the apostrophe in x' means "the DFT of x", then the DFT can be expressed as x' = Wx where W ix an N by N matrix with elements W[n,k] = exp(-j2pi nk/N). The inverse of W is W" where W"[n,k] = 1/N*exp(j2pi nk/N). No sines. No time. No nothing. Just a pair of unitary matrices.> > As I see it the DFT > > provides the coefficients, but this set of coefficients becomes a > > Fourier series only when you attach all the appropriate cos and sin > > functions. > > but we *do* attach it to these sinusoidal functions. i ain't dealing > with the sines and the cosines. maybe Jerry is, but i ain't. but i > would call exp(j*theta) a "sinusoidal function" of sorts.Sure. Euler knew that. Rune
Reply by ●January 3, 20062006-01-03
John Monro wrote:> Jerry Avins wrote: > >> Beating a dead horse into dog food: >> >> John Monro wrote: >> >>> Jerry, >>> Yes, on checking back before this sub-thread you did indeed say, >>> referring to the components of the DFT: >>> "All the integrals are the coefficients a_n and b_n in the series >>> a_n*sin(nwt)f(t)dt + b_n*cos(nwt)f(t)dt. " >>> This doses of course infer that the DFT and the Fourier series are >>> related but different. >> >> >> >> My sentence that you quoted also says that the integrations also >> determine only the coefficients of the Fourier series. It seems to me >> that makes the integrations entirely equivalent to a DFT. > > Jerry, > It seems to me that you are maintaining that if something is part > of a whole then it is the same as the whole. Tell me this is not true!It is not true.> My contribution to this sub-thread was just this: if the coefficients > (as obtained from the DFT output are only part of the Fourier Series > then DFT is not the Fourier Series itself.We already agreed that I didn't say it is the same, only that it (like frequency-by-frequency integration) produces the coefficients of one. Where is the difficulty? ... Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 3, 20062006-01-03
robert bristow-johnson wrote: > John Monro wrote: > ...> time, schmime!Where did you learn Yiddish? ...>> As I see it the DFT >>provides the coefficients, but this set of coefficients becomes a >>Fourier series only when you attach all the appropriate cos and sin >>functions. > > > but we *do* attach it to these sinusoidal functions. i ain't dealing > with the sines and the cosines. maybe Jerry is, but i ain't. but i > would call exp(j*theta) a "sinusoidal function" of sorts.I would call it two sinusoidal functions of a sort. Same thing, sort of. Jerry P.S. Robert: The singers occasionally ask after you. -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������







