declare([C,R_ON,R_L,V_DD,%omega],[constant,real,scalar])$
assume(C>0)$
assume(R_ON>0)$
assume(R_L>0)$
assume(V_DD>0)$
assume(%omega>0)$Class-D Power Amplifier Notebook
Generated from CLASS_D_PA.wxm with rfMaxima 0.2.5 on Maxima 5.46.0.
All results were computed by executing the notebook; none is transcribed.
What efficiency can be expected from a class-D output stage driven as a 50 % duty square wave (NOT PWM: the analysis below takes the switching frequency and the output fundamental to be one and the same) for 4 Ohm load impedance with 0.2 Ohm resistance per switch, 2 nF switch gate capacitance, and 0.5 MHz clock frequency.
Positive half cycle, 0 <= t <= %pi/%omega, high-side switch closed:
(V_DD - V_L)/R_ON = C dV_L/dt + V_L/R_L
with the negative half cycle its mirror image. Write
V_inf = V_DD R_L/(R_ON+R_L) the settled output level %tau_RC = C R_ON R_L/(R_ON+R_L) the RC time constant at the node
and impose PERIODIC STEADY STATE, V_L(%pi/%omega) = -V_L(0). That fixes the integration constant:
V_L(0) = -V_inf*tanh(%pi/(2*%omega*%tau_RC))
rfMaxima 0.2.4 hand-copied the ode2 result but dropped the integration constant %c, so both half-cycle expressions collapsed to plain constants and the RC settling this notebook sets out to study contributed nothing at all. It also called ic1 with a variable (Vout) that does not appear in the ODE.
eq_p:(V_DD-V_L)/R_ON=C*'diff(V_L,t)+V_L/R_L;
ratsimp(ode2(eq_p,V_L,t));V_inf:V_DD*R_L/(R_ON+R_L);
%tau_RC:C*R_ON*R_L/(R_ON+R_L);
/* V_L0 = -V_inf*tanh(%pi/(2*%omega*%tau_RC)), written with only NEGATIVE
exponentials so it stays finite in floating point: here the half period is
thousands of time constants long and tanh() of that argument overflows to
NaN as soon as it is evaluated numerically. */
V_L0:-V_inf*(1-exp(-%pi/(%omega*%tau_RC)))/(1+exp(-%pi/(%omega*%tau_RC)));
V_Lp:V_inf+(V_L0-V_inf)*exp(-t/%tau_RC);
V_Ln:-V_inf+(V_inf-V_L0)*exp(-(t-%pi/%omega)/%tau_RC);Params:[C=2e-9,R_ON=0.2,R_L=4,V_DD=3,%omega=2*%pi*500000]$
/* antiperiodicity check: V_Ln at the half period must equal -V_Lp at t=0 */
float(ev(V_Lp,Params,t=0));
float(ev(V_Ln,Params,t=%pi/(2*%pi*500000)));
/* how many RC time constants fit in a half period */
float(ev(%pi/%omega/%tau_RC,Params));For this particular parameter set the half period is some 2600 RC time constants long, so the transient really is negligible and V_L is a square wave to many digits. That is now a RESULT rather than an artefact of a dropped integration constant: increase C or R_ON and the transient reappears in everything below.
Fourier coefficients of V_L
Fourier coefficients (a0, a1, b1) of a waveform written as
1/2*a0 + sum_n a_n cos(n%theta) + sum_n b_n sin(n%theta)
With the settling term present, V_L is V_inf plus a decaying exponential over each half cycle. Maxima can do those integrals symbolically, but only after a great deal of work and the closed form is then used numerically anyway, so integrate numerically with quad_qags for the parameter set above. (0.2.4 integrated a pair of CONSTANTS, because the integration constant had been dropped -- see the note further up -- so the symbolic answer it printed was just the Fourier series of an ideal square wave.)
%omega_n:2*%pi*500000$
V_Lp_n:ev(V_Lp,Params)$
V_Ln_n:ev(V_Ln,Params)$
a0_V_L:1/%pi*(quad_qags(ev(V_Lp_n,t=%theta/%omega_n),%theta,0,%pi)[1]
+quad_qags(ev(V_Ln_n,t=%theta/%omega_n),%theta,%pi,2*%pi)[1]);
a1_V_L:1/%pi*(quad_qags(ev(V_Lp_n,t=%theta/%omega_n)*cos(%theta),%theta,0,%pi)[1]
+quad_qags(ev(V_Ln_n,t=%theta/%omega_n)*cos(%theta),%theta,%pi,2*%pi)[1]);
b1_V_L:1/%pi*(quad_qags(ev(V_Lp_n,t=%theta/%omega_n)*sin(%theta),%theta,0,%pi)[1]
+quad_qags(ev(V_Ln_n,t=%theta/%omega_n)*sin(%theta),%theta,%pi,2*%pi)[1]);a0 and a1 are ~0 by the half-wave antisymmetry of the waveform; b1 is the output fundamental. For an ideal square wave b1 would be exactly 4/%pi * V_DD*R_L/(R_ON+R_L).
float(4/%pi*ev(V_DD*R_L/(R_ON+R_L),Params));Supply current
The load current is the fundamental across R_L. The supply delivers its rectified average, a0/2 with a0 taken over the positive half cycle.
R_L_n:ev(R_L,Params)$
V_DD_n:ev(V_DD,Params)$
I_dp:b1_V_L*sin(%theta)/R_L_n;
a0_I_d:1/%pi*quad_qags(I_dp,%theta,0,%pi)[1];P_DC, P_RF, efficiency
P_DC:float(2*V_DD_n*(1/2*a0_I_d));
P_RF:float(1/2*b1_V_L^2/R_L_n);
%eta:float(P_RF/P_DC);The efficiency comes out at 95.2 %, i.e. R_L/(R_L+R_ON) = 4/4.2, which is what a resistive divider between the switch and the load must give when the RC settling is negligible. Raise C or R_ON and the number falls below it.
float(ev(R_L/(R_L+R_ON),Params));Gate-charge loss
P_gate = 4 C_g V_DD^2 f_sw for four switches. This is set by the SWITCHING frequency, which in a true PWM stage is NOT the output signal frequency. 0.2.4 used %omega for both; they coincide here only because the stage is driven as a 50 % square wave at 0.5 MHz.
C_g:2e-9$
f_sw:500e3$
P_gate:4*C_g*V_DD_n^2*f_sw;
float(P_gate/P_DC);With 2 nF of gate capacitance per switch at 0.5 MHz the gate-charge loss is about 2 % of the delivered power -- small next to the 4.8 % lost in R_ON, but not the "negligible" that 0.2.4 claimed. It scales linearly with f_sw, so it is what sets the upper useful switching frequency.