Engineering Reference

Electrical Engineering Equations & Formulas

Complete reference with LaTeX syntax and MATLAB commands for every formula
How this document works

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.

1. Fundamental Quantities & Units
QuantitySymbolUnitSI SymbolRelationship
Voltage$V$VoltV$V = W/A$
Current$I$AmpereA$I = Q/t$
Resistance$R$Ohm$\Omega$$R = V/I$
Capacitance$C$FaradF$C = Q/V$
Inductance$L$HenryH$V = L\,dI/dt$
Power$P$WattW$P = VI$
Energy$W$JouleJ$W = Pt$
Charge$Q$CoulombC$Q = It$
Frequency$f$HertzHz$f = 1/T$
Impedance$Z$Ohm$\Omega$$Z = V/I$ (complex)
Conductance$G$SiemensS$G = 1/R$
Magnetic flux$\Phi$WeberWb$\Phi = BA$
Magnetic field$B$TeslaT$B = \Phi/A$
Electric field$E$Volt/meterV/m$E = F/Q$
Charge–Current Relationship
$$Q = \int_0^t I(\tau)\,d\tau \qquad \Leftrightarrow \qquad I = \frac{dQ}{dt}$$

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
Frequency–Period–Angular Frequency
$$f = \frac{1}{T} \qquad \omega = 2\pi f = \frac{2\pi}{T}$$

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
2. DC Circuit Analysis

Ohm's Law

Ohm's Law — Three Forms
$$V = IR \qquad I = \frac{V}{R} \qquad R = \frac{V}{I}$$

LaTeX: V = IR \qquad I = \frac{V}{R} \qquad R = \frac{V}{I}

V = 12; R = 4;
I = V / R;             % I = 3 A

Kirchhoff's Laws

Kirchhoff's Current Law (KCL)
$$\sum_{k=1}^{n} I_k = 0 \qquad \text{(at any node)}$$

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

Kirchhoff's Voltage Law (KVL)
$$\sum_{k=1}^{n} V_k = 0 \qquad \text{(around any closed loop)}$$

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 ✓

Series & Parallel

Resistors in Series
$$R_{\text{total}} = R_1 + R_2 + \cdots + R_n$$

LaTeX: R_{\text{total}} = R_1 + R_2 + \cdots + R_n

R = [100 220 330];
R_total = sum(R);        % 650 Ω
Resistors in Parallel
$$\frac{1}{R_{\text{total}}} = \frac{1}{R_1} + \frac{1}{R_2} + \cdots + \frac{1}{R_n}$$

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 Ω

Voltage & Current Dividers

Voltage Divider
$$V_{\text{out}} = V_{\text{in}} \cdot \frac{R_2}{R_1 + R_2}$$
V_in = 12; R1 = 3e3; R2 = 1e3;
V_out = V_in * R2 / (R1 + R2);    % 3 V
Current Divider
$$I_1 = I_{\text{total}} \cdot \frac{R_2}{R_1 + R_2}$$
I_total = 2; R1 = 6; R2 = 3;
I1 = I_total * R2 / (R1 + R2);    % 0.667 A

Network Theorems

Thévenin Equivalent
$$V_{\text{Th}} = V_{\text{open-circuit}} \qquad R_{\text{Th}} = \frac{V_{\text{oc}}}{I_{\text{sc}}}$$

Any linear circuit can be replaced by a single voltage source $V_{\text{Th}}$ in series with $R_{\text{Th}}$.

Norton Equivalent
$$I_N = I_{\text{short-circuit}} \qquad R_N = R_{\text{Th}} \qquad V_{\text{Th}} = I_N R_N$$
Maximum Power Transfer
$$P_{\max} = \frac{V_{\text{Th}}^2}{4R_{\text{Th}}} \qquad \text{when } R_{\text{load}} = 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
Wheatstone Bridge — Balance Condition
$$\frac{R_1}{R_2} = \frac{R_3}{R_x} \qquad \Rightarrow \qquad R_x = R_3 \cdot \frac{R_2}{R_1}$$
R1 = 100; R2 = 200; R3 = 500;
Rx = R3 * R2 / R1;                      % 1000 Ω
3. AC Circuit Analysis & Phasors
Sinusoidal Voltage
$$v(t) = V_m \sin(\omega t + \phi) \qquad V_{\text{rms}} = \frac{V_m}{\sqrt{2}}$$

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)
Phasor Representation
$$v(t) = V_m \cos(\omega t + \phi) \quad \Leftrightarrow \quad \mathbf{V} = V_m \angle \phi = V_m e^{j\phi}$$

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°

