Current-Mode Control: Slope Compensation & Type-II Design

Size the slope compensation and design a Type-II voltage loop for CCM buck, boost and flyback converters. Inspect sampled-data peaking, all gain crossings, Bode plots and a linear load-step estimate.

#Bode plot #boost #buck #flyback #peak-current-mode-control #sampled-data #slope-compensation #type-II-compensator

This current mode control compensation calculator helps engineers and students choose an artificial current ramp and a Type-II voltage-loop compensator for a fixed-frequency converter. Select a buck, boost, or isolated flyback operating in continuous conduction mode (CCM), then enter the actual power-stage and current-sense values. The results describe one nominal operating point. Buck gain and pole placement include ramp-dependent corrections; boost and flyback warn when omitted low-frequency corrections exceed a declared 10% screening limit.

Start with input and output voltage, load current, switching frequency, inductance, effective output capacitance, and capacitor ESR. For a flyback, inductance and sensed current are referred to the primary, and the turns ratio is secondary turns divided by primary turns. Current-sense gain includes the sensing resistor and amplifier gain up to the PWM comparator. Check the displayed valley current: a zero or negative valley means this CCM calculation no longer applies.

Use the slope compensation calculator in design mode to choose a target sampled-pole Q. The default Qp of 1 provides a practical damping starting point. Existing-ramp mode accepts Se/Sn directly. The reported ramp amplitude is the artificial ramp accumulated over a complete switching period; the ramp present at turn-off is only the duty ratio times that amplitude. The strict stability boundary and the damping recommendation answer different design questions.

For Type 2 compensator design, choose a crossover frequency and target phase margin. The calculator places the high-frequency pole at the lowest of the ESR zero, RHP zero, and half the switching frequency, then solves the zero and gain. In manual mode, choose the zero and pole yourself; gain is still adjusted to cross unity at the requested frequency. The resistor and capacitor results implement the drawn ideal voltage-op-amp network. An OTA, optocoupler, or controller with internal compensation needs its own gain model.

Read the Bode plots together with the crossing count, worst scanned phase margin, high-frequency warning, and closed-loop pole check. For buck converter loop compensation, the current loop simplifies the output dynamics, but sampling can still produce troublesome peaking. Boost and flyback bandwidth also face a right-half-plane zero. A useful starting ceiling is one-tenth of switching frequency and one-fifth of the RHP-zero frequency.

The load-step chart estimates a small current increase using a linear output-impedance model. It includes an ESR jump and loop settling, but excludes current limiting, duty saturation, switching ripple, and controller delay. Use the early-time detail for the initial dip and the full chart for slow settling. The horizon follows the closed-loop decay envelope; a warning identifies any response cut off by the plotting time cap. Use the play control to see the current-sense signal and artificial ramp during one switching cycle. Before selecting production values, repeat the calculation at line and load extremes, apply component tolerances, and verify the loop on hardware. DCM, variable-frequency control, and constant-power loads require another model.

How it is calculated

Current ramp and sampling

All slopes are voltages at the PWM comparator. With D′=1−DD'=1-D, Sn=RiVon/LS_n=R_i V_{on}/L and Sf=RiVoff/LS_f=R_i V_{off}/L, the cycle perturbation multiplier is λ=(Se−Sf)/(Sn+Se)\lambda=(S_e-S_f)/(S_n+S_e). Stability requires ∣λ∣<1|\lambda|<1; a positive minimum slope boundary must be strictly exceeded.

Ridley's public modeling article (attached s1, pp. 4–6) supplies the enhanced current-source response:

Gvc(s)=K (1+s/ωESR)(1−s tRHP)1+s/ωp 11+s/(ωnQp)+(s/ωn)2.G_{vc}(s)=K\,\frac{(1+s/\omega_{ESR})(1-s\,t_{RHP})}{1+s/\omega_p}\, \frac{1}{1+s/(\omega_n Q_p)+(s/\omega_n)^2}.

