Published
- 21 min read
Fourier Series: part 2
Periodicity of a Fourier Series
As we already described in the previous article of part 1, if we consider a periodic function in the span of its period , we can decompose and break it down into its set of components in which we can use it and reconstruct it back as a Fourier Series to represent the function.
Previously, we test it on a function that has the same period as . What if the period is different? Or rather, a more important question, how do we even detect the period?
In the previous article, we found out the integral transform that lets us compute the coefficient (or component) for each basis in the Fourier Series.
As we can see, the span is directly tied with the unit of used by function . Suppose that we want to define a complete period by having a value of , to denote its meaning as a complete cycle. Then we would have to redefine the parameter , or the transform itself. Suppose we don’t want to redefine because we want to have the function unaltered.
Then, if we want to keep the same inner product rule of Fourier basis, with symmetry around , then the span has to become and , such that the span . Consequently, we need to change the basis from into . This is from a simple changes of unit from , with the new parameter with ranges .
Writing over and over again after this will be such a pain. So we introduce a corresponding constant called Tau . One Tau , means one complete cycle.
Then if we want to have the same and consistent coefficient value. We redefined the Fourier Series to use this following form.
Now that we defined a standard “period” or “cycle” using unit . We can redefine the series for arbitrary period, relative to this unit.
Suppose that a function has period that is not . It can be less or greater. We actually want to find this period value.
The catch is, for any periodic function that has multiple harmonics, it will have multiple set of value. Probably, it is not symmetric as well. Each will have its corresponding period in this case. So let’s say we want to figure out the main or principal period. This has to be the period of .
Fortunately, we have two ways of calculating . One way, by setting the value , before doing the integration. So we have our regular integral under the curve , for all :
The second way, is by doing the integration first, then setting .
From the integration, we will have an anti-derivative as a function of and , the span of the period. From the equality between the two results, we can calculate the principal period.
Since this relies on having defined as the total integral of over all values of . It is important that the integral actually converges for any .
A classic example would be a damping oscillator that takes form of .
Let’s calculate its principal coefficient using its total area integral under the curve, from to .
Then we calculate using the integral transform while keeping as variable. Then we use the period , with initial value .
If we let any terms without be evaluated with , we will have:
We are guessing that the above equation can be true for multiple of . The easiest trivial one is at the limit of , in which the expression will be so small, it can be evaluated as zero.
The other set is to solve the second expression: , which is not possible. So the principal period when is actually .
It was unfortunate that we actually contradict our original assumptions. But hey, that is called progress. So, even though we can predict that the damping oscillator will have an oscillating frequency for it turns out the principal coefficient from the function can only be found when we assume , the period to be really big.
Relearning what it means for a Period and Frequency in a Fourier Series
Since our assumption is wrong. We need to rethink what went wrong.
If we take another simple example, such as , we already know that its non-zero coefficient is in fact and . The is zero. So what does it mean for this kind of case?
From what we understand if we set , the inner product transform has become integral under the curve
Although the values were convergent, it is very dependent on . For example, if the ranges were , the integral value is 2. But the function is clearly periodic on , so why we can’t retrieve this value from the transform?
If we look at the definition of “periodic function”, it means any function that satisfies for a given . Important point is that is only affected by the “length” of the span, it is not affected by the starting point of the function. Consequently, any integer multiple of will also work. So that: , when is an integer.
But, if we use the Fourier Series definition from E2, is a direct overlap from the period of the exponential function.
Since the coefficient will be the same between left hand side and right hand side, the only factor to make the equality is when:
Above equality only happens when is an integer, because . If is not an integer, becomes a complex number with real and imaginary component, clearly not equal to .
Suppose that is the fundamental period we are trying to find. The smallest non-zero period possible. Then is an integer multiple of the period. Let’s call it . Then, we have a reciprocal relationship between and . We also redefined connection between the index of the Fourier Series (as seen in E2), with the index of the integral transform (as seen in E1).
Our motivation is of course to make , so that we have a direct relationship between period used by the function in , with the span of the integration in .
In the case of , the connection is from the relation of the integral under the curve to retrieve from both E2 and E1.
Our problem is now the scaling for value . If we use the transform and set , we got integral under the curve. The range of the integration can be broken down into partition of integrals with range each. So, essentially for range now becomes times the for range . It has different meaning, as illustrated below:
Which is clearly inconsistent, since we have just defined that the Fourier Series representation will use the same coefficient . To make it consistent for arbitrary period , the form of the integral transform need to be patched with normalization factor again.
This time, the meaning has slightly changed.
- is the smallest non-zero period that served as the range of integration, the value can be arbitrary
- is the span/length of the integration. It is like a test/window of evaluation to get the corresponding frequency
- is an integer that corresponds to the “frequency”, and a reciprocal of set of values of .
This time, regardless with the arbitrary ranges , our Fourier series is now applicable for any linear combination of periodic function. If the coefficient exists for an integer frequency , that means a corresponding period exists.
Note that for the above convention to work, the description of the relation can’t be standalone. An integer would mean that is greater than . For example, suppose that we have a function . Using a range of integration from for parameter , we will have results in , if using formula .
However, from constructing the Fourier series directly, means if using formula . The index now doesn’t match.
Matching the index of Fourier Series with the index of the integral transform
If we want to have some kind of “inverse transform” relationship, the index and need to actually match the scale. Not just when both are 0.
Our new formula now allows us to identify the smallest non-zero period . From there, we can match the scale of “frequency” to the index of the Fourier series term .
The smallest non-zero period should be able to be found, if we let to be a real number, not just an integer.
If a “cycle” in Fourier series term means , then a “cycle” in the integral transform corresponds to . This is because the following relation will be true for each basis used between formula and
Naturally, if we let to be integers, then has to be between 0 and 1 (a real number, not integer), because is much bigger than . The idea is that the right hand side uses integral transform as some kind of sampling process. So the data that going to be integrated has to be a much denser set than the smallest period the signal can have.
Rearranging things, we will have:
Let us let the left hand side consists of only integers (both for and ), and let the right hand side corresponds to real numbers (both for and ). Since is also a real number, we can even rename it as just one real number variable. We can call this the “continuous” version of “frequency”, and we can name it .
Also, to make life simpler, we call the integral transform, a “Fourier Transform”. Which can take the following form in our current derivation:
The integer ( and ) parameter form:
The real number ( and ) parameter form:
The real number “continuous frequency” form:
We should be able to construct the corresponding Fourier Series, as long as we used the same span/length and index name for the terms.
These two operations is shown to be inverse of each other (proof maybe later on). The “Fourier Transform” is known as the “analysis” process, because it breaks down signals/functions into its corresponding set of coefficient of frequencies. Meanwhile, the “Fourier Series” is known as the “synthesis” process, because it uses the frequency sets to construct back the original signals/functions.
Extending Fourier Transform/Series pairs into non-periodic function
Previously, we had an accidental hint that Fourier Transform might work for non-periodic function, as long as the coefficient converges. If we think about it, the concept does make sense. means coefficient for the “Zero-th” frequency. So, the fundamental period/frequency is actually “no period/frequency applicable” for the previous decayed oscillation we discussed before. Meaning, as a whole, the function itself is not periodic, even though it oscillates (have other sets of frequencies).
While the Fourier Transform itself is computable for this kind of function. The “synthesis” part, the Fourier Series, doesn’t make any sense anymore. This is because there are no “fundamental frequency” to build the series. The just doesn’t exist because for such function, it can be set to an arbitrarily large length, since we never found the periodicity using previous method.
We will now try to understand what is the equivalent “synthesis” part of the duality for non-periodic function.
In this case, let be an infinite span. For a specific reason, this has to be an integer for now, so bear with me. Also, in this case, it is necessary to declare that , because the function is non-periodic (aperiodic).
We will use the “continuous” version of the Fourier Transform. This is because due to the reciprocity between period and frequency, “infinite period” means “infinitely small frequency”. So the frequency index can’t be an integer anymore.
To make sense of the above transform. First, imagine that the period is initially small. But we will gradually increase it. This, in turn will cause to be increasingly small, since the normalization factor gets huge.
Now we want to construct the “synthesis” part. But first we began to construct it using integer for small value of . For each term, using integer index means the spacing between each successive value of is equal to . If we now uses the “continuous” version of the index , spacing between successive terms becomes much denser, with each difference become , increasingly small.
Note that the relation has to be maintained.
If we write out the Fourier Series:
Substituting as and .
Under above condition, we can simplify things by taking into the limit:
Let’s introduce another function .
The Fourier Series/Sum now can be converted into an integral
Both the “analysis” and “synthesis” part now becomes integral transform and dramatically took a similar form.
The Fourier Transform now converts a function into another function with different domain. Since it depends on frequency , we usually call it the function on frequency domain.
The Fourier Series now takes form of another integral transform that can be called an Inverse Fourier Transform. The function is in the time domain.
Although we call it frequency and time domain, for non-periodic function, there is no canonical identity that lets us determine whether a function comes from a Fourier Transform (FT) or an Inverse Fourier Transform (IFT). This is because if both of them were complex function, the domain are the same.
Although, historically for physics related problem, a function in real number space is usually called function in the time domain. Meanwhile, a function that is in the complex number space (which has frequency and phase information) is called function in the frequency domain. For signal processing, it is very convenient to express a function in their frequency domain.
Constructing periodic Fourier Series from the non-periodic Fourier Transform
Our notion of the transformation now changes from finding coefficients of integer indices into finding a function in the frequency domain.
Surprisingly, the non-periodic formula of FT and IFT works really well for periodic function too. We just need to take into account the appropriate normalization scaling.
Let’s take an example of a function .
First, we tried to determine whether this is periodic or non-periodic, from the FT at frequency 0. Suppose that the function is periodic, then there exists the smallest non-zero interval , in which the FT can be decomposed into a partition of integral with the same interval.
Its FT, the frequency-domain function:
The FT with frequency 0 corresponds to the average/mean of the area of the integration. For periodic function, the average has to be the same for any integer multiple of , the smallest non-zero period. In this situation, the average area has to be constant under changes of . So the derivative with respect to is zero.
We can then reduce the range of the FT. Instead of integrating from to . We can use to
The FT then becomes:
If we see the above function , it is immediately obvious that the function will have a peak frequency when . Meaning that the function will have Fourier Series coefficient at .
will have indefinite form , when . This would imply that we should use L’Hopital’s rule to get the limit of the value.
From the same function of , we can also check which frequency that has zero value of . It’s easily be . We can then define the index that can be used in the Fourier Series approximation. So, the Fourier coefficient set only contains 2 values: and
The Fourier Series then will be like this:
Which is indeed that we recover the original function using the Fourier Series.
As for why we are using the Fourier Series instead of the IFT integral transform, this is because for periodic function it will be essentially the same for finite range of integration . It is also easier to compute if the set of frequencies are finite.
Recap
The journey this time is quite long, but I think it is helpful as a simulation to build ideas from first principle.
As you may now, in engineering course, we often directly use Fourier Transform and Fourier Transform Inversion Theorem directly. At least when I first learn it, it feels un-intuitive and looks like hand-waving the theorem without intuitive grounds. Sure, it is easier to use because the theorem has been proven and reformed into a much more easier presentation. But sometimes it feels like it lacks fundamental understanding on why it has to be that way.
This illustration serves as a guide on how to view math as an exploration of ideas. We build it, test it, figure out what went wrong when it doesn’t do what we expect. Then finally, we condense the theory so that it can be easily used in a much more generic situation.
Let’s have a quick recap.
We start from building upon the ideas of Fourier Series, its alternative view as inner product orthogonal basis, and its integral transform to compute the coefficient. We then arrived at a much more generic formula that can be reduced into Fourier Series for a much more specific case.
Given a complex function with time parameter . If the integral converges over its domain , then there exists a Fourier Transform FT:
With another complex function, but on a frequency domain with parameter . The inverse transform: Inverse Fourier Transform IFT also exists:
In the case of periodic function, we can find the smallest periodic interval , by finding the average value of the integration. Suppose is the function in frequency domain with boundary/interval parameter , and number of integer partitions .
If there exists as the smallest non-zero period. Then the zero-th frequency is the average/mean of integral under the curve. For periodic function, this value has to be constant under parameter . This can be expressed as:
Solve to get the period . Use the boundary to perform FT. Construct discrete indices in which frequency is defined. We can then approximate the Fourier Series for periodic function using:
For finite set of frequency spectrum , it can be shown that above approximation is equal to the original function, .
From above interpretation, we can then interpret the difference between Taylor approximation and Fourier approximation.
Taylor series is an approximation of the function at only the point of the evaluation. Fourier series is an approximation of the function at a given interval of the evaluation.
In this sense, Fourier Series can be thought of as a “compression” technique for an information about the function. For any periodic function with infinite domain, there exists a small subset of interval , in which we can sample the function to retrieve the frequency information. This discrete set of frequency is then enough to reconstruct the function for the whole intervals.