Signals in Frequency
The previous chapter introduced signals as quantities that vary with time, and developed the tools needed to describe them: period, frequency, amplitude, phase, and the harmonic signal as the fundamental building block. That time-domain view is natural and intuitive, yet it hides something important. Two signals that look very different in the time domain may share the same underlying frequency content, and two signals that look deceptively similar may differ in ways that only become visible when the question is asked differently: what frequencies does this signal contain, and how strongly is each one present?
This chapter answers that question. It introduces the frequency domain as a complementary way to represent signals, builds the concept of a spectrum from the ground up using the harmonic signal as a starting point, shows how the Fourier Series decomposes any periodic signal into a sum of harmonics, extends the idea briefly to aperiodic signals via the Fourier Transform, and explains why the property of linearity makes all of this analysis enormously powerful in practice. The chapter closes with a survey of frequency ranges and their engineering applications.
Two Ways to See a Signal
Consider a chord played on a piano. In the time domain, a microphone recording of that chord traces a complex, rapidly changing waveform. Identifying which notes are present from the waveform alone is difficult; the individual contributions are superimposed and tangled together. A trained musician listening to the chord, however, immediately recognises each note because the human auditory system performs, in effect, a frequency analysis: it separates the incoming sound into its constituent tones and identifies each one independently.
Engineers borrow the same idea. The time domain describes how a signal changes as a function of time. The frequency domain describes how much of each frequency is present in the signal. Neither representation discards information; they are two equivalent ways of describing the same signal. Switching between them is governed by the mathematics of the Fourier Series and the Fourier Transform, which are introduced in the sections that follow.
Key Concept: Time Domain and Frequency Domain
The time domain represents a signal as a function of time: $v(t)$. The frequency domain represents the same signal as a function of frequency, showing which frequency components are present and how large each one is. The two representations carry identical information expressed in different forms.
Figure 1: The same signal represented in two complementary ways. The time-domain plot (left) shows the waveform as it evolves in time; the frequency-domain plot (right) shows the magnitude of each frequency component present in the signal. Each vertical line in the frequency domain corresponds to one harmonic component.
A single cosine wave occupies one point in the frequency domain: a single vertical line at the cosine frequency. A sum of three cosines at different frequencies occupies three points. When many harmonics are summed to build a more complex waveform such as a square wave, the frequency-domain picture shows precisely which harmonics contribute and how strongly each one does so.
Spectrum of a Harmonic Signal
The simplest possible frequency-domain picture belongs to the harmonic (sinusoidal) signal. A pure cosine
$$v(t) = V_p \cos(2\pi f_0 t + \phi)$$
contains exactly one frequency: $f_0$. In the frequency domain it therefore appears as a single vertical line, or spectral line, located at $f_0$ with height $V_p$.
Figure 2: Frequency spectrum of a single cosine $v(t) = V_p \cos(2\pi f_0 t + \phi)$. Because the signal contains only one frequency, its spectrum consists of a single spectral line at $f_0$ with magnitude $V_p$.
The harmonic signal is the atom of frequency-domain analysis. Every more complex periodic signal is a molecule assembled from these atoms, and the frequency-domain representation identifies exactly which atoms are present and in what proportions.
Key Concept: Spectral Line
A spectral line (or line spectrum) is the frequency-domain representation of a single harmonic component. Its horizontal position gives the frequency of that component; its height gives the magnitude. A signal made up of several harmonics produces several spectral lines.
Fourier Series
The goal of this section is to answer a deceptively simple question: if the harmonic signal is the fundamental building block, how do we build more complex periodic signals from it?
Building Periodic Signals from Harmonics
Begin with a concrete target: a square wave that alternates between $+1$ and $-1$ with period $T$ and fundamental frequency $f_0 = 1/T$. Rather than starting with a formula, start by listening to what happens when harmonic components are added one at a time.
Step 1: fundamental only. A cosine at $f_0$ with amplitude $\frac{4}{\pi} \approx 1.27$ is already a rough approximation. It has the right period and the right sign, but it is smooth where the square wave is flat, and it overshoots at the transitions.
Step 2: add the third harmonic. Adding a cosine at $3f_0$ with amplitude $\frac{4}{3\pi}$ narrows the overshoot and flattens the top and bottom of the waveform noticeably.
Step 3: add the fifth harmonic. Adding a cosine at $5f_0$ with amplitude $\frac{4}{5\pi}$ flattens the waveform further. The transitions are becoming steeper.
Each odd harmonic that is added brings the approximation closer to the ideal square wave. The figure below shows this progression.
Figure 3: Progressive Fourier Series approximations of a square wave. Adding successive odd harmonics brings the approximation closer to the ideal square wave (dashed). Each harmonic contributes to flattening the top and bottom and sharpening the transitions. An infinite number of odd harmonics is required to reproduce the instantaneous transitions of an ideal square wave exactly.
Several observations follow directly from the figure:
- The square wave contains only odd harmonics: $f_0$, $3f_0$, $5f_0$, and so on. Even harmonics are entirely absent.
- The amplitude of the $n$th harmonic decreases as $1/n$. Lower harmonics carry more of the signal's energy; higher harmonics refine the shape.
- The sharp transitions of the square wave in the time domain correspond to high-frequency content in the frequency domain. Removing the higher harmonics smooths and rounds the corners.
- An infinite number of harmonics is needed to reproduce the instantaneous transitions exactly. Any finite approximation exhibits small oscillations near the transitions, a phenomenon known as the Gibbs phenomenon.
The Fourier Series Formula
Mathematical Description: Fourier Series
A periodic signal $f(t)$ with period $T$ can be expressed as an infinite sum of harmonics:
$$f(t) = \sum_{n=-\infty}^{\infty} C_n \, e^{\,j\omega_0 n t}$$
where $\omega_0 = 2\pi/T$ is the fundamental angular frequency. The coefficients $C_n$ are calculated as:
$$C_n = \frac{1}{T} \int_{0}^{T} f(t)\, e^{-j\omega_0 n t} \, dt$$
Each coefficient $C_n$ is a complex number whose magnitude gives the amplitude of the $n$th harmonic and whose angle gives the phase. The notation uses complex exponentials, which will become transparent after complex numbers are covered later in the course. For now, the important message is: any periodic signal can be expressed as a weighted sum of harmonics at integer multiples of $\omega_0$. The coefficients $C_n$ are the weights.
You will not be asked to calculate $C_n$ by hand in this course. What matters is understanding what the formula says: a complex periodic signal in the time domain corresponds to a discrete set of spectral lines in the frequency domain, one line for each value of $n$.
The relationship between the period $T$ and the spacing of spectral lines is worth noting explicitly. If a signal has period $T$, its fundamental frequency is $f_0 = 1/T$, and harmonics appear at $f_0$, $2f_0$, $3f_0$, and so on. A signal with a longer period has a lower fundamental frequency and therefore more closely spaced spectral lines. As $T \to \infty$, the spacing between lines approaches zero and the discrete sum transitions into an integral, leading to the Fourier Transform discussed below.
Spectra of Common Waveforms
Each periodic waveform has a characteristic spectrum that can be recognised by its pattern of spectral lines. The figure below shows the spectra of the cosine, the square wave, the sawtooth wave, and the triangle wave.
Figure 4: Frequency spectra of four periodic waveforms. A cosine contains a single spectral line at $f_0$. The square wave contains only odd harmonics with amplitudes falling as $1/n$. The sawtooth wave contains all harmonics with amplitudes falling as $1/n$. The triangle wave contains only odd harmonics, but amplitudes fall as $1/n^2$, so higher harmonics diminish far more rapidly. Magnitudes are normalised to the fundamental.
| Waveform | Harmonics present | Amplitude of $n$th harmonic | Decay rate |
|---|---|---|---|
| Cosine | Fundamental only | $V_p$ (at $n=1$ only) | N/A |
| Square wave | Odd ($1, 3, 5, \ldots$) | $\propto 1/n$ | Slow |
| Sawtooth wave | All ($1, 2, 3, \ldots$) | $\propto 1/n$ | Slow |
| Triangle wave | Odd ($1, 3, 5, \ldots$) | $\propto 1/n^2$ | Fast |
Two practical points follow from this table.
First, the decay rate is directly connected to the smoothness of the waveform. The triangle wave is continuous and has a smooth appearance despite its pointed peaks; its harmonic amplitudes decay rapidly because the waveform requires little high-frequency content to maintain its shape. The square wave has instantaneous transitions; reproducing those transitions requires significant high-frequency content, and the amplitudes decay only slowly.
Second, the bandwidth required to transmit a waveform faithfully is determined by how many harmonics carry significant energy. Transmitting a square wave with fidelity requires a system that passes many odd harmonics. Transmitting a triangle wave requires far fewer, because higher harmonics are negligibly small. This is a key consideration in filter design, which is covered in a later chapter.
Spectrum of Aperiodic Signals
Not all signals are periodic. A single voltage pulse, the click of a switch, the impulse of a sensor triggered by a passing particle: these events occur once or in an irregular fashion and do not establish a repeating pattern.
Key Concept: Aperiodic Signal
An aperiodic signal does not repeat at regular intervals. It may occur once or continue indefinitely without a consistent period. Because there is no period $T$, there is no fundamental frequency $f_0$, and the Fourier Series does not apply directly.
Continuous Spectra
The key difference between the spectrum of a periodic signal and that of an aperiodic signal lies in whether the spectrum is discrete or continuous.
A periodic signal has a discrete spectrum: energy is concentrated at the specific frequencies $f_0$, $2f_0$, $3f_0$, and so on. Between these frequencies, the spectrum is zero. An aperiodic signal, by contrast, has a continuous spectrum: energy is distributed across a continuous range of frequencies rather than concentrated at isolated points.
Intuitively, this follows from the Fourier Series perspective. A periodic signal with period $T$ has spectral lines spaced $f_0 = 1/T$ apart. As the period grows longer, the spectral lines move closer together. In the limit as $T \to \infty$, the signal occurs only once, the lines merge into a continuous curve, and the Fourier Series sum becomes an integral.
Figure 5: A rectangular pulse in the time domain (left) and its continuous frequency spectrum (right). Unlike the discrete spectral lines of a periodic signal, the pulse spectrum is a smooth, continuous function of frequency. The spectrum has the shape of a sinc function: it is largest at zero frequency and falls to zero at integer multiples of $1/\tau$, where $\tau$ is the pulse width.
Three observations are worth noting:
- Short pulses have wide spectra. A narrower pulse in time produces a wider, flatter spectrum in frequency. In the extreme case of an infinitely short impulse, the spectrum is perfectly flat across all frequencies. This time-frequency trade-off is fundamental and appears throughout signal processing.
- The spectrum is continuous. There are no isolated spikes. Every frequency contributes, though not equally.
- Bandwidth. The range of frequencies where the spectrum is significant is called the bandwidth of the signal. A signal with narrow bandwidth can be transmitted through a channel with limited frequency range; a wide-bandwidth signal requires a broader channel. Digital communication systems routinely require that pulse shapes be designed to fit within an allocated bandwidth, making frequency-domain analysis a practical necessity.
The Fourier Transform
Mathematical Description: Fourier Transform
The Fourier Transform extends the Fourier Series to aperiodic signals. Given an aperiodic signal $f(t)$, its frequency-domain representation $F(\omega)$ is defined by:
$$F(\omega) = \int_{-\infty}^{\infty} f(t)\, e^{-j\omega t}\, dt$$
and the original signal is recovered from $F(\omega)$ by the inverse transform:
$$f(t) = \frac{1}{2\pi} \int_{-\infty}^{\infty} F(\omega)\, e^{\,j\omega t}\, d\omega$$
The function $F(\omega)$ is in general complex: its magnitude $|F(\omega)|$ gives the spectral amplitude at each frequency, and its phase $\angle F(\omega)$ gives the phase. The two together carry exactly the same information as $f(t)$; neither representation loses anything.
You will not be required to evaluate these integrals in this course. The important message is conceptual: any aperiodic signal can be represented as a continuous weighted superposition of harmonics. The weight at each frequency $\omega$ is given by $F(\omega)$.
MATLAB Connection
In your MATLAB exercises you will use the Fast Fourier Transform (FFT) to compute the spectrum of sampled signals. The FFT is an efficient numerical algorithm for evaluating the Discrete Fourier Transform, which is the sampled-signal version of the Fourier Transform. Periodic signals produce spectra with distinct peaks at the harmonic frequencies; aperiodic signals produce smooth, broad spectra. Experimenting with different signal shapes and durations in MATLAB develops an intuitive feel for the time-frequency relationship that equations alone cannot fully convey.
Linearity and Why Harmonics Unlock System Analysis
The Fourier Series and Fourier Transform would be interesting mathematical facts without further consequence if it were not for a property shared by most electrical circuits and systems under normal operating conditions: linearity. Linearity is what transforms frequency-domain analysis from a descriptive tool into a predictive one.
Key Concept: Linear System
A system is linear if it satisfies two properties:
- Homogeneity (scaling): if input $x(t)$ produces output $y(t)$, then input $a \cdot x(t)$ produces output $a \cdot y(t)$ for any constant $a$.
- Superposition (additivity): if input $x_1(t)$ produces output $y_1(t)$ and input $x_2(t)$ produces output $y_2(t)$, then input $x_1(t) + x_2(t)$ produces output $y_1(t) + y_2(t)$.
Superposition and Harmonic Analysis
The connection between linearity and the Fourier Series is direct. Suppose a linear system is driven by the signal:
$$v_{\text{in}}(t) = C_1 e^{j\omega_1 t} + C_2 e^{j\omega_2 t} + C_3 e^{j\omega_3 t} + \cdots$$
Because the system is linear, the superposition property applies: the output is the sum of the responses to each harmonic component taken individually. The total output is therefore:
$$v_{\text{out}}(t) = H(\omega_1) C_1 e^{j\omega_1 t} + H(\omega_2) C_2 e^{j\omega_2 t} + H(\omega_3) C_3 e^{j\omega_3 t} + \cdots$$
where $H(\omega_n)$ is the system's response to a single harmonic at frequency $\omega_n$. This function $H(\omega)$ is called the frequency response of the system.
The implication is profound. To predict how a linear system responds to any input signal, it is sufficient to characterise the system at each frequency separately and then use superposition to assemble the result. The hard problem of analysing a complex input reduces to the simpler problem of analysing one frequency at a time.
Figure 6: Superposition in a linear system. Each harmonic component of the input is processed independently by the system. The output component at each frequency is simply the input component multiplied by the system's frequency response $H(\omega)$ at that frequency. The total output is the sum of all these individual responses.
Linear and Nonlinear Elements
Electrical circuits typically contain a mix of linear and nonlinear elements.
Linear elements obey their governing relationships for all amplitudes and all frequencies. Resistors (Ohm's law: $v = Ri$), capacitors, and inductors are linear. An amplifier operating within its rated range behaves linearly to a good approximation.
Nonlinear elements violate at least one of the two linearity conditions. The ideal diode explored in the previous chapter is nonlinear: its behaviour depends on the polarity of the voltage, not just its magnitude. A transistor operating as a switch is nonlinear. Any element with a saturating or threshold characteristic is nonlinear.
Note: Linear Range
Many elements that are nonlinear in general behave approximately linearly within a limited operating range. An amplifier is linear for small signals but saturates and becomes nonlinear when the signal amplitude is too large. A loudspeaker driver reproduces sound cleanly at moderate levels but distorts at high volumes. Much of circuit design involves ensuring that nonlinear devices are operated within their approximately linear range.
Looking Ahead: AC Analysis
The practical payoff of linearity is the subject of the AC Analysis chapter. If a circuit is linear, its response to a sinusoidal input at frequency $\omega$ is also sinusoidal at the same frequency $\omega$; only the amplitude and phase are altered. This means that the complete behaviour of a linear circuit for any input can be determined by analysing its response to a single harmonic and recording how the amplitude and phase change.
A systematic framework for doing this, called phasor analysis, converts the circuit's differential equations into algebraic equations at each frequency. The result is a powerful and tractable method for designing and analysing circuits that process sinusoidal signals: audio amplifiers, radio receivers, power converters, sensor interfaces, and many others. All of this rests on the two foundations laid in this chapter: the Fourier Series (any periodic signal is a sum of harmonics) and linearity (the response to a sum equals the sum of responses).
Frequency Ranges and Applications
Engineers work with signals across an enormous range of frequencies, from sub-hertz geological measurements to terahertz imaging systems. The table below provides an orientation to the principal bands and their associated applications.
| Band | Approximate range | Representative applications |
|---|---|---|
| Sub-audio | $< 20$ Hz | Seismic sensing, infrasound monitoring |
| Audio | 20 Hz – 20 kHz | Speech, music, hearing-aid circuits |
| Ultrasonic | 20 kHz – 1 MHz | Medical imaging, non-destructive testing |
| Radio (AM) | 530 – 1700 kHz | AM broadcast, marine communication |
| Radio (FM/VHF) | 30 – 300 MHz | FM broadcast, aircraft communication |
| Microwave | 300 MHz – 30 GHz | Wi-Fi, mobile telephony, radar, GPS |
| Millimetre wave | 30 – 300 GHz | 5G communication, automotive radar |
| Terahertz | 0.3 – 10 THz | Security imaging, spectroscopy |
Several engineering domains that depend directly on frequency-domain thinking are worth noting.
Audio engineering. Equaliser circuits selectively amplify or attenuate specific frequency bands to improve the tonal balance of a recording. The ability to manipulate individual harmonics in the frequency domain, rather than operating on the entire waveform at once, makes this practical.
Biomedical engineering. Electroencephalogram (EEG) signals are characterised by named frequency bands: delta (below 4 Hz), theta (4–8 Hz), alpha (8–13 Hz), and beta (above 13 Hz). Identifying which bands are dominant provides clinical information about brain state that is not accessible from the time-domain waveform alone.
Vibration analysis. Rotating machinery develops characteristic fault signatures at specific harmonic frequencies. Monitoring the frequency spectrum of a machine's vibration signal over time reveals developing faults before they cause failure.
Communications. Wireless systems allocate specific frequency bands to different services to prevent interference. Modulation schemes such as AM and FM are designed to place information-bearing signals within assigned bands; signal processing at the receiver extracts the information by operating selectively in the frequency domain. The details of modulation belong to a later communications course; the frequency-domain perspective introduced here is the prerequisite.
Filter design. Filters are circuits designed to pass signals within a defined frequency band while attenuating signals outside it. Their behaviour is described entirely in the frequency domain, through a frequency response function $H(\omega)$. A later chapter develops the theory and design of filters in detail.
Chapter Summary
This chapter has developed the frequency-domain view of signals, starting from the simplest case of a single harmonic and building to the general representation of arbitrary periodic and aperiodic signals.
- The time domain and the frequency domain are equivalent, complementary representations of the same signal.
- A harmonic signal at frequency $f_0$ appears in the frequency domain as a single spectral line at $f_0$.
- The Fourier Series states that any periodic signal with period $T$ can be expressed as a sum of harmonics at integer multiples of the fundamental frequency $f_0 = 1/T$. The spectrum is discrete.
- Different waveforms have characteristic spectra. Square and sawtooth waves contain harmonics with amplitudes decaying as $1/n$; triangle waves decay faster as $1/n^2$; the square wave and triangle wave contain only odd harmonics.
- Aperiodic signals do not have a fundamental frequency. Their spectra are continuous. The relevant mathematical tool is the Fourier Transform. Shorter signals in time have broader spectra in frequency.
- A linear system satisfies homogeneity and superposition. Because any signal is a sum of harmonics, a linear system's response to a complex input is found by analysing each harmonic separately and summing the results. This is the foundation of AC analysis.
Key formulas:
| Concept | Expression | Notes |
|---|---|---|
| Fundamental frequency | $f_0 = 1/T$ | $T$ = period |
| Fourier Series | $f(t) = \sum_{n=-\infty}^{\infty} C_n e^{j\omega_0 n t}$ | Periodic signals |
| Angular fundamental frequency | $\omega_0 = 2\pi f_0 = 2\pi/T$ | |
| Fourier coefficients | $C_n = \frac{1}{T}\int_0^T f(t) e^{-j\omega_0 n t}\,dt$ | $C_n$ complex |
| Fourier Transform | $F(\omega) = \int_{-\infty}^{\infty} f(t) e^{-j\omega t}\,dt$ | Aperiodic signals |
| Inverse Fourier Transform | $f(t) = \frac{1}{2\pi}\int_{-\infty}^{\infty} F(\omega) e^{j\omega t}\,d\omega$ |