Advanced RLC Simulator
Inputs
Frequency Sweep Plot
Phasor Diagram
Workflow and Mathematical Principles
1. User Input
The simulator collects the following inputs:
- Circuit type (R, L, C, RL, RC, LC, RLC series, RLC parallel)
- Resistance (R in Ω)
- Inductance (L in H)
- Capacitance (C in F)
- AC Source frequency (f in Hz)
- AC Source voltage (Vrms in V)
2. Reactance Calculations
- Inductive Reactance:
XL = 2Ï€fL - Capacitive Reactance:
XC = 1 / (2Ï€fC)
3. Impedance Calculation
- Series circuits:
|Z| = √(R² + (XL − XC)²) - Parallel circuits:
Y = √((1/R)² + (1/XL − 1/XC)²), |Z| = 1/Y - Phase angle:
φ = atan((XL − XC) / R)(degrees)
4. Resonance and Bandwidth
- Resonant Frequency:
f0 = 1 / (2Ï€√(LC)) - Bandwidth (series RLC):
BW = R / (2Ï€L) - Lower and Upper Cutoff:
fL = f0 − BW/2,fH = f0 + BW/2
5. Current and Power Calculations
- Current:
I = V / |Z| - Real Power:
P = I² R - Reactive Power:
Q = I² |XL − XC| - Apparent Power:
S = V × I - Power Factor:
PF = P / S
6. Frequency Sweep for Plots
- Step through frequencies:
f = fmin to fmax - Compute
|Z|andφat each frequency - Plot impedance and phase vs. frequency using Chart.js
7. Phasor Representation
- Voltage/current magnitudes represented as vector lengths
- Phase angles represented as vector angles
Summary
This workflow enables dynamic handling of all RLC combinations, calculates important electrical quantities, and visualizes frequency-dependent behavior in both plots and phasor diagrams.