Before deriving the Fourier series, consider a simple periodic rectangular waveform. This waveform is one of the most important examples in power electronics because many switching waveforms can be approximated or directly represented by this form.
Let the waveform have:
Figure 1.
Switch Waveform
amplitude \(V\),
switching period \(T_s\),
duty cycle \(D\), where \(0\le D\le1\).
The duty cycle is defined as the fraction of each switching period during which the waveform remains at \(V\):
Therefore, the ON-time is
and the remaining OFF-time is
We define the rectangular waveform over one period as follows:
and the waveform repeats every switching period:
Thus, the waveform has a value of \(V\) for a fraction \(D\) of every period and a value of zero for the remaining fraction \(1-D\).
Fundamental Period and Frequency
The fundamental period of the waveform is \( T_S \). Therefore, the fundamental frequency is \(f_s=1/T_s\), and the corresponding fundamental angular frequency is \(\omega_s=2\pi f_s=2\pi/T_s\).
The Fourier-series components occur at integer multiples of the fundamental frequency. Thus, the angular frequencies are \(\omega_s,,2\omega_s,,3\omega_s,\ldots\), or equivalently, the frequencies are \(f_s,,2f_s,,3f_s,\ldots\).
We can now derive the Fourier series from the general Fourier-series equations while keeping the duty cycle \(D\) arbitrary throughout the derivation.
Note that the rectangular waveform is periodic and discontinuous (piecewise-constant). During each switching period, the voltage remains at \(V\) for the ON-time \(DT_s\) and at zero for the remaining time \( T_S \).
At \(t=DT_s\), the voltage changes instantaneously from \(V\) to zero. At the beginning of the next switching period, it returns to \(V\).
Thus, although the waveform is continuous between switching instants, it is discontinuous at the switching transitions.
Fourier Series Derivation
For the rectangular waveform, start from the general Fourier series:
with
The Fourier coefficients are
Since the waveform is \(V\) only during \(0\leq t<DT_s\) and zero for the remainder of the period, the coefficient calculations reduce to the ON interval.
DC Coefficient
Therefore,
Cosine Coefficient
Using \(\omega_s=2\pi/T_s\),
Therefore,
Sine Coefficient
Using \(\omega_s=2\pi/T_s\),
Therefore,
Substituting \(a_0\), \(a_n\), and \(b_n\) into the Fourier-series expression gives
Starting from the general trigonometric form for arbitrary duty cycle ,
we identify
and
The magnitude-phase form is
where
Substituting \(a_n\) and \(b_n\),
Factor out \(V/(n\pi)\):
Expand the square:
Using \(\sin^2\theta+\cos^2\theta=1\),
Using the identity \(1-\cos(2x)=2\sin^2x\),
Therefore,
The absolute value is required because a magnitude is always non-negative.
The phase angle is
so
An equivalent and more compact phase expression can be obtained from the harmonic term itself:
Using the identities \(\sin(2x)=2\sin x\cos x\) and \(1-\cos(2x)=2\sin^2x\),
Using \(\cos(A-B)=\cos A\cos B+\sin A\sin B\),
Therefore, a compact magnitude-phase representation is
If you want the magnitude strictly non-negative, then write it as
with
and the corresponding phase chosen according to the sign of \(\sin(\pi nD)\).
Special Case:
Figure 2.
Switch Waveform with duty cycle of 50%
For a 50% duty cycle,
D=0.5
the DC component becomes
For the cosine coefficients,
Substituting \(D=0.5\),
Since \(\sin(n\pi)=0\) for every integer \(n\),
Thus, all cosine terms disappear.
For the sine coefficients,
Substituting \(D=0.5\),
Since
we get
Therefore,
Hence, for \(D=0.5\), only the odd harmonics remain, and the Fourier series becomes
The 50% duty-cycle waveform, therefore, contains a DC component of \(V/2\) and only odd harmonics.
Fourier Series of the Switching Waveform
For a rectangular switching waveform with duty cycle \(D=0.5\), the Fourier series obtained previously is
For the LTspice circuit,
The switching period and angular switching frequency are
Trigonometric Fourier-Series Form
The general trigonometric Fourier series is
For \(D=0.5\), the cosine coefficients are zero:
and the sine coefficients are
The DC component is
Substituting \(V=50\ \mathrm{V}\), the first few non-zero sine coefficients are
Therefore, the numerical trigonometric Fourier series becomes
Only odd harmonics are present. The even harmonics are zero:
Magnitude-Phase Form
The sine and cosine terms belonging to the same harmonic can be represented by a single sinusoidal component:
where the peak magnitude of the \(n\)th harmonic is
and its phase angle is
For the 50% duty-cycle waveform, \(a_n=0\). Therefore, for the non-zero odd harmonics,
Since \(b_n>0\) for \(n=1,3,5,\ldots\),
because
Therefore, Eq. (2) can equivalently be written in magnitude-phase form as
The trigonometric and magnitude-phase forms represent exactly the same waveform. The trigonometric form gives the separate sine and cosine coefficients \(a_n\) and \(b_n\), while the magnitude-phase form directly gives the peak magnitude \(C_n\) and phase \(\phi_n\) of each harmonic.
Analytical Harmonic Components
Harmonic
Frequency
\(a_n\)
\(b_n\)
Peak magnitude \(C_n\)
Phase \(\phi_n\)
DC
0
—
—
\(25.000\ \mathrm{V}\)
—
1st
\(100\ \mathrm{kHz}\)
0
\(31.831\ \mathrm{V}\)
\(31.831\ \mathrm{V}\)
\(90^\circ\)
2nd
\(200\ \mathrm{kHz}\)
0
0
0
N/A
3rd
\(300\ \mathrm{kHz}\)
0
\(10.610\ \mathrm{V}\)
\(10.610\ \mathrm{V}\)
\(90^\circ\)
4th
\(400\ \mathrm{kHz}\)
0
0
0
N/A
5th
\(500\ \mathrm{kHz}\)
0
\(6.366\ \mathrm{V}\)
\(6.366\ \mathrm{V}\)
\(90^\circ\)
7th
\(700\ \mathrm{kHz}\)
0
\(4.547\ \mathrm{V}\)
\(4.547\ \mathrm{V}\)
\(90^\circ\)
The values in the peak magnitude column are the analytical harmonic amplitudes that can now be compared with the Fourier analysis obtained from LTspice.