---
theme: default
title: 'Lecture 42: RC oscillators: (1) Phase shift oscillator, (2) Wein bridge ...'
info: |
  ## DI02011011: Electronics Circuit and Application (ECA)
  Oscillators
---

# DI02011011: Electronics Circuit and Application (ECA)
## Lecture 42: RC oscillators: (1) Phase shift oscillator, (2) Wein bridge ...
### Oscillators

<!--
Welcome to Lecture 42 on RC Oscillators. Today we will explore signal generators designed specifically for the audio frequency spectrum. At frequencies below 100 kHz, LC inductors become physically bulky, expensive, and lossy. Instead, we use resistor-capacitor networks to achieve the necessary phase shifts and frequency selection. We will analyze the two most widely used RC topologies: the Phase-Shift oscillator and the Wien-Bridge oscillator.
-->

---

# Lecture Agenda: Audio Frequency RC Oscillators

- 1. Need for RC Oscillators & Low-Frequency Phase-Shift Principles
- 2. Op-Amp RC Phase-Shift Oscillator: Circuit Schematic & Working
- 3. Mathematical Derivation of Phase-Shift Oscillation Frequency ($f_o$) and Gain ($A_v \ge 29$)
- 4. BJT-Based Phase-Shift Oscillator: Transistor Loading Effects & $h_{fe}$ Requirements
- 5. Wien-Bridge Oscillator Topology: Lead-Lag Network Resonance & Zero Phase Condition
- 6. Wien-Bridge Op-Amp Design: Derivation of $f_o = 1/(2\pi RC)$ and Gain Requirement ($A_v \ge 3$)
- 7. Automatic Gain Control (AGC) & Non-Linear Amplitude Stabilization Techniques

<!--
Here is our agenda for this lecture. We will start by examining why RC networks replace LC tanks at low frequencies. We will then analyze the phase-shift ladder network, deriving its frequency of 1/(2pi sqrt(6) RC) and gain requirement of 29. Next, we will cover the Wien-Bridge topology, deriving its resonance frequency 1/(2pi RC) and gain requirement of 3, along with AGC techniques.
-->

---

# Low Frequency Oscillation & RC Phase-Shift Principle

- Limitations of LC Oscillators at Audio Frequencies: Resonant frequency $f_o = 1/(2\pi \sqrt{LC})$ requires impractically large inductors ($H$) and capacitors ($\mu\text{F}$), causing heavy core losses, bulk, and high cost.
- RC High-Pass Filter Phase Shift: Single RC section $V_{out}/V_{in} = \frac{j\omega RC}{1 + j\omega RC}$ introduces a phase lead $\theta = \arctan\left(\frac{1}{\omega RC}\right)$ up to $90^circ$.
- Three-Stage RC Ladder Network: An inverting amplifier provides $180^\circ$ phase shift; feedback ladder must provide remaining $180^\circ$. A minimum of 3 RC stages is required (each contributing $60^\circ$ phase shift at $f_o$).
- Transfer Function of 3-Stage High-Pass RC Ladder: $\beta(s) = \frac{s^3 R^3 C^3}{s^3 R^3 C^3 + 6 s^2 R^2 C^2 + 5 s R C + 1}$.

<!--
Why do we need RC oscillators? Because at audio frequencies between 10 Hz and 100 kHz, LC inductors would weigh several kilograms and have low quality factors. To achieve positive feedback with an inverting amplifier, we need a 180-degree phase shift from the feedback network. A single RC stage can provide at most 90 degrees. Therefore, we cascade three RC stages, each contributing 60 degrees of phase shift at the desired oscillation frequency.
-->

---

# Op-Amp RC Phase-Shift Oscillator Analysis

