r/DSP•
ReasonHead

Could you do a fourier-like transform with any periodic function?

I.e. could you just replace e^-jyx with any other periodic function and get some continuous spectrum? Or is there something about sinusoids that makes them the only functions that work? Or do the periodic functions you use need to have special properties (like no discontinuities in any of the derivatives)?

I am asking because people always say that "you can construct anything out of sine waves" and that they are like the basic building blocks. I am wondering whether that is actually true or if sines just happen to be a convenient way of describing certain behaviour and psychoacoustic phenomena so that's what's always used. IIRC from a 3blue1brown video even something simple like a pendulum oscillation is technically not a sine function so yeah... Lots of questions go through my head whether sinusoids are universally the simplest and only function one can use.

Posted Mar 24, 2020, 12:52 PM UTC

1633
milax•

First, some words about Fourier series.

sines and cosines (equivalently, complex exponentials) are an orthogonal basis for finite energy signals over a bounded interval (which can be extended to periodic functions).

Note that for a periodic function, eq. function defined over an interval, the spectrum is not continuous but discrete.

Fourier series are interesting because :

  • sines and cosines are orthogonal, the coefficients are easily computed
  • when a sinusoid is given to a filter, the ouput is a sinusoid at the same frequency, which allows easy analysis of the action of a filter on a signal decomposed on the Fourier basis
  • decay of the coefficients is related to the smoothness of the signal (the smoother a signal is, the fastest the decay of the coefficients is. Compare the decay of sawtooth coefficients with triangular wave)

It is not the only example of decomposition of functions over an interval. The Walsh-Hadamard is an other example. I can't find a good free reference on this, but the basis functions used look like sinus and cosines, but with values +1 and -1 (note that they are discontinuous) (you will mostly find documents on the discrete Wlash-Hadamard transformation is you search for this).

Note that this transform does not have the 2nd and 3rd properties of Fourier series.

Another example is the Haar transform, related to wavelets transforms.

If you consider functions defined over R, then in addition to the Fourier transform, you have

  • continuous wavelet transform
  • wavelet basis
  • Hermite functions
  • short time Fourier transforms (spectrograms)
  • etc.

Hermite functions are an orthogonal basis of functions with finite energy defined over R. They are useful in physics as quantum states of harmonic oscillators.

Anyway, they are multiples ways to analyze or decompose signals defined over R or on an interval (or periodic). They have different properties, appropriate for different uses. Orthogonality is useful, but not a requirement (cf. short time Fourier transform, or biorthogonal wavelets used in JPEG2000)

Main properties of Fourier-type decomposition are :

  • orthogonality
  • decay of the coefficients equivalent with smoothness of the signal
  • convenient analysis of filters
12
32BitLongSucks•

you can use any functions you want and generate all kinds of crazy spaces.

Sines are just one particular useful one because they are all orthogonal, which means you can filter one frequency out without affecting all others. So you get many interesting insights from the Fourier transform.

But than again you can generate any function by just defining it over time, some would even dare to say it's more intuitive - so that's not a property that is specific to sine waves. And i never red a requirement that this has to be possible, transforms that lose some information are just as possible - but would make a reverse transform impossible.

So yeah i'd say the fourier transform is especially interesting because we often want to know what happens at a specific frequency to amplify it or filter it out. So projecting onto waves is the obvious choice.

9
Flogge•

Yes, you can. The e-function serves as a basis function. You are essentially searching in the the continuous signal for these continous basis functions. You can pick any other suitable basis function, and search the signal for it.

Of course, there are some conditions for basis functions, most prominently that they must be linearly independent and must span the function space.

If you have taken basic linear algebra classes, this concept should sound familiar, as they have basis vectors and vector spaces there, too. The difference: they're time-discrete and finite length. If you are more comfortable in the linear algebra domain, I recommend looking at the DFT and the DFT matrix instead. The rows of the DFT matrix (the e function) serve as basis vectors here.

Now in the discrete case, your question becomes: Can I only do basis transforms using the DFT matrix (which contains the e function), or are there other basis functions, too? And the answer is obviously "there are others, too".

There are some conditions however: The basis vectors must be linearly independent and must span the entire vector space.

However: The Fourier basis is not just "any basis function" but instead are the eigenfunctions of the convolution. And because the convolution is the most basic operation that we can use to express any other LTI operation, the fourier transform are basically the most "eigen" tool we have to express any LTI system, continous or discrete, that we have.

Same goes for the DFT: the DFT are the eigenvectors of the circular convolution in the time-discrete domain. This eigenfunction/vector attribute leads to the famous Convolution theorem.

Again, linear algebra is easier to grapple with, so try searching for DFT convolution diagonalization

5
ReasonHeadOP•

Thanks. I have taken very basic linear algebra so I have heard of orthogonality and linear (in)dependence there, as well as calculated eigenvalues and eigenvectors but it is has been some time ago and I'm not sure I fully understand your answer. Thanks anyway!

2
AssemblerGuy•

Or is there something about sinusoids that makes them the only functions that work?