Impedance

Component Impedances
$$Z_R = R \qquad Z_L = j\omega L \qquad Z_C = \frac{1}{j\omega C} = -\frac{j}{\omega C}$$

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);
Impedance — Rectangular and Polar Forms
$$Z = R + jX \qquad |Z| = \sqrt{R^2 + X^2} \qquad \theta = \arctan\!\left(\frac{X}{R}\right)$$

$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°
Admittance
$$Y = \frac{1}{Z} = G + jB \qquad \text{(siemens)}$$

$G$ = conductance, $B$ = susceptance.

Z = 100 + 1j*75;
Y = 1/Z;
G = real(Y);       % conductance
B = imag(Y);       % susceptance
Resonant Frequency
$$f_0 = \frac{1}{2\pi\sqrt{LC}} \qquad \omega_0 = \frac{1}{\sqrt{LC}}$$

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;
Quality Factor
$$Q = \frac{\omega_0 L}{R} = \frac{1}{\omega_0 CR} = \frac{1}{R}\sqrt{\frac{L}{C}} \qquad BW = \frac{f_0}{Q}$$
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
4. Electrical Power
DC Power — Three Forms
$$P = VI = I^2 R = \frac{V^2}{R}$$
V = 12; I = 3; R = 4;
P1 = V*I;        % 36 W
P2 = I^2*R;      % 36 W
P3 = V^2/R;      % 36 W
AC Power — Complex, Real, Reactive, Apparent
$$\mathbf{S} = \mathbf{V}\mathbf{I}^* = P + jQ$$
$$P = V_{\text{rms}} I_{\text{rms}} \cos\theta \qquad Q = V_{\text{rms}} I_{\text{rms}} \sin\theta \qquad S = V_{\text{rms}} I_{\text{rms}}$$

$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)
Power Factor
$$\text{PF} = \cos\theta = \frac{P}{S} = \frac{R}{|Z|}$$

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)
Three-Phase Power
$$P_{3\phi} = \sqrt{3}\, V_L I_L \cos\theta = 3 V_\phi I_\phi \cos\theta$$

$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
Energy & Power Billing
$$W = P \cdot t \qquad \text{kWh} = \frac{P \,(\text{W}) \times t \,(\text{h})}{1000}$$
P_watts = 1500; hours = 4; rate = 0.12;  % $/kWh
kWh = P_watts * hours / 1000;            % 6 kWh
cost = kWh * rate;                        % $0.72
5. Capacitors
Capacitor Fundamental Equations
$$C = \frac{Q}{V} \qquad i(t) = C\frac{dv}{dt} \qquad v(t) = \frac{1}{C}\int_0^t i(\tau)\,d\tau + v(0)$$
% 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
Energy Stored in a Capacitor
$$W_C = \frac{1}{2}CV^2 = \frac{Q^2}{2C} = \frac{1}{2}QV$$
C = 470e-6; V = 25;
W = 0.5 * C * V^2;                  % 0.147 J
Parallel-Plate Capacitance
$$C = \frac{\varepsilon_0 \varepsilon_r A}{d}$$

$\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
Capacitors in Series & Parallel
$$C_{\text{parallel}} = C_1 + C_2 + \cdots \qquad \frac{1}{C_{\text{series}}} = \frac{1}{C_1} + \frac{1}{C_2} + \cdots$$

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
6. Inductors
Inductor Fundamental Equations
$$V = L\frac{dI}{dt} \qquad I(t) = \frac{1}{L}\int_0^t V(\tau)\,d\tau + I(0)$$
Energy Stored in an Inductor
$$W_L = \frac{1}{2}LI^2$$
L = 10e-3; I = 2;
W = 0.5 * L * I^2;                  % 0.02 J
Solenoid Inductance
$$L = \frac{\mu_0 \mu_r N^2 A}{\ell}$$