- Circuit Configuration: Inverting operational amplifier with gain $A_v = -R_f / R_1$ cascaded with a 3-stage high-pass RC feedback ladder ($C$ in series, $R$ to ground).
- Frequency of Oscillation ($f_o$): Substituting $s = j\omega$ into transfer function $\beta(s)$ and setting imaginary part of denominator to zero: $\text{Im}[1 - 6\omega^2 R^2 C^2 + j(5\omega RC - \omega^3 R^3 C^3)] = 0 \Rightarrow 5\omega RC = \omega^3 R^3 C^3 \Rightarrow \omega_0 = \frac{1}{\sqrt{6} R C} \Rightarrow f_o = \frac{1}{2\pi \sqrt{6} R C}$.
- Feedback Attenuation at $\omega_0$: Substituting $\omega_0$ into real part yields $\beta(j\omega_0) = \frac{1}{1 - 6(1/6)} = -\frac{1}{29}$. Network attenuates signal by factor of 29 with $180^\circ$ phase inversion.
- Amplifier Gain Requirement: Barkhausen criterion $|A_v \beta| \ge 1 \Rightarrow |A_v| \ge 29 \Rightarrow \frac{R_f}{R} \ge 29$ (setting $R_1 = R$).

<!--
Let's examine the mathematical derivation for an Op-Amp RC phase-shift oscillator. Setting the imaginary term of the 3-stage RC transfer function to zero yields an oscillation frequency of 1 / (2pi sqrt(6) RC). Substituting this frequency back into the real part of the transfer function reveals that the network attenuates the signal by exactly -1/29. Thus, to satisfy Barkhausen's criterion, the inverting amplifier must provide a minimum gain of 29.
-->

---

# BJT-Based RC Phase-Shift Oscillator

- Transistor Loading Considerations: Input resistance of Common-Emitter BJT stage ($h_{ie} \approx \beta_0 r_e$) loads the third RC stage. To maintain equal resistance $R$, third resistor is chosen as $R_3' = R - h_{ie}$.
- Current Feedback Derivation: Analysis using mesh current analysis for CE transistor with collector load $R_C$ alters frequency equation parameters.
- BJT Oscillation Frequency ($f_o$): $f_o = \frac{1}{2\pi R C \sqrt{6 + 4k}}$, where $k = R_C / R$. If $R_C = R$ ($k = 1$), $f_o = \frac{1}{2\pi \sqrt{10} R C}$.
- Minimum Transistor Current Gain ($h_{fe}$): $h_{fe,min} = 23 + 29\left(\frac{R}{R_C}\right) + 4\left(\frac{R_C}{R}\right)$. For $R_C = R$, minimum transistor current gain is $h_{fe,min} = 56$.

<!--
When designing a discrete BJT phase-shift oscillator, transistor loading cannot be ignored. The BJT's finite input resistance h_ie loads the final RC stage. Additionally, the collector load resistor R_C alters the feedback loop impedance. As shown in the equations, if R_C = R, the frequency factor changes from sqrt(6) to sqrt(10), and the minimum required transistor h_fe becomes 56.
-->

---

# Design Example: Op-Amp Phase-Shift Oscillator

- Problem Statement: Design an Op-Amp RC phase-shift oscillator to generate an audio signal at $f_o = 1.0\text{ kHz}$ using capacitors $C = 10\text{ nF}$. Calculate required resistance $R$ and feedback resistor $R_f$.
- Step 1: Calculate Timing Resistance ($R$): $f_o = \frac{1}{2\pi \sqrt{6} R C} \Rightarrow R = \frac{1}{2\pi \sqrt{6} f_o C} = \frac{1}{2\pi \sqrt{6} (1000\text{ Hz}) (10 \times 10^{-9}\text{ F})} = \frac{1}{2\pi (2.4495) (10^{-5})} \approx 6.497\text{ k}\Omega$ (standard $6.49\text{ k}\Omega$ 1%).
- Step 2: Calculate Minimum Feedback Resistor ($R_f$): $|A_v| = \frac{R_f}{R} \ge 29 \Rightarrow R_f = 29 \times 6.497\text{ k}\Omega \approx 188.41\text{ k}\Omega$.
- Step 3: Practical Implementation Adjustment: Choose $R_f$ as a $180\text{ k}\Omega$ resistor in series with a $20\text{ k}\Omega$ potentiometer (set to $\sim 195\text{ k}\Omega$) to guarantee start-up ($|A\beta| > 1$) and trim amplitude.

