Home > Python > Ordinary Differential Equation-1

Ch. 6.4 Half Wave Rectifier with Capacitor Filter

Chapters Index
Program 1

Half Wave Rectifier with Capacitor Filter

Python 3.11 Ready

                                
Click "Run Code" to execute script and render figures.

Mathematical Problem Formulation

Theory of Capacitor in Half-Wave Rectifier Circuit

1. Half-Wave Rectifier with Capacitor Filter

A half-wave rectifier converts an alternating current (AC) signal into a pulsating direct current (DC) signal by allowing only the positive half-cycles of the AC signal to pass through while blocking the negative half-cycles.

To smooth out the pulsating DC signal, a capacitor is placed across the load. The capacitor charges when the rectified voltage is higher than the voltage across it and discharges when the rectified voltage drops. This creates a more stable DC output.

2. Mathematical Model

The voltage V(t) across the capacitor is governed by different ordinary differential equations (ODEs) during the charging and discharging phases:

Charging Phase:

dV(t)/dt = (1/RC) * (V_in(t) - V(t))

This equation describes how the capacitor charges when the rectified input voltage V_in(t) is greater than the current capacitor voltage V(t).

Discharging Phase:

dV(t)/dt = -V(t)/(RC)

This equation describes the discharging process when V_in(t) is less than V(t), causing the capacitor to release its stored energy to maintain the load voltage.

Theoretical Principles & Computational Physics Guide

Half-Wave Rectifier with Capacitor Filter: Nonlinear AC Circuit Simulation

Dr. Alorika Chatterjee & Dr. Anirban Shaw Science & Physics Learners Python 3 / NumPy / SciPy

1. Core Principles & Theoretical Framework

AC to DC Conversion: Exploits unidirectional diode conduction combined with capacitive charge storage to produce smooth DC voltage.
Piecewise Conduction: When $V_{\text{in}} > V_C + V_D$, diode conducts; when $V_{\text{in}}$ drops, the diode cuts off and the capacitor discharges through the load.
Ripple Voltage: Peak-to-peak ripple is inversely proportional to load resistance and filter capacitance: $V_r \approx V_m / (f R_L C)$.

2. Mathematical Formulation & Algorithmic Pipeline

Rectifier conduction criteria and peak-to-peak ripple formula:

$$ V_r \approx \frac{V_m}{f R_L C}, \quad V_{\text{out}}(t + \Delta t) = \begin{cases} V_{\text{in}}(t) - V_D, & V_{\text{in}} > V_C + V_D \ V_C(t) e^{-\Delta t / (R_L C)}, & \text{diode OFF} \end{cases} $$

3. Numerical Mechanics & Implementation Logic

  • Input Generation: Generate sinusoidal supply $V_{\text{in}}(t) = V_m \sin(\omega t)$.
  • Diode State Evaluation: If $V_{\text{in}} > V_{\text{out}} + V_D$, set $V_{\text{out}} = V_{\text{in}} - V_D$ (charging phase).
  • Discharge Phase: Else, update via exponential decay: $V_{\text{out}} \leftarrow V_{\text{out}}(1 - \Delta t / (R_L C))$.
  • Metric Evaluation: Calculate average DC voltage and ripple factor $\gamma = V_r / V_{\text{dc}}$.

4. Relevant Computational Practice Exercises

Exercise 1
Simulate rectifier output for filter capacitances $C = 10\,\mu\text{F}, 100\,\mu\text{F}, 1000\,\mu\text{F}$ and observe ripple reduction.
Exercise 2
Measure the ripple factor and compare with the theoretical prediction $V_r = V_m / (f R_L C)$.
Exercise 3
Extend the simulation to model a full-wave bridge rectifier topology.
Standard Literature & References:
  • Paul Horowitz and Winfield Hill, "The Art of Electronics", Cambridge University Press (2015).