Fourier Analysis of Common Switch Waveform

Rectangular Waveform with Arbitrary Duty Cycle

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:

Switch Waveform
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\):

D=TonTsD=\frac{T_{\mathrm{on}}}{T_s}

Therefore, the ON-time is

Ton=DTsT_{\mathrm{on}}=DT_s

and the remaining OFF-time is

Toff=(1D)Ts.T_{\mathrm{off}}=(1-D)T_s.

We define the rectangular waveform over one period as follows:

v(t)={V,0t<DTs,0,DTst<Ts.v(t)= \begin{cases} V, & 0\leq t<DT_s,\\ 0, & DT_s\leq t<T_s. \end{cases}

and the waveform repeats every switching period:

v(t+Ts)=v(t).v(t+T_s)=v(t).

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:

f(t)=a02+n=1[ancos(nωst)+bnsin(nωst)]f(t)\equal\frac{a_0}{2} +\sum_{n=1}^{\infty} \left[ a_n\cos(n\omega_s t) + b_n\sin(n\omega_s t) \right]

with

ωs=2πTs\omega_s=\frac{2\pi}{T_s}

The Fourier coefficients are

a0=2Ts0Tsv(t),dta_0=\frac{2}{T_s}\int_0^{T_s}v(t),dt
an=2Ts0Tsv(t)cos(nωst),dta_n=\frac{2}{T_s}\int_0^{T_s}v(t)\cos(n\omega_s t),dt
bn=2Ts0Tsv(t)sin(nωst),dtb_n=\frac{2}{T_s}\int_0^{T_s}v(t)\sin(n\omega_s t),dt

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

a0=2Ts0DTsV,dta_0=\frac{2}{T_s}\int_0^{DT_s}V,dt
a0=2VTs[t]0DTsa_0=\frac{2V}{T_s}\left[t\right]_0^{DT_s}
a0=2VTs(DTs)a_0=\frac{2V}{T_s}(DT_s)
a0=2VD\boxed{a_0=2VD}

Therefore,

a02=VD\boxed{\frac{a_0}{2}=VD}

Cosine Coefficient

an=2VTs0DTscos(nωst),dta_n=\frac{2V}{T_s}\int_0^{DT_s}\cos(n\omega_s t),dt
an=2VTs[sin(nωst)nωs]0DTsa_n= \frac{2V}{T_s} \left[ \frac{\sin(n\omega_s t)}{n\omega_s} \right]_0^{DT_s}
an=2VTssin(nωsDTs)nωsa_n= \frac{2V}{T_s} \frac{\sin(n\omega_s DT_s)}{n\omega_s}

Using \(\omega_s=2\pi/T_s\),

an=2VTssin(n2πTsDTs)n2πTsa_n= \frac{2V}{T_s} \frac{ \sin\left( n\frac{2\pi}{T_s}DT_s \right) }{ n\frac{2\pi}{T_s} }
an=Vnπsin(2πnD)a_n= \frac{V}{n\pi}\sin(2\pi nD)

Therefore,

an=Vnπsin(2πnD)\boxed{ a_n=\frac{V}{n\pi}\sin(2\pi nD) }

Sine Coefficient

bn=2VTs0DTssin(nωst),dtb_n=\frac{2V}{T_s}\int_0^{DT_s}\sin(n\omega_s t),dt
bn=2VTs[cos(nωst)nωs]0DTsb_n= \frac{2V}{T_s} \left[ -\frac{\cos(n\omega_s t)}{n\omega_s} \right]_0^{DT_s}
bn=2VTs[cos(nωsDTs)nωs+1nωs]b_n= \frac{2V}{T_s} \left[ -\frac{\cos(n\omega_s DT_s)}{n\omega_s} + \frac{1}{n\omega_s} \right]
bn=2VTs1cos(nωsDTs)nωsb_n= \frac{2V}{T_s} \frac{ 1-\cos(n\omega_s DT_s) }{ n\omega_s }

Using \(\omega_s=2\pi/T_s\),

bn=Vnπ[1cos(2πnD)]b_n= \frac{V}{n\pi} \left[ 1-\cos(2\pi nD) \right]

Therefore,

bn=Vnπ[1cos(2πnD)]\boxed{ b_n= \frac{V}{n\pi} \left[ 1-\cos(2\pi nD) \right] }

Substituting \(a_0\), \(a_n\), and \(b_n\) into the Fourier-series expression gives

v(t)=VD+n=1[Vnπsin(2πnD)cos(nωst)+Vnπ(1cos(2πnD))sin(nωst)]\boxed{ v(t)\equal VD + \sum_{n=1}^{\infty} \left[ \frac{V}{n\pi}\sin(2\pi nD)\cos(n\omega_s t) + \frac{V}{n\pi} \left(1-\cos(2\pi nD)\right) \sin(n\omega_s t) \right] }

Starting from the general trigonometric form for arbitrary duty cycle DD,

we identify

an=Vnπsin(2πnD)a_n=\frac{V}{n\pi}\sin(2\pi nD)

and

bn=Vnπ[1cos(2πnD)]b_n=\frac{V}{n\pi}\left[1-\cos(2\pi nD)\right]

The magnitude-phase form is

v(t)=VD+n=1Cncos(nωstϕn)v(t)=VD+\sum_{n=1}^{\infty}C_n\cos(n\omega_s t-\phi_n)

where

Cn=an2+bn2C_n=\sqrt{a_n^2+b_n^2}

Substituting \(a_n\) and \(b_n\),

Cn=[Vnπsin(2πnD)]2+[Vnπ(1cos(2πnD))]2C_n= \sqrt{ \left[ \frac{V}{n\pi}\sin(2\pi nD) \right]^2 + \left[ \frac{V}{n\pi}(1-\cos(2\pi nD)) \right]^2 }

Factor out \(V/(n\pi)\):

Cn=Vnπsin2(2πnD)+[1cos(2πnD)]2C_n= \frac{V}{n\pi} \sqrt{ \sin^2(2\pi nD) + \left[1-\cos(2\pi nD)\right]^2 }

Expand the square:

Cn=Vnπsin2(2πnD)+12cos(2πnD)+cos2(2πnD)C_n= \frac{V}{n\pi} \sqrt{ \sin^2(2\pi nD) + 1 -2\cos(2\pi nD) + \cos^2(2\pi nD) }

Using \(\sin^2\theta+\cos^2\theta=1\),

Cn=Vnπ22cos(2πnD)C_n= \frac{V}{n\pi} \sqrt{ 2-2\cos(2\pi nD) }

Using the identity \(1-\cos(2x)=2\sin^2x\),

22cos(2πnD)=4sin2(πnD)2-2\cos(2\pi nD)=4\sin^2(\pi nD)

Therefore,

Cn=2Vnπ|sin(πnD)|\boxed{ C_n= \frac{2V}{n\pi} \left|\sin(\pi nD)\right| }

The absolute value is required because a magnitude is always non-negative.

The phase angle is

ϕn=atan2(bn,an)\phi_n=\operatorname{atan2}(b_n,a_n)

so

ϕn=atan2(1cos(2πnD),sin(2πnD))\boxed{ \phi_n= \operatorname{atan2} \left( 1-\cos(2\pi nD), \sin(2\pi nD) \right) }

An equivalent and more compact phase expression can be obtained from the harmonic term itself:

ancos(nωst)+bnsin(nωst)a_n\cos(n\omega_s t)+b_n\sin(n\omega_s t)

Using the identities \(\sin(2x)=2\sin x\cos x\) and \(1-\cos(2x)=2\sin^2x\),

=2Vnπsin(πnD)[cos(πnD)cos(nωst)+sin(πnD)sin(nωst)]= \frac{2V}{n\pi}\sin(\pi nD) \left[ \cos(\pi nD)\cos(n\omega_s t) + \sin(\pi nD)\sin(n\omega_s t) \right]

Using \(\cos(A-B)=\cos A\cos B+\sin A\sin B\),

=2Vnπsin(πnD)cos(nωstπnD)= \frac{2V}{n\pi}\sin(\pi nD) \cos\left(n\omega_s t-\pi nD\right)

Therefore, a compact magnitude-phase representation is

v(t)=VD+n=12Vnπsin(πnD)cos(nωstπnD)\boxed{ v(t)= VD + \sum_{n=1}^{\infty} \frac{2V}{n\pi} \sin(\pi nD) \cos\left(n\omega_s t-\pi nD\right) }

If you want the magnitude strictly non-negative, then write it as

v(t)=VD+n=1Cncos(nωstϕn)\boxed{ v(t)= VD + \sum_{n=1}^{\infty} C_n \cos(n\omega_s t-\phi_n) }

with

Cn=2Vnπ|sin(πnD)|\boxed{ C_n= \frac{2V}{n\pi} \left|\sin(\pi nD)\right| }

and the corresponding phase chosen according to the sign of \(\sin(\pi nD)\).

Special Case: D=0.5D=0.5

Switch Waveform with duty cycle of 50%
Figure 2. Switch Waveform with duty cycle of 50%

For a 50% duty cycle,

D=0.5

the DC component becomes

a02=VD=V2\frac{a_0}{2}=VD=\frac{V}{2}

For the cosine coefficients,

an=Vnπsin(2πnD)a_n=\frac{V}{n\pi}\sin(2\pi nD)

Substituting \(D=0.5\),

an=Vnπsin(2πnD)a_n=\frac{V}{n\pi}\sin(2\pi nD)

Since \(\sin(n\pi)=0\) for every integer \(n\),

an=0\boxed{a_n=0}

Thus, all cosine terms disappear.

For the sine coefficients,

bn=Vnπ[1cos(2πnD)]b_n= \frac{V}{n\pi} \left[ 1-\cos(2\pi nD) \right]

Substituting \(D=0.5\),

bn=Vnπ[1cos(nπ)]b_n= \frac{V}{n\pi} \left[ 1-\cos(n\pi) \right]

Since

cos(nπ)=(1)n\cos(n\pi)=(-1)^n

we get

bn=Vnπ[1(1)n]b_n= \frac{V}{n\pi} \left[ 1-(-1)^n \right]

Therefore,

bn={2Vnπ,n=1,3,5, 0,n=2,4,6,\boxed{ b_n= \begin{cases} \dfrac{2V}{n\pi}, & n=1,3,5,\ldots\ 0, & n=2,4,6,\ldots \end{cases} }

Hence, for \(D=0.5\), only the odd harmonics remain, and the Fourier series becomes

v(t)=V2+2Vπ[sin(ωst)+13sin(3ωst)+15sin(5ωst)+]\boxed{ v(t)\equal \frac{V}{2} + \frac{2V}{\pi} \left[ \sin(\omega_s t) +\frac{1}{3}\sin(3\omega_s t) +\frac{1}{5}\sin(5\omega_s t) +\cdots \right] }

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

v(t)=V2+2Vπ[sin(ωst)+13sin(3ωst)+15sin(5ωst)+](1)\boxed{v(t)=\frac{V}{2}+\frac{2V}{\pi}\left[\sin(\omega_s t)+\frac{1}{3}\sin(3\omega_s t)+\frac{1}{5}\sin(5\omega_s t)+\cdots\right]}\tag{1}

For the LTspice circuit,

V=50 VV=50\ \mathrm{V}
fs=100 kHzf_s=100\ \mathrm{kHz}
D=0.5D=0.5

The switching period and angular switching frequency are

Ts=1fs=10 μsT_s=\frac{1}{f_s}=10\ \mu\mathrm{s}
ωs=2πfs=6.2832×105 rad/s\omega_s=2\pi f_s=6.2832\times10^5\ \mathrm{rad/s}

Trigonometric Fourier-Series Form

The general trigonometric Fourier series is

v(t)=a02+n=1[ancos(nωst)+bnsin(nωst)]v(t)=\frac{a_0}{2}+\sum_{n=1}^{\infty}\left[a_n\cos(n\omega_s t)+b_n\sin(n\omega_s t)\right]

For \(D=0.5\), the cosine coefficients are zero:

an=0a_n=0

and the sine coefficients are

bn={2Vnπ,n=1,3,5,\[6pt]0,n=2,4,6,b_n=\begin{cases}\dfrac{2V}{n\pi}, & n=1,3,5,\ldots\[6pt]0, & n=2,4,6,\ldots\end{cases}

The DC component is

a02=V2=25 V\frac{a_0}{2}=\frac{V}{2}=25\ \mathrm{V}

Substituting \(V=50\ \mathrm{V}\), the first few non-zero sine coefficients are

b1=2(50)π=31.831 Vb_1=\frac{2(50)}{\pi}=31.831\ \mathrm{V}
b3=2(50)3π=10.610 Vb_3=\frac{2(50)}{3\pi}=10.610\ \mathrm{V}
b5=2(50)5π=6.366 Vb_5=\frac{2(50)}{5\pi}=6.366\ \mathrm{V}
b7=2(50)7π=4.547 Vb_7=\frac{2(50)}{7\pi}=4.547\ \mathrm{V}

Therefore, the numerical trigonometric Fourier series becomes

v(t);25&+31.831sin(ωst)&+10.610sin(3ωst)&+6.366sin(5ωst)&+4.547sin(7ωst)+(2)\boxed{\begin{aligned}v(t)\approx;&25\&+31.831\sin(\omega_s t)\&+10.610\sin(3\omega_s t)\&+6.366\sin(5\omega_s t)\&+4.547\sin(7\omega_s t)+\cdots\end{aligned}}\tag{2}

Only odd harmonics are present. The even harmonics are zero:

V2=V4=V6==0V_2=V_4=V_6=\cdots=0

Magnitude-Phase Form

The sine and cosine terms belonging to the same harmonic can be represented by a single sinusoidal component:

ancos(nωst)+bnsin(nωst)=Cncos(nωstϕn)a_n\cos(n\omega_s t)+b_n\sin(n\omega_s t)=C_n\cos(n\omega_s t-\phi_n)

where the peak magnitude of the \(n\)th harmonic is

Cn=an2+bn2C_n=\sqrt{a_n^2+b_n^2}

and its phase angle is

ϕn=atan2(bn,an)\phi_n=\operatorname{atan2}(b_n,a_n)

For the 50% duty-cycle waveform, \(a_n=0\). Therefore, for the non-zero odd harmonics,

Cn=|bn|=2VnπC_n=|b_n|=\frac{2V}{n\pi}

Since \(b_n>0\) for \(n=1,3,5,\ldots\),

ϕn=π2=90\phi_n=\frac{\pi}{2}=90^\circ

because

Cncos(nωstπ2)=Cnsin(nωst)C_n\cos\left(n\omega_s t-\frac{\pi}{2}\right)=C_n\sin(n\omega_s t)

Therefore, Eq. (2) can equivalently be written in magnitude-phase form as

v(t);25&+31.831cos(ωst90)&+10.610cos(3ωst90)&+6.366cos(5ωst90)&+4.547cos(7ωst90)+(3)\boxed{\begin{aligned}v(t)\approx;&25\&+31.831\cos(\omega_s t-90^\circ)\&+10.610\cos(3\omega_s t-90^\circ)\&+6.366\cos(5\omega_s t-90^\circ)\&+4.547\cos(7\omega_s t-90^\circ)+\cdots\end{aligned}}\tag{3}

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

HarmonicFrequency\(a_n\)\(b_n\)Peak magnitude \(C_n\)Phase \(\phi_n\)
DC0\(25.000\ \mathrm{V}\)
1st\(100\ \mathrm{kHz}\)0\(31.831\ \mathrm{V}\)\(31.831\ \mathrm{V}\)\(90^\circ\)
2nd\(200\ \mathrm{kHz}\)000N/A
3rd\(300\ \mathrm{kHz}\)0\(10.610\ \mathrm{V}\)\(10.610\ \mathrm{V}\)\(90^\circ\)
4th\(400\ \mathrm{kHz}\)000N/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.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top