<!--
Here is a practical design calculation. To generate a 1 kHz sine wave with 10 nF capacitors, we plug values into our Op-Amp frequency formula to get R = 6.497 k-ohms. Multiplying R by 29 yields R_f = 188.41 k-ohms. In practice, we use a 180 k-ohm fixed resistor in series with a potentiometer to tune gain slightly above 29, ensuring reliable oscillation start-up.
-->

---

# Wien-Bridge Oscillator: Bridge Network & Resonance

- Bridge Topology: Incorporates a lead-lag RC bridge network comprising a series arm ($R_1, C_1$) and parallel arm ($R_2, C_2$) connected to non-inverting input of Op-Amp.
- Lead-Lag Network Transfer Function ($\beta(s)$): $\beta(s) = \frac{Z_p}{Z_s + Z_p} = \frac{\frac{R_2 / (j\omega C_2)}{R_2 + 1/(j\omega C_2)}}{(R_1 + \frac{1}{j\omega C_1}) + \frac{R_2 / (j\omega C_2)}{R_2 + 1/(j\omega C_2)}}$.
- Symmetrical Case ($R_1 = R_2 = R$, $C_1 = C_2 = C$): $\beta(j\omega) = \frac{j\omega R C}{1 - \omega^2 R^2 C^2 + 3 j\omega R C}$.
- Zero Phase Shift Condition: Phase shift $\angle \beta(j\omega) = 0^\circ$ occurs when imaginary term $1 - \omega^2 R^2 C^2 = 0 \Rightarrow \omega_0 = \frac{1}{RC} \Rightarrow f_o = \frac{1}{2\pi RC}$.

<!--
Now let's turn to the Wien-Bridge oscillator. Unlike the phase-shift oscillator which uses an inverting amplifier, the Wien-Bridge uses a non-inverting amplifier because its lead-lag feedback network produces zero phase shift at resonance. Analyzing the lead-lag network under symmetrical conditions R1=R2=R and C1=C2=C shows that zero phase shift occurs at frequency f_o = 1 / (2pi RC).
-->

---

# Wien-Bridge Op-Amp Amplifier & Gain Requirements

- Attenuation at Resonant Frequency: Substituting $\omega_0 = 1/(RC)$ into transfer function: $\beta(j\omega_0) = \frac{j(1)}{0 + 3 j(1)} = +\frac{1}{3} \angle 0^\circ$. Lead-lag network attenuates signal by factor of 3 without phase shift.
- Non-Inverting Op-Amp Amplifier: Closed-loop voltage gain equation: $A_v = 1 + \frac{R_f}{R_1}$.
- Barkhausen Criterion Compliance: Loop gain $A_v \beta = \left(1 + \frac{R_f}{R_1}\right) \times \frac{1}{3} \ge 1 \Rightarrow 1 + \frac{R_f}{R_1} \ge 3 \Rightarrow \frac{R_f}{R_1} \ge 2$.
- Exact Balance State: Maintaining $A_v = 3$ exactly ($R_f = 2 R_1$) produces sustained, stable, low-distortion sine wave oscillations.

<!--
At the resonant frequency f_o, the lead-lag feedback factor beta is exactly +1/3. Because the phase shift is zero degrees, we use a non-inverting operational amplifier whose gain is 1 + Rf/R1. Applying Barkhausen's criterion (1 + Rf/R1) * (1/3) = 1 shows that 1 + Rf/R1 must equal 3, which means Rf must be exactly twice R1.
-->

---

