Appearance
Chapter 6 — Numerical issues of switching
Switching is where a clean EMT method meets a messy reality: events happen between the grid points, and the trapezoidal rule that served Module 1 so well has one notorious weakness that switching triggers. This short chapter is about the two numerical hazards every power-electronics simulation faces — switching-instant error and trapezoidal chatter — the standard remedies, and the practical rule for choosing a time step when a converter is switching at kilohertz rates.
Learning objectives
By the end of this chapter you should be able to:
- Explain why a switching event that falls between time steps causes error, and how interpolation to the switching instant fixes it.
- Describe trapezoidal chatter after an inductive current interruption and why it appears.
- Name the standard remedies — critical-damping adjustment and interpolation — and why backward Euler damps.
- Choose a time step from a steps-per-switching-period budget and diagnose a step that is too coarse.
6.1 Events fall between the grid points
The EMT engine advances on a fixed grid
The remedy production engines use is interpolation: detect that a crossing happened during the step, interpolate the network solution back to
6.2 Trapezoidal chatter
Chapter 2 flagged the trapezoidal rule's one vice: after an abrupt event it can produce a sustained numerical oscillation — chatter — that does not decay. The classic trigger is interrupting an inductor current: opening a switch in series with an inductor that is carrying current.
Why does it happen? The trapezoidal rule assumes each quantity varies linearly across the step. Forcing an inductor current to jump violates that assumption, and the inductor's companion model (a conductance
Chatter is purely numerical: it lives at two samples per cycle, does not depend on any physical
6.3 Remedies
Two techniques, often used together, tame switching numerics:
- Interpolation to the switching instant (§6.1). By switching at
rather than at the next grid point, the engine avoids the mistimed jump that seeds chatter in the first place. - Critical-damping adjustment (CDA). Right after a discontinuity, replace the trapezoidal rule with a couple of half-steps of backward Euler, then resume trapezoidal. Backward Euler is strongly dissipative (L-stable): it kills the Nyquist-rate oscillation in a step or two without distorting the physical response. Because it is applied only for the brief window around the event, the second-order accuracy of trapezoidal integration is preserved everywhere else.
You do not have to invoke these by hand — a mature engine applies them around detected switching events. The point for you as a user is to recognize the symptom (a fast, non-decaying buzz right after a switching event) and know that it is a numerical artifact, not a physical result.
6.4 Choosing the time step for a switching circuit
Module 1's rule of thumb — step an order of magnitude below the fastest period of interest — becomes concrete for a converter. If it switches at frequency
You want
which is plenty: each on/off interval is resolved by about a hundred samples, so the duty of
6.5 Lab: resolve the switching, then starve it
Open the buck converter in app →
(Full description: buck converter.)
The buck is a good bench for the step-size effect. As shipped (Vm and Vout: the switch node is a crisp
- Starve the resolution. Increase the document time step toward the switching period (
gives ; gives ). Re-run and watch Vmcoarsen into a ragged staircase and the averageVoutdrift as the duty can no longer be represented — a direct view of the switching-instant error of §6.1. - Reason about chatter. The buck does not chatter, and that is instructive: its freewheeling diode (Chapter 5) always gives the inductor current a path, so the current is never hard-interrupted. Chatter needs an inductive branch that is truly opened with nowhere for the current to go. Well-designed converters — like this one — avoid the condition by construction.
A dedicated chatter demo is on the roadmap
A minimal "switch in series with an inductor, opened on command" circuit makes chatter and its damping remedy vivid. That course-specific sample is planned; until then, the buck lets you explore the step-size half of the story.
6.6 Summary
- Switching events fall between grid points; acting only at the next grid point mistimes the switch by up to
. Interpolation to the true instant fixes it. - Trapezoidal chatter is a sustained, non-decaying Nyquist-rate oscillation seeded by interrupting an inductor current; it is numerical, not physical.
- The standard remedies are interpolation plus critical-damping adjustment (a brief backward-Euler window that dissipates the oscillation).
- Budget the step by a steps-per-switching-period count
; the buck's is comfortable, and coarsening it visibly degrades the waveform.
6.7 Problems
Problem 6.1. A converter switches at
Solution 6.1
Problem 6.2. Why is an explicit rule like forward Euler a poor choice for a switching circuit, even setting chatter aside?
Solution 6.2
Forward Euler is only conditionally stable: on a stiff circuit (large conductance ratios, small
Problem 6.3. You see a fast oscillation right after a breaker opens in your simulation. How can you decide whether it is real ringing or numerical chatter?
Solution 6.3
Check three things. (1) Frequency: chatter sits at the Nyquist rate — two samples per cycle, alternating sign each step — whereas real ringing has a physical frequency
Problem 6.4. What does critical-damping adjustment do, and why is backward Euler the right tool for the job?
Solution 6.4
CDA replaces the trapezoidal rule with a short burst (typically two half-steps) of backward Euler immediately after a discontinuity. Backward Euler is L-stable — strongly dissipative — so it damps the non-physical Nyquist-rate oscillation within a step or two. Because it is applied only in the brief window around the event, the trapezoidal rule's second-order accuracy is retained for the rest of the run.
Problem 6.5. A switch is mistimed by up to one step. Estimate the timing error as a fraction of a cycle for (a) a
Solution 6.5
(a) A
6.8 References
- H. W. Dommel, Electromagnetic Transients Program (EMTP) Theory Book, Bonneville Power Administration — numerical oscillations and re-initialization at discontinuities.
- J. R. Marti and J. Lin, "Suppression of numerical oscillations in the EMTP," IEEE Transactions on Power Systems — the critical-damping-adjustment idea.
- J. Arrillaga and N. R. Watson, Power Systems Electromagnetic Transients Simulation, IET Power and Energy Series 39 — switching instants, interpolation, and chatter removal.
Previous: Chapter 5 — Switches and self-commutating devices · Next: Chapter 7 — Rectifiers and converters.
