unfried.
Streak:0 days XP:0

Formula sheet

Signals and DSP

Spectra, sampling, transforms and filters, by unit.

63 entries in 10 units. Free to use and share.

Jump to a unit (10 units)

Unit 1 Complex numbers and phasors

Modulus and conjugate

Definition.

The length is a hypotenuse, not the parts added. Electronics writes j for i⁠.

a
real partno unit
b
imaginary partno unit
z
the complex number a+bino unit
zˉ
conjugate, a−bino unit

Taught in Complex numbers as arrows

Polar form

z
complex numberno unit
r
length ∣z∣no unit
θ
angle counterclockwise from the positive real axisrad

Applies: Place the angle in the right quadrant; −1+3i is at 120°, though arctan gives −60°.

Taught in Polar form: multiplying rotates and scales

Phasors

A
amplitudeno unit
ω
angular frequencyrad/s
t
times
φ
phaserad

Applies: Waves of the same ω add by adding phasors. sin⁡ωt is −i⁠; 3cos⁡ωt+4sin⁡ωt is 5∠−53.1°⁠.

Careful: Different frequencies don't add this way.

Taught in Phasors: adding sinusoids

Impedance

ZR,ZL,ZC
impedances of R, L, CΩ
R
resistanceΩ
j
imaginary unitno unit
ω
2πfrad/s
L
inductanceH
C
capacitanceF

Applies: Series parts add as complex numbers; ∣Z∣ is peak volts per peak amp, the angle is how far voltage leads current.

Careful: 100 Ω and 1 µF at 1 kHz is 188 Ω, not 259 Ω.

Taught in Impedance as a complex number

De Moivre's theorem

θ
any real anglerad
n
integer ≥ 1no unit

Applies: Proved by induction with angle addition. Gives cos⁡3θ=4cos⁡3θ−3cos⁡θ⁠.

Careful: Fails for non-integer n (try n=12⁠, θ=2π⁠).

Taught in De Moivre's theorem

Unit 2 Sinusoids, spectra and decibels

Phase as delay

A
amplitudeno unit
f
frequencyHz
t
times
td
delays
φ
phaserad

Applies: A minus phase is late, a plus early. 2π is one whole period.

Taught in Amplitude, frequency and phase

Product to sum

a,b
anglesrad

Applies: A product of two tones holds the difference and sum frequencies. Adding never makes a new frequency; multiplying always does.

Taught in Spectrum: a signal as sinusoids

RMS of a sum

Xrms
total RMSno unit
X1,rms,X2,rms
RMS of each partno unit

Applies: Parts at different frequencies. A sine of peak A has mean square A2/2⁠; DC of value D has D2⁠.

Careful: At one shared frequency, add phasors first.

Taught in Power and RMS of a sum

Decibels

L
leveldB
P,P0
power and reference powerW
V,V0
voltage and reference, into the same resistanceV

Applies: Gains in series add in dB. Uncorrelated sources add powers, so two 40 dB sources make 43 dB.

Taught in Decibels for power and voltage

SNR of an ideal ADC

N
bitsno unit

Applies: A full-scale sine; rounding noise is 1/12≈0.29 LSB RMS. 12 bits gives 74 dB. A signal 14 dB below full scale gets 14 dB less.

Careful: Real ADCs add noise; ENOB is (SNR−1.76)/6.02⁠.

Taught in SNR and the ideal ADC

Unit 3 Fourier series

Fourier series

x(t)
periodic signalno unit
a0
averageno unit
an,bn
coefficients of harmonic nno unit
f0
fundamental, 1/THz
n
harmonic numberno unit
t
times

Applies: A signal repeating every T. Harmonic n has amplitude An=an2+bn2⁠. Half-wave symmetry leaves odd harmonics only.

Taught in Harmonics of a periodic signal

Harmonics of common waves

The ±1 V square's fundamental is 4/π≈1.27 V, taller than the wave.

Wave, height ±ALines
square4Anπ at odd n
triangle8Aπ2n2 at odd n
sawtooth2Anπ at every n

Taught in Harmonics of a periodic signal

Complex exponential series

cn
two-sided coefficientno unit
an,bn
one-sided coefficientsno unit
a0
averageno unit

Applies: x(t)=∑cnei2πnf0t⁠. One-sided amplitude is 2∣cn∣⁠; DC is not halved.

Careful: The negative-frequency line can't be dropped; it keeps x real.

Taught in Complex exponential series

PWM spectrum

An
harmonic n amplitudeV
A
PWM heightV
n
harmonic numberno unit
D
dutyno unit

Applies: DC is AD⁠. Harmonic n vanishes when nD is whole. The fundamental is largest at 50 %.