You can use any set functions that are mutually orthogonal. One certain set will give you the fourier transform, other sets will give you wavelet transforms.

This is explained well in

http://fourierandwavelets.org/FSP_v1.1_2014.pdf

3
MauledByPorcupines•

You can also use non-orthogonal functions, if you like - it's just a matrix multiplication

1
AssemblerGuy•

Yes, I wasn't thinking about the complete picture.

The book I linked to contains very good explanations, including the particularities of using nonorthogonal or overcomplete bases.

1
Octoxo•

Interesting question. Intuitively it doesn't seam like you could do a Fourier transform of a function like tan(x) at it's asymptotes and it's a periodic function. I did a bit of googling and found this list of conditions required of the function you want to do Fourier transform on.

f (x) is a well defined function. f (x) is finite or bounded. f (x) has only a finite number of discontinuous point. f (x) has only a finite number of maxima and minima.

Since tan(x) doesn't have a finite number of maxima and minima it looks like you can't do a Fourier transform on it.

2
ReasonHeadOP•

f (x) has only a finite number of discontinuous point. f (x) has only a finite number of maxima and minima.

This wouldn't apply to sin/cos would it? They have infinite maxima and minima.

2
Octoxo•

Hmm, yeah. This Wiki does a better job explaining the conditions

https://en.wikipedia.org/wiki/Dirichlet_conditions

2
WikiTextBot•

Dirichlet conditions

In mathematics, the Dirichlet conditions are sufficient conditions for a real-valued, periodic function f to be equal to the sum of its Fourier series at each point where f is continuous. Moreover, the behavior of the Fourier series at points of discontinuity is determined as well (it is the midpoint of the values of the discontinuity). These conditions are named after Peter Gustav Lejeune Dirichlet.

The conditions are:

f must be absolutely integrable over a period.


^([ )^(PM)^( | )^(Exclude me)^( | )^(Exclude from subreddit)^( | )^(FAQ / Information)^( | )^(Source)^( ] Downvote to remove | v0.28)

1
Octoxo•

Check out this video. https://youtu.be/blS_OImUJ-c

1
milax•

Not over a period. Fourier series is better understood on an interval rather than on periodic functions.

1
Flogge•

I think f(x) should have a finite number of maxima and discontinuous points over one period.

1
Octoxo•

Yes, as I learn more about Dirichlet conditions, I can see "over one period" is an important part of the rule.

1
milax•

This is not the question ReasonHead asked. Anyway, you can, in some way, compute Fourier series coefficients of tan(t), but this involve distributions, and you won't have pointwise convergence.

0
mrluxces•

A lot of answers here have mentioned that the basis set of the Fourier Transform is orthogonal, while this is true, this only one of the reasons why this basis is useful (there are infinitely many orthogonal basis sets which can be used to decompose a function). The real reason why the Fourier transform is useful is that sinusoids (i.e. e^iwt ) are the solutions to linear differential equations. And because many physical phenomena are described by differential equations, the Fourier transform is the natural tool for us to use in solving those problems.

2
[deleted]•

Yes

1
Allan-H•

The main requirement for the basis functions is that they are orthogonal.

Examples, sinusoids, wavelets, Walsh functions.

1†
Flogge•

Do they really have to be orthogonal? I think they have to be linearly independent and have to span the function space.

7
Allan-H•

I'm not entirely sure - it's been too many decades since I took a linear algebra course.

I believe the three examples I gave are orthogonal, but that might not be a necessary condition.

3
[deleted]•

[deleted]

3
AssemblerGuy•

Do they really have to be orthogonal?

They don't have to be, but it's convenient. And you need to be aware of the fact that you're using nonorthogonal functions. Some things work slightly differently in this case.

3
mtbdork•

I think they have to form an inner product space, thus implying functional orthogonality.

-1
[deleted]•

[deleted]

3
[deleted]•

[deleted]

2
ReasonHeadOP•

I only know orthogonality and linear dependency from vectors. How do these properties apply to functions?

1
hexafraction•

In the same way, because those functions are elements of a vector space. The zero vector (additive identity) is the function that is identically zero everywhere and the inner product of two functions is the integral of those functions over the domain of interest.

3
ReasonHeadOP•

Ah, cool! Thanks!

1
AssemblerGuy•

I only know orthogonality and linear dependency from vectors. How do these properties apply to functions?

By defining an inner product that works with functions (the scalar product of vectors is a type of inner product). Once you have an inner product, you can determine orthogonality of functions (or angles between functions) and linear dependency/independence.

See the book/pdf I linked to.

1
milax•

orthogonality is not a requirement. Biorthogonal wavelets (used in JPEG), and short time Fourier transforms are not orthogonal. It's also not sufficient.

1

The generalization is something called an orthogonal basis set. They pop up a lot in quantum mechanics where the solution of the equations of motion are basis functions. You then break up your starting state into the basis with the equivalent of a fourier transform and you can figure out the state of the system at any time in the future.

1
[deleted]•

[deleted]

-1
milax•

those are statistical estimators of spectral parameters, not transforms.

2