Each formula is shown three ways: (1) rendered equation, (2) the LaTeX code to type it in Obsidian/Overleaf, (3) MATLAB code to compute it. Variables use standard EE conventions: $j$ for the imaginary unit (not $i$), $\omega$ for angular frequency, bold for vectors/matrices.
| Quantity | Symbol | Unit | SI Symbol | Relationship |
|---|---|---|---|---|
| Voltage | $V$ | Volt | V | $V = W/A$ |
| Current | $I$ | Ampere | A | $I = Q/t$ |
| Resistance | $R$ | Ohm | $\Omega$ | $R = V/I$ |
| Capacitance | $C$ | Farad | F | $C = Q/V$ |
| Inductance | $L$ | Henry | H | $V = L\,dI/dt$ |
| Power | $P$ | Watt | W | $P = VI$ |
| Energy | $W$ | Joule | J | $W = Pt$ |
| Charge | $Q$ | Coulomb | C | $Q = It$ |
| Frequency | $f$ | Hertz | Hz | $f = 1/T$ |
| Impedance | $Z$ | Ohm | $\Omega$ | $Z = V/I$ (complex) |
| Conductance | $G$ | Siemens | S | $G = 1/R$ |
| Magnetic flux | $\Phi$ | Weber | Wb | $\Phi = BA$ |
| Magnetic field | $B$ | Tesla | T | $B = \Phi/A$ |
| Electric field | $E$ | Volt/meter | V/m | $E = F/Q$ |
LaTeX: Q = \int_0^t I(\tau)\,d\tau \qquad I = \frac{dQ}{dt}
syms tau t_val
I_func = @(tau) 5*ones(size(tau)); % constant 5A current
Q = integral(I_func, 0, 3); % charge over 3 seconds = 15 C
LaTeX: \omega = 2\pi f = \frac{2\pi}{T}
f = 60; % Hz (US power grid)
T = 1/f; % period in seconds
omega = 2*pi*f; % angular frequency in rad/s
LaTeX: V = IR \qquad I = \frac{V}{R} \qquad R = \frac{V}{I}
V = 12; R = 4;
I = V / R; % I = 3 A
The sum of currents entering a node equals the sum leaving. Convention: currents entering are positive, leaving are negative.
LaTeX: \sum_{k=1}^{n} I_k = 0
The sum of voltage drops around any closed path equals zero.
LaTeX: \sum_{k=1}^{n} V_k = 0
% KVL example: V_source = V_R1 + V_R2
V_s = 12; R1 = 3; R2 = 9;
I = V_s / (R1 + R2); % 1 A
V_R1 = I*R1; % 3 V
V_R2 = I*R2; % 9 V
check = V_s - V_R1 - V_R2; % 0 ✓
LaTeX: R_{\text{total}} = R_1 + R_2 + \cdots + R_n
R = [100 220 330];
R_total = sum(R); % 650 Ω
For two resistors: $R_{\text{total}} = \frac{R_1 R_2}{R_1 + R_2}$
LaTeX: \frac{1}{R_{\text{total}}} = \frac{1}{R_1} + \frac{1}{R_2} + \cdots + \frac{1}{R_n}
R = [100 220 330];
R_total = 1 / sum(1./R); % 57.89 Ω
V_in = 12; R1 = 3e3; R2 = 1e3;
V_out = V_in * R2 / (R1 + R2); % 3 V
I_total = 2; R1 = 6; R2 = 3;
I1 = I_total * R2 / (R1 + R2); % 0.667 A
Any linear circuit can be replaced by a single voltage source $V_{\text{Th}}$ in series with $R_{\text{Th}}$.
V_th = 10; R_th = 50;
R_load = R_th; % match impedance
P_max = V_th^2 / (4*R_th); % 0.5 W
R1 = 100; R2 = 200; R3 = 500;
Rx = R3 * R2 / R1; % 1000 Ω
LaTeX: v(t) = V_m \sin(\omega t + \phi) \qquad V_{\text{rms}} = \frac{V_m}{\sqrt{2}}
Vm = 170; f = 60; phi = 0;
omega = 2*pi*f;
t = linspace(0, 1/f, 1000);
v = Vm * sin(omega*t + phi);
V_rms = Vm / sqrt(2); % 120.2 V (US mains)
LaTeX: \mathbf{V} = V_m \angle \phi = V_m e^{j\phi}
Vm = 170; phi = deg2rad(30);
V_phasor = Vm * exp(1j*phi); % complex phasor
mag = abs(V_phasor); % 170
angle_deg = rad2deg(angle(V_phasor)); % 30°
LaTeX: Z_R = R \quad Z_L = j\omega L \quad Z_C = \frac{1}{j\omega C}
R = 100; L = 0.5; C = 20e-6; omega = 2*pi*60;
Z_R = R;
Z_L = 1j*omega*L;
Z_C = 1/(1j*omega*C);
$R$ = resistance (real part), $X$ = reactance (imaginary part). $X > 0$ = inductive, $X < 0$ = capacitive.
Z = 100 + 1j*75;
magnitude = abs(Z); % 125 Ω
phase = rad2deg(angle(Z)); % 36.87°
$G$ = conductance, $B$ = susceptance.
Z = 100 + 1j*75;
Y = 1/Z;
G = real(Y); % conductance
B = imag(Y); % susceptance
At resonance: $Z_L = -Z_C$, the imaginary parts cancel, impedance is purely real.
L = 10e-3; C = 100e-6;
f0 = 1 / (2*pi*sqrt(L*C)); % 159.15 Hz
omega0 = 2*pi*f0;
L = 10e-3; C = 100e-6; R = 5;
omega0 = 1/sqrt(L*C);
Q = omega0*L/R;
BW = omega0 / (2*pi*Q); % bandwidth in Hz
V = 12; I = 3; R = 4;
P1 = V*I; % 36 W
P2 = I^2*R; % 36 W
P3 = V^2/R; % 36 W
$P$ = real (active) power in watts. $Q$ = reactive power in VAR. $S = |S|$ = apparent power in VA.
LaTeX: \mathbf{S} = \mathbf{V}\mathbf{I}^* = P + jQ
V_rms = 120; I_rms = 5; theta = deg2rad(30);
P = V_rms * I_rms * cos(theta); % 519.6 W (real)
Q = V_rms * I_rms * sin(theta); % 300 VAR (reactive)
S = V_rms * I_rms; % 600 VA (apparent)
PF = 1 (purely resistive, ideal). PF $<$ 1 means reactive power is present. "Leading" = capacitive. "Lagging" = inductive.
P = 519.6; S = 600;
PF = P / S; % 0.866 (lagging if inductive)
$V_L$ = line-to-line voltage, $V_\phi$ = phase voltage. For balanced Y-connection: $V_L = \sqrt{3}\,V_\phi$.
V_L = 480; I_L = 20; theta = deg2rad(25);
P_3ph = sqrt(3) * V_L * I_L * cos(theta); % 15,045 W
P_watts = 1500; hours = 4; rate = 0.12; % $/kWh
kWh = P_watts * hours / 1000; % 6 kWh
cost = kWh * rate; % $0.72
% Capacitor with constant current charging
C = 100e-6; I = 0.01; t = 5; % 100 µF, 10 mA, 5 seconds
v = I*t/C; % 500 V
C = 470e-6; V = 25;
W = 0.5 * C * V^2; % 0.147 J
$\varepsilon_0 = 8.854 \times 10^{-12}$ F/m (permittivity of free space), $\varepsilon_r$ = relative permittivity, $A$ = plate area, $d$ = separation.
eps0 = 8.854e-12; eps_r = 4.7; % FR-4 PCB material
A = 0.01; d = 1e-3; % 100 cm², 1 mm gap
C = eps0 * eps_r * A / d; % 416 pF
Note: opposite of resistors — capacitors add in parallel, reciprocal-add in series.
C = [10e-6, 22e-6, 47e-6];
C_par = sum(C); % 79 µF
C_ser = 1/sum(1./C); % 5.87 µF
L = 10e-3; I = 2;
W = 0.5 * L * I^2; % 0.02 J
$\mu_0 = 4\pi \times 10^{-7}$ H/m, $N$ = number of turns, $A$ = cross-section area, $\ell$ = length.
mu0 = 4*pi*1e-7; mu_r = 1; N = 100; A = 1e-4; ell = 0.1;
L = mu0*mu_r*N^2*A/ell; % 12.57 µH
Same pattern as resistors (opposite of capacitors).
R = 10e3; C = 100e-6; Vs = 5;
tau = R*C; % 1 second
t = linspace(0, 5*tau, 500);
v_charge = Vs*(1 - exp(-t/tau));
v_discharge = Vs*exp(-t/tau);
R = 100; L = 0.5; Vs = 12;
tau = L/R; % 5 ms
t = linspace(0, 5*tau, 500);
i = (Vs/R)*(1 - exp(-t/tau));
Overdamped ($\alpha > \omega_0$): two real roots. Critically damped ($\alpha = \omega_0$): repeated root. Underdamped ($\alpha < \omega_0$): oscillating decay.
R = 10; L = 0.1; C = 100e-6;
alpha = R/(2*L);
omega0 = 1/sqrt(L*C);
if alpha < omega0
omega_d = sqrt(omega0^2 - alpha^2);
disp('Underdamped — oscillates')
elseif alpha == omega0
disp('Critically damped')
else
disp('Overdamped')
end
$\zeta < 1$: underdamped. $\zeta = 1$: critically damped. $\zeta > 1$: overdamped.
$k_e = 8.988 \times 10^9$ N·m²/C²
ke = 8.988e9; q1 = 1e-6; q2 = 2e-6; r = 0.1;
F = ke * q1 * q2 / r^2; % 1.798 N
LaTeX: \oint \mathbf{E} \cdot d\mathbf{A} = \frac{Q_{\text{enc}}}{\varepsilon_0}
LaTeX: \mathcal{E} = -N\frac{d\Phi_B}{dt}
LaTeX: \nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}
mu0 = 4*pi*1e-7; eps0 = 8.854e-12;
c = 1/sqrt(mu0*eps0); % 2.998e8 m/s
f = 2.4e9; % Wi-Fi frequency
lambda = c/f; % 0.125 m
Fs = 1000; t = 0:1/Fs:1-1/Fs;
x = sin(2*pi*50*t) + 0.5*sin(2*pi*120*t);
X = fft(x);
f_axis = (0:length(X)-1)*Fs/length(X);
plot(f_axis(1:length(X)/2), abs(X(1:length(X)/2)))
| $f(t)$ | $F(s)$ | MATLAB |
|---|---|---|
| $\delta(t)$ | $1$ | laplace(dirac(t)) |
| $u(t)$ | $\frac{1}{s}$ | laplace(heaviside(t)) |
| $e^{-at}$ | $\frac{1}{s+a}$ | laplace(exp(-a*t)) |
| $t^n$ | $\frac{n!}{s^{n+1}}$ | laplace(t^n) |
| $\sin(\omega t)$ | $\frac{\omega}{s^2+\omega^2}$ | laplace(sin(w*t)) |
| $\cos(\omega t)$ | $\frac{s}{s^2+\omega^2}$ | laplace(cos(w*t)) |
| $e^{-at}\sin(\omega t)$ | $\frac{\omega}{(s+a)^2+\omega^2}$ | laplace(exp(-a*t)*sin(w*t)) |
num = [1 2]; % s + 2
den = [1 3 2]; % s^2 + 3s + 2
H = tf(num, den);
step(H) % plot step response
bode(H) % plot frequency response
V_out = 5; V_in = 1;
dB_voltage = 20*log10(V_out/V_in); % 13.98 dB
P_out = 100; P_in = 1;
dB_power = 10*log10(P_out/P_in); % 20 dB
To digitize a signal without aliasing, sample at least twice the highest frequency.
f_max = 20e3; % 20 kHz (audio)
f_s_min = 2 * f_max; % 40 kHz (CD uses 44.1 kHz)
$G(s)$ = forward path, $H(s)$ = feedback path. Unity feedback: $H(s) = 1$.
G = tf([1],[1 5 6]);
H = tf(1);
T = feedback(G, H); % closed-loop TF
Kp = 10; Ki = 5; Kd = 1;
C = pid(Kp, Ki, Kd);
G = tf([1],[1 10 20]);
T = feedback(C*G, 1);
step(T)
A = [0 1; -2 -3]; B = [0; 1];
C = [1 0]; D = 0;
sys = ss(A, B, C, D);
step(sys)
T = feedback(tf([1],[1 5 6]), 1);
poles_T = pole(T);
is_stable = all(real(poles_T) < 0); % true = stable
$I_S$ = reverse saturation current, $n$ = ideality factor (1–2), $V_T$ = thermal voltage.
Is = 1e-12; n = 1; VT = 26e-3;
Vd = 0.6;
I = Is*(exp(Vd/(n*VT)) - 1); % 12.7 mA
beta = 100; IB = 20e-6;
IC = beta * IB; % 2 mA
IE = IC + IB; % 2.02 mA
alpha = beta/(beta+1); % 0.9901
kn = 200e-6; W = 10e-6; L = 1e-6; Vgs = 2; Vth = 0.7;
Id = 0.5*kn*(W/L)*(Vgs - Vth)^2; % 1.69 mA
(1) No current flows into the inputs: $I_+ = I_- = 0$. (2) With negative feedback: $V_+ = V_-$ (virtual short).
R1 = 10e3; Rf = 100e3;
Av = -Rf/R1; % gain = -10
R1 = 10e3; Rf = 40e3;
Av = 1 + Rf/R1; % gain = 5
GBW = 1e6; % 1 MHz (typical)
Av = 100;
f_3dB = GBW / Av; % 10 kHz bandwidth
bin2dec('11010') % 26
dec2bin(26) % '11010'
dec2hex(255) % 'FF'
hex2dec('FF') % 255
LaTeX: \overline{A \cdot B} = \bar{A} + \bar{B}
Vref = 3.3; n = 12;
resolution = Vref / (2^n - 1); % 0.806 mV per step
D = 2048; % digital code
V_out = D * Vref / (2^n - 1); % 1.65 V (midrange)
$B$ = bandwidth (Hz), $S/N$ = signal-to-noise ratio (linear, not dB).
B = 20e6; SNR_dB = 30;
SNR_linear = 10^(SNR_dB/10);
C = B * log2(1 + SNR_linear); % 199.3 Mbps
f = 2.4e9; c = 3e8; d = 100;
lambda = c/f;
FSPL_dB = 20*log10(4*pi*d/lambda); % 80.04 dB
Ptx = 20; Gtx = 5; Lcable = 2; FSPL = 80; Grx = 3;
Prx = Ptx + Gtx - Lcable - FSPL + Grx; % -54 dBm
| Constant | Symbol | Value | MATLAB |
|---|---|---|---|
| Speed of light | $c$ | $2.998 \times 10^8$ m/s | c = 299792458; |
| Permittivity of free space | $\varepsilon_0$ | $8.854 \times 10^{-12}$ F/m | eps0 = 8.854e-12; |
| Permeability of free space | $\mu_0$ | $4\pi \times 10^{-7}$ H/m | mu0 = 4*pi*1e-7; |
| Elementary charge | $q$ or $e$ | $1.602 \times 10^{-19}$ C | q = 1.602e-19; |
| Boltzmann constant | $k$ | $1.381 \times 10^{-23}$ J/K | k = 1.381e-23; |
| Planck's constant | $h$ | $6.626 \times 10^{-34}$ J·s | h = 6.626e-34; |
| Electron mass | $m_e$ | $9.109 \times 10^{-31}$ kg | me = 9.109e-31; |
| Thermal voltage (300 K) | $V_T$ | $\approx 25.9$ mV | VT = k*300/q; |
| Intrinsic carrier conc. (Si) | $n_i$ | $1.5 \times 10^{10}$ cm$^{-3}$ | ni = 1.5e10; |