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.
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 , and , the cycle perturbation multiplier is . Stability requires ; 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:
Here , and . 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 for buck, 2 for boost, and for flyback, with and . Both the buck pole and gain include the ramp correction from Ridley p. 4 and TI SPRABE7A Eqs. (3), (5). The ESR zero is . The RHP time coefficient is zero for buck, for boost, and for flyback, with .
The DC gains used are , and . 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 . The high-frequency pole is chosen first; the zero phase at crossover is solved for the requested margin. Gain is normalized so 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, , , and . These exact impedance relations retain both capacitors, as in SLVA662 Eq. (4), rather than assuming .
Load-step estimate
The reduced disturbance model is . The plotted change is the inverse Laplace transform of , evaluated by polynomial poles and residues. An unstable pole suppresses the trace. The plot keeps 401 uniformly spaced points through and adds 301 geometrically spaced points through the full horizon. With , the remaining tail is bounded by . The horizon is at least and extends until that envelope falls below 0.1% of the fine early-window excursion. A cap of 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
At fixed input voltage and external ramp slope, its DC-gain denominator correction relative to the ideal current-source gain is
where for boost and for flyback. The simplified gain overestimates the averaged peak-command gain by the ratio .
Eliminating duty perturbations from the averaged inductor and output equations gives a low-frequency denominator with constant term , linear term and quadratic term , with . The first-order pole shift indicator is . Warn when either or 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 instead. All topologies also require separation of the dominant pole below , 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 , ripple and sense gain refer to primary magnetizing current. ; 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 , positive current valley, crossover below and, for boost/flyback, below . The frequency model is evaluated only through . 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 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
| Input | Symbol | Unit | Default |
|---|---|---|---|
| Converter topology | topology | Buck | |
| Input voltage Ideal conversion ratio; use the minimum line voltage for the highest duty cycle. | V_in | V | 24 |
| Output voltage (magnitude) Positive output magnitude, also for an isolated flyback. | V_out | V | 12 |
| Output load current Resistive incremental load. Constant-power loads need a different model. | I_out | A | 3 |
| Switching frequency Fixed-frequency, trailing-edge peak current control. | f_sw | kHz | 200 |
| Inductance For flyback, enter the primary magnetizing inductance. | L_u | uH | 47 |
| Effective output capacitance Include DC bias and temperature derating. | C_u | uF | 220 |
| Output capacitor ESR Effective series resistance of the total capacitor bank. | r_m | mohm | 30 |
| Current-sense gain at comparator Volts per ampere, including any current-sense amplifier. Refer flyback sensing to primary current. | R_i | ohm | 0.1 |
| Transformer turns ratio Ns/Np Secondary turns divided by primary turns. | n_sp | 1 | |
| Compensation ramp | ramp_mode | Size ramp for target Qp | |
| Target sampled-pole Q Qp ≤ 1 is a useful damping goal; minimum stability alone is insufficient. | Q_target | 1 | |
| Existing slope ratio Se/Sn Artificial ramp slope divided by sensed ON-current slope, both at the comparator. | k_manual | 0.8 | |
| Type-II placement | comp_mode | Design for phase margin | |
| Requested unity-gain crossover Gain is normalized here. Keep below fs/10 and RHP zero/5. | f_c_k | kHz | 10 |
| Target phase margin The zero is solved with a high-frequency pole at min(ESR zero, RHP zero, fs/2). | PM_target | deg | 60 |
| Compensator zero The origin pole is always present. | f_z_k | kHz | 1 |
| Compensator high-frequency pole Must lie above the compensator zero. | f_h_k | kHz | 50 |
| 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_k | kohm | 10 |
| Load-current increase Small-signal step added to the nominal resistive load; not a change of operating-point resistance. | dI | A | 0.3 |
| Switching-cycle progress Play to follow sensed current plus artificial ramp through one switching period. | progress | 0.65 |
Results
With the default inputs above, the calc gives:
| Result | Value |
|---|---|
| Design assessment | Nominal loop meets the model checks; verify at line and load extremes. |
| Required / applied artificial slope | 0.0163 V/us |
| Full-period ramp amplitude | 0.0813 V |
| Artificial-to-sensed slope ratio Se/Sn | 0.6366 |
| Strict stability boundary Se/Sn | 0 |
| Sampled-pole Qp | 1 |
| Duty ratio | 0.5 |
| Type-II zero | 4,750.2 Hz |
| Type-II high-frequency pole | 24,114.4 Hz |
| Worst scanned phase margin | 60 deg |
| Crossover with worst phase margin | 10,000 Hz |
| Conservative crossover ceiling | 20,000 Hz |
| Unity-gain crossings through fs/2 | 1 |
| Type-II resistor R2 | 15.475 kohm |
| Type-II series capacitor C1 | 2.165 nF |
| Type-II parallel capacitor C3 | 531.12 pF |
| Linear load-step voltage dip | 0.0168 V |
| Load-step settling assessment | Settling captured: remaining modal envelope is at most 0.1% of the early excursion. |
| Full settling-chart horizon | 0.8 ms |
| Remaining tail-envelope ratio | 0 |
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.
| Result | Source | This calc |
|---|---|---|
| Duty ratio | 0.18 | 0.18 |
| Se/Sn required for target Q | 0 ± 1 × 10⁻⁶ | 0 |
| Sampled-pole Qp | 1 ± 0.01 | 0.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.
| Result | Source | This calc |
|---|---|---|
| RHP zero (buck: not present) | 3,600 ± 144 Hz | 3,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.
| Result | Source | This calc |
|---|---|---|
| Type-II phase boost above an integrator at crossover | 50 deg | 50.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.
| Result | Source | This calc |
|---|---|---|
| Buck ramp correction relative to the resistive load term | 1.016 | 1.016 |
| Dominant power-stage pole | 48.6 ± 0.1 Hz | 48.612 Hz |
| Control-to-output DC gain including the buck ramp correction | 148.8 | 148.8 |
Related Resources
Related articles
-
Comparative Performance Analysis of Type-II and Type-III Analog Compensators for Voltage-Mode Buck Converters Using PLECS Simulation -
Design and Performance Analysis of a Two-Stage LED Driver Incorporating Boost Power Factor Correction and Flyback DC–DC Converter Using PLECS Simulation -
Control-to-Output Transfer Function Analysis of an Auto-Toggling CCM-DCM Current-Mode Flyback Converter with Programmable Compensation Ramp
Related courses
IEC Electrical Schematics and Industrial Control Panels
5
Original price was: 42 €.21 €Current price is: 21 €.
Basic Electrical Controls & Diagram Reading
7
Original price was: 32 €.18 €Current price is: 18 €.
Modeling Electrical Motor Faults with FEM Simulation using ANSYS MAXWELL
3
Original price was: 50 €.15 €Current price is: 15 €.







Responses