# 00 | Project architecture

**AI disclosure:** This course was fully AI-generated.

This course covers buck converter models, component selection, control, firmware, layout and bench measurements. The reusable theory and numerical tools can be studied independently of a board. The Letki V007 converter is the worked case study; substitute your own load, controller and operating limits when applying the methods elsewhere.

Course sources are maintained in the general Electronics repository under `courses/buck-converters/`. Letki board/firmware sources and physical evidence remain in their owning repository. The notebook keeps its original course identity so existing exports remain compatible.

This is a technical course for an electronics graduate with limited hardware practice. We use differential equations, complex frequency response and discrete-time models, but derive the converter-specific results. You do not need previous power-electronics design experience. Allow roughly **45–65 hours of study and simulation** for the core chapters 00–20 and another **12–18 hours** for the four extension modules, followed by **several laboratory sessions and board iterations**. The bench schedule depends on your equipment and the faults you discover.

## Worked case study: Letki requirements

The established architecture has a custom **CH32V007 converter** supplying a continuous **3.3 V rail** to the display, X035 and ESP8266. X035 negotiates USB-PD and supervises the converter over a private I²C bus. V007 owns regulation and local protection. The converter must start at the initial USB-C **5 V**, before X035 is alive, and maintain 3.3 V when a higher input is negotiated. The present control-board interface anticipates **5–20 V VBUS**. The input range is a design envelope; operation across it still needs physical qualification.

The provisional 60–65 W charger class is **not an output rating**. At 60 W input and an assumed efficiency of 90%, the arithmetic gives 54 W output or 16.36 A at 3.3 V. Such current makes joints, copper, inductors and temperature central design problems. We will not silently turn that estimate into a specification.

<figure><img src="figures/architecture.svg" alt="Input powers both the independent startup bias and the buck power stage; the buck supplies the controller and display. X035 supervises V007 but is not in the fast regulation path."><figcaption>Figure 1. Energy flows left to right; local control closes around the power stage. Startup bias breaks the circular dependency between the unpowered MCU and its own output.</figcaption></figure>

## Case-study checkpoint · 2 November 2026

The separate Letki repository contains **V007 research board r2**, a two-phase synchronous buck using TPS28225 drivers, 6.8 µH inductors and, in its fabrication BOM, CSD17578Q5A MOSFETs. The PCBs were ordered on 20 October. On 25 October the user selected AON6414A MOSFETs and a non-automotive TPS7B6950 bias regulator for one assembly; those parts are selected, not ordered. The project record notes that the existing 5 V bootstrap does not guarantee 4.5 V of high-side gate drive for either MOSFET, and that the non-Q1 regulator is initially limited to 5–12 V trials. The latest record has no received or assembled board, and the regulation/protection firmware is unwritten. This is a research implementation, not an established current rating. The board-specific source of truth is `hw/v007-converter/README.md` in the Letki repository; its current-state record supersedes this dated summary. Chapter 7 and extension 23 turn the gate-drive and short-circuit questions into calculations.

Keep three kinds of evidence distinct:

| Evidence | What exists | What it establishes |
|---|---|---|
| E1 teaching model | Single-phase 3.3 V / 1 A calculations and ideal tools | Mechanisms and predictions under stated assumptions |
| V007 r2 design | Two phases, independent startup bias, OVP reference, current sensing and CAD review | A particular circuit to analyse and test |
| Measured converter | No assembled-r2 evidence recorded here | No new regulation, fault, thermal or current capability claim |

The r2 review identifies especially tight startup-bias and protection margins. First fault tests start at **5 V with limited energy**. A 12 V input ceiling does not establish short-circuit safety. The ESP/display must stay disconnected until output peaks during the specified transient and fault tests are measured below **3.6 V**. These are board-specific test gates; they are not results produced by this course. Chapters 6 and 13 connect the teaching models to those unresolved questions.

## Teaching example and target converter

| Quantity | Learning example E1 | Eventual integrated converter |
|---|---|---|
| Input | 5–20 V design calculations; first switching at 5 V | Actual USB-C source range, tolerance and transients to establish |
| Output | 3.3 V, 1 A nominal, resistive test load | 3.3 V; current to derive from measured load and distribution |
| Frequency | 100 kHz illustrative starting point | Chosen after loss, timing, EMI and resolution tradeoffs |
| Inductor | 100 µH effective value for calculations | Exact part, hot/bias minimum and thermal limit to select |
| Capacitor | 100 µF effective, 20 mΩ ESR example | Effective capacitance, ESR/ESL, ripple rating and placement to select |
| Regulation | Candidate slow voltage loop | Validated loop and protection architecture |
| Status | Teaching model, **not a build-ready BOM** | r2 research topology selected; operating limits and qualification remain open |

Keep E1 values in your calculations until an exercise explicitly changes them. A 100 µH, 1 A example is not a recommendation for a 10–16 A converter. Starting at modest current lets you learn the mechanisms without making every mistake a high-energy failure.

## How to study

Each chapter supplies theory, an engineering interpretation, and a task with a worked answer or review criteria. Read in order on your first pass. Predict results on paper before moving a slider. Use the **design notebook** to record decisions, evidence and unanswered questions. Progress ticks mean “I studied this”, not “my hardware passed”. The printable view expands worked solutions; browser storage stays on your device and can be exported.

The sequence is: requirements → switched model → components → driving and sensing → control → firmware feasibility → startup/protection → PCB → laboratory → integrated design. The final assignment collects the calculations, circuit, firmware and test results for review.

Use these stopping points to keep the course practical:

| Study block | Produce before moving on | Self-check |
|---|---|---|
| Chapters 0–3 | One-page requirements and a three-state current sketch | Can you predict when the diode model stops being CCM? |
| Chapters 4–8 | Component stress/loss ledger and a sensing error budget | Do peak, RMS, hot values and response delays have separate entries? |
| Chapters 9–11 | Fixed-controller corner plots and a sample-to-latch timeline | Did you keep the same gains while changing the plant? |
| Chapters 12–17 | Startup/fault state machine and one bounded bench test card | Does the hardware still reach a defined state if the MCU stops? |
| Chapters 18–20 | Design dossier and evidence gaps | Can another person reproduce one claimed result? |
| Extensions 21–24 | Input-filter margin, a current-mode alternative, a single-phase ledger and a duty-window calculation | Does every loss, fault and stability claim have an operating point and a stated model? |

Before each calculator run, write **prediction → inputs → result → explanation** in the notebook. Change one input at a time for the first comparison. Export the CSV with its input header when a result supports a decision; a progress tick cannot preserve the operating point.

## A rule for using AI during the project

Ask for derivations, counterexamples, datasheet cross-checks and testable predictions. Before accepting a proposed component or register setting, identify the specification it satisfies and the measurement that would falsify the assumption. Make the first estimate yourself, then compare. Keep three columns: **known**, **assumed**, **measured**. A simulated waveform belongs in the second column until the model and physical circuit have been compared.

**Deliverable 0:** create a notebook entry with your available instruments, expected array size, first-prototype current target, and the three aspects of converters you least trust yourself to assess. Missing equipment changes the measurement method; it does not make the quantity irrelevant.

# 01 | Design requirements

The most expensive ambiguity is “it should power the array”. Separate the rail specification, source contract, load behaviour, operating modes and fault behaviour. A converter can meet average voltage and still fail when Wi-Fi transmits, a display pattern changes, a charger resets or a scope is attached.

## Build a load model

For a scanned display, distinguish LED peak current, duty ratio, average supply current, and the shape of current drawn at the supply terminals. Multiplexing means that adding all LED peak currents usually overstates average demand; treating the load as constant average current understates transients. Drivers, MCU and radio consumption add to the LED budget. Measure a set of patterns: blank, maximum allowed brightness, sparse moving content and abrupt all-on transitions. Include controller boot and radio activity.

At the rail, write

\[
I_o(t)=I_{\rm tiles}(t)+I_{\rm X035}(t)+I_{\rm ESP}(t),\qquad P_o(t)=V_o(t)I_o(t).
\]

The converter input current is approximately \(I_{in}=P_o/(\eta V_{in})+I_{bias}\), provided the efficiency term excludes separately counted bias losses. Do not count the same bias power twice. At 3.3 V/1 A and 85% total efficiency, input current is 0.776 A at 5 V and 0.194 A at 20 V. Raising input voltage reduces cable current but increases some switching and bias losses.

## Specify voltage where it matters

Define a regulation band **at the converter terminals**, ripple with a specified measurement bandwidth, transient excursion with a load-step definition, and a minimum voltage at the farthest tile. A 100 mV distribution drop is about 3% of a 3.3 V rail. Do not “repair” a distant drop by raising every nearby device above its allowed voltage.

An illustrative E1 target could be 3.3 V ±2% DC, ripple below 30 mV peak-to-peak at a stated 20 MHz bandwidth, and a 0.2→1.0 A load step staying within ±150 mV with recovery to ±2% in 2 ms. These are **exercise targets**, not accepted Letki requirements. Check device limits and what the transient model can actually achieve before adopting them.

## Corners are combinations

Worst ripple generally occurs at maximum input and minimum effective inductance. Worst resistive loss often occurs at maximum load and high temperature. Worst duty requirement occurs at low input with conduction drops. Maximum input capacitor RMS stress can occur near duty 0.5 rather than at an endpoint. Startup combines discharged capacitors, restricted input current and an MCU that is not yet executing valid control.

Use a matrix rather than one “worst case”: input minimum/nominal/maximum × load zero/light/rated × cold/room/hot × component extremes. Identify a smaller set of physically meaningful corners for each failure mechanism. The final limits are the minimum of charger, converter, interconnect and load limits.

## The interface already constrains the design

The control-board J6 link, west to east along its north edge, is: **1 VBUS_CHG, 2 GND, 3 GND, 4 +3V3, 5 PRIV_SDA, 6 PRIV_SCL, 7 +3V3**. The V007 board occupies the slot north of the X035 board. Its private-bus pull-ups belong on the V007 board. J6 is not a tile connector. Mirror/orientation must be checked against the mating PCB, not reconstructed from a top-view drawing by memory.

Two output contacts do not establish a high-current rating. The single VBUS contact, soldered wire, copper trunk, return path and spreading resistance all need budgets. The PC-side bench jumper must remain out of the integrated power path; independent supplies must not be paralleled. These interface details are the current project contract, not a released converter design.

### Exercise 1 · Write a one-page specification

Include DC limits, transient limits, startup load, allowed input range, fault recovery, ambient temperature, measurement point and test method. Add a “source of number” column. Estimate the far-end drop if the complete positive-and-return path is 35 mΩ at 4 A.

<details><summary>Worked answer and review criteria</summary>
<p>The drop is 0.140 V and dissipation is 0.560 W. At 10 A, the same path drops 0.350 V and dissipates 3.50 W. The quadratic heating increase is why a satisfactory small prototype does not establish high-current distribution capability. A useful specification contains no unqualified “stable”, “low ripple” or “high efficiency”: each is associated with a number, operating point and measurement.</p>
</details>

# 02 | Switching states and CCM

A buck connects its inductor alternately to the input and to a freewheel path. The inductor current cannot jump instantaneously; capacitor voltage cannot jump without an impulse of current. Those continuity conditions are more useful than memorising a duty formula.

<figure><img src="figures/buck.svg" alt="Asynchronous buck circuit with input capacitor, high-side controlled switch, a diode whose anode is grounded and cathode is at the switch node, series inductor, output capacitor and resistive load."><figcaption>Figure 2. Idealised asynchronous buck. Positive inductor current flows from SW to the output; the diode carries it from ground into SW during the off interval. The switch symbol is functional, not a proposed gate-drive circuit.</figcaption></figure>

Let \(T_s=1/f_s\), \(D=t_{on}/T_s\), and measure inductor voltage left-to-right. In the on interval, \(v_L=V_{in}-V_o\), so current rises at \((V_{in}-V_o)/L\). In the off interval, an ideal diode clamps SW to zero, giving \(v_L=-V_o\) and slope \(-V_o/L\). We initially assume steady state, negligible voltage ripple during one period, ideal devices and continuous conduction (CCM).

Integrating \(v_L=L\,di_L/dt\) over a complete period gives

\[
L[i_L(T_s)-i_L(0)]=(V_{in}-V_o)DT_s-V_o(1-D)T_s=0.
\]

Therefore \(V_o=DV_{in}\). This is **volt-second balance**, not an arbitrary PWM rule. Similarly, integrating \(i_C=C\,dv_o/dt=i_L-I_o\) over a period gives \(\overline{i_L}=I_o\). Together these are the DC conditions for a periodic solution.

The peak-to-peak current ripple is

\[
\Delta I_L=\frac{(V_{in}-V_o)D}{Lf_s}
=\frac{V_o(1-V_o/V_{in})}{Lf_s},\quad
I_{pk}=I_o+\frac{\Delta I_L}{2},\quad I_{val}=I_o-\frac{\Delta I_L}{2}.
\]

Use the same expression at both ends of the input range. For E1, duty is 0.660 at 5 V and 0.165 at 20 V. Ripple is 0.1122 A and 0.27555 A, respectively. At 20 V, on-time is 1.65 µs, peak current 1.1378 A and valley current 0.8622 A.

## Where does the energy go?

Inductor energy is \(E_L=Li_L^2/2\). During on-time the source supplies both load power and increasing magnetic energy. During off-time the magnetic field releases energy through the freewheel path. A buck does **not** empty its inductor each cycle in CCM. Capacitor current is the difference between inductor and load currents, so the output capacitor temporarily supplies or absorbs that difference.

The input sees pulsed current: approximately \(i_L\) while on, zero while off. Its average is \(DI_o\) for the ideal steady-state converter, consistent with power conservation. This discontinuity at the input is the origin of the input hot loop; the output inductor current is comparatively smooth.

## Add the first nonidealities explicitly

With high-side drop \(V_Q\), diode drop \(V_F\), and inductor DC resistance \(r_L\), a first-order CCM balance is

\[
D(V_{in}-V_Q+V_F)=V_o+I_or_L+V_F.
\]

This explains why required duty rises at low input. Overall efficiency is useful for input-power budgeting; it does not uniquely determine the actual duty correction. Work from the voltage drops in the two states. Later, replace constant drops by current- and temperature-dependent models.

### Exercise 2 · Derive, then predict

For 12 V→3.3 V, 100 µH, 100 kHz and 1 A, calculate duty, slopes, ripple and peak. Then reduce the inductor to 47 µH without changing frequency. Explain why a smaller inductor changes both size and transient behaviour.

<details><summary>Worked solution</summary>
<p>Duty is 0.275. On-slope is 87,000 A/s; off-slope is −33,000 A/s. On-time is 2.75 µs, giving 0.23925 A peak-to-peak and a 1.11963 A peak. With 47 µH, ripple becomes 0.50904 A and peak 1.25452 A. Smaller L permits faster current change under a load step, but raises ripple, peak current and often AC/core loss. It is a coupled choice, not a free improvement.</p>
</details>

<div class="tool-slot" data-tool="wave"></div>

# 03 | Discontinuous conduction and light load

The previous equations allow a negative valley if \(I_o<\Delta I_L/2\). A diode cannot conduct reverse current, so an asynchronous buck instead enters a third interval: current reaches zero, both devices are off, and the ideal inductor voltage is zero. This is discontinuous conduction (DCM). Its DC gain depends on load.

For an ideal buck with resistive load \(R\), define \(M=V_o/V_{in}\) and \(K=2Lf_s/R\). During the on interval,

\[
I_{pk}=\frac{V_{in}(1-M)DT_s}{L}.
\]

During diode conduction, the down-slope is \(-MV_{in}/L\), so the fraction of the period spent discharging is \(\delta=D(1-M)/M\). The triangular current area is the average output current:

\[
\frac{MV_{in}}{R}=\frac{I_{pk}}2(D+\delta),\qquad
KM^2=D^2(1-M).
\]

Solving the quadratic gives

\[
M=\frac{2}{1+\sqrt{1+4K/D^2}}.
\]

