| Law | Equation | Notes |
|---|---|---|
| Kirchhoff’s Voltage Law (KVL) | Σ v_i = 0 or v_source = v_R + v_L + v_C + ... | Sum of voltages around any closed loop equals zero |
| Kirchhoff’s Current Law (KCL) | Σ i_in = Σ i_out | Sum of currents entering a node equals sum leaving |
| Ohm’s Law (Resistor) | v_R(t) = i(t) · R | Instantaneous relationship, no derivatives |
| Capacitor (Current) | i(t) = C · dv_C/dt | Current through capacitor |
| Capacitor (Voltage) | v_C(t) = (1/C) ∫ i(t) dt | Voltage across capacitor |
| Inductor (Voltage) | v_L(t) = L · di/dt | Voltage across inductor |
| Inductor (Current) | i(t) = (1/L) ∫ v_L(t) dt | Current through inductor |
| Series Circuit Rule | i_1 = i_2 = i_3 = ... | All components share the same current |
| Parallel Circuit Rule | v_1 = v_2 = v_3 = ... | All components share the same voltage |
## **How to Construct ODEs from Circuit Laws**
### **Step 1: Identify your circuit topology**
- Determine if components are in **series** or **parallel**
- Choose what variable to solve for (usually voltage or current)
### **Step 2: Apply KVL (for series) or KCL (for parallel)**
- **Series circuits:** Write KVL around the loop
- **Parallel circuits:** Write KCL at a node
### **Step 3: Substitute component equations**
- Replace each voltage/current with its component equation
- Use the appropriate form (derivative or integral)
### **Step 4: Eliminate unwanted variables**
- Use series/parallel rules to express everything in terms of one variable
- Substitute until you have only one unknown function
### **Step 5: Simplify to standard ODE form**
- Collect terms
- Arrange as: `a·d²y/dt² + b·dy/dt + c·y = input(t)`
---
## **Example: RC Series Circuit**
**Given:** R and C in series, input voltage v_in, output is v_C
**Step 1:** Series circuit → same current through both
**Step 2:** Apply KVL:
v_in(t) = v_R(t) + v_C(t)
**Step 3:** Substitute component equations:
- `v_R(t) = i(t)·R`
- `i(t) = C·dv_C/dt`
v_in(t) = i(t)·R + v_C(t)
v_in(t) = C·dv_C/dt·R + v_C(t)
**Step 4:** Already in terms of v_C only ✓
**Step 5:** Rearrange to standard form:
RC·dv_C/dt + v_C(t) = v_in(t)