Analog Signals, Signal Parameters & Decibels
What analog electronics is and the language of signals. Learn analog vs digital, continuous time and amplitude, real-world signals from sensors, DC/AC/transient/periodic signals, sinusoids (amplitude, frequency, period, phase, ω = 2πf), peak, peak-to-peak, average, RMS, crest factor, duty cycle and DC offset, noise, offset, headroom and dynamic range, decibels (dB, dBm, dBW, dBV, dBu) and cascaded gain, and the complete analog signal chain from sensor to ADC — with Python computing RMS, averages, dB conversions and dynamic range.
The physical world is analog: temperature, sound pressure, light, force and voltage change continuously in time and can take any value. Analog electronics senses, protects, amplifies, filters and converts these signals — and also generates, regulates and delivers power.
Even the most digital system has analog at its edges: every microcontroller ADC, every audio codec, every power supply and every radio depends on analog circuits that are designed with the ideas in this course.
An analogy
An analog signal is like a ramp you can stand anywhere on; a digital signal is like a staircase with fixed steps. Analog electronics shapes the ramp — making it taller (amplification), smoother (filtering) or safe to walk on (protection) — before a converter turns it into stairs.
Analog vs digital
Analog signals are continuous in time and amplitude. Digital signals are sampled (discrete time) and quantised (discrete levels). Digital processing is flexible and noise-immune once the signal is converted, but conversion needs an analog front end, and the output back to the world (speakers, motors, radios) is analog again. Noise and distortion added in the analog stages can never be removed digitally.
Signal types and parameters
Common signal families:
- DC — constant (supply rails, bias, slowly varying sensors)
- AC / periodic — sine, square, triangle, sawtooth; described by amplitude, frequency, phase
- Pulse / PWM — duty cycle D = t_on/T; average = D·V_high
- Transient / non-periodic — steps, impulses, speech, sensor events
- Noise — random; described statistically (RMS, spectral density)
Offset, headroom and dynamic range
Real signals ride on a DC offset (bias) that must stay inside the circuit's allowed range. Headroom is the margin between the largest expected signal and clipping (the rails or ADC full scale); footroom is the margin above the noise floor. Dynamic range is the ratio of largest undistorted signal to noise — e.g. a 16-bit ADC ideally offers ~98 dB. Good gain staging keeps signals large enough to beat noise but small enough never to clip.
Decibel practice
Use 20·log for voltage/current ratios and 10·log for power ratios (they agree when impedances are equal). Absolute units anchor dB to a reference: dBm (1 mW, RF and telecom, 0 dBm = 0.2236 V in 50 Ω), dBV (1 V_rms, consumer audio −10 dBV), dBu (0.775 V_rms, pro audio +4 dBu). Noise figures, SNR, CMRR, PSRR and filter attenuation are all specified in dB. Remember: −3 dB = half power = 0.707 voltage; −6 dB ≈ half voltage; +20 dB = 10× voltage.
Formulas
- Sinusoid:
v(t) = V_m·sin(ωt + φ), ω = 2πf, T = 1/f - RMS of a sine:
V_rms = V_m/√2 ≈ 0.707·V_m; V_pp = 2V_m - RMS of DC + AC:
V_rms,total = √(V_DC² + V_ac,rms²) - Crest factor:
CF = V_peak/V_rms (sine √2, square 1) - Voltage and power gain in dB:
G_dB = 20·log₁₀(V₂/V₁) = 10·log₁₀(P₂/P₁) - Absolute levels:
dBm: 1 mW; dBW: 1 W; dBV: 1 V_rms; dBu: 0.775 V_rms - Dynamic range:
DR = 20·log₁₀(V_max,rms/V_noise,rms)
Worked example: RMS of mains
Given: 230 V_rms mains
Find: Peak and peak-to-peak.
- V_m = 230√2
- V_pp = 2V_m
Answer: 325 V peak, 650 V peak-to-peak
Worked example: dBm to voltage
Given: −10 dBm into 50 Ω
Find: V_rms.
- P = 10^(−1) mW = 0.1 mW
- V = √(PR) = √(0.1e−3 × 50)
Answer: 70.7 mV_rms
Worked example: Chain gain
Given: Mic preamp +40 dB, filter −1 dB, line driver +6 dB
Find: Total gain.
- 40 − 1 + 6 = 45 dB
- 10^(45/20)
Answer: 45 dB ≈ ×178
The analog signal chain
Sensor ──► Protection ──► Bias / level shift ──► Low-noise amp (LNA)
│
ADC ◄── ADC driver ◄── Gain stage ◄── Anti-alias filter ◄┘
each stage: keep signal above noise, below clipping (headroom), inside bandwidthEvery measurement or audio front end follows this chain. Protection keeps faults out, biasing puts the signal in the amplifier's allowed range, the LNA sets the noise floor, filters remove out-of-band noise and aliasing, and the driver delivers a clean signal into the ADC's sampling capacitor.
RMS, averages and decibels
import math
# Signal parameters of a sine, a square and a PWM waveform, plus decibel conversions
Vm, f, offset = 2.0, 1000.0, 0.5
print(f"sine: Vpp = {2*Vm} V, Vrms = {Vm/math.sqrt(2):.3f} V, period = {1/f*1e3:.1f} ms, omega = {2*math.pi*f:.0f} rad/s")
print(f"sine + {offset} V DC: total RMS = {math.sqrt(offset**2 + (Vm/math.sqrt(2))**2):.3f} V, average = {offset} V")
print(f"crest factor: sine {Vm/(Vm/math.sqrt(2)):.3f}, square 1.000")
duty, Vhigh = 0.25, 5.0
print(f"PWM 25% of 5 V: average {duty*Vhigh:.2f} V, RMS {Vhigh*math.sqrt(duty):.2f} V")
# Decibels
gain_v = 50.0
print(f"voltage gain 50 = {20*math.log10(gain_v):.1f} dB; power ratio 50 = {10*math.log10(50):.1f} dB")
P_mW = 1.0
print(f"1 mW = {10*math.log10(P_mW):.0f} dBm = {10*math.log10(P_mW/1000):.0f} dBW")
print(f"1 Vrms = {20*math.log10(1/1):.0f} dBV = {20*math.log10(1/0.7746):.2f} dBu")
# Cascaded chain: gains in dB add
stages = [20.0, -3.0, 26.0]
print(f"cascade {stages} dB -> total {sum(stages):.0f} dB = x{10**(sum(stages)/20):.0f} in voltage")
# Dynamic range of a system: 2 Vrms max, 20 uVrms noise floor
print(f"dynamic range = {20*math.log10(2/20e-6):.0f} dB")
# sine: Vpp = 4.0 V, Vrms = 1.414 V, period = 1.0 ms, omega = 6283 rad/s
# sine + 0.5 V DC: total RMS = 1.500 V, average = 0.5 V
# crest factor: sine 1.414, square 1.000
# PWM 25% of 5 V: average 1.25 V, RMS 2.50 V
# voltage gain 50 = 34.0 dB; power ratio 50 = 17.0 dB
# 1 mW = 0 dBm = -30 dBW
# 1 Vrms = 0 dBV = 2.22 dBu
# cascade [20.0, -3.0, 26.0] dB -> total 43 dB = x141 in voltage
# dynamic range = 100 dBRMS is the heating-equivalent value — a 2 V-peak sine delivers the same power to a resistor as 1.414 V DC. Average and RMS differ for non-sinusoidal waveforms (a 25% PWM averages 1.25 V but has 2.5 V RMS), which is why 'true-RMS' meters matter. Decibels turn multiplication of gains into addition, so chains are easy to budget: +20 −3 +26 = 43 dB.
Common mistakes
- Wrong: Using 10·log for voltage ratios. — Right: Voltage/current ratios use 20·log₁₀.
- Wrong: Reading a PWM or distorted waveform with an average-responding meter. — Right: Use a true-RMS meter or compute RMS properly.
- Wrong: Ignoring DC offset when checking headroom. — Right: Peak = offset + amplitude must stay inside the rails.
Applications
- Audio: Gain staging in dBu/dBV between microphones, mixers and amplifiers.
- Sensors: Millivolt sensor signals amplified to ADC full scale.
- RF: Power levels and link budgets in dBm.
- Power: RMS current and crest factor for sizing fuses and wires.
Key takeaways
- v(t) = V_m sin(ωt + φ); V_rms = V_m/√2.
- 20·log for voltage, 10·log for power; dB adds through chains.
- Keep headroom above signals and footroom above noise.
- Sensor → protection → bias → LNA → filter → gain → ADC.
Going further
- Spectral analysis: Any signal is a sum of sinusoids (Fourier).
- Level diagrams: Plotting signal and noise levels through a chain.
- Crest factor and ADC loading: Peaky signals need extra headroom.