A signal is anything that carries information by varying with some independent variable. Almost always for us, the variable is time, and the signal is a voltage or a number on a computer. Signals can be much broader than that: a photograph is a signal where brightness varies over the spatial coordinates . The temperature on a wall over the course of a day is a signal. The current draw of a CPU during a cryptographic operation is a signal, and crucially for hardware security, a signal that leaks information about the secret key.
We will mostly deal with one-dimensional signals, functions of time. The signal might be:
- Continuous-time: , defined for every real value of . An analog audio waveform from a microphone is continuous-time. So is the voltage on a transmission line, the temperature in a room, or the brightness of a star reaching Earth.
- Discrete-time: , defined only for integer values of . A digitized audio file is discrete-time: it has a sample at and nothing in between.
We use (with parentheses, ) for continuous-time and (with brackets, ) for discrete-time. This is a universal convention; never violate it. The parentheses-versus-brackets is the visual cue that immediately tells a reader of your code or paper whether you're working in the analog world or the digital one.
Movie analogy. A movie projected on a screen is continuous in apparent motion (your brain interpolates between frames). The actual film is a sequence of discrete frames, a discrete-time signal at 24 frames per second. The brain reconstructs the continuous motion from the discrete samples. This is exactly the conversion that the sampling theorem (later in this chapter) governs: when can you recover continuous-time signals from discrete samples? The answer, foreshadowed: when the sampling rate is high enough relative to how fast the signal changes.
1.1 Where signals come from
Before we get formal, take a moment to think about the physical origin of every signal you'll meet.
- A microphone produces a continuous voltage signal whose amplitude tracks the air pressure at the diaphragm. Loud sound, big swings; quiet sound, small swings.
- A photodiode produces a current proportional to the light hitting it. When you look at fiber-optic communication in Chapter 20, you'll be reading these tiny currents and turning them back into bits.
- An accelerometer in your phone produces three voltages tracking acceleration on , , axes. Three signals from one sensor.
- A current probe clipped over a chip's power pin gives you the chip's instantaneous current draw, sampled fast. In Chapter 24 we'll point an oscilloscope at exactly this signal to break crypto keys.
Every signal we'll analyze in this chapter started life as a physical quantity changing over time. The math is just the bookkeeping.
1.2 Classifying signals
Signals come with a vocabulary worth knowing because each class has its own analysis tools.
- Periodic vs aperiodic. A periodic signal repeats: for some smallest period . A pure sinusoid is the canonical periodic signal. A single voice utterance, or a step function, is aperiodic.
- Even vs odd. Even: (cosine is even). Odd: (sine is odd). Any signal can be uniquely decomposed into even + odd parts. This is sometimes a useful trick when computing Fourier transforms.
- Deterministic vs random. Deterministic: fully describable by an equation, like . Random (stochastic): only describable statistically, such as thermal noise, or a random secret key being processed by a chip. Random signals need a different toolkit (autocorrelation, power spectral density), introduced later in this chapter.
- Energy vs power signals. An energy signal has finite total energy (a pulse, a decaying exponential, a single voice utterance). A power signal has finite average power , but infinite total energy because it lasts forever (every nontrivial periodic signal is a power signal).
- Causal vs noncausal. Causal: for . Real-world signals are usually causal; they had to start at some point. Noncausal signals are mathematical conveniences but rarely physical.
1.3 Standard reference signals
A small zoo of "elementary" signals shows up everywhere. Get comfortable with each, including its picture.
Unit step . Zero for , one for . Models a switch flipping at , a battery being connected, a logic line going high.
u(t)
1 ──────────────
│
0 ──┘
0 t →Unit impulse / Dirac delta . A spike at with infinite height, zero width, and area exactly 1. Mathematically: , and for any well-behaved , , the sifting property that picks out the value of at .
δ(t)
│
│ (height: ∞, area: 1)
│
────┴───────── t →
0The delta is bizarre but useful. It is not a function in the strict mathematical sense (its value at is "infinite"). It is a distribution, a mathematical object defined entirely by what happens when you integrate it against other functions. Practically: any short pulse becomes effectively a delta when its duration is much shorter than the time scales the rest of your circuit cares about. A camera flash is essentially an impulse of light. A drum strike is essentially an impulse of pressure. The brief glitch you see when an MCU pin transitions is essentially an impulse for the rest of the board.
The delta and step are related by integration and differentiation: , and (in the distributional sense). This pairing recurs constantly: differentiate a step, get an impulse; integrate an impulse, get a step.
Unit ramp . Linear ramp starting at 0. Differentiate: get a step. Differentiate again: get an impulse. The impulse, step, and ramp are siblings related by integration.
Sinusoids: , . Periodic, smooth, the eigenfunctions of LTI systems (we'll prove that in Section 4). They are the atoms out of which Fourier builds everything.
Exponentials: . Decaying () or growing (). Used to model RC discharges, capacitor charging, radioactive decay, population growth, and runaway oscillation.
Rectangular pulse: for , 0 otherwise. Models a short on/off event, a single transmitted bit in PCM, a single radar pulse.
Sinc function: . Looks like a tall central peak at with decaying oscillating ripples on either side. It shows up everywhere in sampling theory because the sinc is the Fourier transform of the rect (and vice versa).
sinc(t)
1 ── ╱╲
╲ ╱ ╲
╲ ╱ ╲ ╱╲ ╱╲
0 ────╳──────╳────╱──╲─────╱──╲─── t →
╲ ╱ ╲ ╱
╲_╱ ╲_╱1.4 Operations on signals
Three basic operations transform one signal into another in the time variable:
- Time shift: . The signal delayed by . ( moves the signal to the right, which can feel counterintuitive because the formula has , not .) Think of it this way: if has a peak at , then has the same peak when , i.e., at . So a positive pushes the peak later in time.
- Time scale: . Compresses () or stretches () in time. Sped-up audio sounds chipmunky; slowed-down sounds underwater.
- Time reversal: . A backward-played record.
Three operations on amplitude:
- DC offset: .
- Gain: .
- Inversion: .
These compose. A common exam example: . Sketching this requires applying time scale (factor of 2 compression), time shift (delay by , careful with the order), inversion (vertical flip), gain of 2, and DC offset (raise by 1). The trick is to apply transformations in the right order: handle the argument of first (scale before shift, or factor it out and shift first), then the amplitude. Mistakes here are why first-time students hate this material; once you've done five examples, it becomes mechanical.