ELE-250 · Lesson 1 of 12 · 26 min
Signals: classification and operations
A signal is any quantity that varies with time, position or some other independent variable and carries information. The voltage from a microphone, the stream of pulses from a shaft-speed sensor, the temperature logged every minute by a cabinet controller, the brightness of each pixel in a camera image and the price of a stock at each market close are all signals. A system is anything that takes one or more signals in and produces signals out: an amplifier, a filter, a motor and its load, a microcontroller program that averages readings, or a whole power grid. Signals and Systems gives you one language for describing all of them, and one toolkit, built around convolution and the Fourier, Laplace and z-transforms, for predicting what a system will do to a signal before you build it.
In an ABET-accredited American electrical or computer engineering program, Signals and Systems normally comes in the spring of the sophomore year, after calculus, differential equations and circuit analysis and alongside Electronics I. It is the mathematical foundation for Communication Systems (ELE-350), Digital Signal Processing (ELE-351) and Control Systems (ELE-390), and it shows up again in power systems, electromagnetics and machine learning. Most students find it the most abstract course of sophomore year. The way to make it concrete is to keep asking what each idea means for a real circuit or a real program, which is what this course does.
The examples continue at Cedarline Controls, the invented Madison, Wisconsin company from ELE-210 and ELE-240 that designs controllers for traffic signals and small machines. Amara Osei, an engineer intern, and Daniel Fortin, the senior hardware designer, have finished the analog hardware of the pedestrian crossing controller. Now they are writing the signal processing that runs on its microcontroller. The accessible pedestrian signal has to measure street noise from its microphone and set the loudness of its locator tone, the tachometer on a nearby pump has to turn a noisy pulse train into a clean speed reading, and every analog input has to be sampled without aliasing. Each lesson takes one of those jobs.
Continuous-time and discrete-time signals
A continuous-time signal is defined for every value of time in an interval and is written with the time variable in parentheses, x(t). The microphone voltage is continuous-time: it has a value at t = 0.1 s, at t = 0.1001 s and at every instant in between. A discrete-time signal is defined only at integer indices and is written with square brackets, x[n]. When the microcontroller's analog-to-digital converter (ADC) reads the microphone 8,000 times a second, it produces a discrete-time signal x[n] = x(nT), where T = 125 µs is the sampling interval and n counts samples. Between samples, x[n] is not zero; it simply is not defined.
A second, separate distinction is between analog and digital values. An analog signal can take any value in a continuous range; a digital signal takes values from a finite set, such as the 4,096 levels of a 12-bit ADC. The ADC output is therefore both discrete-time and digital. Most of this course treats discrete-time signals as if their values were exact real numbers and ignores the small rounding error, called quantization error, that comes from the finite set of levels. ELE-351 deals with quantization in detail.
Periodic signals
A continuous-time signal is periodic if there is a positive T such that x(t + T) = x(t) for all t. The smallest such T is the fundamental period T₀, and f₀ = 1/T₀ is the fundamental frequency in hertz, with ω₀ = 2πf₀ in radians per second. The 60 Hz hum that couples into the microphone cable from the cabinet wiring has T₀ = 16.67 ms. A sum of periodic signals is periodic only if the ratio of their periods is a rational number; the period of the sum is then the least common multiple of the individual periods. A tone at 400 Hz plus one at 600 Hz repeats every 5 ms, because 5 ms holds exactly two periods of the first and three of the second. A signal made of sin(2πt) and sin(2π√2 t) never repeats exactly.
Discrete-time periodicity has a twist. x[n] is periodic with period N if x[n + N] = x[n] for all n, and N must be an integer. A discrete-time sinusoid cos(Ω₀n), where Ω₀ is in radians per sample, is periodic only if Ω₀/2π is a ratio of integers. cos(πn/4) repeats every 8 samples, but cos(n) never repeats, because 1/2π is irrational. A second surprise is that discrete-time frequencies are only unique over a range of 2π: cos((Ω₀ + 2π)n) = cos(Ω₀n) for every integer n, so the two signals are identical. This is the mathematical root of aliasing, which lesson 9 studies.
Even and odd signals
A signal is even if x(−t) = x(t), like a cosine, and odd if x(−t) = −x(t), like a sine. Every signal can be split uniquely into an even part and an odd part:
Symmetry matters because it simplifies the transforms later in the course. The Fourier series of an even periodic signal contains only cosines, and that of an odd one only sines. When you can see a symmetry, you can skip half of an integral.
Energy and power
Engineers classify signals by how much energy they carry. By analogy with a voltage across a 1 Ω resistor, the energy of a continuous-time signal and its average power are
For discrete-time signals the integrals become sums over n, and the average divides by the number of samples, 2N + 1. An energy signal has finite energy and therefore zero average power; a single click from a push button or one tick of the locator tone is an energy signal. A power signal has finite, non-zero average power and therefore infinite energy; periodic signals such as the 60 Hz hum, and steady random noise, are power signals. Some signals, such as a ramp that grows forever, are neither. For a sinusoid A cos(ω₀t + φ) the average power is A²/2, which is why the root-mean-square value of a sinusoid is A/√2.
Worked problem
Energy of a decaying tick and power of a hum
Amara models one tick of the locator tone envelope as x(t) = 2e^(−50t) V for t ≥ 0 and zero before. She models the hum on the microphone line as h(t) = 0.03 cos(120πt) V. Find the energy of the tick and the average power and RMS value of the hum.
Show solution
- The tick is zero for negative time, so its energy is an integral from zero to infinity.
- \[E_x = \int_{0}^{\infty} \big(2e^{-50t}\big)^2\,dt = 4\int_{0}^{\infty} e^{-100t}\,dt = \frac{4}{100} = 0.04\ \text{V}^2\text{s}\]
- The hum is periodic, so its average power over one period equals its long-run average power.
- \[P_h = \frac{A^2}{2} = \frac{(0.03)^2}{2} = 4.5 \times 10^{-4}\ \text{V}^2\]
- \[h_{rms} = \sqrt{P_h} = \frac{0.03}{\sqrt{2}} \approx 21.2\ \text{mV}\]
Answer: The tick is an energy signal with E = 0.04 V²·s (0.04 J in a 1 Ω reference). The hum is a power signal with P = 4.5 × 10⁻⁴ V² and an RMS value of about 21.2 mV.
The basic building-block signals
A small set of signals appears so often that each has a symbol. The unit step u(t) is 0 for t < 0 and 1 for t > 0; it models a switch closing. Multiplying by u(t) turns any signal on at t = 0, so the tick above can be written 2e^(−50t)u(t). The unit ramp r(t) = t u(t) is the integral of the step. The rectangular pulse of width τ centered at zero, often written rect(t/τ), equals u(t + τ/2) − u(t − τ/2).
The unit impulse δ(t) is the idealization of a very short, very tall pulse of unit area: zero everywhere except at t = 0, and with ∫δ(t)dt = 1. No real signal is an impulse, but a pulse much shorter than any time constant in the system behaves like one, so the impulse is the natural test input. Its most important property is sifting: multiplying a signal by δ(t − t₀) and integrating picks out the value at t₀,
The step is the running integral of the impulse, and the impulse is the derivative of the step. In discrete time the unit impulse δ[n] is simply 1 at n = 0 and 0 elsewhere, with none of the mathematical subtlety, and the unit step u[n] is 1 for n ≥ 0. Any discrete-time signal can be written as a sum of shifted, scaled impulses, x[n] = Σ x[k]δ[n − k], which is the starting point of convolution in lesson 3.
Complex exponentials are the most important signals of all. By Euler's formula,
so every sinusoid is a sum of two complex exponentials spinning in opposite directions. The more general exponential e^(st), with s = σ + jω, grows or decays at rate σ while it oscillates at ω. You will see in lesson 2 that complex exponentials pass through linear time-invariant systems unchanged in shape, only scaled, which is why every transform in this course is built from them.
Operations on the time variable
Three operations change the time axis. A time shift x(t − t₀) moves the signal right by t₀ when t₀ is positive, which is a delay; x(t + t₀) moves it left, an advance. Time reversal x(−t) mirrors the signal about t = 0. Time scaling x(at) compresses the signal by a factor a when a > 1 and stretches it when 0 < a < 1. A recording played back at double speed is x(2t): every event happens in half the time, and every frequency doubles. Amplitude operations, such as multiplying by a constant or adding an offset, change the vertical axis and are easier to get right.
Combined operations cause most errors. The safe method for y(t) = x(at − b) is to shift first and scale second: form v(t) = x(t − b), then y(t) = v(at). Alternatively, find the new location of any feature by solving at − b = t_old for t. If x(t) has a pulse edge at t = 1, then in x(2t − 3) that edge is where 2t − 3 = 1, at t = 2.
Worked problem
Locating a transformed pulse
The tachometer's conditioning circuit produces a clean pulse x(t) that is 1 V for 0 ≤ t ≤ 4 ms and zero otherwise. A test script builds y(t) = 3x(−2t + 6) with t in milliseconds. Where is the pulse in y, and how tall is it?
Show solution
- Solve for the times when the argument of x lies between its edges, 0 and 4.
- \[0 \le -2t + 6 \le 4\]
- Subtract 6 and divide by −2, reversing the inequalities.
- \[-6 \le -2t \le -2 \quad\Rightarrow\quad 1 \le t \le 3\]
- The factor 3 scales the amplitude, and the minus sign reverses the pulse, which is invisible here because a rectangle is symmetric.
Answer: y(t) is a 3 V pulse from t = 1 ms to t = 3 ms: half as wide, three times as tall and moved to a new position.
Discrete-time operations
Time shifts and reversal work the same way in discrete time, but scaling does not. Keeping every second sample, y[n] = x[2n], is called decimation or downsampling, and it throws away half of the samples for good; it cannot be undone. Going the other way, y[n] = x[n/2] is only defined when n is even, so the odd samples must be filled in, usually with zeros followed by a smoothing filter, a process called upsampling and interpolation. When Cedarline's firmware reduces the microphone stream from 8,000 to 1,000 samples a second to save memory, it is decimating by 8, and lesson 9 shows that it must filter first or high-frequency noise will fold down into the band it keeps.
import math
def energy(x):
return sum(v * v for v in x)
def power(x):
return energy(x) / len(x)
fs = 8000 # samples per second
T = 1 / fs
N = fs # one second of samples
tick = [2 * math.exp(-50 * n * T) for n in range(N)]
hum = [0.03 * math.cos(2 * math.pi * 60 * n * T) for n in range(N)]
print(f"tick energy (sum x^2 * T) = {energy(tick) * T:.4f} V^2 s")
print(f"hum average power = {power(hum):.2e} V^2")
print(f"hum RMS = {math.sqrt(power(hum)) * 1000:.1f} mV")
# Is cos(Omega n) periodic? Look for the smallest N with Omega*N a multiple of 2*pi.
for name, Om in (("pi/4", math.pi / 4), ("2*pi*3/10", 2 * math.pi * 3 / 10), ("1 rad", 1.0)):
period = next((N for N in range(1, 200)
if abs(math.remainder(Om * N, 2 * math.pi)) < 1e-9), None)
print(f"cos({name} n): period = {period if period else 'none found up to 199 samples'}")tick energy (sum x^2 * T) = 0.0403 V^2 s hum average power = 4.50e-04 V^2 hum RMS = 21.2 mV cos(pi/4 n): period = 8 cos(2*pi*3/10 n): period = 10 cos(1 rad n): period = none found up to 199 samples
The sampled energy, 0.0403 V²·s, is close to the exact 0.04 because 8,000 samples a second is fast compared with the 20 ms time constant of the tick; the small excess comes from approximating the integral by a sum of rectangles that start at the peak. The hum's power and RMS value match the formulas. The last three lines show the discrete-time periodicity rule in action: Ω = π/4 repeats after 8 samples, Ω = 2π(3/10) after 10 samples (three full cycles), and Ω = 1 rad per sample finds no period at all, because it never repeats.
Common mistakes
MistakeWriting x[n] for a continuous-time signal or x(t) for a sampled one.
InsteadParentheses mean the variable is continuous and square brackets mean it is an integer index; mixing them hides whether a result applies to sampled data.
MistakeScaling before shifting in x(at − b) and putting the pulse in the wrong place.
InsteadSolve at − b = t_old for each feature, or shift by b first and then scale by a.
MistakeAssuming every discrete-time sinusoid is periodic.
Insteadcos(Ω₀n) is periodic only when Ω₀/2π is rational, and frequencies 2π apart are the same signal.
MistakeCalling a periodic signal an energy signal.
InsteadA periodic signal that is not zero has infinite energy; describe it by its average power.
MistakeTreating the impulse as a very large number at t = 0.
Insteadδ(t) is defined by its unit area and the sifting property, and it only makes sense inside an integral or as an input to a system.
Summary and key terms
- A signal carries information as a function of an independent variable; a system maps input signals to output signals.
- Continuous-time signals x(t) exist at every instant; discrete-time signals x[n] exist only at integer indices, often from sampling with x[n] = x(nT).
- Sums of periodic signals are periodic only when their periods have a rational ratio; discrete-time sinusoids are periodic only when Ω₀/2π is rational.
- Energy signals have finite energy; power signals have finite, non-zero average power. A sinusoid of amplitude A has power A²/2.
- The step, ramp, rectangular pulse, impulse and complex exponential are the building blocks, and the impulse's sifting property picks out a single value.
- Time shifting, reversal and scaling act on the time variable; for combined operations, shift first and then scale.
- Discrete-time signal
- A signal defined only at integer values of its index, written x[n].
- Fundamental period
- The smallest positive shift that leaves a periodic signal unchanged.
- Energy signal
- A signal with finite total energy and zero average power.
- Power signal
- A signal with finite, non-zero average power, such as a periodic signal.
- Unit impulse
- The signal δ(t) of zero width and unit area, defined by the sifting property.
- Unit step
- The signal u(t) that is 0 before t = 0 and 1 after it.
- Decimation
- Keeping every Mth sample of a discrete-time signal, which reduces the sampling rate by M.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Is x(t) = cos(4πt) + sin(6πt) periodic? If so, find its fundamental period.
Show answer
Yes. The periods are 0.5 s and 1/3 s, whose ratio 3/2 is rational; the least common multiple is 1 s.
Find the even and odd parts of x(t) = e^(−t)u(t).
Show answer
x_e(t) = ½e^(−|t|) and x_o(t) = ½e^(−|t|)·sign(t).
Find the energy of x[n] = (0.5)^n u[n].
Show answer
E = Σ 0.25^n = 1/(1 − 0.25) ≈ 1.333.
What is the average power of x(t) = 5 + 3cos(100t)?
Show answer
P = 5² + 3²/2 = 25 + 4.5 = 29.5; the DC and sinusoidal parts add because their cross term averages to zero.
Evaluate ∫ (t² + 1) δ(t − 3) dt over all t.
Show answer
By sifting, 3² + 1 = 10.
A pulse occupies 2 ≤ t ≤ 5. Where does x(t/2 + 1) occupy?
Show answer
Solve 2 ≤ t/2 + 1 ≤ 5: 2 ≤ t ≤ 8. The pulse is twice as wide.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.