Taught in The spectrum of PWM

Parseval's theorem

x2‾
mean squareno unit
cn
two-sided coefficientsno unit
a0
averageno unit
An
one-sided amplitudesno unit

Applies: Powers of harmonics add. A ±1 V square keeps 8/π2=81% in its fundamental.

Careful: RMS values of harmonics don't add.

Taught in Where the power is: Parseval

Proving Parseval

For a finite sum, expand x2 and average term by term; every cross term averages to 0 over T because product to sum leaves whole cycles. Infinite series need the mean-square extension.

Careful: Cross terms are not 0 at each instant.

Taught in Proving Parseval

Filtering a periodic signal

cnout,cnin
output and input coefficientsno unit
H
filter's frequency responseno unit
n
harmonic numberno unit
f0
fundamentalHz

Applies: Any LTI filter; same lines out, new heights. RC low-pass ∣H∣=1/1+(f/fc)2⁠.

Careful: The whole wave is not scaled by one gain, and no filter makes a frequency that isn't there.

Taught in Filtering a periodic signal

Unit 4 Fourier transform and bandwidth

Fourier transform

X(f)
spectrum densityV/Hz
x(t)
signalV
f
frequencyHz
t
times

Applies: Signals that don't repeat. X(0) is the area. A pulse train has lines cn=X(nf0)/T0⁠.

Taught in The spectrum of a pulse

Rectangular pulse

X(f)
spectrumV/Hz
A
heightV
T
widths
f
frequencyHz

Applies: Zeros at ±1/T,±2/T,… Narrower pulse, wider spectrum.

Taught in The spectrum of a pulse

Delay and modulation

x
signalno unit
X
its transformno unit
t
times
f
frequencyHz
t0
delays
fc
carrier frequencyHz

Applies: Delay leaves the magnitude and drops phase by 360°×ft0⁠. Modulation makes two half-height copies at ±fc⁠.

Taught in Shift and modulation

The impulse and sifting

δ
unit impulse, area 1no unit
x
continuous signalno unit
t
times
t0
the time picked outs

Applies: So F{δ}=1 at every f. A real pulse of width w acts as an impulse well below 1/w⁠.

Taught in The impulse and flat spectra

Rise time and bandwidth

tr
10–90 % rise times
τ
time constant, 1/(2π BW)s

Applies: Exact for one pole; scopes with a sharper roll-off use 0.35 to 0.45. Rise times in a chain add roughly as squares.

Taught in Rise time and bandwidth

Transforming a derivative

x′
derivative of xno unit
f
frequencyHz
X
transform of xno unit

Applies: x differentiable, x and x′ absolutely integrable, and x → 0 at ±∞. Differentiating boosts noise and fast ripple.

Taught in Transforming a derivative

Unit 5 LTI systems, impulse response, convolution

Linear and time-invariant

Definition.

Linear means this, so zero in gives zero out. Time-invariant means x[n−k]→y[n−k]⁠; a bare n outside x[⋅] usually breaks it.

T
the systemno unit
a,b
constantsno unit
x1,x2
inputsno unit

Taught in Linear and time-invariant

Discrete convolution

y
outputno unit
x
inputno unit
h
impulse responseno unit
n,k
sample indicesno unit

Applies: Any LTI system. Lengths N and M give N + M − 1 samples.

Careful: Not the sample-by-sample product.

Taught in Impulse response and discrete convolution

Continuous convolution

y
outputno unit
x
inputno unit
h
impulse responseno unit
t
times
τ
integration variables

Applies: Flip h, slide it to t, multiply, take the area. Widths add.

Taught in Flip and slide: continuous convolution

RC low-pass impulse response

h
impulse response1/s
τ
RCs
t
times

Applies: Area 1. A pulse much shorter than τ acts as an impulse of its area.

Taught in An RC circuit as an LTI system

Causal and BIBO stable

Definition.

Causal never uses future input. Stable, for LTI systems, is an absolutely summable h.

h
impulse responseno unit
n
sample indexno unit

Careful: A bounded h is not enough; u[n] turns a constant into a ramp.

Taught in Causality and stability

Why h says everything

Write x[n]=∑kx[k] δ[n−k]⁠. Time invariance maps each δ[n−k] to h[n−k]⁠; linearity carries the sum and weights through. Lose either property and h isn't enough.

Taught in Why h says everything

Unit 6 Frequency response; filters as eigenvalues of LTI systems

Frequency response

H
frequency responseno unit
ω
frequencyrad/sample
h
impulse responseno unit
k
tap indexno unit

Applies: eiωn in gives H(ω)eiωn out. H(0)=∑h[k] is the DC gain.