# Wien-Bridge Oscillator Component Design Example

- Problem Statement: Design a Wien-bridge oscillator for an audio signal generator operating at $f_o = 10.0\text{ kHz}$ using standard capacitors $C = 1.0\text{ nF}$. Determine resistance $R$, feedback resistors $R_1$ and $R_f$.
- Step 1: Calculate Resistor $R$: $f_o = \frac{1}{2\pi R C} \Rightarrow R = \frac{1}{2\pi f_o C} = \frac{1}{2\pi (10,000\text{ Hz}) (1.0 \times 10^{-9}\text{ F})} = \frac{1}{2\pi (10^{-5})} \approx 15.915\text{ k}\Omega$ (standard $15.8\text{ k}\Omega$ 1%).
- Step 2: Select Ground Resistor $R_1$: Choose standard precision resistor $R_1 = 10.0\text{ k}\Omega$.
- Step 3: Calculate Feedback Resistor $R_f$: $R_f = 2 \times R_1 = 2 \times 10.0\text{ k}\Omega = 20.0\text{ k}\Omega$.
- Step 4: Real-World Adjustments: Use a $18.0\text{ k}\Omega$ resistor in series with a $5.0\text{ k}\Omega$ trimmer resistor to fine-tune loop gain to $3.00$.

<!--
Here is a complete Wien-Bridge design example. For a 10 kHz target frequency and 1 nF capacitors, we calculate R = 15.915 k-ohms. Setting R1 = 10 k-ohms requires Rf to be 20 k-ohms. To compensate for component tolerances and ensure reliable start-up, Rf is implemented with a fixed 18 k-ohm resistor plus a 5 k-ohm trimmer potentiometer.
-->

---

# Amplitude Stabilization & Automatic Gain Control (AGC)

- Thermal & Tolerance Instability: If $A_v < 3$, oscillations exponentially decay to zero; if $A_v > 3$, oscillations exponentially grow until Op-Amp clips against supply rails ($V_{CC}, V_{EE}$), introducing severe distortion.
- JFET Automatic Gain Control (AGC): Replace resistor $R_1$ with a JFET operating in its voltage-controlled linear ohmic region ($r_{ds} = \frac{r_o}{1 - V_{GS}/V_P}$). Output peak voltage is rectified and fed back to JFET gate ($V_{GS}$), dynamically adjusting $A_v = 3.00$.
- Incandescent Lamp / Thermistor Method: Lamp with positive temperature coefficient (PTC) placed as $R_1$; rising output amplitude heats filament, increasing $R_1$ and reducing gain $1 + R_f / R_1$ back to 3.
- Diode Limiting Network: Parallel back-to-back diodes across portion of $R_f$ smoothly decrease effective feedback resistance as peak signal voltage exceeds diode threshold ($V_\gamma \approx 0.7\text{ V}$).

<!--
Because component values drift with temperature, maintaining gain at exactly 3.00 open-loop is impossible. If gain is slightly greater than 3, the sine wave will clip and distort. To solve this, we use Automatic Gain Control. A JFET or thermistor dynamically adjusts the feedback resistance based on output amplitude, keeping loop gain at exactly 1.00 and yielding an ultra-pure sine wave.
-->

---

# Comparison: Phase-Shift vs. Wien-Bridge Oscillators

- Operating Frequency Band: Phase-Shift ($1\text{ Hz} - 100\text{ kHz}$); Wien-Bridge ($5\text{ Hz} - 1\text{ MHz}$ with high-speed Op-Amps).
- Frequency Tuning Capability: Phase-Shift requires simultaneous adjustment of 3 ganged components ($3 R$'s or $3 C$'s); Wien-Bridge requires adjusting only 2 ganged components ($2 R$'s or $2 C$'s), making it standard for laboratory signal generators.
- Spectral Purity & THD: Wien-Bridge offers ultra-low Total Harmonic Distortion (THD $< 0.01\%$ with AGC); Phase-Shift exhibits higher THD due to high required amplifier gain ($A_v = 29$).
- Gain Requirements: Phase-Shift ($A_v \ge 29$ inverting); Wien-Bridge ($A_v \ge 3$ non-inverting).

