Lab 15 — ISF of a Nonlinear Oscillator (van der Pol)
Breadcrumb: Simulation labs › System & advanced › This page (nonlinear ISF). Upstream: isf_definition, lab_04; related: lab_03.
β: This English translation is in beta — the Traditional-Chinese original is the authoritative version.
Earlier we derived for an ideal LC — clean, but that is a special case of a weakly nonlinear, near-sinusoidal waveform. This lab dismantles a common misconception: the ISF is not always . The ISF is set by the oscillator's large-signal steady-state waveform — whatever the waveform looks like, the ISF looks accordingly. We use the classic van der Pol oscillator, with a nonlinearity-strength knob that tunes the waveform continuously from "near-sinusoidal" to "relaxation oscillation with sharp transitions", and watch how the ISF deforms along with it.
Physical intuition (conclusion first): the ISF measures "kick at which phase of the waveform pushes the phase the most". For a near-sinusoidal waveform (small ), the most sensitive point is the zero crossing and the least sensitive is the peak, so the ISF is close to . But once grows and the waveform develops fast, steep transitions, the sensitivity concentrates and skews onto those steep edges — the ISF is no longer a symmetric sine but gets "pinched" by the waveform into an asymmetric shape. The waveform determines the ISF — exactly why ring (square-wave-like, steep edges) and LC (near-sinusoidal) ISF shapes differ so much.
1. Learning objectives
- Meet the van der Pol oscillator and the nonlinearity strength : small → near-sinusoidal, large → relaxation.
- Internalize "the ISF is set by the large-signal waveform" — not always .
- Learn to extract the ISF numerically: inject a small perturbation at different phases and measure the persistent steady-state time shift .
- Connect to the LC vs ring ISF shape difference (lab_03).
2. Mathematical model
Second-order ODE of the van der Pol oscillator (dimensionless form):
Rewritten in first-order state space ():
- Physics of the nonlinear term : when , → negative damping (injects energy, grows small oscillations); when , → positive damping (dissipates, compresses large oscillations). The balance between the two forms a stable limit cycle.
- Role of : degenerates to the simple harmonic oscillator (pure sine, ); for large the energy injection/dissipation is violent and the waveform becomes relaxation-type: slow charging plus abrupt flips with steep edges.
- Units: the equation is dimensionless (normalized); time and are already normalized, (small ).
Principle of numerical ISF extraction (operational definition, matching [P1] Eq.(10)): at some injection phase , hit the velocity state with a small impulse ; the oscillator steady state is permanently shifted by a time . Convert the time shift to phase:
- Why measure the "persistent time shift": phase perturbations have no restoring force (they persist forever), while amplitude perturbations decay ([P1] assumption); so once the transient dies out, the remaining steady-state edge-timing offset is purely phase. The code measures the offset of the rising zero crossing many periods after injection relative to a reference, wrapped to .
- Dimension check: ; after dividing by we get the ISF (here normalized to for shape comparison) ✓.
3. Block diagram
4. Core Python code
simulations/lab_15_nonlinear_isf.py integrates the van der Pol equation with RK4 and extracts the ISF from the
persistent shift of the rising zero crossings. Core integrator and extractor:
import numpy as np
def simulate_vdp(mu, t_end, fs, x0=2.0, y0=0.0, impulse_time=None, impulse_dy=0.0):
dt = 1.0 / fs
n = int(round(t_end * fs))
x = np.empty(n); y = np.empty(n)
xi, yi = float(x0), float(y0)
imp = int(round(impulse_time * fs)) if impulse_time is not None else -1
def deriv(xx, yy):
return yy, mu * (1 - xx * xx) * yy - xx # van der Pol RHS
for k in range(n):
x[k] = xi; y[k] = yi
if k == imp:
yi += impulse_dy # inject small impulse on velocity
k1x, k1y = deriv(xi, yi)
k2x, k2y = deriv(xi + 0.5 * dt * k1x, yi + 0.5 * dt * k1y)
k3x, k3y = deriv(xi + 0.5 * dt * k2x, yi + 0.5 * dt * k2y)
k4x, k4y = deriv(xi + dt * k3x, yi + dt * k3y)
xi += dt / 6 * (k1x + 2 * k2x + 2 * k3x + k4x)
yi += dt / 6 * (k1y + 2 * k2y + 2 * k3y + k4y)
return np.arange(n) * dt, x, y
def extract_vdp_isf(mu, fs=400.0, n_points=36, dq=0.02):
T, _ = measure_period(mu, fs, t_end=220.0, t_settle=80.0)
t_settle = max(60.0, 10 * T); t_late = t_settle + 6 * T; t_end = t_late + 4 * T
w0 = 2 * np.pi / T
t_ref, xr, _ = simulate_vdp(mu, t_end, fs) # reference (no impulse)
zr = rising_zero_crossings(t_ref, xr)
t0 = zr[zr > t_settle][0]; zr_late = zr[zr > t_late][0]
thetas = np.linspace(0, 2 * np.pi, n_points, endpoint=False)
isf = np.zeros(n_points)
for i, th in enumerate(thetas):
t_inj = t0 + (th / (2 * np.pi)) * T + T # inject at phase th
t_p, xp, yp = simulate_vdp(mu, t_end, fs, impulse_time=t_inj, impulse_dy=dq)
zp = rising_zero_crossings(t_p, xp); zp = zp[zp > t_late]
dt_shift = (zp[0] - zr_late + T / 2) % T - T / 2 # wrap to [-T/2, T/2]
isf[i] = -w0 * dt_shift / dq # Gamma(theta) ~ Dphi/Dq
return thetas, isf, T
(rising_zero_crossings uses linear interpolation to find where crosses from negative to positive; measure_period takes the median
zero-crossing spacing as the period . See the script path below for the complete, runnable version — the excerpt above is for explanation.)
5. Full script path
simulations/lab_15_nonlinear_isf.py (main() plots (a) the waveforms and (b) the extracted ISF;
simulate_vdp does the RK4 integration, extract_vdp_isf extracts the ISF numerically, rising_zero_crossings finds edges).
Re-run: python scripts/run_all_sims.py.
6. Parameter table
| Parameter | Symbol | Value | Role |
|---|---|---|---|
| Nonlinearity strength | Main knob: small = near-sinusoidal, large = relaxation | ||
| Sampling rate | 400 (dimensionless) | Integration step | |
| Extraction phase points | 36 | 36 injection phases per period | |
| Injected perturbation | 0.02 | Applied to velocity state (small perturbation) | |
| Settle time | Wait for the transient to die out before measuring | ||
| Initial conditions | Starting point (converges to the limit cycle) |
7. Unit table
This lab is a dimensionless (normalized) model with no physical units; correspondence table:
| Quantity | Symbol | Unit |
|---|---|---|
| State variables | Dimensionless | |
| Time / period | Dimensionless | |
| Angular frequency | Dimensionless (rad/"time") | |
| Nonlinearity strength | Dimensionless | |
| ISF (normalized) | Dimensionless (divided by in the figure) |
8. Simulation figure

