The Fourier Series for a finite sum may be defined as:
where
The coefficients are found to be:
For an amplitude-offset square wave, the function may be defined:
where
where and
which gives:
Consider a pulse sequence of amplitude A and duty-cycle d (where d = k/T) centered about 0. By definition, this is an even function:
The even-function coefficients are found from:
If and , then the amplitudes for the first several terms are:
Put into Mathematica code:
Gives this result:
The Gibbs Effect “ears” are prominent and indicate about 9% over and under shoot.
But the function is even – centered about 0; the full response appears as:
… sort of “sloppy” with only 13 terms (with DC).
If I calculate for 1200 terms, I get this:
The Gibbs “ears” remain at about 9%, but the duration decreases as N increases and the energy content tends to 0.
Time-shifting the function will alter the coefficients (Coefficients are only zero if the function is centered about 0; i.e., an even function).