This applies when \(D+\delta<1\). At the boundary, \(K=1-D\) and the DCM solution meets \(M=D\). For a **regulated target** \(M\), rearrange instead to \(D=M\sqrt{K/(1-M)}\). That is the formula used by the waveform tool when the specified load is below the boundary.

## Light-load example

At 20 V, 100 µH and 100 kHz, suppose you leave duty fixed at 0.165 but replace the 3.3 Ω load by 33 Ω. Then \(K=0.6061\) and the DCM solution is \(M\approx0.1906\): output rises to about **3.81 V**, not 3.3 V. To regulate 3.3 V into 33 Ω, ideal duty must fall to about **0.1406**. At vanishing load, fixed-frequency fixed-duty ideal DCM tends toward the input voltage. Real leakage and control policies change the result, but an open-loop duty value is clearly not an output guarantee.

## Synchronous behaviour is a policy choice

A synchronous low-side MOSFET can conduct negative current. Forced continuous conduction can keep the triangular waveform centred around a small average, at the expense of circulating energy and light-load loss. Diode emulation turns the low-side device off near zero current to prevent reversal. Burst or pulse-skipping control reduces switching loss by varying the pulse pattern, but introduces low-frequency ripple and possible audible effects. These modes have different models and transient behaviour.

During the zero-current interval, an ideal switch node sits at the output potential because inductor voltage is zero. A physical node often rings with parasitic capacitance. Do not mistake that ringing for useful power transfer, and do not treat a diode-emulated buck as CCM when designing the light-load loop.

### Exercise 3 · Find the boundary

At 5, 12 and 20 V, compute the E1 load current where diode conduction first becomes discontinuous. Explain what must change in a controller tested only at 1 A.

<details><summary>Worked solution</summary>
<p>The boundaries are 56.1 mA, 119.6 mA and 137.8 mA, half the respective CCM ripple. Below them, the diode stage has a different gain and dynamics. Validate stability and overvoltage behaviour in light-load operation, or deliberately define another mode with its own entry/exit rules. Do not extrapolate the nominal-load Bode model to zero load.</p>
</details>

# 04 | Inductor selection

An inductor stores energy, opposes current change and dissipates heat. Its label gives a nominal small-signal inductance under specified test conditions. It does not promise that value at your peak DC bias and temperature.

From the ripple equation, the minimum **effective** inductance for a selected ripple target is

\[
L_{min}\geq\frac{V_o(1-V_o/V_{in,max})}{f_{s,min}\Delta I_{L,max}}.
\]

For E1 with 0.30 A allowed ripple at 20 V and 100 kHz, this gives 91.85 µH. A nominal 100 µH part with −20% tolerance already misses that target before DC-bias reduction. At 80 µH, ripple becomes 0.3444 A. If the limit is a design requirement, select a different value or relax the target explicitly.

## Saturation and thermal limits are different