9. How to read the figure
- Left panel (a), waveforms: (blue) is almost a sine; (orange) already shows visible asymmetry; (red) is classic relaxation — the rising segment is pushed fast and steep, the top flattens, the fall is abrupt too. The larger , the further the waveform departs from a sine.
- Right panel (b), extracted ISF: at (blue) the measured ISF nearly overlaps the sine reference (black dashed), confirming "weak nonlinearity ≈ "; at (red) the ISF is clearly deformed and asymmetric — the peak is shifted, rise/fall slopes are unequal, reflecting the steep edge in (a). The ISF changes with the large-signal waveform; it is not always .
- Key reading: panel (b) deliberately normalizes each ISF to peak 1, comparing shape only. The point is not the amplitude but that "the shape is no longer a clean sine". The more nonlinear the waveform, the richer the ISF harmonics ( beyond just ), and its and (which sets ) are likewise dictated by the waveform.
- Connection to rings: the ring's square-wave-like steep edges concentrate the ISF energy at the transitions, giving a shape close to a triangular pulse (lab_03) — another instance of "the large-signal waveform determines the ISF".
10. Corresponding paper equations/figures
- Operational ISF definition (impulse → persistent phase step): [P1] Eq.(10), p.182, .
- "ISF is set by the waveform": [P1] Fig. 7, p.183 (LC vs ring waveforms with their ISFs); this lab uses van der Pol to display the waveform→ISF causality continuously.
- Linearity of excess phase vs injected charge (small perturbation): [P1] Fig. 6, p.182.
- ISF Fourier series (deformed ISF → more ): [P1] Eq.(12), p.183.
- The van der Pol oscillator and the numerical ISF extraction method are external literature, not among the five source PDFs, supplemented from standard nonlinear-oscillation / oscillator
perturbation literature (teaching toy).
TODO: for a formal citation, add van der Pol (1927) and the adjoint/PSS ISF extraction methods.
11. Limitations and approximations
- Toy model, not transistor-level: van der Pol is a dimensionless nonlinear oscillator for teaching; it does not correspond to any specific circuit; and time are normalized, with no physical V/A/s units.
- Approximations of the numerical extraction: measuring the persistent time shift with a single small impulse assumes (i) is small enough for a linear response, (ii) the transient (amplitude perturbation) has decayed completely before , (iii) RK4 step size and zero-crossing interpolation errors are negligible. At large the time resolution at the steep edges gets strained, so the ISF is numerically more sensitive near the transitions.
- Phase definition: the rising zero crossing serves as the phase reference; "phase" of a non-sinusoidal waveform is itself a matter of choice, and different reference points shift the ISF along its horizontal axis.
- Phase only, no amplitude tracking: follows the [P1] first-order assumption (amplitude perturbations decay); AM–PM under strong nonlinearity is not fully captured.
- Normalized amplitude: dividing the ISF by its peak in the figure is only for shape comparison; the absolute values of and require keeping the normalization before plugging into [P1] Eq.(21)/(24).
Key takeaways
- The ISF is set by the large-signal waveform, not always : only near-sinusoidal oscillators approach .
- van der Pol: small → near-sinusoidal waveform, near-sinusoidal ISF; large → relaxation, deformed and asymmetric ISF.
- Numerical extraction: inject a small impulse, measure the persistent steady-state time shift , , .
- The more nonlinear the waveform → the more ISF harmonics → affecting and (the latter sets upconversion).
Further reading
- Rigorous ISF definition: isf_definition
- From impulse to phase shift: impulse_to_phase_shift
- ISF Fourier coefficients ( of a deformed ISF): lab_05_isf_fourier_coefficients
- LC vs ring ISF shapes: lab_03_ring_oscillator_toy_model
- Applied to design/theory: how waveform slope / transition steepness shapes the ISF and → waveform_slope