Chapter 5: Electrical, Fluid, and Thermal System Modeling
Lesson 1: RLC Circuits: KVL, KCL, and Dynamic Equations for Electrical Networks
This lesson develops first-principles dynamic models of electrical networks containing resistors, inductors, and capacitors. Starting from Kirchhoff’s laws (KVL/KCL) and element constitutive relations, we derive ordinary differential equations (ODEs) for canonical series/parallel RLC circuits and then generalize the workflow to systematic network equation assembly. We also prove key structural facts (continuity of capacitor voltage and inductor current under finite signals) and an energy-balance identity that underpins passivity and stability insights.
1. Variables, Sign Conventions, and the Modeling Goal
A dynamic electrical model is an ODE relating time-varying inputs (e.g., a source voltage) to observable quantities (currents/voltages), consistent with physical laws. We adopt the passive sign convention: current enters the terminal labeled with positive voltage.
For a two-terminal element with voltage \( v(t) \) and current \( i(t) \), instantaneous power is \( p(t)=v(t)i(t) \). Energy methods later rely on the integral \( W(t)=\int_{0}^{t} p(\sigma)\,d\sigma \).
flowchart LR
Vs["Source v_s(t)"] --> N1["Node"]
N1 --> R["R"]
R --> L["L"]
L --> C["C"]
C --> G["Reference node (ground)"]
N1 --> Meas["Measured variable: i(t) or v_C(t)"]
The circuit above is a canonical series RLC topology. In this lesson we derive its ODE from KVL/KCL and then show how similar steps scale to larger networks.
2. Constitutive Relations and Energy Storage
The fundamental element relations (linear, time-invariant parameters) are:
\[ v_R(t) = R\,i_R(t), \qquad v_L(t) = L\,\frac{d i_L(t)}{dt}, \qquad i_C(t) = C\,\frac{d v_C(t)}{dt}, \quad R > 0,\; L > 0,\; C > 0. \]
Energy in an inductor. Using \( p=v i \) and \( v_L=L\,di/dt \):
\[ p_L(t)=v_L(t)\,i_L(t)=L\,\frac{d i_L(t)}{dt}\,i_L(t) =\frac{d}{dt}\left(\frac{1}{2}L\,i_L^2(t)\right). \]
Hence the stored magnetic energy is \( E_L(t)=\frac{1}{2}L\,i_L^2(t) \) (up to an additive constant set by reference).
Energy in a capacitor. Using \( i_C=C\,dv/dt \):
\[ p_C(t)=v_C(t)\,i_C(t)=v_C(t)\,C\,\frac{d v_C(t)}{dt} =\frac{d}{dt}\left(\frac{1}{2}C\,v_C^2(t)\right). \]
Hence the stored electric energy is \( E_C(t)=\frac{1}{2}C\,v_C^2(t) \).
Dissipation in a resistor. Since \( v_R=Ri_R \), we have \( p_R=v_R i_R=R\,i_R^2 \ge 0 \); resistors do not store energy, they dissipate it.
3. Kirchhoff’s Laws and Why Dynamics Appear
Kirchhoff’s Current Law (KCL) expresses charge conservation at nodes; Kirchhoff’s Voltage Law (KVL) expresses energy consistency around loops.
KCL (node form). At any node (excluding the reference node), the algebraic sum of currents is zero:
\[ \sum_{k \in \mathcal{E}(n)} s_{nk}\, i_k(t) = 0, \]
where \( \mathcal{E}(n) \) is the set of branches incident to node \( n \) and \( s_{nk}\in\{+1,-1\} \) encodes the chosen current reference directions.
KVL (loop form). For any loop, the algebraic sum of voltages is zero:
\[ \sum_{\ell \in \mathcal{L}} s_{\ell}\, v_{\ell}(t) = 0, \]
where the signs \( s_{\ell}\in\{+1,-1\} \) depend on loop traversal direction relative to element polarity.
Where dynamics come from: KCL/KVL alone are algebraic constraints. Dynamics enter only when we combine them with element laws containing derivatives (inductors, capacitors). The result is typically a coupled set of differential-algebraic equations (DAEs) that can often be reduced to ODEs by selecting independent energy variables.
In this lesson, we will prefer a physically transparent choice of independent variables: \( i_L(t) \) for each inductor and \( v_C(t) \) for each capacitor.
4. Series RLC Circuit: Deriving a Second-Order ODE
Consider a series connection of \( R \), \( L \), and \( C \) driven by a source voltage \( v_s(t) \). The same current flows through all series elements: \( i_R(t)=i_L(t)=i_C(t)=i(t) \).
KVL around the loop:
\[ v_s(t) = v_R(t) + v_L(t) + v_C(t). \]
Substitute the element laws \( v_R=Ri \), \( v_L=L\,di/dt \):
\[ v_s(t) = R\,i(t) + L\,\frac{d i(t)}{dt} + v_C(t). \]
Capacitor law relates current and capacitor voltage:
\[ i(t) = i_C(t) = C\,\frac{d v_C(t)}{dt}. \]
Substitute \( i=C\,dv_C/dt \) into KVL and simplify to obtain an ODE in \( v_C(t) \):
\[ v_s(t) = R\,C\,\frac{d v_C(t)}{dt} + L\,C\,\frac{d^2 v_C(t)}{dt^2} + v_C(t). \]
Standard form:
\[ L C\,\frac{d^2 v_C(t)}{dt^2} + R C\,\frac{d v_C(t)}{dt} + v_C(t) = v_s(t). \]
This is a linear second-order ODE. Its order equals the number of independent energy storage elements (here, one inductor and one capacitor).
Initial conditions and physical consistency. A minimal set is \( v_C(0) \) and \( i(0) \). Since \( i(0)=C\,\dot{v}_C(0) \), specifying \( v_C(0) \) and \( i(0) \) is equivalent to specifying \( v_C(0) \) and \( \dot{v}_C(0) \).
5. Parallel RLC Circuit: Node Equation and a Second-Order ODE
Consider \( R \), \( L \), \( C \) in parallel sharing a common node voltage \( v(t) \) to ground, driven by a current source \( i_s(t) \) injected into the node. The branch currents are \( i_R=v/R \), \( i_C=C\,dv/dt \), and \( v=L\,di_L/dt \) for the inductor branch.
KCL at the node:
\[ i_s(t) = i_R(t) + i_C(t) + i_L(t) = \frac{v(t)}{R} + C\,\frac{d v(t)}{dt} + i_L(t). \]
Differentiate both sides and use \( \frac{d i_L}{dt}=\frac{v}{L} \):
\[ \frac{d i_s(t)}{dt} = \frac{1}{R}\,\frac{d v(t)}{dt} + C\,\frac{d^2 v(t)}{dt^2} + \frac{v(t)}{L}. \]
Standard form (in node voltage):
\[ C\,\frac{d^2 v(t)}{dt^2} + \frac{1}{R}\,\frac{d v(t)}{dt} + \frac{1}{L}\,v(t) = \frac{d i_s(t)}{dt}. \]
Again we obtain a second-order linear ODE, consistent with one inductor and one capacitor contributing independent energy storage.
6. Structural Proofs: Why Inductor Current and Capacitor Voltage Are Continuous
These continuity properties are not “rules of thumb”; they follow directly from the constitutive relations and basic integrability assumptions.
Lemma 1 (Inductor current continuity under bounded voltage).
If an inductor of inductance \( L > 0 \) is subjected to a voltage \( v_L(t) \) that is finite and integrable on an interval \( [t_0,t_1] \), then \( i_L(t) \) is continuous on that interval.
Proof. From \( v_L = L\,di_L/dt \), integrate from \( t_0 \) to \( t \):
\[ i_L(t) - i_L(t_0) = \frac{1}{L}\int_{t_0}^{t} v_L(\sigma)\,d\sigma. \]
The right-hand side is continuous in \( t \) whenever \( v_L \) is integrable. Hence \( i_L(t) \) is continuous. A jump in \( i_L \) would require an impulse (distribution) in \( v_L \). ■
Lemma 2 (Capacitor voltage continuity under bounded current).
If a capacitor of capacitance \( C > 0 \) is subjected to a current \( i_C(t) \) that is finite and integrable on \( [t_0,t_1] \), then \( v_C(t) \) is continuous on that interval.
Proof. From \( i_C = C\,dv_C/dt \), integrate:
\[ v_C(t) - v_C(t_0) = \frac{1}{C}\int_{t_0}^{t} i_C(\sigma)\,d\sigma. \]
Again the integral is continuous in \( t \) if \( i_C \) is integrable. A jump in \( v_C \) requires an impulse current. ■
These lemmas guide initial condition handling: it is generally physically inconsistent to “reset” \( v_C \) or \( i_L \) instantaneously unless ideal impulsive excitations are explicitly included in the model.
7. Systematic Electrical Network Modeling: A Repeatable Workflow
For larger networks, manually writing KVL/KCL for each loop/node becomes error-prone. A common systematic approach is to write node-voltage equations (KCL at each node) and introduce extra variables for inductors and voltage sources. One widely used framework is modified nodal analysis (MNA).
Without assuming any prior “state-space” machinery, we can still express a general RLC network in a structured first-order form. Let \( \mathbf{v}(t)\in\mathbb{R}^{n} \) denote node voltages (relative to ground) and \( \mathbf{i}_L(t)\in\mathbb{R}^{m} \) denote inductor currents (one variable per inductor).
For a broad class of networks (linear R, L, C; independent sources), the equations can be organized as:
\[ \underbrace{\mathbf{C}_n}_{\text{node capacitances}}\frac{d\mathbf{v}}{dt} + \underbrace{\mathbf{G}}_{\text{conductances}}\mathbf{v} + \underbrace{\mathbf{A}_L}_{\text{incidence}}\mathbf{i}_L = \mathbf{i}_{\text{inj}}(t), \]
\[ \underbrace{\mathbf{L}}_{\text{inductances}}\frac{d\mathbf{i}_L}{dt} - \mathbf{A}_L^{\mathsf{T}}\mathbf{v} = \mathbf{v}_{L,\text{src}}(t). \]
Here, \( \mathbf{G} \) is assembled from resistor connections (conductances add at nodes), \( \mathbf{C}_n \) collects capacitor contributions in node form, and \( \mathbf{A}_L \) maps inductor branch currents into node KCL balances (signs depend on chosen current directions).
When the pair \( (\mathbf{C}_n,\mathbf{L}) \) is nonsingular on the dynamic subspace, the above DAE can be reduced to an ODE in the “energy variables” \( (\mathbf{v},\mathbf{i}_L) \). This provides a scalable modeling workflow: assemble matrices, set initial conditions consistent with KCL/KVL, and simulate.
flowchart TD
A["Choose reference directions and ground"] --> B["Write element laws: R, L, C"]
B --> C["Write KCL at nodes (unknown node voltages v)"]
C --> D["Introduce extra unknowns for inductors (iL) and voltage sources if any"]
D --> E["Assemble structured equations (matrix form)"]
E --> F["Select independent energy variables (vC and iL)"]
F --> G["Reduce to ODE + consistent initial conditions"]
G --> H["Simulate and validate (units, power/energy checks)"]
8. Energy Balance Identity and a Passivity Consequence
Energy identities provide “model auditing” tools and qualitative insight. We demonstrate this on the series RLC circuit.
Total stored energy:
\[ E(t) = E_L(t) + E_C(t) = \frac{1}{2}L\,i^2(t) + \frac{1}{2}C\,v_C^2(t). \]
Using KVL \( v_s = v_R + v_L + v_C \) and multiplying both sides by \( i(t) \):
\[ v_s(t)i(t) = v_R(t)i(t) + v_L(t)i(t) + v_C(t)i(t). \]
Substitute \( v_R=Ri \), \( v_L=L\,di/dt \), and \( i=C\,dv_C/dt \):
\[ v_s(t)i(t) = R\,i^2(t) + L\,\frac{d i(t)}{dt}\,i(t) + v_C(t)\,C\,\frac{d v_C(t)}{dt}. \]
Recognize total derivatives from Section 2:
\[ v_s(t)i(t) = R\,i^2(t) + \frac{d}{dt}\left(\frac{1}{2}L\,i^2(t)\right) + \frac{d}{dt}\left(\frac{1}{2}C\,v_C^2(t)\right). \]
Energy balance identity:
\[ \frac{dE(t)}{dt} = v_s(t)i(t) - R\,i^2(t). \]
Consequence (unforced dissipation): if \( v_s(t)\equiv 0 \), then
\[ \frac{dE(t)}{dt} = -R\,i^2(t) \le 0. \]
Therefore \( E(t) \) is non-increasing, so energy cannot grow spontaneously in a passive RLC network with \( R > 0 \). This provides a rigorous qualitative stability check: trajectories are energetically bounded and, in many standard topologies, currents/voltages decay as energy is dissipated in resistors.
9. Computational Implementations
We simulate the series RLC model using the physically meaningful variables \( x_1=i(t) \), \( x_2=v_C(t) \). From KVL: \( L\,\dot{i} = v_s - R i - v_C \) and capacitor law: \( \dot{v}_C = i/C \).
\[ \dot{x}_1(t) = \frac{1}{L}\big(v_s(t) - R x_1(t) - x_2(t)\big),\qquad \dot{x}_2(t) = \frac{1}{C}x_1(t). \]
9.1 Python (NumPy/SciPy; optional SymPy for checks)
Recommended libraries for system dynamics simulation: NumPy (arrays), SciPy (ODE solvers), and optionally SymPy (symbolic validation).
import numpy as np
from scipy.integrate import solve_ivp
# Parameters
R = 2.0
L = 0.5
C = 0.25
def v_s(t):
# Example input: a bounded sinusoid plus a step-like component
return 1.0 * np.sin(2.0 * t) + (1.0 if t >= 1.0 else 0.0)
def rlc_series_ode(t, x):
i, vC = x
di = (v_s(t) - R * i - vC) / L
dvC = i / C
return [di, dvC]
# Initial conditions: i(0), vC(0)
x0 = [0.0, 0.0]
t_span = (0.0, 10.0)
t_eval = np.linspace(t_span[0], t_span[1], 4000)
sol = solve_ivp(rlc_series_ode, t_span, x0, t_eval=t_eval, rtol=1e-8, atol=1e-10)
t = sol.t
i = sol.y[0]
vC = sol.y[1]
# Energy check: E(t) = 0.5*L*i^2 + 0.5*C*vC^2
E = 0.5 * L * i**2 + 0.5 * C * vC**2
# Approximate energy balance derivative check (finite difference)
dt = t[1] - t[0]
dE_dt_num = np.gradient(E, dt)
balance_rhs = np.array([v_s(tt) for tt in t]) * i - R * i**2
print("Max |dE/dt - (v_s*i - R*i^2)| ~", np.max(np.abs(dE_dt_num - balance_rhs)))
The final line numerically verifies the energy identity from Section 8 (up to discretization and solver tolerances).
9.2 C++ (from-scratch RK4; optional Boost.Odeint / Eigen)
For C++ system dynamics: a minimal baseline is a custom Runge–Kutta integrator; for larger projects, consider Boost.Odeint (ODE integration) and Eigen (linear algebra).
#include <iostream>
#include <vector>
#include <cmath>
struct Params {
double R, L, C;
};
double v_s(double t) {
// Example input
return std::sin(2.0 * t) + (t >= 1.0 ? 1.0 : 0.0);
}
// x = [i, vC]
std::vector<double> f(double t, const std::vector<double>& x, const Params& p) {
double i = x[0];
double vC = x[1];
double di = (v_s(t) - p.R * i - vC) / p.L;
double dvC = i / p.C;
return {di, dvC};
}
std::vector<double> rk4_step(double t, const std::vector<double>& x, double h, const Params& p) {
auto k1 = f(t, x, p);
std::vector<double> x2 = {x[0] + 0.5 * h * k1[0], x[1] + 0.5 * h * k1[1]};
auto k2 = f(t + 0.5 * h, x2, p);
std::vector<double> x3 = {x[0] + 0.5 * h * k2[0], x[1] + 0.5 * h * k2[1]};
auto k3 = f(t + 0.5 * h, x3, p);
std::vector<double> x4 = {x[0] + h * k3[0], x[1] + h * k3[1]};
auto k4 = f(t + h, x4, p);
return {
x[0] + (h / 6.0) * (k1[0] + 2.0 * k2[0] + 2.0 * k3[0] + k4[0]),
x[1] + (h / 6.0) * (k1[1] + 2.0 * k2[1] + 2.0 * k3[1] + k4[1])
};
}
int main() {
Params p{2.0, 0.5, 0.25};
double t0 = 0.0, tf = 10.0, h = 0.001;
std::vector<double> x = {0.0, 0.0};
for (double t = t0; t <= tf; t += h) {
// Example: print every 1000 steps
if (static_cast<int>(t / h) % 1000 == 0) {
double i = x[0], vC = x[1];
double E = 0.5 * p.L * i * i + 0.5 * p.C * vC * vC;
std::cout << t << " " << i << " " << vC << " " << E << "\n";
}
x = rk4_step(t, x, h, p);
}
return 0;
}
9.3 Java (from-scratch RK4; optional Apache Commons Math)
In Java, a common library choice is Apache Commons Math for ODE solvers; however, a transparent RK4 baseline is instructive and portable.
import java.util.function.DoubleUnaryOperator;
public class RLCSeriesRK4 {
static class Params {
double R, L, C;
Params(double R, double L, double C) { this.R = R; this.L = L; this.C = C; }
}
static double v_s(double t) {
return Math.sin(2.0 * t) + (t >= 1.0 ? 1.0 : 0.0);
}
// x = [i, vC]
static double[] f(double t, double[] x, Params p) {
double i = x[0];
double vC = x[1];
double di = (v_s(t) - p.R * i - vC) / p.L;
double dvC = i / p.C;
return new double[]{di, dvC};
}
static double[] rk4Step(double t, double[] x, double h, Params p) {
double[] k1 = f(t, x, p);
double[] x2 = new double[]{x[0] + 0.5*h*k1[0], x[1] + 0.5*h*k1[1]};
double[] k2 = f(t + 0.5*h, x2, p);
double[] x3 = new double[]{x[0] + 0.5*h*k2[0], x[1] + 0.5*h*k2[1]};
double[] k3 = f(t + 0.5*h, x3, p);
double[] x4 = new double[]{x[0] + h*k3[0], x[1] + h*k3[1]};
double[] k4 = f(t + h, x4, p);
return new double[]{
x[0] + (h/6.0)*(k1[0] + 2.0*k2[0] + 2.0*k3[0] + k4[0]),
x[1] + (h/6.0)*(k1[1] + 2.0*k2[1] + 2.0*k3[1] + k4[1])
};
}
public static void main(String[] args) {
Params p = new Params(2.0, 0.5, 0.25);
double t0 = 0.0, tf = 10.0, h = 1e-3;
double[] x = new double[]{0.0, 0.0};
int steps = (int)Math.round((tf - t0)/h);
for (int k = 0; k <= steps; k++) {
double t = t0 + k*h;
if (k % 1000 == 0) {
double i = x[0], vC = x[1];
double E = 0.5*p.L*i*i + 0.5*p.C*vC*vC;
System.out.println(t + " " + i + " " + vC + " " + E);
}
x = rk4Step(t, x, h, p);
}
}
}
9.4 MATLAB (ODE45) and Simulink (Integrator-based model)
MATLAB provides reliable ODE solvers (e.g., ode45) and
Simulink supports block-level implementation directly from the
first-order equations.
% Series RLC: x1=i, x2=vC
R = 2.0; L = 0.5; C = 0.25;
vs = @(t) sin(2*t) + (t >= 1.0);
ode = @(t,x) [ (vs(t) - R*x(1) - x(2))/L ; x(1)/C ];
tspan = [0 10];
x0 = [0; 0];
opts = odeset('RelTol',1e-8,'AbsTol',1e-10);
[t,x] = ode45(ode, tspan, x0, opts);
i = x(:,1);
vC = x(:,2);
E = 0.5*L*i.^2 + 0.5*C*vC.^2;
% Energy balance check (finite difference)
dt = t(2)-t(1);
dE = gradient(E, dt);
rhs = arrayfun(vs,t).*i - R*i.^2;
fprintf('Max energy balance error: %g\n', max(abs(dE - rhs)));
Simulink build (block-level):
- Use two Integrator blocks to integrate \( \dot{i} \) and \( \dot{v}_C \).
- Compute \( \dot{i}=(v_s - R i - v_C)/L \) using Sum, Gain, and a source block for \( v_s(t) \).
- Compute \( \dot{v}_C=i/C \) using a Gain block \( 1/C \).
- Optionally compute energy \( E=\frac{1}{2}L i^2 + \frac{1}{2}C v_C^2 \) using Product, Gain, and Sum blocks for validation.
9.5 Wolfram Mathematica (NDSolve)
R = 2.0; L = 0.5; C = 0.25;
vs[t_] := Sin[2 t] + Boole[t >= 1.0];
(* State variables: i(t), vC(t) *)
eqs = {
i'[t] == (vs[t] - R i[t] - vC[t])/L,
vC'[t] == i[t]/C,
i[0] == 0.0,
vC[0] == 0.0
};
sol = NDSolve[eqs, {i, vC}, {t, 0, 10}, AccuracyGoal -> 12, PrecisionGoal -> 12][[1]];
E[t_] := 1/2 L (i[t] /. sol)^2 + 1/2 C (vC[t] /. sol)^2;
(* Evaluate energy balance residual *)
residual[t_] := D[E[t], t] - (vs[t] (i[t] /. sol) - R (i[t] /. sol)^2);
MaxValue[Abs[residual[t]], 0 <= t <= 10]
This Mathematica snippet reproduces the same energy identity check symbolically/numerically within the solver’s precision settings.
10. Problems and Solutions
The following problems reinforce the modeling workflow: apply KVL/KCL, substitute element laws, reduce to an ODE (or first-order system), and verify physical structure through continuity and energy arguments.
Problem 1 (Series RLC: ODE in current). A series RLC loop is driven by a source voltage \( v_s(t) \). Derive a single ODE in the loop current \( i(t) \). Assume \( R, L, C > 0 \) and that all variables are sufficiently smooth.
Solution. Start with KVL:
\[ v_s(t) = R i(t) + L\frac{d i(t)}{dt} + v_C(t). \]
Use the capacitor law \( i(t)=C\,dv_C(t)/dt \), i.e., \( dv_C/dt = i/C \). Differentiate the KVL equation once:
\[ \frac{d v_s(t)}{dt} = R\frac{d i(t)}{dt} + L\frac{d^2 i(t)}{dt^2} + \frac{d v_C(t)}{dt}. \]
Substitute \( d v_C/dt = i/C \):
\[ L\frac{d^2 i(t)}{dt^2} + R\frac{d i(t)}{dt} + \frac{1}{C}i(t) = \frac{d v_s(t)}{dt}. \]
This is the desired second-order ODE in \( i(t) \). Initial conditions can be taken as \( i(0) \) and \( v_C(0) \) (or equivalently \( i(0) \) and \( \dot{i}(0) \) consistent with KVL).
Problem 2 (Continuity consequence). Show that if the capacitor current \( i_C(t) \) is bounded on \( [0,T] \), then the capacitor voltage cannot jump at any time in \( [0,T] \).
Solution. From \( i_C=C\,dv_C/dt \), integrate from \( t^- \) to \( t^+ \):
\[ v_C(t^+) - v_C(t^-) = \frac{1}{C}\int_{t^-}^{t^+} i_C(\sigma)\,d\sigma. \]
If \( i_C \) is bounded, the integral tends to \( 0 \) as \( t^+ \downarrow t \) and \( t^- \uparrow t \), hence \( v_C(t^+) = v_C(t^-) \). Therefore \( v_C(t) \) is continuous on \( [0,T] \).
Problem 3 (Parallel RLC: node-voltage ODE). A parallel RLC network is driven by an injected current source \( i_s(t) \) into the node of voltage \( v(t) \). Derive an ODE in \( v(t) \).
Solution. Apply KCL:
\[ i_s(t) = \frac{v(t)}{R} + C\frac{d v(t)}{dt} + i_L(t). \]
Differentiate and use \( v = L\,di_L/dt \Rightarrow di_L/dt = v/L \):
\[ \frac{d i_s(t)}{dt} = \frac{1}{R}\frac{d v(t)}{dt} + C\frac{d^2 v(t)}{dt^2} + \frac{v(t)}{L}. \]
Rearranging yields:
\[ C\frac{d^2 v(t)}{dt^2} + \frac{1}{R}\frac{d v(t)}{dt} + \frac{1}{L}v(t) = \frac{d i_s(t)}{dt}. \]
Problem 4 (Energy decay in the unforced series RLC). For the series RLC with \( v_s(t)\equiv 0 \), prove that the total stored energy \( E(t)=\frac{1}{2}L i^2(t)+\frac{1}{2}C v_C^2(t) \) satisfies \( E(t) \le E(0) \) for all \( t \ge 0 \).
Solution. From the energy balance identity derived in Section 8 with \( v_s\equiv 0 \):
\[ \frac{dE(t)}{dt} = -R\,i^2(t) \le 0. \]
Integrate from \( 0 \) to \( t \):
\[ E(t) - E(0) = -\int_{0}^{t} R\,i^2(\sigma)\,d\sigma \le 0, \]
hence \( E(t) \le E(0) \) for all \( t \ge 0 \), with strict decrease whenever \( i(t) \not\equiv 0 \) on a time interval.
Problem 5 (First-order form from the second-order capacitor ODE). Starting from the series RLC ODE in capacitor voltage \( L C\,\ddot{v}_C + R C\,\dot{v}_C + v_C = v_s(t) \), define suitable variables and rewrite it as two coupled first-order ODEs.
Solution. Choose variables \( x_1(t)=i(t) \) and \( x_2(t)=v_C(t) \). Since \( i=C\,\dot{v}_C \), we get \( \dot{x}_2 = x_1/C \). From KVL \( v_s = R i + L\dot{i} + v_C \), solve for \( \dot{i} \):
\[ \dot{x}_1(t)=\dot{i}(t)=\frac{1}{L}\big(v_s(t)-R x_1(t)-x_2(t)\big), \qquad \dot{x}_2(t)=\frac{1}{C}x_1(t). \]
This is exactly the simulation form used in Section 9.
11. Summary
We derived dynamic equations for RLC circuits directly from Kirchhoff’s laws and element constitutive relations, obtaining second-order ODEs for canonical series and parallel topologies and a scalable workflow for larger networks. We proved continuity properties of \( i_L(t) \) and \( v_C(t) \) under finite excitations and established an energy balance identity \( \frac{dE}{dt}=v_s i - R i^2 \), which provides a principled passivity and stability check. These foundations will support multi-domain analogies (Lesson 2) and network modeling in fluid/thermal domains (Lessons 3–4).
12. References
- Kirchhoff, G. (1845). Über den Durchgang eines elektrischen Stromes durch eine Ebene, insbesondere durch eine kreisförmige. Annalen der Physik und Chemie, 64, 497–514.
- Kirchhoff, G. (1847). Über die Auflösung der Gleichungen, auf welche man bei der Untersuchung der linearen Verteilung galvanischer Ströme geführt wird. Annalen der Physik und Chemie, 72, 497–508.
- Tellegen, B.D.H. (1952). A general network theorem, with applications. Philips Research Reports, 7, 259–269.
- Brayton, R.K., & Moser, J.K. (1964). A theory of nonlinear networks I. Quarterly of Applied Mathematics, 22(1), 1–33.
- Chua, L.O., & Lin, P.M. (1975). Computer-aided analysis of electronic circuits: algorithms and computational techniques. Proceedings of the IEEE, 63(10), 1444–1456.
- Ho, C.-W., Ruehli, A.E., & Brennan, P.A. (1975). The modified nodal approach to network analysis. IEEE Transactions on Circuits and Systems, 22(6), 504–509.
- Desoer, C.A., & Kuh, E.S. (1969). The basic theory of lumped linear networks. McGraw–Hill (theoretical monograph frequently cited in journals).
- Willems, J.C. (1972). Dissipative dynamical systems—Part I: General theory. Archive for Rational Mechanics and Analysis, 45, 321–351.