Taught in Complex exponentials are eigenfunctions

Sinusoid in, same sinusoid out

For real taps, cos⁡(ωn) comes out as ∣H(ω)∣cos⁡(ωn+∠H(ω))⁠. Only [0,π] is plotted, since H(−ω) is the conjugate.

Taught in Magnitude and phase response

RC low-pass Bode plot

j
imaginary unitno unit
H
frequency responseno unit
f
frequencyHz
fc
cornerHz

Applies: At fc⁠, −3 dB and −45°; at fc/10⁠, −0.04 dB but −5.7°; at 10fc⁠, −20 dB and −84.3°.

Careful: The passband is not phase-free.

Taught in Bode plots of H(jω)

Poles and zeros

∣H(jω)∣ is k times the product of distances to the zeros over the product of distances to the poles. A real pole at −a makes a corner at fc=a/2π⁠. Stable means every pole in the left half-plane.

Taught in Poles, zeros and the shape of |H|

Linear phase

H
frequency responseno unit
N
number of tapsno unit
A
real amplitude functionno unit
ω
frequencyrad/sample

Applies: Symmetric taps, h[k]=h[N−1−k]⁠. Every frequency is delayed (N−1)/2 samples, so the shape survives.

Careful: The delay is not N samples, and not N/2.

Taught in Linear phase and delay

When cos ωn is an eigenfunction

eiωn always is, when ∑∣h[k]∣<∞⁠. cos⁡ωn is one only where H(ω) is real; elsewhere it comes out shifted.

Taught in Is cos ωn an eigenfunction?

Unit 7 Sampling and aliasing

Sampled tone and aliasing

x[n]
samplesno unit
f
toneHz
fs
sample rateHz
n
sample indexno unit
k
whole number nearest f/fsno unit
falias
frequency shown, 0 to fs/2Hz

Applies: Every sampled tone. Only f/fs reaches the samples.

Taught in Sampling a sinusoid

Nyquist and folding

Every tone must sit strictly below fs/2⁠, so fs>2fmax⁠. The inputs that land on fout are kfs±fout⁠. At exactly fs/2 the samples depend on the phase.

Taught in Nyquist and folding

Spectrum of a sampled signal

Xs
sampled spectrumno unit
T
sample periods
X
original spectrumno unit
f
frequencyHz
k
whole numberno unit
fs
sample rateHz

Applies: Images repeat around every multiple of fs⁠. A 0 to B band's first copy starts at fs−B⁠; overlap is aliasing.

Taught in The spectrum of a sampled signal

Anti-alias filter

H
Butterworth responseno unit
f
frequencyHz
fc
cornerHz
n
poles, about 20n dB per decadeno unit

Applies: Before the ADC. It must be down by fs−B⁠, not fs/2⁠.

Careful: Nothing after the ADC can separate an alias from signal.

Taught in Anti-alias filters

Zero-order hold

H
hold's responseno unit
f
frequencyHz
fs
sample rateHz

Applies: A DAC holding each sample. Gain 0.90 at fs/4⁠, 2/π at fs/2⁠, 0 at fs⁠; half a sample of delay. A reconstruction low-pass removes the images.

Taught in Reconstruction and the zero-order hold

Why aliases look identical

With θ=2πfn/fs⁠, f+kfs gives cos⁡(θ+2πkn)=cos⁡θ⁠, and kfs−f gives cos⁡(−θ)=cos⁡θ⁠. For sine the second is inverted. This holds only at the sample times.

Taught in Why aliases look identical

Unit 8 DFT and FFT

The DFT

X[k]
bin kno unit
x[n]
samplesno unit
N
number of samplesno unit
k
bin, frequency kfs/Nno unit

Applies: Above N/2, bin N−k is frequency −k. A cosine of amplitude A on bin k gives NA/2 at k and N−k⁠.

Taught in The DFT as correlation with test tones

Bin spacing

Δf
bin spacingHz
fs
sample rateHz
N
samplesno unit
T
window lengths

Applies: Tones δ apart need N≥fs/δ⁠.

Careful: Zero-padding adds bins on the same curve; peaks stay fs/N wide.

Taught in Bin spacing and resolution

Hann window

w
windowno unit
n
sample indexno unit
N
window lengthno unit

Applies: Tones that don't fit a whole number of cycles. Leak falls like 1/d3 instead of 1/(πd)⁠, but the peak is twice as wide.

Taught in Leakage and windows

The FFT butterfly

X
DFT of all N samplesno unit
E,O
DFTs of the even and odd samplesno unit
W
e−2πi/Nno unit
k
binno unit
N
lengthno unit