$\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
Inductors in Series & Parallel
$$L_{\text{series}} = L_1 + L_2 + \cdots \qquad \frac{1}{L_{\text{parallel}}} = \frac{1}{L_1} + \frac{1}{L_2} + \cdots$$

Same pattern as resistors (opposite of capacitors).

7. RC, RL & RLC Circuits
RC Time Constant & Step Response
$$\tau = RC \qquad v_C(t) = V_s\left(1 - e^{-t/\tau}\right) \qquad \text{(charging)}$$
$$v_C(t) = V_0 \, e^{-t/\tau} \qquad \text{(discharging)}$$
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);
RL Time Constant & Step Response
$$\tau = \frac{L}{R} \qquad i(t) = \frac{V_s}{R}\left(1 - e^{-t/\tau}\right)$$
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));
Series RLC — Natural Response
$$\alpha = \frac{R}{2L} \qquad \omega_0 = \frac{1}{\sqrt{LC}} \qquad \omega_d = \sqrt{\omega_0^2 - \alpha^2}$$

Overdamped ($\alpha > \omega_0$): two real roots. Critically damped ($\alpha = \omega_0$): repeated root. Underdamped ($\alpha < \omega_0$): oscillating decay.

$$s_{1,2} = -\alpha \pm \sqrt{\alpha^2 - \omega_0^2}$$
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
Damping Ratio
$$\zeta = \frac{\alpha}{\omega_0} = \frac{R}{2}\sqrt{\frac{C}{L}}$$

$\zeta < 1$: underdamped. $\zeta = 1$: critically damped. $\zeta > 1$: overdamped.

8. Electromagnetics
Coulomb's Law
$$F = \frac{1}{4\pi\varepsilon_0}\frac{q_1 q_2}{r^2} = k_e \frac{q_1 q_2}{r^2}$$

$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
Electric Field
$$\mathbf{E} = \frac{\mathbf{F}}{q} = \frac{1}{4\pi\varepsilon_0}\frac{Q}{r^2}\hat{r} \qquad V = -\int \mathbf{E} \cdot d\mathbf{l}$$
Gauss's Law
$$\oint \mathbf{E} \cdot d\mathbf{A} = \frac{Q_{\text{enc}}}{\varepsilon_0}$$

LaTeX: \oint \mathbf{E} \cdot d\mathbf{A} = \frac{Q_{\text{enc}}}{\varepsilon_0}

Faraday's Law of Induction
$$\mathcal{E} = -\frac{d\Phi_B}{dt} = -N\frac{d\Phi_B}{dt} \qquad \text{(N turns)}$$

LaTeX: \mathcal{E} = -N\frac{d\Phi_B}{dt}

Ampere's Law (with Maxwell's correction)
$$\oint \mathbf{B} \cdot d\mathbf{l} = \mu_0 I_{\text{enc}} + \mu_0 \varepsilon_0 \frac{d\Phi_E}{dt}$$
Maxwell's Equations — Differential Form
$$\nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0} \qquad \nabla \cdot \mathbf{B} = 0$$
$$\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t} \qquad \nabla \times \mathbf{B} = \mu_0 \mathbf{J} + \mu_0 \varepsilon_0 \frac{\partial \mathbf{E}}{\partial t}$$

LaTeX: \nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}