Saturation is a reduction in incremental inductance as the core approaches its flux limit. The current ramp becomes steeper under the same applied voltage: a dangerous positive feedback during a fault. A datasheet saturation current is often defined at a stated percentage reduction in inductance. A thermal RMS rating is defined by a stated temperature rise under stated mounting conditions. Neither is interchangeable with “maximum safe current”. See the concise manufacturer discussion in [Coilcraft’s inductor selection note](https://www.coilcraft.com/en-us/resources/application-notes/selecting-the-best-inductor-for-your-dc-dc-convert/).

For triangular ripple around a DC current,

\[
I_{L,rms}=\sqrt{I_o^2+\frac{\Delta I_L^2}{12}},\qquad P_{Cu}=I_{L,rms}^2R_{DCR}(T).
\]

At E1’s high-input corner, \(I_{L,rms}=1.0032\) A. With an illustrative hot DCR of 0.18 Ω, copper loss is 0.181 W. At 4 A the same resistance gives about 2.88 W even before core loss. High-current scaling usually requires a substantially different inductor.

## Relate flux to voltage

For a winding with \(N\) turns and effective core area \(A_e\), Faraday’s law gives \(v_L=NA_e\,dB/dt\), hence

\[
\Delta B=\frac{(V_{in}-V_o)DT_s}{NA_e}.
\]

A gapped core stores much of its energy in the gap. Increasing turns raises inductance but also resistance and winding capacitance. Powdered and ferrite materials have different bias, frequency and temperature characteristics. For a purchased SMD inductor, you usually select from manufacturer bias and loss curves rather than designing its core. The physics explains which curves matter.

Core loss depends on frequency, flux swing, waveform and temperature. A Steinmetz-style relation \(P_v\approx kf^\alpha(\Delta B)^\beta\) is only meaningful with the manufacturer’s definitions and valid range; coefficients for sinusoidal excitation cannot be blindly applied to a PWM waveform. Skin and proximity effects add AC winding loss. Include a documented estimate or measurement instead of assuming DCR is the entire loss.

## Selection procedure

Choose a candidate L from ripple and current slew needs. Evaluate minimum L at hot peak current. Evaluate peak including current-limit tolerance and shutdown delay. Evaluate hot RMS copper loss plus core/AC loss. Check footprint, height, magnetic leakage near sensing and mechanical retention. Then compare cost and size among candidates that pass. A shelf part with unknown bias behaviour is a characterisation exercise, not a free qualified component.

### Exercise 4 · The current-limit trap

Suppose a nominal 1.6 A trip has ±10% tolerance, total trip-to-off delay is 300 ns, input is 20 V, output is shorted and minimum L is 80 µH. Estimate the peak after a maximum-threshold trip.

<details><summary>Worked solution</summary>
<p>The threshold can be 1.76 A. During the delay, current rises approximately 20/80 µH × 300 ns = 0.075 A, giving 1.835 A before switching and parasitic effects. Select against that fault peak and the actual minimum inductance, not merely the 1.138 A normal operating peak. If saturation lowers L further, the delay increment also grows.</p>
</details>

# 05 | Capacitors, ripple and load steps

Capacitors are frequency-dependent impedances with capacitance, ESR and ESL. They support different currents on the input and output. Begin with the ideal charge model, then add the physical limitations.

## Output ripple from charge balance

In CCM with approximately constant load, capacitor current is the triangular AC component of inductor current, of peak amplitude \(\Delta I_L/2\). The positive area between zero crossings is \(\Delta Q=\Delta I_LT_s/8\). Therefore

\[
\Delta V_{C,pp}\approx\frac{\Delta I_L}{8f_sC_{eff}},\qquad
\Delta V_{ESR,pp}\approx\Delta I_Lr_C.
\]

Adding the two magnitudes is a conservative first estimate of ripple, since their extrema need not coincide. ESL and switching spikes are excluded. For E1 at 20 V, 100 µF and 20 mΩ, these terms are 3.44 mV and 5.51 mV; their sum is 8.95 mV. This does not predict the oscilloscope’s full-bandwidth peak-to-peak reading.

The output capacitor RMS ripple current is \(\Delta I_L/\sqrt{12}\), or 79.5 mA in E1. Input capacitor current is much more abrupt. Neglecting source ripple and inductor ripple,

\[
I_{Cin,rms}\approx I_o\sqrt{D(1-D)}.
\]

That approximation has a maximum of \(I_o/2\) at \(D=0.5\). The waveform tool keeps inductor ripple and uses the mean-square current explicitly:

\[
I_{Cin,rms}^2=D\left(I_o^2+\frac{\Delta I_L^2}{12}\right)-(DI_o)^2
\quad\text{(CCM)}.
\]

In DCM, replace the on-time rectangle by a triangle: \(\overline{i_{in}}=DI_{pk}/2\) and \(\overline{i_{in}^2}=DI_{pk}^2/3\). Thus \(I_{Cin,rms}=\sqrt{DI_{pk}^2/3-(DI_{pk}/2)^2}\). The output-capacitor RMS current in either ideal steady-state mode is \(\sqrt{I_{L,rms}^2-I_o^2}\). These expressions assume the source delivers the average input current and the capacitors carry the switching-frequency remainder; cable/filter impedance changes the physical sharing. With an ideal source supplying average current, a charge-based estimate is \(\Delta V_{in}\approx I_oD(1-D)/(C_{in}f_s)\), plus ESR/ESL contributions. The nearby ceramic bank handles fast commutation; bulk capacitance supports lower-frequency source and cable dynamics.

## A load step is not switching ripple

When load abruptly increases by \(\Delta I\), inductor current initially remains unchanged. The capacitor supplies the deficit. ESR gives an immediate approximate step \(\Delta I r_C\); capacitance then contributes \(\Delta V=\int(i_{load}-i_L)dt/C\). If control reacts after \(t_d\) and inductor current then catches up linearly over \(t_r\),

\[
\Delta V\approx\Delta I r_C+\frac{\Delta I(t_d+t_r/2)}{C}.
\]

At 0.8 A, 10 µs delay, 40 µs catch-up, 100 µF and 20 mΩ, this is about **256 mV**. A capacitor bank that easily meets an 8.95 mV switching-ripple estimate can still fail a ±150 mV transient target. At low input, limited positive inductor voltage slows recovery; after load removal, the converter must safely dispose of stored energy.

A conservative overshoot bound assumes all inductor energy above the new equilibrium goes into the output capacitor:

\[
\frac12C(V_{peak}^2-V_o^2)\leq\frac12L(I_{before}^2-I_{after}^2).
\]

It overestimates a partial unload because the remaining load keeps consuming part of that energy. If duty falls to zero immediately and the inductor discharges at \(-V_o/L\), the excess charge delivered to the capacitor is the triangle \(\Delta I\,t/2\) with \(t=L\Delta I/V_o\):

\[
\Delta V_{overshoot}\approx\frac{L\,\Delta I^2}{2CV_o}.
\]

For E1 releasing 1.0→0.2 A, the energy bound gives about 142 mV and the charge estimate about 97 mV, both before ESR and control delay. For a full release (\(I_{after}=0\)) the two estimates coincide to first order. A low output voltage makes the discharge slope small, which is why 3.3 V rails are sensitive to load release. Neither expression is a waveform model; controller delay, synchronous reverse current and loss change the result.

## Effective capacitance and damping

Class-II ceramics can lose considerable capacitance under DC bias; nominal value and voltage rating do not quantify the loss. Use exact-part curves, including tolerance, temperature and ageing. [Murata explains this DC-bias mechanism](https://www.murata.com/support/faqs/capacitor/ceramiccapacitor/char/0005). Bulk electrolytic/polymer parts have different ESR, ageing and temperature behaviour. Parallel mixtures can produce impedance resonances; “more capacitance” is not a universal cure.

The source cable inductance and input capacitors can ring when plugged in. The regulated converter can look like a negative incremental input resistance below its control bandwidth: since \(I=P/V\), \(dI/dV=-P/V^2\). An undamped input filter and tightly regulated load can therefore interact. Analyse source impedance and damping before adding an LC filter merely because it looks like an EMI improvement.

### Exercise 5 · Size to a transient budget

With a 150 mV budget, 0.8 A step, 20 mΩ ESR and 30 µs equivalent charge-deficit time, what minimum effective capacitance is required?

<details><summary>Worked solution</summary>
<p>ESR consumes 16 mV, leaving 134 mV. C ≥ 0.8 × 30 µs / 0.134 = 179.1 µF effective. This is a simplified charge bound, not a selected bank. Add model uncertainty, verify actual current slew at low input, and re-evaluate loop stability after changing C.</p>
</details>

# 06 | Topology, semiconductor stress and losses

The teaching topology comparison explains a design decision rather than deriving it from the MCU. V007 r2 has selected two synchronous phases; E1 remains the single-phase model used to learn each mechanism. The practical contenders are an asynchronous buck with a diode and a synchronous buck with a controlled low-side MOSFET. High-side implementation may use a P-channel device or an N-channel device with a suitable driver. These choices affect cost, efficiency, control complexity and failure behaviour.

| Choice | Why consider it | What must be solved |
|---|---|---|
| Asynchronous, P-channel high side | Simple conceptual first stage; no low-side shoot-through | Level shifting, VGS clamp, switching speed, higher RDS(on), diode loss |
| Asynchronous, N-channel high side | Better switch choices, still simple freewheel path | Floating high-side gate drive and bias |
| Synchronous half bridge | Lower freewheel conduction loss at high current | Non-overlap, reverse current, startup, driver UVLO, fault shutdown |

## Build a loss ledger

Using hot resistances and CCM, define \(I_2=I_o^2+\Delta I_L^2/12\). Approximate conduction losses are

\[
P_{QH}=DI_2R_H,\quad P_{QL}=(1-D)I_2R_L,\quad
P_D\approx(1-D)I_oV_F.
\]

For an asynchronous stage, use the diode term instead of the low-side MOSFET term. At 20 V→3.3 V, 1 A and 0.45 V forward drop, the diode alone dissipates 0.376 W, more than 11% of output power. At 10 A it is 3.76 W under the same simplified drop assumption. This is why synchronous rectification becomes attractive as current rises.

A first estimate of high-side transition loss is

\[
P_{sw}\approx\frac12V_{in}I_o(t_r+t_f)f_s.
\]

At 20 V, 1 A, 40 ns total transition duration and 100 kHz, this is 40 mW. At 10 A and 300 kHz it becomes 1.2 W. The overlap model excludes output-capacitance energy, reverse recovery, ringing and timing asymmetry; use it for sensitivity, not a final efficiency claim.

Gate-drive power is approximately \(Q_gV_{drive}f_s\) per MOSFET. It is drawn from the driver supply and dissipated between driver, gate resistance and MOSFET internal resistance. Add bias supply loss, shunt loss, capacitor ESR loss, inductor copper/core loss and interconnect loss. Then

\[
\eta=\frac{P_o}{P_o+\sum P_{loss}}.
\]

Do not select an arbitrary efficiency and also claim that a detailed ledger independently proved it. Compare the estimate to measured input and output power at several operating points.

## Bridge to r2: interleaving is not automatic current sharing

Two buck phases share one output capacitor bank and one regulated rail. With equal inductances, equal average phase currents and clocks displaced by half a switching period, the triangular ripple currents partially cancel at the output. The individual inductors still carry their own ripple and peak current. They do not become one ideal inductor with a magically doubled current rating. TI's [multiphase design guide](https://www.ti.com/lit/an/slva882b/slva882b.pdf) discusses cancellation and why real capacitors remain necessary even at ideal cancellation points.

For two identical uncoupled phases in CCM, let \(\Delta I_{phase}=V_o(1-D)/(Lf_s)\). Adding the piecewise-linear currents gives

\[
\Delta I_{sum}=\Delta I_{phase}
\begin{cases}
(1-2D)/(1-D), & 0<D\leq 1/2,\\
(2D-1)/D, & 1/2<D<1.
\end{cases}
\]

Derive the first branch by considering the interval when one high-side switch is on: the total slope is \((V_{in}-2V_o)/L\), lasting \(DT_s\). For the second branch, the interval when both high sides are on lasts \((D-1/2)T_s\). The summed ripple repeats at \(2f_s\), but each phase switches at \(f_s\).

At 12 V→3.3 V, 100 µH **per phase**, 100 kHz and 1 A **total**, each phase averages 0.5 A. Its ripple is 0.23925 A p-p and peak is 0.61963 A. The summed ripple is 0.14850 A p-p, versus 0.47850 A with aligned clocks. At 6.6 V input, ideal duty is 0.5 and the summed ripple vanishes; each inductor still has 0.165 A p-p. Mismatch, transients and parasitics prevent treating the ideal zero as a capacitor-removal rule.

Equal average currents are an **assumption of this tool**. A voltage loop alone does not establish balance: resistance, sensing offset, duty mismatch and temperature can concentrate current in one phase. Current sensing and a reviewed balancing strategy are required; see TI's [current-sharing explanation](https://www.ti.com/document-viewer/lit/html/SSZT900/GUID-9E06D468-625E-4955-902E-37D4DA7B7D97). Evaluate per-phase peaks and fault thresholds even when total output current looks acceptable. Phase shedding and startup must also define which devices conduct and whether reverse current is permitted.

**E06 extension · Predict before plotting:** compare 0°, 90° and 180° phase shift at 5, 6.6, 12 and 20 V. Record total ripple and each inductor peak. Then explain why the chart cannot prove balanced currents on r2's 6.8 µH inductors or validate its firmware.

<details><summary>Interleaving check</summary>
<p>At 180°, the ideal summed ripple is 0.0544 A at 5 V, zero at 6.6 V, 0.1485 A at 12 V and 0.2211 A at 20 V. These use the teaching 100 µH and 100 kHz values. Cancellation depends on duty; neither “two phases always halve ripple” nor “half the output current is the phase peak” is correct. The model prescribes equal means and omits loss, dead time and current-control errors.</p>
</details>

<div class="tool-slot" data-tool="interleave"></div>

## Ratings are multidimensional

MOSFET drain voltage must cover maximum input plus measured or bounded overshoot, with an explicit margin policy. Absolute maximum is not a repetitive working target. Gate threshold only indicates the onset of conduction; select RDS(on) specified at the actual gate voltage. Check hot resistance, gate charge at relevant conditions, pulsed current and safe operating area. Linear startup or a failed control state may put a device in a regime where its headline switching-current rating is irrelevant.

A diode needs reverse-voltage margin, repetitive peak and average current capability, thermal allowance and acceptable reverse leakage at temperature. Schottky leakage can become important at hot high voltage. A synchronous MOSFET body diode conducts during dead time and has reverse-recovery consequences. Device capacitances are nonlinear; a single Coss number is not the stored-energy curve.

### Exercise 6 · Compare the two stages

At 20 V/3.3 V, 4 A, assume 0.45 V diode drop versus a 12 mΩ hot low-side MOSFET. Estimate only the freewheel conduction saving. Why is that insufficient to choose synchronous rectification?

<details><summary>Worked solution</summary>
<p>The diode dissipates about 1.503 W. Neglecting ripple, the MOSFET dissipates 0.160 W, a difference of 1.343 W. Subtract added driver/gate/dead-time losses and consider cost, layout and fault risk. At much lighter current, fixed switching/driver losses can erase a large fraction of the benefit.</p>
</details>

<div class="tool-slot" data-tool="loss"></div>

# 07 | Gate drive

A MOSFET is controlled by **VGS**, not gate voltage relative to the PCB ground. For an N-channel high-side device, the source moves with SW. To keep it on while SW approaches input voltage, its gate must rise above that source by the required drive voltage. A 3.3 V MCU GPIO connected directly to that gate does not implement a high-side switch.

<figure><img src="figures/driver.svg" alt="Synchronous half bridge with a high-side and low-side N-channel MOSFET, separate gate resistors, local driver, bootstrap capacitor from floating bias to switch node and bootstrap diode from driver supply."><figcaption>Figure 3. A conceptual bootstrap-driven half bridge. Driver pin names and bootstrap ratings are part-specific. The floating supply is referenced to SW, not ground.</figcaption></figure>

## Gate charge and the Miller interval

During turn-on, gate charge first raises VGS, then supports the Miller interval while VDS changes, then raises VGS to the final drive level. For a first estimate, \(t_M\approx Q_{gd}/I_g\), with \(I_g\) set by driver source/sink capability and total gate-loop resistance. Gate capacitance is nonlinear; \(Q_g\) curves are usually more informative than one Ciss value.

A resistor can slow an edge and reduce ringing/EMI, but also increases transition loss. Asymmetric turn-on and turn-off resistances can tune the tradeoff. Start from the selected driver/device recommendations and measure VGS and VDS together. A common-source inductance produces \(L_s\,di/dt\) in the gate reference, so a beautiful PWM signal at the MCU tells you little about the actual die gate voltage.

## Bootstrap operation

When SW is pulled low, a diode charges the bootstrap capacitor from the driver supply. When the high-side turns on, that capacitor floats upward with SW. Its approximate droop is

\[
\Delta V_{boot}\approx\frac{Q_g+I_{HB}t_{on}+Q_{leak}}{C_{boot}}.
\]

For 12 nC gate charge, 0.2 mA floating bias current, 6.6 µs on-time and 0.2 V allowed droop, ignoring leakage gives at least 66.6 nF **effective** capacitance. Add the driver’s specified constraints, tolerances and recharge requirements. Check diode reverse voltage, bootstrap capacitor bias and all negative-SW tolerances.

Bootstrap supplies need charging opportunities. They cannot sustain arbitrary DC high-side on-time without another mechanism. The driver also needs a supply adequate for its UVLO and gate amplitude at the initial 5 V input. A driver intended for a 10–12 V bias rail cannot be assumed to operate from 3.3 V. This driver-bias decision interacts directly with autonomous startup.

The floating gate voltage is lower than the driver supply. To first order,

\[
V_{GS,H}\approx V_{drv}-V_{F,boot}-\Delta V_{boot}.
\]

With a 5 V input, a linear bias regulator in dropout can leave about 4.85 V for the driver. A 0.5 V bootstrap-diode drop and 0.1 V droop then give roughly **4.25 V** high-side drive, while the low-side device receives nearly the full 4.85 V. MOSFET datasheets usually guarantee RDS(on) only at listed gate voltages such as 4.5 V and 10 V. At 4.25 V the resistance is unspecified, typically higher and more temperature- and threshold-dependent. Use the transfer/output curves only as a qualitative guide and measure VGS across the floating source. This is the gate-drive question recorded for Letki r2; it is a design-margin issue to resolve, not a reason to assume failure.

## Non-overlap and false turn-on

Both MOSFETs conducting simultaneously create a low-impedance path across the input. Dead time must exceed the worst turn-off/propagation mismatch with margin, but excessive dead time increases body-diode conduction. Miller current \(i=C_{gd}\,dv/dt\) can lift the supposedly off gate. Low impedance turn-off, appropriate resistance, short gate loops and, when warranted, a Miller clamp address the mechanism. Never validate non-overlap only from logic-level PWM traces: inspect device VGS under load and across operating corners.

An illustrative dead-time loss estimate is \(P_{dt}\approx2V_FI_ot_df_s\), assuming two intervals of equal duration per cycle and positive current. It excludes recovery and polarity changes. A 50 ns dead time is neither inherently safe nor inherently efficient; its adequacy follows from the actual switching delays.

## P-channel is simpler in one respect only

A P-channel high side turns on when its gate is pulled below its source. At 20 V input, pulling directly to ground could exceed its negative VGS rating. A level shifter, gate-source clamp and properly sized pull-up/discharge paths are needed. The pull-up can make turn-off slow, and resistor losses can matter. Draw all reset and unpowered states before choosing this option as “the simple circuit”.

### Exercise 7 · Explain every reset state

Draw your proposed driver input, enable and gate pull resistors with the MCU absent, in reset, brownout, and halted by the debugger. Determine whether both switches remain off and whether a fault can disable the driver without a software interrupt.

<details><summary>Review criteria</summary>
<p>Every state must resolve to a definite gate condition. Include driver UVLO behaviour, bootstrap undervoltage, input pin leakage, power-sequencing backfeed and output polarity. An undefined pin is not an off state. Verify the complete path with the driver powered and the power stage initially disconnected.</p>
</details>

# 08 | Voltage and current sensing

Output sensing, input sensing and current sensing have different bandwidth and accuracy needs. The voltage loop needs repeatable samples with bounded delay. Fast overcurrent protection needs a prompt, independent threshold response. Telemetry can be slower and heavily filtered. Trying to use one heavily averaged ADC value for all three jobs usually fails.

<figure><img src="figures/sense.svg" alt="Output voltage divider with RC filter to ADC and a separate current shunt with Kelvin leads to amplifier and comparator. Comparator disables gate drive independently of the MCU processing loop."><figcaption>Figure 4. Separate the regulation measurement from the fast trip path. Kelvin sense connections carry measurement current, not load current.</figcaption></figure>

## Divider and ADC accuracy

For divider ratio \(H=R_b/(R_t+R_b)\), ADC input is \(HV_o\). An N-bit ADC with reference \(V_{ref,ADC}\) has ideal output-referred step

\[
q_v=\frac{V_{ref,ADC}}{2^NH}.
\]

With an illustrative 12-bit ADC, 3.3 V reference and \(H=0.5\), that is 1.611 mV per count. Quantisation is not the complete error budget: reference error/drift, divider tolerance, ADC gain/offset, noise and ground differences also contribute. Calibrate offset and gain with traceable measurements, but do not expect calibration to remove switching interference or temperature dependence you did not characterise.

The ADC reference deserves special attention if it is derived from the very rail being measured. A measurement can become ratiometric and hide an absolute rail change. Establish the actual V007 reference architecture and how an absolute output-voltage estimate is obtained; an internal reference channel, external reference or independently known supply may be required by your scheme.

## Sampling capacitor settling

A SAR ADC input briefly connects a sampling capacitor. With source resistance \(R_s\) and sample capacitance \(C_s\), a simple settling model gives error \(e^{-t/(R_sC_s)}\). To settle a full-scale step within half an N-bit LSB,

\[
t_{acq}\gtrsim(N+1)\ln(2)R_sC_s.
\]

For 12 bits, 10 kΩ and 10 pF, the idealised result is about 0.90 µs. Actual requirements include internal switch resistance, channel switching, external RC network and datasheet limits. Increasing divider resistance saves DC power but makes settling harder. A buffer may help, at the cost of its own offset, bandwidth and stability with capacitive load.

An RC filter with corner \(f_p\) adds phase \(-\arctan(f/f_p)\). At a 2 kHz loop crossover, a 1 kHz filter already contributes −63.4°. Filtering noise without budgeting its phase is a common route to an unstable converter.

## Current sensing choices

A shunt produces \(V_s=IR_s\) and dissipates \(I_{rms}^2R_s\). At 1 A with 50 mΩ, the signal is 50 mV and loss 50 mW; at 10 A it is 0.5 V and 5 W. A larger-current design needs a different tradeoff. Amplifier offset becomes an input-referred current error \(V_{os}/R_s\). Use Kelvin traces from the resistor pads, with a compact differential loop.

Low-side load sensing can lift the load ground; high-side sensing requires common-mode capability. A shunt in the low-side switch measures current only during part of the PWM cycle. Inductor DCR sensing can reduce loss but requires matching an RC time constant and accounting for copper temperature. None of these automatically provides an accurate instantaneous inductor current across all states.

## Sample at a known phase

Synchronise sampling to PWM where the selected signal is observable and settled. Avoid switching edges and allow amplifier recovery after large common-mode steps. At high input the on-window is short, which can invalidate an on-time current sample. Sampling once per cycle at a consistent point can reduce switching-ripple contamination, but it does not remove aliasing from unrelated disturbances.

### Exercise 8 · Budget a measurement

For a 20 mΩ shunt, amplifier gain 20 and 100 µV input offset, calculate output signal at 1 A and input-referred current error. What happens at 50 mA?

<details><summary>Worked solution</summary>
<p>At 1 A the amplifier output signal is 0.4 V. Offset corresponds to 5 mA, or 0.5% of 1 A. At 50 mA the useful output signal is 20 mV and the same offset is 10% of the reading. Add ADC and gain errors. This illustrates why a wide dynamic range is not obtained merely by choosing a nominally high-resolution ADC.</p>
</details>

# 09 | Averaged model and control plant

A control loop responds primarily to an envelope of the switching waveform. State-space averaging replaces the rapidly switched system by a continuous model valid well below switching frequency and within a specified conduction mode. It predicts small-signal behaviour near an operating point; it does not predict gate ringing, saturation or abrupt mode changes.

For an ideal CCM buck with resistive load R,

\[
L\frac{di}{dt}=d(t)v_{in}(t)-v(t),\qquad
C\frac{dv}{dt}=i(t)-\frac{v(t)}R.
\]

Write \(d=D+\hat d\), \(v_{in}=V_{in}+\hat v_{in}\), \(i=I+\hat i\), \(v=V+\hat v\). Subtract the DC equilibrium and discard the product \(\hat d\hat v_{in}\). Then

\[
Ls\hat i=V_{in}\hat d+D\hat v_{in}-\hat v,\qquad
Cs\hat v=\hat i-\hat v/R.
\]

Eliminating current gives

\[
G_{vd}(s)=\frac{\hat v}{\hat d}=\frac{V_{in}}{LCs^2+(L/R)s+1},\qquad
G_{vg}(s)=\frac{\hat v}{\hat v_{in}}=\frac{D}{LCs^2+(L/R)s+1}.
\]

The natural frequency is \(\omega_0=1/\sqrt{LC}\), and \(Q=R\sqrt{C/L}\). For E1 at 1 A, R=3.3 Ω, L=C=100 in µH/µF, giving \(f_0=1.592\) kHz and Q=3.3. The LC double pole supplies nearly −180° phase above resonance. A pure integrator adds another −90°, so a high crossover with integral-only control cannot have acceptable phase margin.

## Include parasitic resistance

Let inductor resistance be \(r_L\) and capacitor ESR be \(r_C\). The output impedance of the parallel load/capacitor branch is

\[
Z_p=\frac{R(1+sr_CC)}{1+sC(R+r_C)}.
\]

Since \(G_{vd}=V_{in}Z_p/(r_L+sL+Z_p)\), expansion gives

\[
G_{vd}(s)=\frac{V_{in}R(1+sr_CC)}
{(R+r_L)+s[L+r_LC(R+r_C)+Rr_CC]+s^2LC(R+r_C)}.
\]

This is the model in the loop explorer. At DC it gives \(V_{in}R/(R+r_L)\). ESR introduces a left-half-plane zero at \(f_{z,ESR}=1/(2\pi r_CC)\), while DCR and ESR also change damping. The loss terms in this plant are illustrative and do not replace the nonlinear loss ledger.

## Output impedance connects the model to load steps

For an independently applied incremental load current, the ideal open-loop output impedance is

\[
Z_{out}(s)=\frac{Ls}{LCs^2+(L/R)s+1},\qquad \hat v=-Z_{out}\hat i_{load}.
\]

Here R describes the existing resistive operating load; the current disturbance is additional. With negative feedback and loop gain T, closed-loop disturbance response is reduced by \(1/(1+T)\) where the model applies. A load-step trace is therefore a useful combined test of output impedance, control delay and saturation, but it does not uniquely reveal phase margin.

### Exercise 9 · Which load model?

The resistor model has incremental conductance 1/R. Compare it with an ideal current sink and a constant-power load. Explain why the same average current is insufficient to choose a stability model.

<details><summary>Worked solution</summary>
<p>An ideal current sink has zero incremental conductance. A constant-power load has dI/dV = −P/V², a negative incremental conductance that can reduce damping. A scanned LED array with MCU and radio is neither universally one nor the other: identify behaviour across the bandwidth of interest. Use measured transients and impedance reasoning rather than replacing every load by its DC V/I ratio.</p>
</details>

# 10 | Loop compensation

Negative feedback compares a measured output with a reference and changes duty. Its effectiveness depends on loop gain, phase, delay and nonlinear limits. “The voltage looks stable” at one load is not a stability argument.

<figure><img src="figures/loop.svg" alt="Negative feedback block diagram with reference, summing junction, compensator, PWM and delay, power stage, output, and sensing filter in the feedback path."><figcaption>Figure 5. Keep the units through every block. ADC counts, volts and duty are not interchangeable gains.</figcaption></figure>

For sensor gain/filter H, compensator \(G_c\), PWM gain \(G_m\) and delay \(T_d\),

\[
T(s)=G_c(s)G_m(s)G_{vd}(s)H(s)e^{-sT_d}.
\]

A controller that consumes output-referred volts and outputs duty can use \(G_m=1\), \(H(0)=1\) after calibration. An analogue PWM ramp of amplitude \(V_{ramp}\) instead has modulator gain approximately \(1/V_{ramp}\). An ADC-count controller needs the count-per-volt factor. Omitting these gains moves crossover.

At a unity-gain crossing \(f_c\), phase margin is \(180°+\angle T(j2\pi f_c)\). Gain margin is evaluated where phase reaches −180°. Multiple crossings require inspecting the whole response; a single displayed phase margin is not sufficient. Nyquist reasoning, internal plant stability and appropriate sign conventions still matter. A practical starting objective is roughly 50–65° phase margin with useful gain margin over the intended corners, followed by measured validation. This is a design target, not a theorem guaranteeing every nonlinear transient.

## PI, type II and type III

A PI controller \(G_c=K_p+K_i/s\) integrates DC error and adds one zero. A type-II form adds a high-frequency pole. A type-III form provides two zeros and two high-frequency poles in addition to the integrator:

\[
G_c(s)=\frac{K}{s}\frac{(1+s/\omega_{z1})(1+s/\omega_{z2})}{(1+s/\omega_{p1})(1+s/\omega_{p2})}.
\]

The two zeros can provide phase lead around the LC double pole. High-frequency poles limit noise gain. Their placement is a design process, not a template to copy without the plant. Voltage-mode CCM control often needs this extra phase if crossing above resonance. A deliberately slow loop crossing well below resonance may work with a simpler controller, but can require more capacitance and tolerate slower disturbance rejection.

## A worked E1 compensation study

Use 12 V, R=3.3 Ω, L=100 µH, C=100 µF, rL=0.18 Ω and rC=20 mΩ. Place zeros at 800 Hz and 1.6 kHz, high poles at 15 kHz and 30 kHz, and choose K so the total loop magnitude is unity at 3 kHz. Add a 30 kHz sensing pole and **15 µs effective delay**. The loop explorer performs complex arithmetic on this exact stated model, finds the gain, and reports the first descending unity crossing. This is an educational design candidate, not firmware coefficients.

The calculation gives K ≈ 527.98 s⁻¹, a 3.000 kHz crossing and only **30.9° phase margin**. It therefore **misses** the 50–65° starting target. At 20 V with the same controller, crossover rises to about 4.016 kHz and margin falls to 21.4°. Try zeros at 400/800 Hz and gain multiplier 0.28085: nominal crossover returns to 3 kHz with about 51.4° margin, but the 20 V corner still has only about 35.8°. That is a successful diagnosis, not a finished loop design. Lower bandwidth, less delay, different compensation or deliberately designed input-dependent gain are candidates to investigate.

Change input to 5 and 20 V with **fixed controller gain**, then vary L/C and load. Do not automatically renormalise gain at every corner; that would analyse a different controller each time and conceal gain variation. If you deliberately implement input feedforward or gain scheduling, include its measurement delay, saturation and fault behaviour.

## Why delay matters

A pure delay contributes \(-360fT_d\) degrees. At 3 kHz, 15 µs costs 16.2°. At 10 kHz it costs 54°. Sampling, conversion, computation and deferred PWM updates all consume phase. A crossover well below switching and sampling rates is necessary, but the actual delay budget is more informative than a blanket “one tenth” rule.

Current-mode control changes the plant seen by the outer voltage loop. In idealised peak-current control, the inner current loop can simplify the outer dynamics; it also introduces sampled-data effects. With rising current slope \(m_1\), falling slope magnitude \(m_2\), and added ramp slope \(m_a\), a simple cycle-to-cycle perturbation factor is \((m_a-m_2)/(m_1+m_a)\). Its magnitude must be below one; hence \(m_a>(m_2-m_1)/2\) when the falling slope dominates. All slopes must use the same sensed-signal units. This is the origin of slope compensation at high duty, not a reason to assume the V007 already contains a suitable peak-current controller.

### Exercise 10 · Challenge the loop

Keep nominal gain fixed. Increase delay from 15 to 40 µs, halve effective capacitance, and compare 5/12/20 V. Record crossings, phase and whether the nominal CCM assumption is still valid.

<details><summary>Review criteria</summary>
<p>An extra 25 µs alone costs 27° at 3 kHz, before crossover shifts. Halving capacitance moves resonance upward by √2 and changes damping and the ESR zero. At 5 V with the nominal controller the loop magnitude crosses 0 dB three times, near 0.61, 0.85 and 2.06 kHz, because the reduced plant gain lets the magnitude dip below unity before the LC resonance lifts it again. The phase stays far from −180° at the two low crossings, and the last descending crossing shows about 52° margin. A report quoting only that number would still hide the shape: a small gain or damping change near resonance changes the number of crossings, and the effective bandwidth jumps between about 0.6 and 2 kHz. A valid report gives the fixed controller, model corners and all unity crossings, not just the nicest Bode trace. Check a switching model and the real converter before accepting the compensation.</p>
</details>

<div class="tool-slot" data-tool="loop"></div>

# 11 | V007 digital control and timing

The CH32V007 is an inexpensive MCU, not a complete buck-controller IC. WCH’s product description identifies a 48 MHz core, 12-bit ADC with advertised maximum 3 MS/s, an OPA and two comparators. Those family-level facts motivate investigation; they do not establish the routing, latency, accuracy or gate-drive capability of the exact **CH32V007E8R6** package. Consult the [official product page](https://www.wch.cn/products/CH32V007.html), [datasheet](https://www.wch-ic.com/downloads/CH32V007DS0_PDF.html), [reference manual](https://www.wch-ic.com/downloads/CH32V00XRM_PDF.html) and [official SDK](https://github.com/openwch/ch32v002_004_005_006_007). Do not import CH32M007 power-driver features into a V007 design.

## The hardware feasibility table

Before assigning pins, fill this from the exact manual revision and verify critical paths with a logic analyser/scope:

| Function | Evidence required |
|---|---|
| PWM clock and update | Actual timer clock, prescaler, counting mode, preload/update event |
| Complementary outputs | Bonded pins, polarity, dead-time range/resolution, idle state |
| Emergency stop | Comparator/external-break route, latch/reset policy, propagation delay |
| ADC trigger | Timer event route, acquisition/conversion time, sequence timing |
| Analogue front end | Reference, input/common-mode range, OPA gain/bandwidth/offset |
| Debug and boot | Reset pin levels, timer behaviour while halted, programming isolation |
| I²C management | Compatible pins without sacrificing sensing, PWM or debug |

Unavailable internal routing is a design fact. Use an external comparator/driver shutdown path if needed. The learning objective is custom power-stage design with local V007 control, not proving that every function can be forced into firmware.

## PWM resolution is not timer register width

For an edge-aligned timer with effective clock \(f_{tim}\), approximately \(N=f_{tim}/f_s\) counts fit in one period. Duty resolution is \(1/N\). At an illustrative 48 MHz timer clock and 100 kHz, N=480: only about 8.91 bits of duty resolution, even if the register is 16 bits. The static ideal output step per count is \(V_{in}/N\), or 41.7 mV at 20 V and 10.4 mV at 5 V. This is **not** a prediction that ripple always equals that step: filtering, duty dithering and limit cycles affect the waveform.

Increasing switching frequency reduces both the available compute time and PWM resolution. Centre-aligned counting uses a different period relationship and can change update timing. Quantised feedback and actuation can cause limit cycles near the setpoint. Dithering can improve average resolution but deliberately introduces spectral content; validate ripple and stability rather than calling the extra bits free.

## Write the timeline before the ISR

At 100 kHz, one period is 10 µs. Allocate sampling window, acquisition, conversion, interrupt latency, computation, PWM register write and the next latch event. An ADC headline rate does not include your full control path. A result produced just after the update deadline may wait an entire extra cycle. Measure worst-case timing with communication, faults and other interrupts active; keep logging out of the control path.

The sampled plant is ideally obtained from the continuous state model with a zero-order hold:

\[
A_d=e^{AT_s},\qquad B_d=\int_0^{T_s}e^{A\tau}B\,d\tau.
\]

For controller conversion, the bilinear transform \(s=(2/T_s)(1-z^{-1})/(1+z^{-1})\) maps the left half-plane into the unit disk but warps frequency; prewarp near a critical design frequency if appropriate. A discrete model is necessary when bandwidth becomes a substantial fraction of update rate. Avoid double-counting hold delay if the discrete plant already includes it.

## A PI example with saturation

Trapezoidal integration gives

\[
x_k=x_{k-1}+\frac{K_iT_s}{2}(e_k+e_{k-1}),\quad
u_k=K_pe_k+x_k+d_{ff,k},\quad d_k=\operatorname{clip}(u_k,d_{min},d_{max}).
\]

Here error is output-referred volts and \(d_{ff}\approx V_{set}/V_{in}\). Integrator windup occurs when x keeps growing although the actuator is saturated. Conditional integration or back-calculation prevents that accumulation; define behaviour at current limit, disable and soft start. A type-III digital filter similarly becomes a difference equation with explicit coefficient units and sign convention.

Quantise coefficients and internal states, bound products and sums, and test overflow at maximum errors. On a small core, fixed-point arithmetic may be useful, but only after defining the range and precision of each signal. Compare the quantised frequency response and step response with the floating-point design. A fast ISR running the wrong scaled controller is still wrong.

### Exercise 11 · Timing gate

At 48 MHz and 200 kHz, estimate counts and static ideal output step at 20 V. If acquisition+conversion is 1.2 µs, computation and latency 1.5 µs, and write/setup 0.3 µs, how much of the 5 µs period remains?

<details><summary>Worked solution</summary>
<p>N≈240, giving an 83.3 mV ideal output step per duty count. The listed operations consume 3.0 µs, leaving 2.0 µs only if trigger and latch placement permit that schedule. The real deadline may be earlier. None of these assumed numbers constitutes a measured V007 capability; prove them with the configured clock tree and actual code.</p>
</details>

<div class="tool-slot" data-tool="timing"></div>

# 12 | Startup, bias and PD transitions

The integrated system has a dependency loop: V007 must drive the buck to make 3.3 V, yet it needs power to execute; X035 must be powered before it can negotiate higher VBUS. Resolve this electrically. Software cannot start from an absent supply.

## An independent startup bias

A small input-derived bias path must power V007 and whatever driver/protection circuitry is required to begin operation from 5 V. Its input rating must cover the maximum negotiated voltage and transients, not just startup. A linear bias regulator is conceptually simple, but its dissipation is \((V_{in}-V_{bias})I_{bias}\). At 20 V to 3.3 V and 20 mA, that is 334 mW; driver gate-charge current may add materially. Verify dropout at 5 V, quiescent current, thermal behaviour and UVLO.

An auxiliary switching supply can reduce bias loss but adds components and another startup dynamic. A resistor/zener or bootstrap-only scheme requires a particularly careful load-range and startup analysis; it is not automatically adequate because the average MCU current seems small. Select the least costly circuit that meets the complete envelope. If you later transfer bias to the regulated output, analyse handover, hysteresis, reverse current and failure recovery.

## Soft start is a current budget

Ramping the output reference limits capacitor charging current only if the controller can track the ramp without hitting an uncontrolled state. The required average inductor current is

\[
I_L\approx I_{load}+C_o\frac{dV_o}{dt}.
\]

Charging 470 µF to 3.3 V in 10 ms adds about 155 mA. In 1 ms it adds 1.55 A. Include the MCU/radio boot load, load capacitance beyond the converter and any output enable sequence. A brownout/restart loop can result if the bias rail collapses whenever the main converter begins switching.

Prebiased output is another case: the rail may still be charged or powered through an interface. A synchronous stage must not unexpectedly sink it. Define startup duty, reverse-current policy, output discharge and restart conditions.

## State machine with physical entry conditions

<figure><img src="figures/startup.svg" alt="Startup sequence from bias valid through self-check, limited soft start, 3.3 V valid, host boot, contract validation and full load. Faults disable switching and enter a latched or controlled retry state."><figcaption>Figure 6. Every transition needs a measured condition and timeout. The local fault path can interrupt every active state.</figcaption></figure>

A reasonable design exercise uses OFF → BIAS_VALID → SELF_CHECK → SOFT_START_LIMITED → RAIL_VALID → HOST_READY → CONTRACT_VALID → RUN. The names are unimportant; the invariants are not. Before a contract is known, keep demand within the actual initial USB-C source capability. Do not assume that every USB-C source supplies 3 A at 5 V; advertised current and the selected source matter. After negotiation, permit only the load supported by the contract, converter and distribution.

On contract loss, input droop or host reset, V007 must preserve its local voltage/current limits. X035 management cannot be in the fast trip path. A timeout policy may return to a conservative load budget, but an immediate electrical overcurrent cannot wait for I²C.

## A line step acts before software reacts

At 5 V, ideal 3.3 V duty is 0.66. If input suddenly becomes 20 V while duty remains 0.66, the average applied voltage corresponds to 13.2 V. With E1’s L and output initially 3.3 V, average current slope is roughly \((0.66\times20-3.3)/100\,\mu H=99,000\) A/s. One 10 µs cycle can add about 0.99 A. A negotiated transition may be ramped, but the example shows why line transient handling must be designed.

Input feedforward \(d_{ff}=V_{set}/V_{in}\) helps, but depends on sensing delay and validity. Fast current limiting, output overvoltage response and bounded duty remain necessary. For a downward input step, duty may saturate and output droop; maintaining full load at reduced input may violate the source current limit even if the output voltage initially looks correct.

### Exercise 12 · Startup energy and control

Write a timing diagram for 5 V plug-in, output ramp, X035 boot, PD negotiation, input transition and load release. Repeat for a reset during negotiation. Assign the owner of every decision and the physical circuit enforcing every limit.

<details><summary>Review criteria</summary>
<p>V007 can start without X035, and can turn switching off without I²C. The driver has adequate bias before its first pulse. Load demand is restricted before the contract is established. Reset cannot leave an unsafe duty active. A failed handshake has a defined timeout and recovery. Use a programmable/current-limited DC source to study line transitions before involving the charger; this course does not require the previously deferred PD bench test to begin design.</p>
</details>

# 13 | Protection and failure analysis

A regulator controls normal operation. Protection bounds abnormal energy. The same software loop can contribute to both, but a loop that samples every 10 µs cannot guarantee a sub-microsecond current interruption. Work backwards from the allowable energy and device stress to determine the required response time.

## Peak current and shutdown delay

A comparator threshold is not the actual maximum current. With a trip threshold \(I_{trip}\), total detection/blanking/propagation/turn-off delay \(t_{off}\), and minimum effective L,

\[
I_{peak,fault}\lesssim I_{trip,max}+\frac{V_{in,max}-V_o}{L_{min}}t_{off}.
\]

This simplified bound excludes parasitic spikes and changing inductance. Leading-edge blanking can prevent nuisance trips from commutation spikes, but it also creates a blind interval. Current sensing must remain meaningful during the fault state being protected. A low-side sample may disappear when the high-side is stuck on.

Cycle-by-cycle limiting ends a pulse and retries on a subsequent cycle. Hiccup limiting waits and retries at a low duty in time; it can reduce average short-circuit heating. A latched fault requires an explicit reset. Choose according to fault energy and recovery requirements. Repeated retries are a thermal operating mode that must be rated.

## Hard shorts and current runaway

Cycle-by-cycle limiting has a hidden assumption: the off interval must remove at least as much current as the shortest possible pulse adds. With the output shorted, the off-interval inductor voltage is only the freewheel drop plus resistive drops, not \(-V_o\). Every cycle still contains a minimum pulse \(t_{min}\) set by blanking, comparator and driver delay. The current ratchets upward when

\[
\frac{V_{in}t_{min}}{L}>\frac{(V_F+I\,r_{loop})(T_s-t_{min})}{L}.
\]

It settles only where the two sides are equal, at \(I_{eq}=[V_{in}t_{min}/(T_s-t_{min})-V_F]/r_{loop}\), if the components survive that long.

For E1 at 20 V with \(t_{min}=150\) ns, 80 µH, a 0.45 V diode and 0.18 Ω DCR near a 1.76 A trip, a pulse adds 37.5 mA. At 100 kHz the 9.85 µs off interval removes about 94 mA, so the limit holds. At 500 kHz the off interval is 1.85 µs and removes only about 18 mA: the current climbs toward \(I_{eq}\approx6.5\) A, nearly four times the threshold. A synchronous stage is worse because its off-interval voltage is only \(I\,r_{loop}\), tens of millivolts. Frequency foldback, pulse skipping when the trip is already active at the start of a cycle, or hiccup/latch shutdown are the standard responses. A trip delay longer than the switching period means cycle-by-cycle limiting cannot work at all; the trip must then stop switching for many cycles. Laboratory 10 in extension 23 applies this test to an r2-like phase.

## Overvoltage cannot be reduced to “set duty to zero”

Turning off the high-side removes further commanded input energy, but the inductor still contains energy. A synchronous stage might actively sink output energy, which introduces its own current and reverse-power risks. If the high-side MOSFET fails short, the ordinary duty command has no authority. Assess whether the load requires an independent input disconnect, output clamp/crowbar or other protection. A fuse responds to current and time, not directly to a 3.3 V overvoltage; it is not a universal rail protector.

A TVS must be selected from stand-off, breakdown, dynamic clamp, energy and source impedance; its label does not mean “the rail never exceeds this voltage”. A high-energy source can destroy an inadequately rated clamp. The appropriate protection depends on the documented fault analysis and value/vulnerability of the attached load.

## Define fault thresholds as intervals

For a measured quantity x, account for sensor error, reference error, comparator offset, temperature and filtering. A trip threshold has a minimum and maximum physical value. The minimum must exceed the highest allowed normal value with noise allowance; the maximum plus response overshoot must remain within protected-device capability. If these intervals overlap, adjusting a nominal constant cannot fix the design.

| Fault | Immediate mechanism to design | Slower software action |
|---|---|---|
| Overcurrent/short | Comparator or driver trip with bounded delay | Log cause, retry budget or latch |
| Output overvoltage | Independent threshold/energy response as justified | Freeze setpoint changes; require recovery conditions |
| Bias undervoltage | Driver UVLO and defined gate-off state | Restart only after hysteresis and timeout |
| Overtemperature | Sensor/threshold with adequate location and response | Derate then shut down; hysteretic recovery |
| ADC invalid/stale | Bounded duty and fault policy | Reject stale samples; record sequence/time |
| MCU hang/reset | Hardware gate default and watchdog strategy | Recover without automatically energising a fault |
| I²C loss | Local regulation/protection continues | Conservative budget and stale-telemetry status |

A watchdog is helpful for a stalled processor, but its reset delay may be much longer than semiconductor survival time. It supplements rather than substitutes for fast hardware action.

## Apply the distinction to the r2 OVP review

V007 r2 replaced the supply-dependent threshold with a TLV431B reference and a 0.1% divider. The design record estimates a **conditional static trip interval of 3.37–3.59 V**; comparator offset is assumed rather than guaranteed, and reference bias conditions add uncertainty. That interval is not a promise that a rising output stays below 3.6 V.

The existing sense filter is about 6.4 µs. Even an illustrative 2 A excess into **476 µF nominal** gives \(dV/dt=I/C\approx4.2\,\text{mV/µs}\), so a settled ramp can produce roughly 27 mV of filter lag before comparator/driver delay and stored-energy effects. Effective capacitance may be smaller. A static trip sweep alone cannot close this margin. Measure both the threshold and the dynamic peak in the bounded bring-up tests, retaining the actual load, input, probe and capacitance conditions.

The MCU supply is also its ADC reference and has its own tolerance. The r2 firmware contract therefore requires regulation calibrated against **OVP_REF**, with ADC errors still to budget; treating VDD_MCU as an exact 3.3 V reference is not adequate. This is a useful capstone error-budget exercise before writing the loop. The authoritative circuit values and assumptions remain in the board README; this course makes no component substitution or hardware change.

### Exercise 13 · A small FMEA

For each of these faults, write cause → electrical consequence → detection → limiting mechanism → recovery: open feedback resistor, shorted high-side MOSFET, saturated inductor, stuck ADC code, broken current-sense trace, driver bias collapse and loose ground return.

<details><summary>Review criteria</summary>
<p>Do not give every row “firmware detects it”. Ask what the firmware would actually read, whether it remains powered, and whether its actuator still has control. An open divider can command maximum duty; a failed-short switch ignores PWM; a lifted ground can change both gate and sensor references. The exercise passes when the limiting mechanism addresses the physical failure, even if the conclusion is that an additional component is required.</p>
</details>

# 14 | PCB layout is part of the circuit

At DC, a copper trace is mainly resistance. At switching edges, its inductance and capacitance can dominate. The layout defines several of the components missing from the schematic. A converter layout should make current paths obvious before signal routing begins.

## Identify the commutating loop correctly

In an asynchronous buck, on-state current flows from the local input capacitor through the high-side switch, inductor and output network back to the input return. Off-state current freewheels through the diode, inductor and output network. Subtract the two paths: the abrupt current change is concentrated in the **input capacitor–high-side switch–diode loop**. In a synchronous stage, substitute the low-side MOSFET. The inductor/output path carries relatively continuous current and is not the main commutating hot loop.

<figure><img src="figures/layout.svg" alt="Conceptual placement with the input ceramic directly across the half bridge, short commutating loop, small switch-node connection to the inductor, output capacitors after the inductor, and quiet Kelvin sense routing away from switch copper."><figcaption>Figure 7. Placement logic, not a board layout to copy. The dashed loop marks the high-di/dt commutation path. Keep driver and sensing return paths intentional.</figcaption></figure>

Parasitic inductance produces \(V=L_p\,di/dt\). At 5 nH and a 5 A change in 10 ns, the voltage is 2.5 V. A few nanohenries can therefore consume much of your voltage margin. Minimise loop area using adjacent forward/return paths and local ceramics directly at the switching pair. Wide copper without a close return does not necessarily give low inductance. TI’s [layout discussion](https://www.ti.com/document-viewer/lit/html/SSZTAL0) and [parasitic-inductance note](https://www.ti.com/lit/pdf/slyt682) provide useful manufacturer comparisons.

## Switch node and gate loop

Keep SW copper only as large as necessary for current and heat. It is a high-dv/dt electric-field source; large area increases capacitive coupling to nearby sensing and other layers. Do not route feedback underneath it. A ground plane is valuable for return continuity, but copper directly under SW can increase common-mode capacitance; evaluate the local keepout guidance of the selected devices without slicing the overall return plane.

Place the driver near the gates, return its low-side reference to the appropriate source/Kelvin point, and keep its decoupling loop compact. The high-side gate loop travels through the floating driver supply and source reference. Routing the gate neatly while sending its return around a long ground path defeats the purpose.

## Quiet sensing on a noisy board

Sense output voltage at the intended regulation point near the output capacitor/load connection. Route its reference beside it back to the analogue circuitry, away from high-current ground drops. Kelvin-sense shunts from the actual resistive element terminals. Avoid arbitrary splits named AGND and PGND: a split that forces return current around a gap can worsen interference. Use the selected MCU/driver guidance and an explicit current-return plan.

For the existing four-layer mechanical approach, a reasonable starting stack is signal/power components, solid ground, power distribution, and secondary routing. Final copper weights, stackup and clearances follow the fabricator and current/voltage constraints. Electrical loop quality takes priority over a low via count; parallel vias may be necessary for current and heat.

## Snubber selection

A damped ringing estimate uses resonance \(f_r\approx1/(2\pi\sqrt{L_pC_p})\), where \(C_p\) is mainly the off device's output capacitance. Adding a known capacitor \(C_{add}\) and measuring the new frequency \(f_r'\) gives \(C_p=C_{add}/[(f_r/f_r')^2-1]\), then \(L_p=1/[(2\pi f_r)^2C_p]\). An RC snubber dissipates the ringing energy. A practical starting point is a resistor near the characteristic impedance \(R_s\approx\sqrt{L_p/C_p}\) and a snubber capacitor of about three to four times \(C_p\), so the capacitor presents a low impedance near the ringing frequency and the resistor can dissipate the ringing energy. Then tune with measured waveforms and loss. The snubber capacitor is charged and discharged every cycle, dissipating about \(C_sV^2f_s\) in the resistor. Letki r2's DNP 2.2 Ω / 1 nF snubber footprints would dissipate 1 nF × (20 V)² × 400 kHz = 0.16 W, requiring an exact-part continuous/pulse power and temperature-derating check; package size alone does not establish its rating. Leave tuning pads if justified, but do not populate arbitrary values as an EMI charm.

### Exercise 14 · Placement before routing

Print a blank board outline. Place input ceramics, switching devices, driver, inductor, output capacitors and shunt. Draw the hot loop, both gate loops and sense returns in different line styles. Only then place the MCU and management connector.

<details><summary>Review criteria</summary>
<p>A reviewer should identify the commutating loop without following ten vias. No feedback trace crosses SW or a return-plane slot. Gate pull-downs and decoupling are local. High-current paths include their return and inter-board seams. Native ERC/DRC and schematic parity are required, but they do not establish low inductance, temperature or EMI performance.</p>
</details>

# 15 | Heat, power distribution and scaling current

The power converter does not end at its output capacitor. At 3.3 V, distribution resistance is a major fraction of the available voltage budget. A higher-current spin must revisit the entire path from charger connector to the farthest load.

## Thermal reasoning

For a rough single-source estimate, \(T_j\approx T_a+P\theta_{JA}\). Datasheet \(\theta_{JA}\) depends strongly on the test PCB and airflow; it is not a universal package property. For a real board, think of a thermal network from junction to package, copper, neighbouring components, enclosure and air. Several heat sources can raise the same local ambient.

Use hot electrical parameters in the loss ledger. MOSFET RDS(on) and copper resistance increase with temperature, changing the dissipation that caused the temperature rise. An iterative estimate is more honest than combining room-temperature loss with a hot maximum rating. Reserve temperature margin for sensor error and inaccessible junction hot spots.

A thermal camera reports apparent surface temperature and depends on emissivity/reflections. A shiny solder joint can read misleadingly. A thermocouple adds its own attachment and conduction errors. Record method, ambient, airflow, dwell time and load. Continue until temperature approaches equilibrium; a 20-second test is not proof of a continuous rating.

## Copper and joints

For a uniform trace, \(R=\rho\ell/(wt)\), with copper resistivity approximately \(1.72\times10^{-8}\,\Omega\,m\) near room temperature. A 50 mm long, 2 mm wide, 35 µm thick trace has about 12.3 mΩ resistance. At 5 A it drops 61 mV and dissipates 0.307 W. This estimate excludes vias, neck-downs, contacts and temperature rise. Return resistance adds to it.

A via bank shares current according to actual geometry, not perfectly by count. Soldered wire links need repeatable wetting and strain relief. The X035 control board’s VBUS trunk and J6 link must be included in the integrated current limit; a nominal charger wattage cannot overrule a hot connector.

## One source, multiple feed points

Letki’s continuous 3.3 V rail is fed by one buck. Additional feeds from **that same output** can reduce path resistance. Model the network as a resistive graph and calculate node voltages and branch currents under load patterns. A distant load can draw through several paths; the nearest seam may not carry the current you intuitively expect. Do not parallel independent regulator outputs as an incidental fix.

Remote sensing could compensate a known distribution drop, but needs open-sense protection, controlled maximum output and stability analysis with cable impedance. It may overvoltage nearer devices. For the first design, local regulation plus a properly limited and measured distribution network is easier to reason about.

### Exercise 15 · Scaling is a new design

Take a 1 A loss ledger and scale to 4 A. Classify each term as approximately constant, linear, quadratic or dependent on a component change. Then identify which physical component is likely to become limiting first.

<details><summary>Worked reasoning</summary>
<p>Bias and much gate-drive loss are roughly fixed at fixed frequency; diode and overlap loss are roughly linear in current under fixed assumptions; MOSFET/shunt/trace copper loss is roughly quadratic. Core and AC losses depend on ripple and frequency, and temperatures feed back into parameters. The first limit may be an inductor, diode, connector or bias regulator rather than the MCU-controlled switch.</p>
</details>

<div class="tool-slot" data-tool="budget"></div>

# 16 | Simulation models and tests

Use models in increasing detail, with a question assigned to each. Agreement between two simulations that share the same wrong assumptions is not independent validation.

## Four useful model levels

1. **Hand calculation:** DC duty, ripple, stresses, charge deficit, loss and timing budgets. This catches unit errors and establishes the expected scale.
2. **Averaged model:** poles, zeros, feedback design, load/line envelopes and controller saturation. Fast enough for corner sweeps, but cannot show switching spikes or reverse recovery.
3. **Switched ideal model:** PWM, diode zero-current intervals, startup, sampling, quantisation and current-limit logic. Check timestep convergence and event handling.
4. **Device/parasitic model:** gate charge, driver delay, inductances, diode recovery and candidate parts. Model quality and valid operating range now become central uncertainties.

A switching simulator should use timesteps small enough to resolve the events being studied. Halve the maximum step and compare the measured result; a smooth plot alone is not convergence. For loop work, an averaged AC model and a time-domain injection test can cross-check each other. Save model revisions and all non-default parameters.

## Interactive averaged load-step laboratory

The tool below integrates the ideal CCM equations with a resistive load step and a sampled PI controller. It includes a configurable integer update delay, duty limits and conditional anti-windup. It uses forced CCM and permits negative inductor current, so it resembles an ideal synchronous power stage. **It does not model diode DCM, MOSFET losses, current limit, startup or ADC/PWM quantisation.** Use it to understand how delay, gains and capacitance change response, not to approve hardware.

Nominal conditions are 12 V→3.3 V, 100 µH/100 µF, a load change from 16.5 Ω to 3.3 Ω (0.2→1 A at nominal voltage), and 100 kHz update. The display gives a numerical timestep and the simulation status. The same model can become unstable or hit duty limits; that is an intended learning result. Reset to the documented baseline when you lose track of which parameter caused a change.

With the default Kp = 0.01 duty/V and Ki = 20 duty/(V·s), the model reaches roughly 2.680 V minimum and 3.742 V maximum after the step, then 3.304 V at 8 ms. It plainly fails the illustrative ±150 mV excursion target. That is intentional: use the charge-deficit and loop arguments to improve it, rather than treating a running PI loop as proof of adequate regulation. A timestep-halving check of this baseline agrees within 0.01% on the minimum and final voltage.

<div class="tool-slot" data-tool="transient"></div>

## Laboratory S1 · Open loop

Build the ideal asynchronous circuit in your preferred SPICE tool. Use a resistive load, fixed duty, known L/C and a diode model with explicit assumptions. Reproduce the chapter 2 waveform at 12 V. Measure current slopes and verify volt-second balance. Then use the chapter 3 light load and compare the DCM gain. A generic switch/diode model is enough for this exercise; do not spend the session searching for a particular MOSFET model.

## Laboratory S2 · Closed loop

Implement the averaged plant and your chosen compensator. Compare Bode predictions, small load perturbations and larger steps that saturate duty. Add sensing delay, then quantised coefficients. Record the first point where the simpler model stops predicting behaviour. For a switching model, synchronise the ADC sampler and PWM latch explicitly.

## Laboratory S3 · Fault and startup

Use a bounded source and simulate bias rise, delayed enable, output prebias, short-circuit entry and removal, and input transitions. Check that the trip path can act when the control task is disabled. Replace ideal trip delay with a worst-case delay and include minimum inductance. Model a failed-short high-side as a separate fault: ordinary PWM shutdown will no longer solve it.

### Exercise 16 · Model discrepancy log

For each simulation, record prediction, observed result, discrepancy, changed assumption and next test. If your simulation disagrees with volt-second balance in settled CCM, first check measurement windows, timestep and definitions before inventing new physics.

<details><summary>Review criteria</summary>
<p>A useful result contains an executable model or enough information to reproduce it, the parameter set, timestep/convergence comparison, and a statement of excluded effects. “Simulation passed” without a question and acceptance criterion is not evidence.</p>
</details>

# 17 | Bench measurements

The first physical prototype should answer narrow questions at modest energy. Use a current-limited source and an appropriate test load, keeping the valuable display/radio assembly disconnected until the rail and faults have been characterised. These are engineering procedures to design and execute deliberately; the course does not itself authorise a new board flash or energisation.

## Instrument setup and probing

A basic useful set is a current-limited DC supply, DMM, oscilloscope with suitable probes, known resistive or electronic load, and temperature measurement. Current waveform measurement needs a suitable current probe or a designed shunt and differential measurement. State the bandwidth, current/voltage ratings and common-mode range of the instruments actually used.

Many bench oscilloscopes tie BNC shields to protective earth. Connect a conventional probe ground only to an electrically compatible reference. Never clip it to a high-side source/SW node as if it were a floating voltmeter, and never defeat protective earth to make it float. Measure high-side VGS with a suitably rated differential or isolated measurement method. Differential probes also have finite common-mode rejection and dv/dt capability.

For output ripple, use a short spring ground or coax connection at the output capacitor. A long ground lead forms a pickup loop and can manufacture apparent spikes. Record AC/DC coupling, bandwidth limit, sample rate and probe attenuation. Use DC coupling to measure absolute excursions and a separate zoomed measurement for ripple. A 20 MHz-limited ripple result and a full-bandwidth switching-spike result answer different questions.

## Staged bring-up

| Stage | Setup and question | Evidence to keep before advancing |
|---|---|---|
| B0: unpowered | Inspect polarity, bridges, resistances, continuity and isolation | Annotated inspection and meter results |
| B1: bias only | Power the bias path with switching disabled | MCU/driver rails, reset/UVLO and current |
| B2: logic/driver | Dummy/no power-stage load as appropriate | PWM frequency, polarity, update timing, fault-off path |
| B3: first switching | 5 V, restricted current, resistive test load | VGS, SW, inductor current, Vout and input current |
| B4: regulation | Low-to-rated learning load; then input sweep | DC error, ripple, load/line transients and control timing |
| B5: protection | Bounded-energy tests, one fault at a time | Trip threshold interval, delay, peak, retry/latched behaviour |
| B6: thermal | Sustained load at documented ambient | Loss/efficiency and equilibrium temperature |
| B7: integration | Output qualified first, limited system load | Boot, radio/display steps, source-loss and management behaviour |

Do not use an uncontrolled wire short as your first protection test. Establish a bounded load method and know the energy in supply/output capacitors. A bench supply current limit is upstream and may be too slow to protect the switching pair from local capacitor discharge.

## Measuring efficiency honestly

Measure input and output voltage/current at defined terminals after thermal settling. Account for wiring drops and instrument burden. For roughly independent errors, relative power uncertainty can be estimated by root-sum-square of relative voltage and current errors; systematic offsets and correlations require separate treatment. If loss is small compared with total power, computing loss as the difference of two uncertain measurements can have large relative error.

At 3.30 W output and 3.80 W input, efficiency is 86.84%. If each power measurement has ±1% uncertainty, a simple worst-case ratio spans approximately 85.12–88.60%. Reporting 86.8421% would conceal the measurement quality.

## Loop measurement and diagnosis

A frequency-response analyser with an appropriate small-signal injection arrangement can measure loop transfer. Injection location, DC continuity and loading matter; read the manufacturer method before inserting a transformer into a feedback path. TI’s [loop measurement note](https://www.ti.com/lit/an/snva364a/snva364a.pdf) is a focused reference. A load step is an accessible complementary check, not a replacement for all stability measurements.

| Symptom | Candidate mechanisms | Discriminating observation |
|---|---|---|
| Large SW ringing | Probe loop, hot-loop inductance, device capacitance | Repeat with correct probing; correlate edge current and frequency |
| Vout oscillates slowly | Loop gain/delay, current-limit cycling, bias restart | Observe bias, duty and fault flag simultaneously |
| Current ramp bends upward | Inductor saturation or changing applied voltage | Measure V_L and current together |
| Hot diode at high input | Large off-time conduction fraction | Compare loss estimate over input sweep |
| Good DC, poor load step | Capacitance deficit, slew limit, delay, saturation | Compare initial ESR step, slope and duty clipping |
| Errors only during I²C | ISR jitter, ground coupling, stale control sample | Timestamp control path and probe analogue reference |

### Exercise 17 · Write a test card

Pick one B-stage. State setup, current/voltage limits, trigger, expected waveform, stop condition, pass criterion and evidence filename. A helper should be able to review the card without guessing which wire or rail you mean.

<details><summary>Review criteria</summary>
<p>Pass/fail numbers come from your specification and component limits, not the pleasant appearance of the trace. Include uncertainty, operating point, instrument settings and whether the result is measured or simulated. Record failures without overwriting the earlier prediction.</p>
</details>

# 18 | V007 design review

You are ready to design the converter when you can explain its normal and abnormal energy paths, calculate the first estimates, and turn the remaining uncertainty into experiments. You need not solve the eventual maximum-power system in the first PCB spin.

## A sequence of useful prototypes

**Spin A: control and energy conversion.** A modest-current power stage with explicit startup bias, accessible measurement points, a verified driver-off path and a reproducible test load. Learn gate behaviour, sensing quality and the V007 timing limits. Choose asynchronous or synchronous deliberately from your loss and complexity comparison.

**Spin B: robust regulation and faults.** Incorporate the measured parasitics and actual analogue errors. Validate compensation, startup, prebias, overcurrent, line changes and thermal behaviour. Add management only after it cannot disturb the control deadline.

**Spin C: integrated power and mechanics.** Scale current only after updating magnetics, semiconductors, capacitance, copper, seams and source budget. Fit the tile-slot interface and test the continuous rail. Use the same output for additional feeds if needed. A smaller earlier current rating remains valid evidence only for its tested configuration.

## Capstone deliverables and acceptance gates

| Gate | Deliverable | What a reviewer must be able to verify |
|---|---|---|
| G0 requirements | Specification and known/assumed/measured table | Input, load, voltage, thermal and fault envelopes are explicit |
| G1 power stage | Hand calculations, candidate parts and loss ledger | Minimum L/C, fault peak, hot ratings and cost tradeoffs |
| G2 control | Plant, controller, corner Bode plots and transient models | Units, delays, mode changes, saturation and quantisation |
| G3 implementation | Exact V007 pin/peripheral map and timing evidence | PWM/ADC/trip routes, deadlines, reset behaviour |
| G4 startup/protection | State machine and FMEA | Autonomous 5 V startup and bounded abnormal energy |
| G5 CAD | Schematic, layout and native checks | Pin maps, ERC/DRC/parity, hot loops and interface orientation |
| G6 prototype | Test cards, raw traces and discrepancy log | Reproducible regulation, fault and thermal evidence |
| G7 integration | Source/distribution budget and system test report | Actual operating limit and remaining qualification gaps |

A course checkbox cannot pass one of these gates. An agent review can identify a missing derivation or inconsistent rating, but only physical evidence can establish measured behaviour. Keep all open gates visible.

## Management protocol as a bounded interface

Expose measured input/output voltage, current, temperatures if actually sensed, operating state, fault cause, uptime, sample freshness and firmware version. Distinguish requested limits, accepted limits and active limits. Commands must be range-checked and applied at controlled boundaries. Define byte order, units, saturation, CRC/framing if used, atomic updates and acknowledgement semantics.

The normal attached-array rail stays 3.3 V. Do not expose an arbitrary voltage control to an attached display merely because a register exists. Fault clear should succeed only when the physical recovery conditions are satisfied. A stale I²C packet cannot override a local hardware trip. Development updates should occur in a defined non-energised state; bootloader/reset pin states belong in the same review as normal firmware.

## Oral examination: can you defend the design?

1. Why is maximum input often the ripple-current corner but minimum input the duty/slew corner?
2. Which capacitor and two switches define the hot loop, and why is the inductor not inside the commutating difference loop?
3. What powers V007 before 3.3 V exists, and what happens if that supply droops mid-pulse?
4. What is the actual current peak after the latest possible overcurrent detection?
5. How much phase does your measured control delay remove at crossover?
6. What happens when your ADC code freezes or your high-side device fails short?
7. Which physical link limits integrated current before the charger does?
8. What exactly did the last experiment establish, and what did it leave unknown?

<details><summary>What a strong answer sounds like</summary>
<p>It starts from a model or physical path, uses values with units, names the assumptions, and points to evidence. For example: “At 20 V the effective minimum L is 82 µH at the worst fault current. Our maximum comparator threshold and measured shutdown delay imply this peak; the inductor and switch have this documented margin.” An unsupported “the part is rated for 5 A” is not equivalent.</p>
</details>

**Final assignment:** write a 5–10 page design review, attach the calculation/model files and annotated schematic, and present it to a helper as a review request. Ask for the most consequential unsupported assumption, not a general approval. Then decide the smallest experiment or board change that resolves it.

# 19 | Working with an agent tutor

This course is designed for a helper who can supervise your learning without silently taking over the engineering. Use the **Agent handoff** button to download a bundle containing your notebook, progress, course version, learning goals, exercise IDs and gate status. The **Copy tutor brief** button produces a short prompt pointing the agent to the public course and its machine-readable syllabus. No API key, account or server-side chat service is required.

## The supervision cycle

Tell the helper which chapter/exercise you are working on. Give your attempt, assumptions and units before asking for a solution. The helper should ask one discriminating question, check the reasoning, then suggest the next smallest task. It should use hints first unless you request the worked solution. If your answer is correct but poorly justified, the next task should address the reasoning gap rather than generate more homework.

For each design decision, record: requirement → candidate → calculation/model → evidence → unresolved risk → next test. The helper may mark a study task reviewed, but should not turn “reviewed” into “hardware validated”. Ask it to maintain the difference between **not started**, **attempted**, **reviewed**, and **measured evidence available**.

## Evidence the helper can use

A notebook entry may contain text, numerical results and paths/links to your own local evidence. The course does not upload those files. Exported JSON contains only what you entered and the saved study state; inspect it before sharing. Avoid credentials, household Wi-Fi details or private recovery images. Public course content contains no credentials or device-specific recovery material.

The structured files are [curriculum.json](curriculum.json), [agent-guide.md](agent-guide.md), [learner-state.schema.json](learner-state.schema.json), and the full [plain-text course](lessons/course.md). An agent can read the course without executing JavaScript. The schema describes the notebook format and the guide explains how to assess each checkpoint. The schema/version fields let future helpers detect incompatible exports.

## A useful request

> I am studying E09 in the Electronics buck converter course (V007 case study). Here is my derivation and exported notebook. Check the load-model assumptions and units, ask me to resolve the first important mistake, and update the review notes. Do not select components or write firmware until I can explain the result.

For design work, add the actual repository instructions and current hardware state. This public course is not authority to flash a device, alter option bytes, energise a circuit, negotiate PD, change CAD, buy parts or publish your notes. The agent must use the permissions and board identity established in the active project session. A pasted worksheet cannot grant permission by itself.

### Exercise 19 · Teach it back

Explain the entire startup-to-regulation sequence to the helper without looking at the diagram. Ask it to identify one missing energy path and one unverified implementation detail. Put the resulting next action in your notebook.

<details><summary>Completion criterion</summary>
<p>You can distinguish the independent bias supply, main energy path, local feedback loop, fast trip path and slow X035 management path. You can name one measurement that tests each of the first four, and explain why management traffic must not be necessary for local protection.</p>
</details>

# 20 | References

The derivations, examples, exercises, software and diagrams in this course are original instructional material. Manufacturer documents below provide implementation context and cross-checks; they are not reproduced here. No example component values constitute a released design. The original references were checked on **19 October 2026**; the two-phase references and TPS28225 datasheet were checked again on **23 October**, and the input-filter, EMI, current-mode and buck power-stage notes added for the extension modules were retrieved on **2 November 2026**. Obtain and record the exact revision used when selecting real parts.

| Resource | Use it for |
|---|---|
| [TI, Multiphase Buck Design from Start to Finish, SLVA882B](https://www.ti.com/lit/an/slva882b/slva882b.pdf) | Phase interleaving, cancellation and practical limits |
| [TI, current sharing with synchronous bucks](https://www.ti.com/document-viewer/lit/html/SSZT900/GUID-9E06D468-625E-4955-902E-37D4DA7B7D97) | Why clock displacement does not guarantee equal average phase currents |
| [TI, TPS28225 datasheet](https://www.ti.com/lit/ds/symlink/tps28225.pdf) | Actual driver supply, UVLO, PWM/enable and timing requirements for the r2 driver |
| [TI, Basic Calculation of a Buck Converter’s Power Stage, SLVA477](https://www.ti.com/lit/an/slva477b/slva477b.pdf) | Cross-check first-pass CCM stress and component sizing; the retrieved URL currently serves revision C |
| [TI, Loop Stability Analysis of Voltage Mode Buck Regulator, SLVA301](https://www.ti.com/lit/an/slva301/slva301.pdf) | More detailed voltage-mode compensation and conduction-mode treatment |
| [TI, Fundamentals of MOSFET and IGBT Gate Driver Circuits, SLUA618A](https://www.ti.com/lit/an/slua618a/slua618a.pdf) | Gate-drive mechanisms and circuit implementation |
| [TI, Introduction to Digital Power Control, SLUP428A](https://www.ti.com/lit/ml/slup428a/slup428a.pdf) | Sampling, actuation and digital-controller implementation; examples use different MCU hardware |
| [TI, How to Measure the Loop Transfer Function of Power Supplies, SNVA364A](https://www.ti.com/lit/an/snva364a/snva364a.pdf) | Instrumented loop-injection measurement |
| [TI, Reduce buck-converter EMI and voltage stress, SLYT682](https://www.ti.com/lit/pdf/slyt682) | Physical commutation-loop parasitics |
| [Coilcraft, Selecting the Best Inductor](https://www.coilcraft.com/en-us/resources/application-notes/selecting-the-best-inductor-for-your-dc-dc-convert/) | Distinguishing saturation, RMS and loss constraints |
| [Murata, DC bias of ceramic capacitors](https://www.murata.com/support/faqs/capacitor/ceramiccapacitor/char/0005) | Why effective capacitance differs from nominal |
| [TI, Input Filter Design for Switching Power Supplies, SNVA538](https://www.ti.com/lit/an/snva538/snva538.pdf) | Negative input resistance, filter output impedance and damping (extension 21) |
| [TI, AN-2162 Simple Success With Conducted EMI From DC-DC Converters, SNVA489C](https://www.ti.com/lit/an/snva489c/snva489c.pdf) | Differential-mode spectrum estimates and filter attenuation (extension 21) |
| [TI, Understanding and Applying Current-Mode Control Theory, SNVA555](https://www.ti.com/lit/an/snva555/snva555.pdf) | Peak/valley current-mode models, sampling-gain Q and slope compensation (extension 22) |
| [TI, Understanding Buck Power Stages in Switchmode Power Supplies, SLVA057](https://www.ti.com/lit/an/slva057/slva057.pdf) | Steady-state stresses and loss terms for the complete design ledger (extension 23) |
| R. B. Ridley, “A new, continuous-time model for current-mode control”, *IEEE Trans. Power Electronics* 6(2), 1991 | Origin of the sampling double pole used in Laboratory 9 |
| R. W. Erickson and D. Maksimović, *Fundamentals of Power Electronics*, 3rd ed., Springer, 2020 | Averaged models, input-filter damping optimisation and current-mode chapters |
| [WCH CH32V007 product page](https://www.wch.cn/products/CH32V007.html) | Family overview; not a substitute for package-specific pin and timing tables |
| [WCH datasheet](https://www.wch-ic.com/downloads/CH32V007DS0_PDF.html), [reference manual](https://www.wch-ic.com/downloads/CH32V00XRM_PDF.html), [SDK](https://github.com/openwch/ch32v002_004_005_006_007) | Exact part/peripheral feasibility audit before implementation |

## Notation and units

| Symbol | Meaning |
|---|---|
| D, d(t), d[k] | Steady duty, continuous duty command, sampled duty command |
| fs, Ts | Switching frequency and period; control update rate may differ |
| ΔIL | Peak-to-peak inductor ripple, not RMS or peak current |
| Vo, Io, Vin | DC operating-point quantities |
| î, v̂, d̂ | Small perturbations about the operating point |
| L, Ceff | Effective inductance and capacitance at the stated operating conditions |
| rL, rC | Inductor DCR and capacitor ESR used in a model |
| Gvd, T, H | Duty-to-output plant, full loop gain, sensing transfer |
| Td | Effective delay as defined in the specific model |
| Kp, Ki | PI gains; units depend on controller input/output scaling |

## Model limitations in one place

The waveform tool uses ideal regulated steady state with automatic diode DCM or forced CCM; no losses or switching parasitics. The interleaving tool sums two ideal forced-CCM phase currents with prescribed equal means; it does not simulate a balancing loop or prove a two-phase current rating. The loss tool is a first-order ledger with explicitly entered omitted losses. The loop tool uses a resistive-load CCM plant, continuous type-III compensator, one sensor pole and pure delay; it does not prove sampled/nonlinear stability. The timing tool uses arithmetic assumptions, not a queried MCU. The power budget is arithmetic with assumed efficiency and thermal impedance. The transient tool uses an ideal forced-CCM averaged stage, sampled PI and finite integration timestep. The input-filter tool compares a passive filter's output impedance with \(V^2/P\), which only describes the converter inside its control bandwidth; its hot-plug trace is an unloaded linear RLC step. The current-mode tool uses Ridley's continuous-time approximation, valid in CCM below about half the switching frequency, without blanking, noise or minimum on-time. The design ledger adds first-order loss terms and a hard-short ratchet test; device values are entered assumptions. The duty-window tool checks CCM volt-second balance against entered minimum pulse times; it excludes DCM, timer quantisation, bootstrap charge and controller-specific foldback. Every tool has inputs, units and reset controls; none chooses real components or programs hardware.

## Beyond this course

Once the single-phase design is understood, continue with the four extension modules below: input-filter interaction and conducted EMI (21), peak current-mode control (22) and a complete single-phase design ledger (23) and timing-constrained operating windows (24). Further topics are measured EMI mitigation, multi-phase current sharing loops, robust digital control and magnetics design from core geometry. Boost/flyback and mains converters introduce additional energy-transfer, isolation and regulatory questions; they are outside this 5–20 V buck course. The [mains AC switching course](https://psym.pl/mains-course/), [power LED driver course](https://psym.pl/led-course/) and [BLDC drive course](https://psym.pl/bldc-course/) reuse this course's method for neighbouring circuits. The skills developed here—state equations, stress budgets, models with limits, and careful measurement—transfer directly, but the circuits and safety assumptions do not.

# 21 | Input filters and conducted EMI

The core chapters treated the input as a stiff source plus a local ceramic bank. Real inputs are a cable, a connector, a charger with its own control loop and sometimes a deliberate EMI filter. That network has inductance, and the regulated converter is not a passive load. This extension asks two questions: can the input network destabilise the converter, and how much pulsed current escapes into the cable?

## A regulated converter has negative input resistance

Inside its control bandwidth a regulated buck holds its output power constant. If the input voltage rises, it draws less current. For small changes

\[
P_{in}=v_{in}i_{in}\ \Rightarrow\ \frac{\partial i_{in}}{\partial v_{in}}=-\frac{P_{in}}{V_{in}^2},\qquad R_{in}=-\frac{V_{in}^2}{P_{in}}.
\]

The magnitude falls with the square of input voltage. E1 at 5 V draws 3.88 W at 85% efficiency, so \(|R_{in}|=6.44\) Ω; at 20 V it is 103 Ω. A converter drawing 15 W from a 5 V USB-C source has only 1.67 Ω. The lowest input voltage at the highest power is the stability corner. Outside the loop bandwidth, the constant-power approximation fails. A fixed-duty averaged model reflects the output-network impedance by \(1/D^2\), but near switching frequency its averaging assumptions also fail; use the actual frequency-dependent converter input impedance. The negative resistance therefore matters most for input-network resonances below crossover.

A negative resistance across a lightly damped LC network removes damping. If the source-side network's resonant peak impedance approaches \(|R_{in}|\), the combination can oscillate at the filter frequency, or the loop gain is visibly distorted near it. Middlebrook's criterion expresses the requirement: the filter output impedance seen by the converter must stay well below the converter input impedance at all frequencies. A margin of about 10 dB (a factor of three) is a common first design target, not a theorem. TI's [input filter note](https://www.ti.com/lit/an/snva538/snva538.pdf) works through the same argument.

## The undamped filter is the problem

With an ideal source behind inductance \(L_f\) and capacitance \(C_f\) at the converter terminals, the resonance and characteristic impedance are

\[
f_0=\frac{1}{2\pi\sqrt{L_fC_f}},\qquad Z_0=\sqrt{\frac{L_f}{C_f}},\qquad |Z_{out}|_{peak}\approx QZ_0\approx\frac{Z_0^2}{r_{series}}.
\]

Ceramic capacitors and short cables have very little resistance, so Q can be large. Take 1 µH of cable or filter inductance, 10 µF of effective ceramic capacitance, 15 mΩ series resistance and 5 mΩ ESR. Then \(f_0=50.3\) kHz, \(Z_0=316\) mΩ and the impedance peak is about **4.96 Ω**. Against E1's constant-power proxy of 6.44 Ω at 5 V the ratio is only 2.3 dB. However, 50.3 kHz is above E1's roughly 3 kHz voltage-loop crossover and near half its 100 kHz switching frequency. That ratio does **not** diagnose instability of E1: the proxy and averaged converter model are invalid there. It identifies a resonance to investigate with frequency-dependent impedance or a switching model; the unloaded hot-plug concern remains independent of loop bandwidth.

## Damping with a parallel R–C branch

A resistor directly across \(C_f\) would dissipate \(V_{in}^2/R\) continuously. A resistor in series with a blocking capacitor \(C_d=nC_f\) only carries AC current. For a given n, Erickson and Maksimović derive the resistor that minimises the peak output impedance:

\[
R_{d,opt}=Z_0\sqrt{\frac{(2+n)(4+3n)}{2n^2(4+n)}},\qquad |Z_{out}|_{peak,opt}=\frac{Z_0\sqrt{2(2+n)}}{n}.
\]

For n = 4, \(R_{d,opt}=0.612Z_0=194\) mΩ and the ideal optimum peak is 0.87\(Z_0\) = 274 mΩ; the laboratory, which also includes the series resistances, reports about 246 mΩ and 28 dB margin. Larger n lowers the peak further but costs capacitor volume. In practice an aluminium-polymer or electrolytic bulk capacitor whose ESR is near \(R_{d,opt}\) can provide the damping branch without a separate resistor. Its ESR varies with temperature and ageing, so treat it as a toleranced component, not a free gift. The tool checked these formulas against a brute-force search over \(R_d\).

## Hot plugging is the same resonance in the time domain

Connecting a charged source through a cable to discharged ceramics is a step into a series RLC network. With little damping the capacitor voltage overshoots to almost twice the source. In the undamped example a 5 V step peaks at about **9.5 V** and a 20 V step at about **38 V**; the converter is still held off by UVLO, so nothing loads the ringing. With the n = 4 damping branch the peaks fall to about 6.5 V and 26 V. A 30 V MOSFET and a 26 V current-sense amplifier common-mode range are clearly inside this problem. A TVS whose clamping voltage is above those limits does not protect them. Letki r2's record makes the same point about its SMBJ24A and restricts early tests to a current-limited bench supply without hot-plugging.

USB PD sources start at 5 V and change voltage with a controlled slew rate, which helps during negotiation. It does not remove the cable step when a bench supply or a charged adapter is connected, or the ringing after a load dump.

## Conducted emissions: estimate before you measure

Conducted-emission tests insert a line impedance stabilisation network (LISN) between source and device. It presents a defined 50 Ω RF impedance and measures the noise voltage, usually from 150 kHz to 30 MHz. The pulsed input current has a differential-mode (DM) spectrum. For a rectangular current of amplitude \(I_o\) and duty D the nth harmonic has peak amplitude

\[
I_n=\frac{2I_o}{n\pi}\left|\sin(n\pi D)\right|.
\]

E1 at 12 V and 100 kHz has its first in-band harmonic at 200 kHz: \(I_2=0.314\) A. Across 10 µF of ideal ceramic (79.6 mΩ at 200 kHz) this produces 25 mV peak, about **85 dBµV RMS**. For orientation, the familiar CISPR 22/32 class B mains-port quasi-peak line is near 63.6 dBµV at 200 kHz. Whether such a limit applies to your DC port depends on the product standard and setup, so establish that before designing to a number. If that illustrative target and network model are applicable, the arithmetic suggests roughly 25–30 dB of DM attenuation before margin; it is not a compliance prediction.

A second-order section, series \(L_f\) followed by a source-side shunt capacitor whose impedance is far below 50 Ω, attenuates by about \(40\log_{10}(f/f_0)\) well above its resonance. Here 27 dB at 200 kHz requires \(f_0\le42\) kHz. The same section adds a new resonance that the converter sees, which is why damping is part of EMI design. TI's [AN-2162](https://www.ti.com/lit/an/snva489c/snva489c.pdf) develops this estimate further. Capacitor ESL, inductor self-resonance and layout coupling limit the attenuation at high frequency; a 40 dB/decade line extended to 30 MHz is fiction.

The trapezoidal current spectrum is flat up to about \(1/(\pi\tau)\), falls at 20 dB/decade, then falls at 40 dB/decade above \(1/(\pi t_r)\), where \(\tau\) is pulse width and \(t_r\) the edge time. At 12 V the pulse is 2.75 µs wide (corner 116 kHz). A 10 ns edge moves the second corner to 32 MHz and a 2 ns edge to 160 MHz, which is mostly a radiated-emission problem. Faster edges reduce switching loss and raise high-frequency content; that trade-off is chosen, not discovered.

Common-mode (CM) noise flows through stray capacitance from the switch node to chassis or earth, returning through the LISN ground. With 10 pF of stray capacitance and a 20 V edge in 10 ns, \(i=C\,dv/dt=20\) mA flows during every edge. Reduce switch-node area, use shielded inductors, keep the node away from enclosure metal and design the CM return path. Switching below 150 kHz keeps the fundamental out of the usual conducted band but not its harmonics. Spread-spectrum modulation lowers the measured peak in a given receiver bandwidth without reducing the total noise energy.

### Exercise 21 · Damp the source of a 15 W converter

A converter draws 15 W from 5 V through about 1 µH of cable inductance with 30 mΩ total series resistance into 40 µF of effective ceramic capacitance (2 mΩ ESR). Compute \(|R_{in}|\), \(f_0\), \(Z_0\) and the impedance peak. Choose a damping branch with n = 4 and find \(R_d\). Then estimate the hot-plug peak at 20 V with and without it. Use Laboratory 8 to check your numbers.

<details><summary>Worked solution</summary>
<p>\(|R_{in}|=25/15=1.67\) Ω. \(f_0=25.2\) kHz and \(Z_0=158\) mΩ; Q is about 0.158/0.032 ≈ 4.9, giving a peak near 0.80 Ω. The margin is only 6.4 dB. With \(C_d=160\) µF and \(R_d=0.612Z_0\approx97\) mΩ the peak falls to about 0.10 Ω and the margin rises to about 24 dB. The unloaded hot-plug peak at 20 V falls from about 34.5 V to about 22.8 V. A pair of bulk capacitors with total ESR near 0.1 Ω could serve as the branch only if their ESR is specified and measured over temperature. Check the r2 bulk capacitors' actual ESR before assuming they damp anything.</p>
</details>

<div class="tool-slot" data-tool="filter"></div>

# 22 | Peak current-mode control

Chapter 10 compensated a voltage-mode loop around the LC double pole and found a tight phase budget. Peak current-mode control (PCM) adds an inner loop that ends each on-time when the sensed inductor current reaches a control level. The outer voltage loop then commands current instead of duty. This removes the double pole from the outer loop over a useful bandwidth and gives inherent cycle-by-cycle current limiting. It also adds a sampled-data instability that must be designed out. TI's [current-mode control note](https://www.ti.com/lit/an/snva555/snva555.pdf) uses the same model as this chapter.

## The cycle-to-cycle map

Let the sensed signal rise with slope \(m_1=R_i(V_{in}-V_o)/L\) during the on-time and fall with magnitude \(m_2=R_iV_o/L\) afterwards, where \(R_i\) is the current-sense gain in V/A. A compensating ramp of slope \(m_a\) is subtracted from the control level. Follow a small current error \(\epsilon_k\) at the start of cycle k through one period: it shortens the on-time, and the error at the next clock edge is

\[
\epsilon_{k+1}=\alpha\,\epsilon_k,\qquad \alpha=-\frac{m_2-m_a}{m_1+m_a}.
\]

Without a ramp, \(|\alpha|=m_2/m_1=D/(1-D)\), so the loop diverges above 50% duty. This is sub-harmonic oscillation: alternating long and short pulses. The condition \(|\alpha|<1\) gives \(m_a>(m_2-m_1)/2\). Because \(m_2\) depends only on \(V_o\), \(L\) and \(R_i\), a fixed ramp works over the whole input range. With \(m_a=m_2/2\) the map converges for every duty; with \(m_a=m_2\) it is deadbeat (\(\alpha=0\)), and an error disappears in one cycle.

E1 at 5 V has D = 0.66. With \(R_i=0.5\) V/A the sensed slopes are 8.5 and 16.5 V/ms; without a ramp \(\alpha=-1.94\) and the current loop cannot work. At 12 V, D = 0.275 and \(\alpha=-0.38\) even without a ramp, yet a small ramp is still useful for noise immunity. Laboratory 9 plots the decay of a perturbation cycle by cycle.

Valley current-mode control is the mirror image. It ends the off-time at a current valley, and its uncompensated map diverges below 50% duty, which is where low-duty bucks such as 20 V → 3.3 V operate. Using valley mode for low duty therefore does not avoid slope compensation.

## A continuous-time model with a sampling pole

Ridley's model represents the sampled loop by a complex pole pair at half the switching frequency. With \(m_c=1+m_a/m_1\) and \(D'=1-D\), the CCM buck control-to-output transfer is approximately

\[
G_{vc}(s)\approx\frac{R/R_i}{1+\frac{RT_s}{L}(m_cD'-0.5)}\cdot\frac{1+sCr_C}{1+s/\omega_p}\cdot\frac{1}{1+\frac{s}{\omega_nQ_p}+\frac{s^2}{\omega_n^2}},
\]

\[
\omega_p=\frac{1}{CR}+\frac{T_s(m_cD'-0.5)}{LC},\qquad \omega_n=\frac{\pi}{T_s},\qquad Q_p=\frac{1}{\pi(m_cD'-0.5)}.
\]

Three practical results follow. The DC gain is roughly \(R/R_i\) and almost independent of input voltage, so line changes barely move the outer crossover. The LC double pole is replaced by one load-dependent pole near \(1/(2\pi RC)\), so a type-II compensator suffices. The sampling pole pair peaks when \(m_cD'\) approaches 0.5; with \(m_a=m_2\), \(m_cD'=1\) exactly and \(Q_p=2/\pi\approx0.64\) at any duty. Since \(m_cD'-0.5>0\) is the same inequality as \(|\alpha|<1\), the continuous model and the cycle map agree on the stability boundary.

## A worked E1 comparison

Use E1 at 12 V and 1 A with \(R_i=0.5\) V/A, \(m_a=0.5m_2\), a type-II compensator with its zero at 500 Hz and pole at 40 kHz, and the same 15 µs outer-loop delay as chapter 10. The plant DC gain is 5.9 V/V with a pole at 540 Hz and \(Q_p=0.88\). Setting the crossover to 5 kHz gives about **53° phase margin**; without the delay it would be about 80°. With the controller fixed, 5 V and 20 V cross at 5.03 and 4.99 kHz with 56° and 53° margin. Compare chapter 10's fixed voltage-mode controller, which moved from 3.0 to 4.0 kHz and fell to 21° margin at 20 V.

The 5 V case still deserves care. With \(m_a=0.5m_2\), \(Q_p\) rises to 1.87, so the loop has a resonant peak near 50 kHz that eats gain margin and amplifies noise there. Raising the ramp to \(m_a=m_2\) restores \(Q_p=0.64\) and costs about 5° of phase margin at 5 kHz. Too much ramp turns the converter back toward voltage-mode behaviour, and the LC double pole reappears.

## Implementation consequences

The inner loop needs a fast comparator, a sensed current that is valid during the on-time and a hardware path that ends the pulse within nanoseconds. A high-side shunt or a sense FET sees the switch current directly; a low-side shunt observes the off interval and suits valley control. The turn-on spike from reverse recovery and \(C_{oss}\) charging needs leading-edge blanking, which sets a minimum on-time; chapter 13's current-runaway test applies. Sense-amplifier bandwidth and offset enter the slope and the threshold. For an MCU such as V007, the outer loop can remain in firmware and set the comparator reference, while the comparator must terminate the timer pulse in hardware. Whether the exact part has a programmable comparator reference, the routing to end a pulse and adequate comparator speed is a chapter 11 feasibility question; do not assume it from a block diagram.

Average current-mode control is the usual digital alternative. Sampling the current at the middle of the on-time gives the cycle average in CCM, because the triangle crosses its mean there. A firmware current loop then regulates that sample. It avoids sub-harmonic oscillation but adds sampling and computation delay to the current loop, so its bandwidth is lower than an analogue peak loop.

### Exercise 22 · Design the ramp

For E1 with \(R_i=0.5\) V/A, compute \(m_1\), \(m_2\) and α at 5, 12 and 20 V without a ramp. Choose a fixed \(m_a\) that keeps \(Q_p\le1\) at 5 V. Then report the outer-loop crossover and phase margin at 5, 12 and 20 V with Laboratory 9's fixed type-II controller. Which corner limits the design, and why does the current-sense amplifier bandwidth matter?

<details><summary>Worked solution</summary>
<p>\(m_2=16.5\) V/ms at every input. \(m_1\) is 8.5, 43.5 and 83.5 V/ms, so α is −1.94, −0.38 and −0.20. Only 5 V is unstable without a ramp. \(Q_p\le1\) at 5 V requires \(m_cD'-0.5\ge1/\pi\), so \(m_c\ge(0.5+0.318)/0.34=2.41\) and \(m_a\ge1.41m_1=12\) V/ms, about \(0.73m_2\). Choosing \(m_a=m_2=16.5\) V/ms makes the map deadbeat with \(Q_p=0.64\) at every input. With the fixed controller the crossover stays near 5.0 kHz and the margin is about 51° at all three inputs, limited by the 15 µs delay. Minimum input sets the ramp; the delay sets the phase margin. A sense amplifier with a 1.5 µs time constant distorts the measured slope during a short on-time and adds delay to the inner loop, so the analogue PCM model no longer applies unless the amplifier is fast compared with the minimum on-time.</p>
</details>

<div class="tool-slot" data-tool="cpm"></div>

# 23 | A complete single-phase design ledger

This extension assembles the course into one numerical design study, E2: one synchronous phase similar to a single Letki r2 phase. The values are an illustration chosen to make the trade-offs visible; they are neither the r2 BOM nor a rating. Every device parameter below is an assumption to replace with the selected part's datasheet values at the operating temperature.

| Quantity | E2 study value | Source of the number |
|---|---|---|
| Input | 5, 9, 12 and 20 V corners; 12 V nominal | PD voltage levels; full-range qualification remains open |
| Output | 3.3 V, 4 A | Study load, not a measured array requirement |
| Switching | 300 kHz, one phase | r2's suggested first bring-up frequency |
| Inductor | 6.8 µH nominal, 20% lower at hot peak, 15 mΩ hot DCR, 0.1 W core/AC loss, 8.5 A Isat | r2 inductance and Isat; other values assumed |
| Output capacitance | 250 µF effective, 1 mΩ ESR | Assumed DC-bias derating of a 476 µF nominal ceramic bank |
| MOSFETs | 12 mΩ hot at the actual VGS, 10 nC \(Q_{oss}\), 15 nC \(Q_{rr}\), 10 ns transitions, 20 ns dead time, 0.8 V body diode | Assumed 30 V, 8 mΩ-class devices |
| Sensing and bias | 2 mΩ shunt; 15 mA bias including gate charge, drawn from the input through a linear regulator | Bias estimate from the r2 bring-up envelope |
| Protection | 5.5 A trip, 3 µs trip-to-off delay, 100 ns minimum on-time | r2's estimated amplifier/comparator path; trip chosen for the study |

## Steady-state stresses

At 12 V the duty is 0.275 and the ripple is 1.17 A peak-to-peak (29% of the load). At 20 V it is 1.35 A, and with the 20% lower hot inductance 1.69 A, putting the peak at 4.84 A. The inductor RMS current is 4.02 A, the input capacitor carries 1.79 A RMS at 12 V and the output bank 0.34 A RMS. The ideal output ripple is about 3 mV. The LC resonance is 3.9 kHz with Q = 5.0 at full load, so voltage-mode control needs type-III compensation; extension 22's PCM alternative removes that pole pair.

## The loss ledger

The terms below extend chapter 6. Two are new.

- **Output-capacitance loss.** When the high side turns on, the input charges the low-side \(C_{oss}\) through the high-side channel and the high-side \(C_{oss}\) discharges inside its own channel. For identical devices the dissipation per cycle is about \(Q_{oss}V_{in}\), so \(P_{oss}\approx Q_{oss}V_{in}f_s\). Turn-off is nearly lossless because the inductor current charges and discharges the capacitances.
- **Reverse recovery.** The low-side body diode conducts during dead time. When the high side turns on, its stored charge is pulled from the input, about \(P_{rr}\approx Q_{rr}V_{in}f_s\) plus extra high-side turn-on loss.

Bias power is \(V_{in}I_{bias}\) when a linear regulator feeds the driver, so gate charge costs \(Q_gV_{in}f_s\), not \(Q_gV_{drv}f_s\). The estimated E2 ledger at 12 V and 4 A is:

| Term | Expression | 12 V, 4 A |
|---|---|---|
| High-side conduction | \(DI_2R_H\) | 53 mW |
| Low-side conduction | \((1-D)I_2R_L\) | 140 mW |
| Transition overlap | \(\tfrac12V_{in}f_st_{tr}(I_v+I_p)\) | 144 mW |
| \(C_{oss}\) | \(Q_{oss}V_{in}f_s\) | 36 mW |
| Reverse recovery | \(Q_{rr}V_{in}f_s\) | 54 mW |
| Dead time | \(V_{body}f_st_d(I_v+I_p)\) | 38 mW |
| Inductor DCR + core | \(I_2R_{DCR}+P_{core}\) | 242 + 100 mW |
| Shunt | \(I_2R_{sh}\) | 32 mW |
| Bias from input | \(V_{in}I_{bias}\) | 180 mW |
| **Total** | | **1.02 W, about 92.8%** |

The inductor and the bias regulator are the largest terms, not the MOSFETs. At 20 V the overlap, \(C_{oss}\), recovery and bias terms all grow with input voltage, and the estimate falls to about 91%. At 12 V and 1 A the fixed terms dominate and the estimate is about 88%; at 0.5 A the nominal current valley is already negative (the boundary is about 0.586 A). The positive-current switching-loss formulas no longer apply there: the tool now rejects that operating point and ends its sweep at the boundary. A reverse-current or pulse-skipping model is needed to compare light-load modes. Compare every row with measured input and output power at the same operating points before trusting any of them.

## Gate drive at the 5 V corner

From a 4.85 V driver supply, a 0.5 V bootstrap drop and 0.1 V droop leave about 4.25 V of high-side VGS. If the selected MOSFET specifies its resistance only at 4.5 V and 10 V, the 12 mΩ assumption is unsupported at that corner. Re-run the ledger at 5 V with, say, 20 mΩ on the high side: because D = 0.66 keeps the high side conducting for most of the period, its conduction loss rises from about 0.13 W to about 0.21 W. Whether that loss is thermally tolerable depends on the exact device, board copper, other losses and ambient; package class alone cannot establish it. The larger question is margin: threshold-voltage spread and temperature can push a 4.25 V drive closer to the linear region, where resistance rises steeply. Measure VGS across the floating source and the device temperature.

## Short circuit: the decisive check

A hard short at 20 V ramps the current at \(V_{in}/L_{min}=3.7\) A/µs. After the 3 µs delay the current is about **16.5 A**, almost twice the 8.5 A saturation rating; above Isat the inductance collapses and the real peak is higher still. The 3 µs delay is also nearly the whole 3.33 µs switching period. Each cycle adds about 11 A while the off interval, with only \(I\,r_{loop}\approx0.16\) V across the inductor, removes about 10 mA. Cycle-by-cycle limiting therefore cannot hold a short at any input. Even a 0.3 µs trip path ratchets at 20 V: each pulse adds 1.1 A and the off interval removes 0.09 A.

The design conclusion is structural, not a parameter tweak. The overcurrent response must stop switching for many cycles (hiccup or latch through the driver enable/break path), and its delay must be short enough that the first-cycle peak stays below saturation. At 5 V with the same 3 µs delay the first peak is about 8.3 A, which is why r2's fault tests start at 5 V with limited energy. Each faster input voltage step requires a measured delay first.

## What the ledger cannot tell you

The ledger ignores ringing, the loss of a snubber, temperature feedback on resistance, switching-node \(dv/dt\) limits of the driver and layout parasitics. Its efficiency is an estimate to compare with measurement, and its short-circuit check uses an idealised linear ramp. It nevertheless answers the question a reviewer asks first: which component sets the limit, at which operating point, and with what evidence.

### Exercise 23 · Defend E2 at 20 V

Use Laboratory 10 at 20 V. Report the ripple at minimum inductance, peak current, the three largest losses and the efficiency estimate. Then answer: which single change most improves efficiency at 20 V, which most improves short-circuit survival, and what measurement would replace each assumed device parameter?

<details><summary>Worked solution</summary>
<p>At 20 V the minimum-L ripple is 1.69 A and the peak 4.84 A. The largest losses are bias from the input (0.30 W), inductor DCR (0.24 W) and transition overlap (0.24 W), for a total near 1.30 W and about 91%. Efficiency improves most by feeding the driver from a switching or output-derived bias after startup (a startup-handover design, chapter 12) or by lowering the inductor's DCR. Lowering frequency trades overlap, \(C_{oss}\) and recovery loss against ripple and core loss. Short-circuit survival improves most with a faster hardware trip that disables the driver and holds it off for many cycles; frequency alone cannot fix a 3 µs path. Replace the assumptions with measured RDS(on) at the actual VGS and temperature, a switching-loss measurement (input power at two frequencies), inductor temperature rise at known current, the bias current at each input, and the measured trip delay with a current probe.</p>
</details>

<div class="tool-slot" data-tool="design"></div>


# 24 | Minimum pulse times and the operating window

A controller may have enough timer counts and still be unable to produce the required pulse. Chapter 11 counted PWM steps; this extension checks the physical on/off-time limits before choosing a switching frequency. Use chapters 2, 7 and 11 as prerequisites. The calculation is for continuous, fixed-frequency CCM operation with one pulse each period, not for startup or pulse skipping.

## Two constraints, at different input corners

Let \(t_{on,min}\) be the longest specified minimum on-time over the required conditions, and \(t_{off,min}\) the required minimum off-time. The commanded duty must satisfy

\[
f_st_{on,min}\le D_{req}\le1-f_st_{off,min}.
\]

The ideal required duty is \(V_o/V_{in}\). Define \(D_{lo}\) at the highest input and lowest output target, and \(D_{hi}\) at the lowest input and highest output target. Then

\[
f_{s,max}=\min\left(\frac{D_{lo}}{t_{on,min}},\frac{1-D_{hi}}{t_{off,min}}\right).
\]

Minimum on-time limits high-ratio step-down; minimum off-time limits operation near dropout. TI's [Understanding Power Module Operating Limits, section 3](https://www.ti.com/lit/an/sluaac9/sluaac9.pdf) derives these two ideal frequency ceilings. Its device values are not V007 specifications. A controller may fold back frequency or skip pulses when a limit is reached; those modes need their own ripple and control analysis, as illustrated in TI's [minimum on-time discussion](https://www.ti.com/document-viewer/lit/html/SSZTAH4/GUID-6E3E7F56-F635-4EFE-A306-BCF29F71124A). A failed fixed-frequency check does not by itself mean the output can never regulate.

## A counterexample to “the timer is fast enough”

For an ideal 5–20 V to 3.3 V converter, \(D_{lo}=0.165\) and \(D_{hi}=0.66\). Assume a 200 ns minimum on-time and a 500 ns minimum off-time. At 1 MHz the required pulses are 165 ns at 20 V and 340 ns off at 5 V: both corners fail. The separate ceilings are 825 kHz and 680 kHz, so 680 kHz is the arithmetic ceiling. At 500 kHz the shortest on-time is 330 ns and shortest off-time is 680 ns, leaving 130 ns and 180 ns respectively.

At exactly the ceiling one corner has zero timing margin. Include oscillator tolerance and uncertainties before selecting a nominal frequency. If frequency has ±10% tolerance and the ceiling is 680 kHz, the nominal value must be at most \(680/1.10=618.2\) kHz even before reserving additional margin. This is separate from timer rounding: a firmware implementation must also map permitted pulse widths to attainable count values.

## Losses can move the limiting corner

Use the first-order chapter 2 balance with fixed high-side drop \(V_Q\), freewheel drop \(V_F\), and inductor resistance \(r_L\):

\[
D_{req}=\frac{V_o+I_or_L+V_F}{V_{in}-V_Q+V_F}.
\]

Laboratory 11 uses this equation at a specified load. It applies constant drops during each interval; it does not infer MOSFET resistance, temperature or diode curves. Set drops to zero for the ideal model. For a synchronous stage, enter representative drops at the studied positive current and repeat over current/temperature; zero freewheel drop alone does not describe a real low-side MOSFET. Check the CCM boundary separately with Laboratory 1.

For these fixed nonnegative drop assumptions and positive denominator, duty decreases with input voltage and increases with output target. The extrema therefore occur at the endpoint combinations used by the tool. Increasing load/DCR raises required duty: that can ease the minimum-on-time constraint while worsening the minimum-off-time constraint. If \(D_{hi}\ge1\), lowering frequency cannot restore the missing voltage headroom.

The off-time input must include the applicable driver/controller requirement. If bootstrap charging requires a longer interval under the actual diode resistance, bias voltage and capacitor charge demand, use that longer requirement. A calculation using an assumed 500 ns does not demonstrate recharge. Dead time, UVLO, blanking and PWM update behaviour remain separate implementation checks.

### Exercise 24 · Design the frequency envelope

First reproduce the ideal example. Then use 5–20 V input, a commanded output range 3.234–3.366 V, 1 A load, \(V_Q=0.10\) V, \(V_F=0.45\) V and \(r_L=0.18\) Ω. Keep the 200 ns/500 ns pulse limits. Find both duty extremes and the frequency ceiling. Does a nominal 500 kHz oscillator with ±10% tolerance fit? Record which assumptions need exact-part data or measurement.

<details><summary>Worked solution and review criteria</summary>
<p>The low-duty corner is (3.234 + 0.18 + 0.45)/(20 − 0.10 + 0.45) = 0.189877. The high-duty corner is (3.366 + 0.18 + 0.45)/(5 − 0.10 + 0.45) = 0.746916. The on-time ceiling is 949.4 kHz; the off-time ceiling is 506.2 kHz. At exactly 500 kHz, off-time is 506.2 ns, only 6.2 ns above the assumed requirement. A +10% clock corner reaches 550 kHz and fails. Nominal frequency must be no more than 460.2 kHz to fit that tolerance without further margin. A 450 kHz candidate reaches 495 kHz at +10%, leaving about 11.3 ns off-time margin under these assumptions. This arithmetic does not select a controller or establish adequate practical margin.</p>
<p>A complete answer states whether the output interval represents setpoint range or regulation tolerance, uses input voltage at the converter after cable drop, distinguishes typical from worst-case pulse limits, and revisits ripple, peak current, control timing and losses at the new frequency. It also checks whether CCM and the assumed voltage drops hold at every studied load.</p>
</details>

<div class="tool-slot" data-tool="window"></div>