Applies: N a power of 2; N2log⁡2N multiplies against N2⁠.

Careful: For one or two bins, a direct sum (N each) beats the whole FFT.

Taught in The FFT

Spectra from DMA buffers

An FFT on each half of a 2L-sample circular buffer gives a spectrum every T=L/fs⁠, bins 1/T apart. Convert bins with the FFT length, not the buffer length.

Taught in Spectra from DMA buffers

Roots of unity cancel

r
e2πid/N⁠, d not a multiple of Nno unit
n
sample indexno unit
N
lengthno unit

Applies: For d a multiple of N the sum is N. So the inverse is x[n]=1N∑kX[k]e2πikn/N⁠.

Taught in Roots of unity cancel

Unit 9 z-transform; FIR and IIR filters

z-transform and transfer function

x
input samplesno unit
n
sample indexno unit
X,Y
transforms of input and outputno unit
z
complex variableno unit
H
transfer functionno unit

Applies: A one-sample delay multiplies by z−1⁠. On z=eiω⁠, H is the frequency response; DC is z=1 and fs/2 is z=−1⁠.

Taught in The z-transform and the delay operator

Moving average nulls

f
removed frequenciesHz
fs
sample rateHz
N
samples averagedno unit
k
whole numberno unit

Applies: An N-sample average, zeros at the N-th roots of 1 except 1. 50 Hz at 1,000 samples/s needs 20.

Taught in FIR filters: moving averages and taps

One-pole IIR

y
outputno unit
x
inputno unit
n
sample indexno unit
a
poleno unit
b
input gain; 1−a for DC gain 1no unit
τ
time constantsamples

Applies: To copy an RC, a=e−1/(τfs)⁠. Stable exactly when ∣a∣<1⁠.

Careful: A small input gain can't rescue a pole outside the circle.

Taught in IIR filters: feedback and poles

Notch filter

H
transfer functionno unit
z
complex variableno unit
ω0
notch frequencyrad/sample
r
pole radius, a little under 1no unit

Applies: Zeros on the circle, poles a little inside at the same angle; r closer to 1 makes it narrower. A pole pair at re±iθ alone peaks about 2(1−r) rad wide.

Careful: r≥1 is unstable.

Taught in Poles near the unit circle

FIR on a ring buffer

Cycles per sample is fclk/fs⁠.

// x[n - k] lives in slot (head - k) mod N
int idx = (head - k + N) % N;   // or & (N - 1) for a power of 2

Careful: (head - k) % N goes negative in C.

Taught in FIR on a ring buffer

Stable means poles inside the circle

If ∣a∣<1⁠, ∑∣h∣=1/(1−∣a∣) bounds the output. If ∣a∣≥1⁠, the bounded input sn (s the sign of a) makes ∣y[n]∣≥n+1⁠.

Taught in Stable means poles inside the circle

Unit 10 DSP on a microcontroller: fixed point, timing

Q15 format

x
valueno unit

Applies: Range −1 (0x8000) to 0.99997 (0x7FFF), step about 0.00003.

Careful: 1.0 doesn't fit.

Taught in Fixed-point numbers: Q15

Q15 multiply with rounding

y
Q15 resultno unit
p
32-bit Q30 productno unit

Applies: Fraction bits add, so Q15 × Q15 is Q30. A plain >> 15 is the floor.

Careful: Storing the product in an int16_t keeps the wrong 16 bits.

Taught in Multiplying in fixed point

Overflow and saturation

int16_t arithmetic wraps; 0.75 + 0.5 becomes −0.75. Compute in 32 bits and clamp with min⁡(max⁡(s,−32,768),32,767)⁠, or use QADD16 / SSAT on a Cortex-M4. The only Q15 product that overflows is (−1) × (−1).

Careful: Testing s > 32767 on an int16_t never fires.

Taught in Overflow and saturation

Rounding the coefficients

Since τ≈1/(1−a)⁠, the coefficient step must be much smaller than 1−a⁠. a=0.999 in Q7 stores 127/128, a τ of 128 samples, not 1,000.

Taught in Rounding the coefficients

CPU load of an FIR

N
tapsno unit
c
cycles per MACno unit
fs
sample rateHz
fclk
CPU clockHz

Applies: Add per-sample interrupt overhead; DMA blocks cut it.

Taught in The real-time budget

Q14 for biquads

Q14 (int16 ÷ 16,384, range ±2) holds every stable biquad coefficient, including 2cos⁡ω0=1.902 for a 50 Hz notch at 1,000 samples/s, which Q15 can't. b2=1 is exact, so the zeros stay on the circle.

Taught in Capstone: a 50 Hz notch