Lorentz Force
$$\mathbf{F} = q(\mathbf{E} + \mathbf{v} \times \mathbf{B})$$
Electromagnetic Wave — Speed of Light
$$c = \frac{1}{\sqrt{\mu_0 \varepsilon_0}} = 2.998 \times 10^8 \text{ m/s} \qquad c = f\lambda$$
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
9. Signals & Systems
Euler's Formula
$$e^{j\theta} = \cos\theta + j\sin\theta \qquad \cos\theta = \frac{e^{j\theta} + e^{-j\theta}}{2} \qquad \sin\theta = \frac{e^{j\theta} - e^{-j\theta}}{2j}$$
Fourier Series
$$f(t) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\left[a_n \cos(n\omega_0 t) + b_n \sin(n\omega_0 t)\right]$$
$$a_n = \frac{2}{T}\int_0^T f(t)\cos(n\omega_0 t)\,dt \qquad b_n = \frac{2}{T}\int_0^T f(t)\sin(n\omega_0 t)\,dt$$
Fourier Transform
$$F(\omega) = \int_{-\infty}^{\infty} f(t)\,e^{-j\omega t}\,dt \qquad f(t) = \frac{1}{2\pi}\int_{-\infty}^{\infty} F(\omega)\,e^{j\omega t}\,d\omega$$
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)))
Laplace Transform
$$F(s) = \int_0^{\infty} f(t)\,e^{-st}\,dt \qquad s = \sigma + j\omega$$
$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))
Transfer Function
$$H(s) = \frac{Y(s)}{X(s)} = \frac{b_m s^m + \cdots + b_0}{a_n s^n + \cdots + a_0}$$
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
Decibels
$$\text{dB} = 20\log_{10}\!\left(\frac{V_{\text{out}}}{V_{\text{in}}}\right) = 10\log_{10}\!\left(\frac{P_{\text{out}}}{P_{\text{in}}}\right)$$
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
Sampling Theorem (Nyquist)
$$f_s \geq 2 f_{\max} \qquad \text{(Nyquist rate)}$$

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)
10. Control Systems
Closed-Loop Transfer Function
$$T(s) = \frac{G(s)}{1 + G(s)H(s)}$$

$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
PID Controller
$$u(t) = K_p e(t) + K_i \int_0^t e(\tau)\,d\tau + K_d \frac{de}{dt}$$
$$C(s) = K_p + \frac{K_i}{s} + K_d s$$
Kp = 10; Ki = 5; Kd = 1;
C = pid(Kp, Ki, Kd);
G = tf([1],[1 10 20]);
T = feedback(C*G, 1);
step(T)
State-Space Representation
$$\dot{\mathbf{x}} = \mathbf{A}\mathbf{x} + \mathbf{B}\mathbf{u} \qquad \mathbf{y} = \mathbf{C}\mathbf{x} + \mathbf{D}\mathbf{u}$$
A = [0 1; -2 -3]; B = [0; 1];
C = [1 0]; D = 0;
sys = ss(A, B, C, D);
step(sys)
Stability — Routh Criterion & Poles
$$\text{Stable} \iff \text{all poles of } T(s) \text{ have } \operatorname{Re}(s_i) < 0$$
T = feedback(tf([1],[1 5 6]), 1);
poles_T = pole(T);
is_stable = all(real(poles_T) < 0);   % true = stable
11. Semiconductors & Diodes
Ideal Diode Equation (Shockley)
$$I = I_S\left(e^{V_D / nV_T} - 1\right) \qquad V_T = \frac{kT}{q} \approx 26 \text{ mV at 300 K}$$

$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
BJT — DC Operating Point
$$I_C = \beta I_B \qquad I_E = I_C + I_B = (\beta + 1)I_B \qquad \alpha = \frac{\beta}{\beta + 1}$$
beta = 100; IB = 20e-6;
IC = beta * IB;                       % 2 mA
IE = IC + IB;                         % 2.02 mA
alpha = beta/(beta+1);                % 0.9901
MOSFET — Drain Current (Saturation)
$$I_D = \frac{1}{2} k_n' \frac{W}{L}(V_{GS} - V_{th})^2 \qquad \text{for } V_{DS} \geq V_{GS} - V_{th}$$
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
12. Operational Amplifiers
Ideal Op-Amp Rules

(1) No current flows into the inputs: $I_+ = I_- = 0$. (2) With negative feedback: $V_+ = V_-$ (virtual short).

