RLC Oscillator Lab
Electronics · Control theory

RLC Oscillator Lab

The simplest self-sustaining oscillator: a series RLC tank driven by a saturating amplifier, with the voltage across R fed straight back to the amplifier input. Change any component on the left and every diagram, plot and the live simulation follow.

01 · Model

Circuit and control loop

K + +Vs −Vs ±5 V feedback: amplifier input e = v_R (+ noise) L10 mH C100 nF R100 Ω i → y = v_R u
Schematic. The amplifier (small-signal gain K, rails ±Vs) drives the series L–C–R loop. The voltage across R is the output and is fed back to the amplifier input. Moving dots show the live current from the simulation.
d(t) kick + noise Σ + + e Amplifier u = Vs·tanh(K e/Vs) small signal: u ≈ K e u Series RLC H(s) (R/L) s s² + (R/L) s + 1/(LC) y = v_R unity positive feedback (e = y + d) H(jω₀) = 1 at f₀ = 5.03 kHz K = 1.20 Loop gain L(s) = −K·H(s) in the negative-feedback convention
Block diagram (automation view). Plant = RLC network from amplifier output u to resistor voltage y. Controller = amplifier. Disturbance d(t) represents the noise or kick that starts the oscillation.
02 · Formalism

From Kirchhoff to the characteristic equation

Kirchhoff voltage law

\[ u(t) = L\frac{di}{dt} + R\,i + \frac{1}{C}\int i\,dt, \qquad y = v_R = R\,i \]

State variables: inductor current \(i\) and capacitor voltage \(v_C\): \(\;L\,\dot i = u - v_C - R i,\;\; C\,\dot v_C = i\).

Plant transfer function

\[ H(s) = \frac{Y(s)}{U(s)} = \frac{\frac{R}{L}\,s}{s^2 + \frac{R}{L}s + \frac{1}{LC}} = \frac{2\zeta\omega_0 s}{s^2 + 2\zeta\omega_0 s + \omega_0^2} \]

A second-order band-pass with \(\omega_0 = 1/\sqrt{LC}\), \(\zeta = \tfrac{R}{2}\sqrt{C/L}\), \(Q = \tfrac{1}{2\zeta} = \tfrac{1}{R}\sqrt{L/C}\).

Frequency response

\[ H(j\omega) = \frac{1}{1 + jQ\left(\frac{\omega}{\omega_0} - \frac{\omega_0}{\omega}\right)}, \qquad H(j\omega_0) = 1 \]

Unity gain and zero phase only at \(\omega_0\). As \(\omega\) sweeps, \(H\) traces a circle of radius ½ centred at ½ on the real axis.

Closing the loop

\[ e = y + d \;\Rightarrow\; T(s) = \frac{Y}{D} = \frac{K H(s)}{1 - K H(s)} \]

Positive feedback. Rewritten as a standard negative-feedback loop with \(L(s) = -K H(s)\), the closed-loop poles solve \(1 + L(s) = 0\).

Characteristic equation and poles

\[ s^2 + \frac{R}{L}(1-K)\,s + \frac{1}{LC} = 0 \] \[ s_{1,2} = -\frac{R(1-K)}{2L} \pm j\sqrt{\omega_0^2 - \left(\frac{R(1-K)}{2L}\right)^2} \]

The amplifier acts as a negative resistance \(-KR\): the effective series resistance is \(R(1-K)\). \(K<1\): poles in the left half-plane. \(K=1\): on the \(j\omega\) axis. \(K>1\): right half-plane.

Barkhausen criterion

\[ K\,H(j\omega_0) = 1 \iff |L(j\omega_0)| = 1,\;\; \angle L(j\omega_0) = -180^\circ \]

Sustained oscillation needs loop gain exactly 1 with zero net phase (positive feedback) at one frequency. Here that frequency is \(\omega_0\) for any \(R\).

Nyquist criterion

\[ Z = N + P \]

\(P\): open-loop RHP poles (0, since the passive RLC with \(R>0\) is stable). \(N\): clockwise encirclements of \(-1\) by \(L(j\omega)\), \(\omega\in(-\infty,\infty)\). \(Z\): closed-loop RHP poles. Here \(L(j\omega)\) is a circle through 0 and \(-K\), traced twice, so \(N = 2\) when \(K>1\).

Amplitude: describing function

\[ N(A) = \frac{1}{\pi A}\int_0^{2\pi} V_s \tanh\!\left(\frac{K A\sin\theta}{V_s}\right)\sin\theta\,d\theta, \qquad N(A)\,H(j\omega_0) = 1 \]

Linear theory says the amplitude grows forever when \(K>1\). Saturation lowers the effective gain \(N(A)\) as \(A\) grows; the limit cycle settles where \(N(A) = 1\). \(A/V_s\) depends only on \(K\).

03 · Frequency domain

Bode, Nyquist and stability

Bode diagram of the open-loop gain \(L(j\omega) = -K H(j\omega)\). Hover to read values. The dashed vertical line is \(f_0\).
Nyquist plot of \(L(j\omega)\). Solid: \(\omega>0\). Dashed: \(\omega<0\). Red cross: critical point \(-1\).
s-plane, axes in units of ω₀. Grey trail: root locus for K from 0 to 4. ○ zero, × closed-loop poles.
04 · Design

How to tune it

Presets:

Set the frequency with L and C

\(f_0 = \dfrac{1}{2\pi\sqrt{LC}}\). Pick a practical inductor first (they come in fewer values and carry more parasitics), then solve \(C = \dfrac{1}{(2\pi f_0)^2 L}\). Frequency scales as the inverse square root: doubling \(C\) lowers \(f_0\) by \(\sqrt 2\). Component tolerance shifts it by \(\Delta f/f \approx -\tfrac12(\Delta L/L + \Delta C/C)\).

Set the selectivity with R

\(R = \dfrac{1}{Q}\sqrt{L/C}\). The ratio \(\sqrt{L/C}\) is the tank's characteristic impedance. A high \(Q\) (small \(R\)) gives a narrow band-pass that filters the amplifier's clipping harmonics, so the output is a cleaner sine. The cost is a slower start-up. Changing \(R\) does not move \(f_0\).

Set the loop gain K a little above 1

With \(K = 1+\delta\), the envelope grows as \(e^{t/\tau}\) with \(\tau = \dfrac{2L}{R\,\delta} = \dfrac{2Q}{\omega_0\,\delta}\). Use \(\delta\approx 0.05\text{–}0.5\). Exactly \(K=1\) is not robust: any drift below 1 and the oscillation dies. Too large (\(K > 1 + 2Q\)) makes the poles real, and the circuit behaves like a relaxation oscillator instead of a sine source.

Set the amplitude with the supply Vs

The describing-function solution gives \(A = a(K)\,V_s\), with \(a(K)\) from the table. For \(K\) close to 1, \(a(K) \approx 2\sqrt{(K-1)/K^3}\). For large \(K\), the amplifier output becomes a square wave and \(a \to 4/\pi\).

Verify on the plots

Bode: the magnitude peak \(20\log_{10}K\) must sit above 0 dB exactly where the phase crosses −180° (at \(f_0\)); the gain margin is negative. Nyquist: the circle reaches \(-K\) and must enclose \(-1\). Then run the simulation and compare the measured frequency and amplitude with the predictions.

05 · Time domain

Live simulation

Nonlinear model integrated with RK4 (200 steps per period). The window always shows the last 10 periods of f₀. Edit parameters while it runs.

Measured frequency–
Measured amplitude v_R–
Predicted amplitude–
Simulated time–

Control loop signals

Component voltages (KVL: u = v_L + v_C + v_R)

Loop current