Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: Fourier transforms



REPOSTING WHAT I THINK WAS LOST.

I will try to guess the answer to Roger's question.
And I will ask my own question. See below.

On Thursday, Oct 16, 2003 Roger Haar wrote:

. . . . A possibly interesting aside:
We do a lab with some FFT analysis of sound or a
function generator. Even with a good signal
generator the FFT usually produces a Gaussian-like
distribution of frequencies about the "correct"
one. This is because none of the frequencies
included in the FFT analysis match the actual
frequency. That is if the signal is a 103 Hz and
the FFT's frequencies include 100 HZ and 105 Hz,
but nothing in between, the analysis gives a
non-zero amplitude to both 100 and 105 Hz and
usually a bit in 90, 95, 110, and 115.

*****************************************
"Edmiston, Mike" wrote:

I have not carefully studied all the posts in this thread, so I
apologize if I say something redundant.

Ludwik says he has a square-wave pulse that is f(x) = 7 between x=2
and x=5. He then says he solves for the fourier cosine coefficients
by
integrating from x=2 to x=5.

John Mallinckrodt suggested Ludwik cannot use cosines alone because
the function Ludwik is working on is not an even function. John
suggested
moving the square wave pulse so it is centered about zero.

It seems to me John's suggestion would yield an entirely different
situation, that is, the two situations are not even close to
equivalent.

Fourier theory assumes the function you are trying to express (as a
fourier series) is a periodic function. If your "function" is
constant
at f(x) = 7 from x=2 to x=5 (and zero from x=0 to x=2), then when you
try to integrate over only that domain (from 2 to 5) you are getting
the
same result as if you had integrated from 0 to 5. That means the
periodic function you are trying to express actually runs from 0 to 5,
then repeats. That is, the periodic function is f(x)=0 from x = 0 to
2,
5 to 7, 10 to 12, etc. and f(x)=7 from x = 2 to 5, 7 to 10, 12 to 15,
etc.

We would indeed need both sine and cosine terms to represent this
(because it is neither even nor odd), except it is also possible to
express it as only sines or only cosines if a phase constant is
specified for each wavenumber. But to find the phase constants you
first find both the sine and cosine coefficients, so even if you want
to
express it as a cosine series you first find both the sine and cosine
coefficients.

If we move the f(x) = 7 "pulse" to center it on the origin, such that
f(x) = 7 for x between -1.5 and +1.5, and we integrate this from -1.5
to
1.5, then we don't really have a pulse. This is just a constant
function. a(0) = 7 and all other a(j) and b(j) are zero.

I also don't understand what Ludwik is doing when he talks about k =
6.1
and k = 5.9. Doesn't fourier analysis involve integer wave numbers?


1) I just wrote a simple True Basic program to find a Fourrier's
transform F(w) for any given function f(t). Given the shape of
f(t) it plots the distribution of angular frequencies, F(w). So far
I played with the function f(t)=cos(A*t) which is nonzero only
between t=-3 and +3 seconds. By changing A (between 2 and
100) I can impose the number of cycles of my wave train. The
expectation is that for a very large A (--> infinity) the distribution
of F(w) is essentially a single frequency (delta function).

The highest maximum in each F(w) always corresponds to the
frequency of f(t). For example, with A=10 the central maximum
is at w=10. And for A=60 the central maximum is at w=60, as I
expected. But there are many wiggles around the central peak,
even when A is as high as 100. I do not know how the FFT
analysis is performed by Roger (please share the details) but
I suspect that his hardware captures a certain finite number of
cycles to be processed. That is why the output is never a
single value of w.

Roger wrote: " . . . if the signal is a 103 Hz and the FFT's
frequencies include 100 HZ and 105 Hz, but nothing in between,
the analysis gives a non-zero amplitude to both 100 and 105 Hz
and usually a bit in 90, 95, 110, and 115." The fact that it is not
a single f is consistent with what my program shows. Perhaps
the software is instructed to round the values of f to nearest
multiple of 5. Roger changes f with the signal generator, I do
the same by choosing A. His number of captured cycles is
controlled by hardware; I control that number by choosing the
width on the wave train (from -3 s to +3 s).

By the way, my observations were confirmed when A=20 was
kept constant while the length of the wave train was changed
between 6 and 1000 seconds. The longer the wave train, the
less significant side frequencies in the F(w) are.

2) And here is my own question. What meaning should be
attached to negative w which my program generates? The
distributions of F(w), for the f(t)=cos(A*t) wave trains, are
always symmetrical with respect to w=0; how should
negative w be interpreted?
Ludwik Kowalski