Inverting Amplifier
$$V_{\text{out}} = -\frac{R_f}{R_1}V_{\text{in}} \qquad A_v = -\frac{R_f}{R_1}$$
R1 = 10e3; Rf = 100e3;
Av = -Rf/R1;                          % gain = -10
Non-Inverting Amplifier
$$V_{\text{out}} = \left(1 + \frac{R_f}{R_1}\right)V_{\text{in}} \qquad A_v = 1 + \frac{R_f}{R_1}$$
R1 = 10e3; Rf = 40e3;
Av = 1 + Rf/R1;                       % gain = 5
Summing Amplifier
$$V_{\text{out}} = -R_f\left(\frac{V_1}{R_1} + \frac{V_2}{R_2} + \frac{V_3}{R_3}\right)$$
Differentiator & Integrator
$$V_{\text{out}} = -RC\frac{dV_{\text{in}}}{dt} \quad \text{(diff.)} \qquad V_{\text{out}} = -\frac{1}{RC}\int V_{\text{in}}\,dt \quad \text{(int.)}$$
Gain-Bandwidth Product
$$\text{GBW} = A_v \cdot f_{-3\text{dB}} = \text{constant}$$
GBW = 1e6;                    % 1 MHz (typical)
Av = 100;
f_3dB = GBW / Av;             % 10 kHz bandwidth
13. Digital & Logic Fundamentals
Number Base Conversions
$$N_{10} = d_n \cdot b^n + d_{n-1} \cdot b^{n-1} + \cdots + d_1 \cdot b^1 + d_0 \cdot b^0$$
bin2dec('11010')           % 26
dec2bin(26)                % '11010'
dec2hex(255)               % 'FF'
hex2dec('FF')              % 255
Boolean Algebra Laws
$$A + 0 = A \qquad A \cdot 1 = A \qquad A + A' = 1 \qquad A \cdot A' = 0$$
$$\text{De Morgan's: } \overline{A \cdot B} = \bar{A} + \bar{B} \qquad \overline{A + B} = \bar{A} \cdot \bar{B}$$

LaTeX: \overline{A \cdot B} = \bar{A} + \bar{B}

ADC / DAC Resolution
$$\text{Resolution} = \frac{V_{\text{ref}}}{2^n - 1} \qquad V_{\text{out}} = D \cdot \frac{V_{\text{ref}}}{2^n - 1}$$
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)
14. Communications & Information
Shannon Channel Capacity
$$C = B \log_2\!\left(1 + \frac{S}{N}\right) \quad \text{bits/s}$$

$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
Friis Transmission (Free-Space Path Loss)
$$P_r = P_t G_t G_r \left(\frac{\lambda}{4\pi d}\right)^2 \qquad \text{FSPL (dB)} = 20\log_{10}\!\left(\frac{4\pi d}{\lambda}\right)$$
f = 2.4e9; c = 3e8; d = 100;
lambda = c/f;
FSPL_dB = 20*log10(4*pi*d/lambda);     % 80.04 dB
Noise Figure & Noise Temperature
$$F = \frac{\text{SNR}_{\text{in}}}{\text{SNR}_{\text{out}}} \qquad T_e = T_0(F - 1) \qquad T_0 = 290 \text{ K}$$
Modulation Index (AM)
$$m = \frac{V_m}{V_c} \qquad P_{\text{total}} = P_c\left(1 + \frac{m^2}{2}\right)$$
Link Budget
$$P_{\text{rx}} = P_{\text{tx}} + G_{\text{tx}} - L_{\text{cable}} - \text{FSPL} + G_{\text{rx}} \quad \text{(all in dB)}$$
Ptx = 20; Gtx = 5; Lcable = 2; FSPL = 80; Grx = 3;
Prx = Ptx + Gtx - Lcable - FSPL + Grx;  % -54 dBm
15. Physical Constants
ConstantSymbolValueMATLAB
Speed of light$c$$2.998 \times 10^8$ m/sc = 299792458;
Permittivity of free space$\varepsilon_0$$8.854 \times 10^{-12}$ F/meps0 = 8.854e-12;
Permeability of free space$\mu_0$$4\pi \times 10^{-7}$ H/mmu0 = 4*pi*1e-7;
Elementary charge$q$ or $e$$1.602 \times 10^{-19}$ Cq = 1.602e-19;
Boltzmann constant$k$$1.381 \times 10^{-23}$ J/Kk = 1.381e-23;
Planck's constant$h$$6.626 \times 10^{-34}$ J·sh = 6.626e-34;
Electron mass$m_e$$9.109 \times 10^{-31}$ kgme = 9.109e-31;
Thermal voltage (300 K)$V_T$$\approx 25.9$ mVVT = k*300/q;
Intrinsic carrier conc. (Si)$n_i$$1.5 \times 10^{10}$ cm$^{-3}$ni = 1.5e10;