This is the second course in University Electrical Engineering: mathematical
methods 数学方法. These are the tools the rest of the degree uses. Course 1's DC
circuits needed only algebra. From AC circuits onwards, every method uses something
taught here.
Units 2.1–2.3 review and extend the basics: calculus for signals, complex numbers and
linear algebra.
Units 2.4–2.6 are the tools for systems that change with time: differential
equations, Laplace transforms and Fourier series.
Units 2.7–2.8 deal with randomness and fields: probability for noise, and vector
calculus for electromagnetics.
Each unit opens with a real situation and shows a picture before the formal idea. It
defines its terms, derives the results that later courses use, and works two examples
that get harder. It then lists the common mistakes and ends with a short summary. The
unit also builds one habit that the whole degree uses: check every symbolic answer with
numbers. Check an integral with a sum, a solved system by putting the answer back in,
and a transform pair by computing both sides.
A scope trace rises smoothly from 0 to 5 V and then levels off. The current into a
capacitor at each moment depends on how fast the trace changes, which is its slope.
The charge delivered over a time interval is the area under the current trace.
Signals are functions of time, and calculus reads them. The derivative 导数$\dfrac{dv}{dt}$ is the slope, the rate of change at one instant. The integral 积分$\int i\,dt$ is the area collected over time.
The same signal, read twice: slope on top, area below
Three facts do most of the work in electrical engineering:
The derivative of $e^{at}$ is $a\,e^{at}$: an exponential's slope is a constant times
the exponential itself.
The integral of a rectangular pulse 矩形脉冲 of height $A$ and width $\tau$ is its
area, $A\tau$.
A triangle's area is half that of the rectangle around it. Also
$\int_0^\infty A e^{-t/\tau}\,dt = A\tau$: a decaying exponential with time constant
$\tau$ has the same area as a rectangle of height $A$ and width $\tau$.
Deriving the slope of $e^{at}$. From the definition of the derivative:
The factor $e^{at}$ comes out of the limit. This is why a circuit quantity that varies
as $e^{at}$ keeps that form when it is differentiated.
Worked example 1 (a linear ramp, checked two ways). A capacitor with
$C = 100\ \mu\text{F}$ charges linearly from 0 to 5 V in 2 s, so $v = 2.5t$ volts.
Current: $i = C\dfrac{dv}{dt} = 100\ \mu\text{F} \times 2.5\ \text{V/s} = 250\ \mu\text{A}$.
It is constant because the slope is constant.
Check: the charge must also equal $C\,\Delta V = 100\ \mu\text{F} \times 5\ \text{V} = 500\ \mu\text{C}$.
Two methods give one answer.
Worked example 2 (an exponential pulse). A sensor current decays as
$i(t) = 5 e^{-t/0.2}$ mA, with $t$ in seconds: the peak is 5 mA and the time constant
is $\tau = 0.2$ s.
Total charge: $\int_0^\infty 5e^{-t/0.2}\,dt = 5 \times 0.2 = 1.0$ mC, by the
exponential-area rule.
Check: a rectangle 5 mA high and 0.2 s wide has area 1.0 mC, the same. This is not
luck; it is what the time constant means.
Common mistakes.
Using a signal's value instead of its slope. A constant 5 V across a capacitor does
not give a constant current; it gives zero. Only a constant slope gives a constant
current.
Forgetting that integrals have signs: area below the axis counts as negative.
Dropping units inside the integral. $\mu\text{A} \times \text{s} = \mu\text{C}$.
Summary: the derivative is the slope and the integral is the signed area. An
exponential's slope is proportional to itself. A pulse's area is its height times its
width, and the width is $\tau$ for a decaying exponential. Every answer has a unit.
An AC voltage has a size, such as 230 V, and a phase. One real number cannot hold
both, but a point on a plane can. A complex number 复数$z = a + jb$, with
$j^{2} = -1$, has a real part $a$ and an imaginary part $b$. Its modulus 模$|z| = \sqrt{a^{2} + b^{2}}$ is its distance from the origin, and its argument 辐角$\theta = \text{atan2}(b, a)$ is its angle from the positive real axis. The two forms
describe the same number:
Here $r = |z|$. The second equals sign is Euler's identity 欧拉公式, which
electrical engineering uses everywhere. In polar form, multiplication multiplies the
moduli and adds the arguments:
$r_{1}e^{j\theta_{1}} \cdot r_{2}e^{j\theta_{2}} = r_{1}r_{2}\, e^{j(\theta_{1}+\theta_{2})}$.
So multiplying is a scaling plus a rotation. That is exactly what happens to a sinusoid
whose amplitude changes and whose phase shifts.
Division in polar form: 6 ÷ 2 = 3 and 30° − 80° = −50°
Worked example 1 (divide two phasors, checked by the inverse). Divide
$6\angle 30^{\circ}$ by $2\angle 80^{\circ}$. The notation $r\angle\theta$ means
modulus $r$ at angle $\theta$.
Polar form: divide the moduli and subtract the angles: $3\angle -50^{\circ}$.
Rectangular form would mean working out
$\dfrac{5.196 + j3}{0.347 + j1.970}$. That is possible but slow, which is why
engineers work with phasors 相量 in polar form for this.
Check by the inverse operation:
$3\angle -50^{\circ} \times 2\angle 80^{\circ} = 6\angle 30^{\circ}$, the starting
number.
Worked example 2 (a quadratic with complex roots). A damped system has the
characteristic equation $s^{2} + 2s + 5 = 0$.
Meaning: the real part, $-1$, is the decay rate, and the imaginary part, 2 rad/s, is
the frequency of the ringing. One complex number carries both, which is why later
courses keep them together.
Common mistakes.
Adding moduli instead of adding the complex numbers. Moduli do not add; the real and
imaginary parts do.
Using degrees in formulas such as $e^{j\theta}$ that need radians.
Rotating the wrong way: multiplying by $j$ rotates by $+90^{\circ}$, and multiplying
by $-j$ rotates by $-90^{\circ}$.
Summary: one complex number, two forms. Use rectangular form to add and polar form to
multiply and divide. Euler's identity links the two. For the roots of a quadratic, the
real part gives the decay and the imaginary part gives the frequency.
Three mesh currents in a coupled circuit give three equations in three unknowns. The
best way to organise them is not clever substitution but a matrix. A linear system线性方程组$Ax = b$ has a matrix $A$ of coefficients, a vector $x$ of unknowns and a
vector $b$ of known values. It is solved by elimination. A matrix inverse 逆矩阵$A^{-1}$ exists only when the determinant 行列式 is not zero. For a 2×2 matrix:
$$A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \quad
A^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}$$
If the determinant $ad - bc = 0$, the system is singular 奇异: there is no unique
solution. In a circuit this usually means a loop of voltage sources or a node that is
not connected to the rest.
A basis spans the space; a matrix moves between bases
Deriving the 2×2 inverse. Multiply $A$ by the proposed inverse:
$$\begin{pmatrix} a & b \\ c & d \end{pmatrix} \frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} = \frac{1}{ad-bc}\begin{pmatrix} ad-bc & 0 \\ 0 & ad-bc \end{pmatrix} = I$$
$I$ is the identity matrix. The pattern (swap the diagonal, negate the other two) works
because the cross terms cancel to zero.
Worked example 1 (elimination and the inverse agree). Solve $x + 2y = 8$ and
$3x + y = 9$.
Elimination: subtract 3 times the first equation from the second: $-5y = -15$, so
$y = 3$ and then $x = 2$.
Inverse: the determinant is $1\cdot1 - 2\cdot3 = -5$, and
$A^{-1} = \dfrac{1}{-5}\begin{pmatrix} 1 & -2 \\ -3 & 1 \end{pmatrix}$.
So $x = \dfrac{1\cdot8 - 2\cdot9}{-5} = 2$ and $y = \dfrac{-3\cdot8 + 1\cdot9}{-5} = 3$.
Each route checks the other.
Worked example 2 (the mesh system from course 1). The two-mesh circuit of unit 1.3
becomes one matrix equation:
Check: both values satisfy both original equations.
Meaning: the off-diagonal entries $-4$ come from the shared 4 $\Omega$ resistor.
Coupling between meshes appears as off-diagonal terms.
A singular case for contrast: $x + 2y = 8$ and $2x + 4y = 16$ have determinant
$1\cdot4 - 2\cdot2 = 0$. The second equation is just twice the first, so every point
on one line is a solution.
Common mistakes.
Writing the rows of $A$ and $b$ in different orders.
Thinking a non-zero determinant means the solution is easy. It means the solution is
unique, nothing more.
Forgetting that a singular system can have no solution (parallel lines or planes) or
infinitely many (the same line twice). The determinant alone cannot tell you which.
Summary: if $\det A \ne 0$, then $Ax = b$ has exactly one solution. Elimination finds
it, the inverse finds it again, and substitution checks it. Coupling appears in the
off-diagonal entries. A zero determinant means the equations do not fix a single point.
A switch closes at $t = 0$ and a capacitor voltage moves smoothly to its new value. The
RC response in course 1 was one example of a general pattern, and this unit shows the
pattern. Circuit equations are ordinary differential equations 常微分方程 (ODEs).
Take a first-order linear ODE with constant coefficients,
$$\frac{dy}{dt} + ay = f(t),$$
where $a$ is a constant and $f(t)$ is the input. Its solution is the sum of two parts:
the homogeneous 齐次 part $Ce^{-at}$, and a particular 特解 part caused by
$f$. The constant $C$ is fixed by the initial condition 初始条件, the value of $y$
at $t = 0$.
One equation, a family of curves; the initial condition selects one
Why the solution has this shape. With a constant input, the equation can be written
$\dfrac{dy}{dt} = -a(y - y_\infty)$, where $y_\infty$ is the final value. Rearrange to
$\dfrac{dy}{y - y_\infty} = -a\,dt$, so each side can be integrated:
$\ln(y - y_\infty) = -at + \text{const}$, which means $y - y_\infty = C e^{-at}$. For a constant input and $a > 0$, the gap
to the final value decays exponentially.
Worked example 1 (a step input, checked at both ends). Solve
$\dfrac{dy}{dt} + 2y = 10$ with $y(0) = 1$.
Homogeneous part: $Ce^{-2t}$.
Particular part: a constant input gives a constant output, $y_{p} = \dfrac{10}{2} = 5$.
So $y = 5 + Ce^{-2t}$. Then $y(0) = 5 + C = 1$ gives $C = -4$, and
$y = 5 - 4e^{-2t}$.
Check at $t = 0$: $y = 1$. Check as $t \to \infty$: $y \to 5$ and
$\dfrac{dy}{dt} \to 0$, so the equation reads $0 + 2 \times 5 = 10$.
This is the RC equation of unit 1.7 in general form. The method, not the circuit, is
what this course teaches.
Worked example 2 (a decaying input). Solve $\dfrac{dy}{dt} + 3y = 6e^{-t}$ with
$y(0) = 2$.
Try a particular part $y_p = ke^{-t}$: $-ke^{-t} + 3ke^{-t} = 2ke^{-t} = 6e^{-t}$,
so $k = 3$.
So $y = 3e^{-t} + Ce^{-3t}$. Then $y(0) = 3 + C = 2$ gives $C = -1$, and
$y = 3e^{-t} - e^{-3t}$.
Check at $t = 0.5$: $y = 3 \times 0.6065 - 0.2231 = 1.596$, and
$\dfrac{dy}{dt} = -3e^{-0.5} + 3e^{-1.5} = -1.150$. The left side is
$-1.150 + 3 \times 1.596 = 3.639$, and the right side is $6e^{-0.5} = 3.639$.
The response contains two exponentials: the input's ($e^{-t}$) and the system's own
($e^{-3t}$).
Common mistakes.
Solving the homogeneous equation and forgetting the particular part.
Using the initial condition to choose $k$ in the particular part. Only the constant
$C$ of the homogeneous part is free.
Checking only $t = 0$. Also check large $t$, where $\dfrac{dy}{dt} \approx 0$ and the
equation must still balance.
Summary: solution = homogeneous part + particular part. The initial condition picks one
curve from the family. Separating the variables explains the exponential shape. Checks
at both ends cost almost nothing.
Solving an ODE by hand works for one equation, but a circuit with three storage
elements needs three. The Laplace transform 拉普拉斯变换 turns differentiation into
multiplication by a variable $s$, so a whole system of ODEs becomes algebra:
Here $f(t)$ is a function of time and $F(s)$ is its transform, a function of $s$.
Deriving the key pair.$\int_0^\infty e^{at}e^{-st}\,dt = \int_0^\infty
e^{-(s-a)t}\,dt = \dfrac{1}{s-a}$, valid when the real part of $s$ is greater than $a$.
The transform of an exponential is a simple fraction with one pole at $s = a$. Most of
the standard table comes from this one integral.
Each time curve maps to a pole; pole position predicts decay
Three rules do the work. First, $\mathcal{L}\left\{\dfrac{dy}{dt}\right\} = sY - y(0)$,
so the initial condition enters the algebra directly. Second,
$\mathcal{L}\{1\} = \dfrac{1}{s}$. Third, partial fractions 部分分式 split a ratio of
polynomials $F(s)$ into simple pieces that can each be looked up in the table.
Worked example 1 (the ODE of unit 2.4, by transform). Solve
$\dfrac{dy}{dt} + 2y = 10$ with $y(0) = 1$.
Invert term by term: $y = 5 - 4e^{-2t}$, the same as the classical method. The
initial condition was handled in step 1, not at the end.
The poles 极点 of $Y$ are the values of $s$ that make its denominator zero, here
$s = 0$ and $s = -2$. They predict the behaviour before any inversion: a constant plus a
decaying exponential.
Worked example 2 (second order). Solve
$\dfrac{d^2y}{dt^2} + 3\dfrac{dy}{dt} + 2y = 0$ with $y(0) = 1$ and $y'(0) = 0$.
Transform, using the derivative rule twice:
$(s^{2}Y - s - 0) + 3(sY - 1) + 2Y = 0$, so $(s^{2} + 3s + 2)Y = s + 3$.
Meaning: the two poles, $-1$ and $-2$, are the two decay rates. The pole at $-1$
decays more slowly, so it sets the long tail. Later courses call this the dominant
pole.
Common mistakes.
Forgetting the $-y(0)$ in the derivative rule, or the $-s\,y(0) - y'(0)$ in its
second-order form.
Inverting before the fractions are fully split.
$\dfrac{s+3}{(s+1)(s+2)}$ must become two simple fractions before any table lookup.
Treating a zero (a root of the numerator) as a pole. Only denominator roots create
terms in $y(t)$.
Summary: differentiation becomes multiplication by $s$, with the initial conditions
included. Partial fractions split $Y$. Poles predict the time behaviour. The transform
method and the classical method must agree, and that agreement is the check.
A distorted mains waveform heats a resistor exactly as a certain mix of pure sinusoids
would. That mix is not a guess; it can be calculated. Any periodic signal is a sum of
sinusoids. For a signal with period $T$, the fundamental 基波 angular frequency is
$\omega_{0} = \dfrac{2\pi}{T}$ (rad/s), and the Fourier series 傅里叶级数 is
$a_0$ is the average value. Each $a_{n}$ and $b_{n}$ is found as an average of $f$
times the matching sinusoid. This works because of orthogonality 正交性: two
different harmonics multiplied together average to zero over a period. So each
coefficient can be found on its own, like a set of tuned filters that each hear only
their own frequency.
Odd harmonics 4/(nπ) build the square wave; the Gibbs overshoot never goes away
Worked example 1 (the square wave, checked at one point). Take a ±1 square wave of
period $T$ with odd symmetry.
All $a_{n} = 0$, and $b_{n} = \dfrac{4}{n\pi}$ for odd $n$ (zero for even $n$). So
$f(t) = \dfrac{4}{\pi}\left(\sin\omega_0 t + \dfrac{1}{3}\sin 3\omega_0 t + \dfrac{1}{5}\sin 5\omega_0 t + \dots\right)$.
Check at $t = \dfrac{T}{4}$, where the wave equals 1. There each sine is $+1$ or
$-1$, and the sum is $\dfrac{4}{\pi}\left(1 - \dfrac{1}{3} + \dfrac{1}{5} - \dots\right)$.
The bracket is Gregory's series for $\dfrac{\pi}{4}$, so the total is exactly 1.
Meaning: each harmonic 谐波 amplitude falls as $\dfrac{1}{n}$. Sharp edges need
many harmonics, and removing harmonics is what filtering does.
Worked example 2 (power in the harmonics). A ±1 V square wave across 1 Ω delivers
1 W on average, because the voltage squared is always 1.
Parseval's theorem says the powers of the harmonics must add up to the same total.
A sinusoid of amplitude $A$ across 1 Ω delivers $\dfrac{A^{2}}{2}$.
The first 20 odd harmonics give 0.990 W. The full bracket is $\dfrac{\pi^{2}}{8}$, so
the total is exactly 1 W.
Meaning: the fundamental alone carries $\dfrac{8}{\pi^{2}} \approx 81\%$ of the
power, and the third harmonic (one third of the amplitude) adds about 9%. A low-pass
filter that keeps only the fundamental still delivers most of the power.
Common mistakes.
Using $\dfrac{1}{T}$ (hertz) instead of $\omega_0 = \dfrac{2\pi}{T}$ (rad/s) for the
fundamental.
Forgetting the $\dfrac{1}{2}$ in each harmonic's power. A sinusoid's mean square is
half its peak squared.
Assuming a symmetry the signal does not have. Shift the time origin and the
coefficients change, so work with the signal as it is placed.
Summary: a periodic signal is an average plus harmonics. Orthogonality finds each
coefficient on its own. For many signals with jumps, the harmonic amplitudes have an envelope that falls as $\dfrac{1}{n}$.
Parseval checks the power. The Gibbs overshoot at a jump never goes away.
Every measurement is noisy, and the noise cannot be predicted sample by sample. Its
statistics, though, stay the same over time, and instruments rely on that. A
random variable 随机变量 takes values according to a probability distribution概率分布. Thermal noise follows the Gaussian (normal) distribution $N(\mu, \sigma^{2})$,
with mean $\mu$ and standard deviation $\sigma$:
Dice: each throw is a random variable, and noise in a circuit is modelled the same way, by its distribution rather than its next valueFor independent random variables means add and variances add
The expectation 期望$E[X] = \mu$ is the long-run average. The variance 方差$\text{Var}(X) = E[X^{2}] - \mu^{2}$ measures the spread. Its square root, the
standard deviation 标准差$\sigma$, is in the signal's own units: it is the noise
level an oscilloscope shows. Two rules do most of the work:
For independent sources the variances add, so
$\sigma_{total} = \sqrt{\sigma_1^2 + \sigma_2^2}$.
The average of $n$ independent samples has standard deviation $\dfrac{\sigma}{\sqrt{n}}$.
Worked example 1 (the 2σ rule and averaging). Noise $X \sim N(0, \sigma^{2})$ with
$\sigma = 2$ mV.
The chance that a sample is beyond $\pm 2\sigma$ is 4.55%. The 95% band is
$\pm 1.96\sigma \approx \pm 3.9$ mV.
Averaging 16 independent samples leaves $\dfrac{2}{\sqrt{16}} = 0.5$ mV of noise.
This is why instruments average.
Worked example 2 (two noise sources, in decibels). An amplifier stage adds 2 mV of
noise, uncorrelated with the 3 mV of noise already carried by the signal.
The total is not $3 + 2 = 5$ mV. Variances add:
$\sqrt{3^{2} + 2^{2}} = \sqrt{13} = 3.61$ mV. The smaller source counts for less than
its size suggests.
Averaging 16 readings divides the noise by 4, a signal-to-noise gain of
$20\log_{10}4 = 12.0$ dB. Each further 6 dB needs four times as many readings, and so
four times the measurement time.
Reducing the larger source costs no measurement time. Halving the 3 mV to 1.5 mV
gives $\sqrt{1.5^{2} + 2^{2}} = 2.5$ mV, a 3.2 dB gain on every single reading.
Common mistakes.
Adding standard deviations instead of variances.
Mixing up $\sigma$ and $\sigma^{2}$. The scope shows $\sigma$; most formulas use
$\sigma^{2}$.
Forgetting that the $\dfrac{\sigma}{\sqrt{n}}$ gain needs independent samples.
Correlated noise may not fall as $1/\sqrt{n}$; the result depends on its correlation and the sampling times.
Summary: the Gaussian is the model for noise, and $\sigma$ is the noise a scope shows.
Independent variances add, and averaging $n$ samples divides $\sigma$ by $\sqrt{n}$.
Reduce the largest source first, then average.
探索
How much noise lies beyond 2σ
Shade the band within ±2σ of the mean. About 95.45% of Gaussian samples fall inside it and only 4.55% beyond; with σ = 2 mV that band is ±4 mV.
probability distribution/ˌprɒbəˈbɪlɪti ˌdɪstrɪˈbjuːʃn/
概率分布
gài lǜ fēn bù
expectation/ekspɪkˈteɪʃn/
期望
qī wàng
variance/ˈveərɪəns/
方差
fāng chà
standard deviation/ˈstændəd ˌdiːvɪˈeɪʃn/
标准差
biāo zhǔn chà
2.8
向量微积分
English
A voltage probe gives one number at each point in space, so a potential is a whole
landscape of values. The Maxwell equations of course 7 describe the shape of such
landscapes. A field is a function of position; a vector field gives an arrow at each
point. Three operators act on fields, where $V$ is a scalar field and $\mathbf{F}$ a
vector field:
Gradient 梯度$\nabla V$ points up the steepest slope of a scalar field. For an electrostatic field, the
electric field is $\mathbf{E} = -\nabla V$, pointing downhill.
Divergence 散度$\nabla \cdot \mathbf{F}$ is the net outflow per unit volume. For
an electric field it is proportional to the charge density.
Curl 旋度$\nabla \times \mathbf{F}$ is the circulation per unit area. It is zero
for electrostatic fields; where it is not zero, induction is at work.
Read a field's story at a glance: outflow means divergence, swirl means curl
Worked example 1 (the gradient predicts a change, checked with a small step). Take
$V(x, y) = 3x^{2}y$ volts.
At $(1, 2)$: $\nabla V = (12, 3)$, so $\mathbf{E} = -(12, 3)$ V/m.
Check with a small step $\boldsymbol{\delta} = (0.01, 0)$ from $(1, 2)$. The gradient
predicts $\Delta V \approx 12 \times 0.01 = 0.12$ V, which equals
$-\mathbf{E} \cdot \boldsymbol{\delta}$. Directly,
$V(1.01, 2) - V(1, 2) = 3(1.01)^{2}(2) - 6 = 0.1206$ V. The gradient predicts the
change, which is what a gradient means.
Worked example 2 (divergence and curl by hand).
For $\mathbf{F} = (x^{2},\ xy,\ 3x^{2}z)$:
$\nabla\cdot\mathbf{F} = \dfrac{\partial F_x}{\partial x} + \dfrac{\partial F_y}{\partial y} + \dfrac{\partial F_z}{\partial z} = 2x + x + 3x^{2}$.
At $(1,1,1)$ this is $2 + 1 + 3 = 6$: a net source.
For the circulating field $\mathbf{G} = (-y,\ x,\ 0)$, the $z$-component of the curl
is $\dfrac{\partial G_y}{\partial x} - \dfrac{\partial G_x}{\partial y} = 1 - (-1) = 2$
everywhere.
Meaning: $\mathbf{G}$ is the velocity field of a rigid body turning at 1 rad/s, and
its curl is twice the angular velocity. These two calculations are the point forms of
the Gauss and Stokes laws in course 7.
Common mistakes.
Taking the gradient of a vector or the divergence of a scalar. Gradient acts on a
scalar; divergence and curl act on a vector.
Sign errors in the curl. The $z$-component is
$\dfrac{\partial F_y}{\partial x} - \dfrac{\partial F_x}{\partial y}$; swapping the
terms reverses the rotation.
Thinking a uniform field has some divergence or curl. It has zero divergence and
zero curl.
Summary: the gradient points steepest uphill (scalar to vector). Divergence is net
outflow (vector to scalar). Curl is circulation (vector to vector). A small step checks a
gradient: $\Delta V \approx \nabla V \cdot \boldsymbol{\delta}$.