<!--
Comparing these two RC oscillators reveals why Wien-Bridge is preferred in commercial test equipment. Wien-Bridge requires adjusting only two ganged potentiometers to sweep frequency, whereas Phase-Shift requires three. Furthermore, with AGC, Wien-Bridge achieves total harmonic distortion below 0.01%, far superior to Phase-Shift.
-->

---

# Quadrature & State-Variable RC Oscillator Variants

- Quadrature RC Oscillator: Utilizes two cascaded Op-Amp integrators and one inverter in a feedback loop to simultaneously generate sine ($V_{\sin}$) and cosine ($V_{\cos}$) outputs in phase quadrature ($90^\circ$ phase difference).
- Quadrature Frequency Equation: $f_o = \frac{1}{2\pi R C}$.
- State-Variable Active Filter Oscillator: Derived from state-variable active filter by removing damping resistor ($Q \to \infty$), causing second-order poles to sit precisely on $j\omega$-axis.
- Wide Sweep Capability: State-variable topologies enable wide continuous frequency tuning over a 1000:1 range without amplitude breakdown.

<!--
In advanced instrumentation, we often need orthogonal signals—sine and cosine—separated by 90 degrees. The quadrature oscillator cascades two active integrators to provide simultaneous quadrature outputs. Similarly, state-variable active filter oscillators enable sweeping across three decades of frequency while maintaining constant output amplitude.
-->

---

# Summary of RC Oscillator Topologies

- RC Oscillators are designed for audio frequency generation ($1\text{ Hz} - 1\text{ MHz}$), overcoming the size and loss limitations of LC tanks.
- Phase-Shift Oscillator uses a 3-stage high-pass RC ladder providing $180^\circ$ shift at $f_o = \frac{1}{2\pi \sqrt{6} RC}$, requiring an inverting gain $|A_v| \ge 29$.
- Wien-Bridge Oscillator uses a lead-lag RC bridge providing $0^\circ$ shift at $f_o = \frac{1}{2\pi RC}$, requiring a non-inverting gain $A_v = 1 + R_f / R_1 \ge 3$.
- Automatic Gain Control (AGC) using JFETs or thermistors is critical in Wien-Bridge circuits to maintain $A_v = 3.00$ and achieve ultra-low harmonic distortion.

<!--
To summarize, RC oscillators provide indispensable audio frequency synthesis. Phase-Shift circuits use a 3-stage ladder providing 180-degree shift and require a gain of 29. Wien-Bridge circuits use lead-lag networks providing zero phase shift with a gain of 3, making them the standard for lab audio generators when paired with AGC.
-->

---

# Formula Reference & Key Equations

- Op-Amp Phase-Shift Frequency: $f_o = \frac{1}{2\pi \sqrt{6} R C}$, Gain Condition: $|A_v| = \frac{R_f}{R} \ge 29$.
- BJT Phase-Shift Frequency ($R_C = R$): $f_o = \frac{1}{2\pi \sqrt{10} R C}$, Minimum BJT Current Gain: $h_{fe,min} = 56$.
- Wien-Bridge Frequency: $f_o = \frac{1}{2\pi R C}$, Gain Condition: $A_v = 1 + \frac{R_f}{R_1} \ge 3 \Rightarrow R_f \ge 2 R_1$.
- JFET Resistance in Ohmic Region: $r_{ds} = \frac{r_{ds0}}{1 - V_{GS} / V_P}$, used for dynamic AGC loop gain stabilization.

<!--
This formula reference slide consolidates all essential equations for RC Phase-Shift and Wien-Bridge oscillator calculations. Use these formulas for solving problem sets and completing laboratory designs.
-->