Here ωn=πfs\omega_n=\pi f_s, mc=1+Se/Snm_c=1+S_e/S_n and Qp−1=π(mcD′−1/2)Q_p^{-1}=\pi(m_cD'-1/2). Solving for a target Q gives the nonnegative artificial slope ratio. Negative Q denotes an unstable inner loop; Q is undefined at the boundary.

Topology and gain

The load-pole factor is a=1+δba=1+\delta_b for buck, 2 for boost, and 1+D1+D for flyback, with δb=(RTs/L)(mcD′−1/2)\delta_b=(RT_s/L)(m_cD'-1/2) and ωp=a/(RC)\omega_p=a/(RC). Both the buck pole and gain include the ramp correction from Ridley p. 4 and TI SPRABE7A Eqs. (3), (5). The ESR zero is 1/(rcC)1/(r_cC). The RHP time coefficient is zero for buck, L/(RD′2)L/(RD'^2) for boost, and n2DLp/(RD′2)n^2DL_p/(RD'^2) for flyback, with n=Ns/Npn=N_s/N_p.

The DC gains used are R/[Ri(1+δb)]R/[R_i(1+\delta_b)], RD′/(2Ri)RD'/(2R_i) and RD′/[n(1+D)Ri]RD'/[n(1+D)R_i]. These follow by linearizing the ideal CCM power balance at fixed averaged current command. TI SLYT511, p. 15, independently gives the boost factor of one-half. SLVA636 Eq. (6) omits that factor; its RHP-frequency example is used for verification, not its DC gain. ADI's unified-model article supplies topology, sensing and CCM context.

Type-II network

Use C(s)=Ki(1+s/ωz)/[s(1+s/ωh)]C(s)=K_i(1+s/\omega_z)/[s(1+s/\omega_h)]. The high-frequency pole is chosen first; the zero phase at crossover is solved for the requested margin. Gain is normalized so ∣GvcC∣=1|G_{vc}C|=1 at the requested crossover. Every sign change in loop magnitude on the 501-point log grid is refined with a root solver. A normalized characteristic polynomial also checks closed-loop stability, including possible crossings beyond the plotted band.

For the voltage-op-amp network, CΣ=1/(R1Ki)C_\Sigma=1/(R_1K_i), C3=CΣfz/fhC_3=C_\Sigma f_z/f_h, C1=CΣ−C3C_1=C_\Sigma-C_3 and R2=1/(2πfzC1)R_2=1/(2\pi f_zC_1). These exact impedance relations retain both capacitors, as in SLVA662 Eq. (4), rather than assuming C3≪C1C_3\ll C_1.

Load-step estimate

The reduced disturbance model is Zo(s)=(R/a)(1+s/ωESR)/(1+s/ωp)Z_o(s)=(R/a)(1+s/\omega_{ESR})/(1+s/\omega_p). The plotted change is the inverse Laplace transform of −ΔI Zo/[s(1+GvcC)]-\Delta I\,Z_o/[s(1+G_{vc}C)], evaluated by polynomial poles and residues. An unstable pole suppresses the trace. The plot keeps 401 uniformly spaced points through 1/fc1/f_c and adds 301 geometrically spaced points through the full horizon. With σ=−2πfnmax⁡ℜ(pj)\sigma=-2\pi f_n\max\Re(p_j), the remaining tail is bounded by ΔI∑∣rj∣e−σt\Delta I\sum|r_j|e^{-\sigma t}. The horizon is at least 8/fc8/f_c and extends until that envelope falls below 0.1% of the fine early-window excursion. A cap of 10000/fc10000/f_c prevents impractically long windows; hitting it produces an explicit truncation warning. The separate early-time plot keeps the ESR jump and dip readable. This output-impedance approximation is derived here; it is not a measured transient or ADI's full switch model.

Approximation screening

The remaining low-frequency approximation is screened at a fixed 10% correction limit; this is a screening threshold, not a guaranteed total model-error bound. For boost and flyback, linearize the actual steady-state peak command

Vc/Ri=IL+VonDTs2L+SeDTsRi.V_c/R_i=I_L+\frac{V_{on}DT_s}{2L}+\frac{S_eDT_s}{R_i}.

At fixed input voltage and external ramp slope, its DC-gain denominator correction relative to the ideal current-source gain is

ηg=RTsD′3(k+1/2)Ln2a0,k=Se/Sn,\eta_g=\frac{RT_sD'^3(k+1/2)}{L n^2 a_0},\qquad k=S_e/S_n,

where (a0,n)=(2,1)(a_0,n)=(2,1) for boost and (1+D,Ns/Np)(1+D,N_s/N_p) for flyback. The simplified gain overestimates the averaged peak-command gain by the ratio ηg\eta_g.

Eliminating duty perturbations from the averaged inductor and output equations gives a low-frequency denominator with constant term (a0/R)(1+ηg)(a_0/R)(1+\eta_g), linear term C+ti/RC+t_i/R and quadratic term CtiCt_i, with ti=TsD′(k+1/2)t_i=T_sD'(k+1/2). The first-order pole shift indicator is ηp=∣(1+ηg)/(1+ti/(RC))−1∣\eta_p=|(1+\eta_g)/(1+t_i/(RC))-1|. Warn when either ηg\eta_g or ηp\eta_p exceeds 0.1. These screening relations are derived here for ideal CCM, and do not replace the sampled-data model. For the corrected buck, screen the remaining time-coefficient ratio ti/(RC)t_i/(RC) instead. All topologies also require separation of the dominant pole below fs/20f_s/20, small ESR relative to load, and a moderate artificial ramp.

Assumptions

  • Ideal, fixed-frequency, trailing-edge peak-current control in CCM with a positive resistive incremental load. No losses, propagation delay, current-sense filtering, slope curvature, transformer leakage or extra isolation-loop poles.
  • Flyback LpL_p, ripple and sense gain refer to primary magnetizing current. n=Ns/Npn=N_s/N_p; output capacitance and ESR remain secondary-side quantities.
  • The buck model includes the ramp-dependent DC gain and dominant pole. Boost and flyback retain the enhanced current-source approximation, with explicit 10% omitted-correction screening. Very steep ramps or a dominant pole approaching the sampling poles require a full switch model.
  • The Type-II result is the complete AC feedback transfer from output voltage to control voltage for the drawn voltage op amp. Do not multiply a separate feedback-divider ratio into it. Amplifier gain-bandwidth, control-voltage range and the lower DC divider resistor must be checked separately.
  • All engineering calculations are independent of the animation input; play only updates the cursor and its drawing.

Where it applies

Use for nominal CCM loop design and education, with 0.02<D<0.950.02<D<0.95, positive current valley, crossover below fs/10f_s/10 and, for boost/flyback, below fRHP/5f_{RHP}/5. The frequency model is evaluated only through fs/2f_s/2. A finite grid can miss very narrow features; inspect peaking and verify the measured loop. A positive first-crossing phase margin alone does not establish stability.

The load step is a reduced linear estimate. Prefer ΔI≤20%\Delta I\leq20\% of nominal load and predicted voltage movement below 10%; details within the first ten switching cycles are not switching-level predictions. The first point represents the instantaneous ESR drop. The early-time detail uses 401 points through one crossover period; the full chart adds logarithmically spaced tail samples. The displayed settling assessment reports whether the 0.1% modal envelope was captured or the plot was truncated at its time cap. No transient is shown when the characteristic polynomial predicts instability.

DCM has different power-stage dynamics and does not share this CCM subharmonic criterion. Constant on-time, valley current mode, multiphase control, current limits, discontinuous pulse skipping, OTA/opto feedback and constant-power loads are outside scope. Recheck line, load, capacitance derating, ESR, inductance, sensing gain and component tolerances.

The implementation uses open public restatements. A direct cross-check against the original 1991 IEEE paper remains pending IEEE Xplore access.

When the inner current loop is unstable or marginal, Bode gain/phase traces and phase-margin results are withheld; increase the artificial ramp first. The Type-II circuit shows Rb for DC setpoint biasing only; its value follows the controller reference and desired output voltage.

References

  • R. B. Ridley, A New, Continuous-Time Model for Current-Mode Control, IEEE TPEL 6(2), 271–280 (1991), DOI: https://doi.org/10.1109/63.76813 — original-paper cross-check pending.
  • R. Ridley, Current-Mode Control Modeling, Switching Power Magazine (2006), pp. 4–7: https://ridleyengineering.com/images/pdf-design_center/5-current-mode-control-modeling.pdf
  • Wei Gu, A Unified LTspice AC Model for Current-Mode DC-to-DC Converters, ADI (2021): https://www.analog.com/en/resources/technical-articles/a-unified-ltspice-ac-model-for-current-mode-dc-to-dc-converters.html
  • Texas Instruments, Practical Feedback Loop Analysis for Current-Mode Boost Converter, SLVA636 (2014), pp. 5, 8–11: https://www.ti.com/lit/an/slva636/slva636.pdf — boost gain discrepancy discussed in method.
  • Texas Instruments, Analog Applications Journal 2Q 2013, p. 15, Eq. (3), boost plant DC gain: https://www.ti.com/jp/lit/an/slyt511/slyt511.pdf
  • Texas Instruments, Demystifying Type II and Type III Compensators Using Op-Amp and OTA for DC/DC Converters, SLVA662 (2014), pp. 4, 7: https://www.ti.com/lit/an/slva662a/slva662a.pdf
  • Texas Instruments, Digital Peak Current Mode Control With Slope Compensation Using the TMS320F2803x, SPRABE7A (2012), p. 4, Eqs. (3), (5): https://www.ti.com.cn/cn/lit/pdf/sprabe7

Inputs

InputSymbolUnitDefault
Converter topologytopologyBuck
Input voltage
Ideal conversion ratio; use the minimum line voltage for the highest duty cycle.
V_inV24
Output voltage (magnitude)
Positive output magnitude, also for an isolated flyback.
V_outV12
Output load current
Resistive incremental load. Constant-power loads need a different model.
I_outA3
Switching frequency
Fixed-frequency, trailing-edge peak current control.
f_swkHz200
Inductance
For flyback, enter the primary magnetizing inductance.
L_uuH47
Effective output capacitance
Include DC bias and temperature derating.
C_uuF220
Output capacitor ESR
Effective series resistance of the total capacitor bank.
r_mmohm30
Current-sense gain at comparator
Volts per ampere, including any current-sense amplifier. Refer flyback sensing to primary current.
R_iohm0.1
Transformer turns ratio Ns/Np
Secondary turns divided by primary turns.
n_sp1
Compensation rampramp_modeSize ramp for target Qp
Target sampled-pole Q
Qp ≤ 1 is a useful damping goal; minimum stability alone is insufficient.
Q_target1
Existing slope ratio Se/Sn
Artificial ramp slope divided by sensed ON-current slope, both at the comparator.
k_manual0.8
Type-II placementcomp_modeDesign for phase margin
Requested unity-gain crossover
Gain is normalized here. Keep below fs/10 and RHP zero/5.
f_c_kkHz10
Target phase margin
The zero is solved with a high-frequency pole at min(ESR zero, RHP zero, fs/2).
PM_targetdeg60
Compensator zero
The origin pole is always present.
f_z_kkHz1
Compensator high-frequency pole
Must lie above the compensator zero.
f_h_kkHz50
Op-amp input / upper divider resistor R1
Component synthesis is for an ideal voltage op amp; no extra divider gain is multiplied into the AC loop.
R_1_kkohm10
Load-current increase
Small-signal step added to the nominal resistive load; not a change of operating-point resistance.
dIA0.3
Switching-cycle progress
Play to follow sensed current plus artificial ramp through one switching period.
progress0.65

Results

With the default inputs above, the calc gives:

ResultValue
Design assessmentNominal loop meets the model checks; verify at line and load extremes.
Required / applied artificial slope0.0163 V/us
Full-period ramp amplitude0.0813 V
Artificial-to-sensed slope ratio Se/Sn0.6366
Strict stability boundary Se/Sn0
Sampled-pole Qp1
Duty ratio0.5
Type-II zero4,750.2 Hz
Type-II high-frequency pole24,114.4 Hz
Worst scanned phase margin60 deg
Crossover with worst phase margin10,000 Hz
Conservative crossover ceiling20,000 Hz
Unity-gain crossings through fs/21
Type-II resistor R215.475 kohm
Type-II series capacitor C12.165 nF
Type-II parallel capacitor C3531.12 pF
Linear load-step voltage dip0.0168 V
Load-step settling assessmentSettling captured: remaining modal envelope is at most 0.1% of the early excursion.
Full settling-chart horizon0.8 ms
Remaining tail-envelope ratio0

Checked against sources

Each case below was calculated by this calc and agrees with the value from its source (within the tolerance where one is shown).

Ridley: Q ≈ 1 at the 18% ramp-onset boundary

Source: Ridley, Current-Mode Control Modeling (2006), attached p. 7: rounded ramp-onset duty is 18% for Qp=1. Exact onset from the published equation is 18.169%; at D=18%, zero added ramp gives Qp=0.9947. The tolerance accommodates that stated rounding; equations are unchanged.

Inputs: Input voltage = 100 V; Output voltage (magnitude) = 18 V; the others as above.

ResultSourceThis calc
Duty ratio0.180.18
Se/Sn required for target Q0 ± 1 × 10⁻⁶0
Sampled-pole Qp1 ± 0.010.9947

TI SLVA636: boost RHP zero near 3.6 kHz

Source: TI SLVA636, March 2014, pp. 10–11, Figure 10 and text: Vin=5 V, Vout=18 V, Iout=3 A, L=20 µH, C=480 µF, ESR=8 mΩ; RHP zero reported as 3.6 kHz. The ideal equation gives 3.684 kHz (2.34% difference); use a 4% rounding allowance. The reported 0.6 kHz is below one-fifth of the ideal RHP zero. https://www.ti.com/lit/an/slva636/slva636.pdf

Inputs: Converter topology = Boost; Input voltage = 5 V; Output voltage (magnitude) = 18 V; Inductance = 20 uH; Effective output capacitance = 480 uF; Output capacitor ESR = 8 mohm; Requested unity-gain crossover = 0.6 kHz; the others as above.

ResultSourceThis calc
RHP zero (buck: not present)3,600 ± 144 Hz3,684 Hz

TI SLVA662: Type-II 50° phase boost at 10 kHz

Source: TI SLVA662, July 2014, p. 7, Eqs. (23)–(24): Type-II example places fp=27.5 kHz and fz=3.64 kHz for 50° phase boost at 10 kHz. Checks only the pole/zero phase shape, which is shared by the OTA and voltage-op-amp realizations; it does not claim to reproduce OTA component values. https://www.ti.com/lit/an/slva662a/slva662a.pdf

Inputs: Type-II placement = Evaluate zero and pole; Compensator zero = 3.64 kHz; Compensator high-frequency pole = 27.5 kHz; the others as above.

ResultSourceThis calc
Type-II phase boost above an integrator at crossover50 deg50.015 deg

Independent review: light-load buck ramp corrections

Source: Independent reviewer supplied this regression case and the expected numbers: otherwise default inputs with Iout=0.4 A, dI=0.03 A, fc=0.1 kHz. Expected ramp correction=1.016, pole=48.6 Hz and DC gain=148.8, using TI SPRABE7A (2012), p. 4 Eqs. (3), (5), and Ridley public article p. 4. These are reviewer-computed equation checks, not bench measurements. https://www.ti.com.cn/cn/lit/pdf/sprabe7

Inputs: Output load current = 0.4 A; Load-current increase = 0.03 A; Requested unity-gain crossover = 0.1 kHz; the others as above.

ResultSourceThis calc
Buck ramp correction relative to the resistive load term1.0161.016
Dominant power-stage pole48.6 ± 0.1 Hz48.612 Hz
Control-to-output DC gain including the buck ramp correction148.8148.8

Related Resources

Responses

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

L ading...