DSP_Notes
DSP_Notes
Digital Signal
Processing
Enis Yazici
SRH University Heidelberg
[Link]@[Link]
Digital Signal Processing (DSP) has transformed the way we analyze, interpret, and
manipulate information across virtually every branch of science and engineering. From
noise cancellation in consumer headphones to the detection of gravitational waves at LIGO,
from real-time speech recognition on smartphones to the reconstruction of particle tracks in
high-energy physics detectors, DSP provides the mathematical and algorithmic foundation
that makes these achievements possible.
These lecture notes guide students through the core principles of DSP in a way that
emphasizes understanding over memorization. We begin with the mathematical building
blocks (trigonometry, complex numbers, and exponentials) and show how these classical
ideas connect directly to the modern tools of sampling, filtering, Fourier analysis, and system
design. Every concept is developed from first principles, illustrated with worked
examples, and placed in historical context so that students can see not only how things
work but why they were invented.
The notes are designed to be self-contained. A student with a solid background in
calculus and basic linear algebra should be able to follow every derivation from start to
finish. At the same time, the connections to real-world applications, including
communications, audio processing, biomedical instrumentation, control systems, and
physics research, are woven throughout, so that the mathematics never feels
disconnected from practice.
ii
Contents
1 Introduction 1
1.1 What Is a Signal?................................................................................................................1
1.2 From Continuous to Discrete: The Big Idea...................................................................2
1.3 What Can We Do with Digital Signals?...........................................................................2
1.4 The Role of Mathematics...................................................................................................2
1.5 Signals and Systems: A Classification.............................................................................3
1.6 Software Tools...................................................................................................................3
1.7 The Road Ahead.................................................................................................................4
iii
CONTENTS
3 Fundamental Concepts 30
3.1 Continuous-Time and Discrete-Time Signals...............................................................30
3.2 Sampling, Nyquist Rate, and Aliasing..........................................................................32
3.3 Quantization and Analog-to-Digital Conversion........................................................34
3.4 Basic Classes and Properties of Discrete-Time Signals...............................................35
3.5 Basic Operations on Discrete-Time Signals..................................................................36
3.6 Linear Time-Invariant (LTI) Systems............................................................................37
3.7 Difference Equations for Discrete-Time Systems........................................................39
3.8 Impulse Response, Convolution, and Step Response.................................................40
3.9 Stability and Causality of LTI Systems.........................................................................41
4 The Z-Transform 44
iv
4.1 Definition and Properties...............................................................................................44
4.2 Key Applications..............................................................................................................45
4.3 Properties of Z-Transform..............................................................................................47
4.3.1 Linearity...............................................................................................................47
4.3.2 Time Shifting........................................................................................................48
CONTENTS
v
CONTENTS
vi
1 CHAPTER
1
Introduction
Think about the last time you made a phone call. Your voice travelled through a microphone,
was captured as a stream of electrical fluctuations, sliced into thousands of tiny snapshots
every second, and converted into a sequence of numbers. Those numbers were compressed,
encrypted, beamed across a cellular network, and reassembled at the other end into the
sound of your voice. The entire journey, from your lips to someone else’s ear on the other
side of the planet, took less than a fraction of a second. What made this possible was not a
single brilliant invention, but a whole discipline built on the marriage of mathematics and
engineering: Digital Signal Processing, or DSP.
The story of DSP is, at its heart, the story of how we learned to speak the language of
nature in numbers.
1
Chapter 1. Introduction
Signals in nature are almost always continuous. When you listen to a violin, the sound
pressure varies smoothly and uninterruptedly. There are no gaps, no jumps, no pauses
in the physics. However, computers do not understand smooth, continuous curves. They
understand numbers, and more specifically, they understand finite collections of
numbers.
This is where discretization enters the picture. The idea is beautifully simple:
instead of trying to capture every single instant of a continuous signal, we take
measurements at regular intervals. Imagine watching a movie. What you perceive as fluid
motion is actually a rapid sequence of still photographs, typically 24 or 30 frames per
second. Each frame is a snapshot, a frozen moment in time. Your brain fills in the gaps and
creates the illusion of continuity. DSP does something remarkably similar with signals.
The process has two essential steps. First, sampling: we measure the amplitude
of the signal at evenly spaced points in time. A music recording, for example, is typically
sampled 44,100 times per second. Each of those measurements captures a single number
representing the air pressure at that instant. Second, quantization: since computers work
with finite precision, each sampled value must be rounded to one of a finite set of allowed
levels. This introduces a tiny amount of error, but if the quantization is fine enough, the error
is imperceptible.
The device that performs this conversion from the continuous world to the discrete
world is called an analog-to-digital converter, or ADC. At the output of an ADC,
what was once a continuously varying physical phenomenon has become a sequence of
numbers, ready for mathematical manipulation. It is worth pausing to appreciate how
profound this step really is. The entire richness of the natural world, the warmth of a
human voice, the shimmer of a sunset captured by a camera, the tremor of a seismic
wave, is reduced to an ordered list of integers. And yet, as we will see throughout these
notes, that list of integers contains, under appropriate conditions, enough information to
analyze, transform, and even reconstruct the original signal.
2
1.5 Signals and Systems: A Classification
The processing tools we use in DSP are called systems, and systems are described by
mathematical models. A filter, for instance, is really just a mathematical equation that takes
an input sequence and produces an output sequence. To understand how filters work, we
need algebra. To design them, we need calculus. To analyze their behaviour in different
conditions, we need complex numbers, exponentials, and the theory of linear systems.
The core operations of DSP can be summarized in a few sentences. We analyze signals
using frequency analysis, a technique that reveals the hidden oscillatory components inside
any signal. We transform signals from the time domain to the frequency domain using
the Fourier Transform, one of the most beautiful and powerful ideas in all of mathematics.
We design filters to select, reject, or reshape specific frequency components. We optimize
systems to perform as efficiently as possible. And we develop algorithms, step-by-step
computational procedures, that implement all of these operations on real hardware.
All of this requires a strong mathematical background. But here is the good news: the
mathematics of DSP is not arbitrary or abstract. Every equation has a clear physical meaning.
Every formula connects directly to something you can hear, see, or measure. The
challenge in engineering education has always been that students learn mathematical
tools, such as trigonometry, complex numbers, and differential equations, in isolation,
without seeing how these tools apply to real problems. These lecture notes are designed to
bridge that gap. Every mathematical concept introduced here will be immediately
connected to a concrete application in signal processing. You will never have to wonder
“why am I learning this?” because the answer will always be right in front of you.
3
Chapter 1. Introduction
4
2 CHAPTER
2
Every great engineering discipline stands on a mathematical foundation. For digital signal
processing, that foundation is built from a surprisingly small number of ideas: trigonome-
try, complex numbers, exponentials, and difference equations. You have almost certainly
encountered each of these in earlier courses. But chances are you learned them in isolation,
as separate chapters in separate textbooks, without seeing how they connect to one another
or to anything in the physical world.
This chapter changes that. Here we rebuild these familiar concepts from scratch, but this
time with a clear purpose in mind. Trigonometry is not an abstract exercise in
memorizing identities; it is the language of oscillation, and oscillation is what signals do.
Complex numbers are not a mathematical curiosity invented to solve cubic equations;
they are the most natural way to describe rotation and phase. Exponentials are not just
another family of functions; they are the eigenfunctions of every linear time-invariant
system you will encounter in DSP.
The presentation is self-contained: every concept is explained before it is used. Examples,
geometric interpretations, and short historical notes are included throughout to give you a
strong foundation for the topics that follow, including sampling theory, convolution, Fourier
analysis, filtering, and discrete-time system design.
The answer gradually led to the study of circles. A circle is the simplest geometric shape
that repeats perfectly as one moves along its boundary. If a point travels around a circle at
constant speed, its horizontal and vertical coordinates oscillate in a perfectly regular and
smooth manner. Today we call these oscillations the sine and cosine functions.
Historically, the earliest trigonometric tables were developed to help compute the lengths
of chords in a circle when the central angle was known. Hipparchus (2nd century BC) is
5
Chapter 2. Mathematical Background for DSP
often considered the first to formalize this approach. Later, Ptolemy’s Almagest (2nd
century AD) organized extensive chord tables, enabling astronomers to perform angular
calcula-tions for planetary predictions. Centuries after that, Indian mathematicians replaced
chord lengths with half-chords, giving functions essentially identical to modern sine. Muslim
mathematicians such as al-Battani and al-Tusi refined these concepts, and by the time Euro-
pean mathematics matured during the Renaissance, trigonometry had become a systematic
discipline.
Although ancient mathematicians developed trigonometry for astronomy, its geometric
heart remained unchanged:
A sinusoid is the projection of uniform circular motion onto a line.
Here cos θ is literally the horizontal projection of the point, and sin θ the vertical
projection. This perspective is geometrically intuitive: if a point travels around the circle, its
shadow on each coordinate axis oscillates back and forth. These shadows trace out the
familiar cosine and sine waves.
An important observation follows:
The trigonometric functions are not arbitrary formulas; they emerge directly from
geometry.
6
2.1 The Unit Circle and Trigonometric Foundations
(0,
1)
(cos θ, sin
sin θ θ)
θ
x
(−1, 0) cos θ (1, 0)
(0, −1)
Figure 2.1: The unit circle. A point at angle θ has coordinates (cos θ, sin θ). The horizontal
and vertical projections of the rotating radius vector produce cosine and sine waves,
respectively.
7
Chapter 2. Mathematical Background for DSP
Consider a point on the unit circle corresponding to angle θ. The point corresponding
to angle— θ is its reflection across the horizontal axis. This reflection leaves the
horizontal coordinate unchanged but reverses the sign of the vertical coordinate. Hence,
• Sine is an odd function. Odd functions change sign under reflection. This is
consistent with the vertical coordinate of a reflected point.
Symmetry is a core theme in DSP: when we analyze real-valued signals in the frequency
domain, we repeatedly encounter the even symmetry of magnitude and the odd symmetry
of phase.
A second fundamental property arises because moving around the circle by one full turn
returns the point to its starting location. Thus, sinusoidal functions are periodic:
Periodicity implies that sinusoidal signals repeat indefinitely. In signal processing, this is
crucial: periodic waveforms form the basis of Fourier series, and periodicity is directly tied
to harmonic structure.
• They describe how phase shifts combine, which is essential when multiple
sinusoids interact.
• They allow us to rewrite products of sinusoids as sums, a key step in Fourier analysis.
• They show that the structure of trigonometric functions mirrors the structure of rota-
tions.
In DSP, a very common situation is adding two sinusoids of the same frequency but
different phases. The angle addition formulas allow us to calculate the resulting
amplitude and phase precisely.
8
2.1 The Unit Circle and Trigonometric Foundations
θ cos θ sin θ
0 1 0
π √ 1
6 √23 √2
π 2 2
4 2 √2
π 1 3
3 2 2
π
2
0 1
π −1 0
3π 0 −1
2
2π 1 0
These points divide the circle into regions of increasing and decreasing sine and cosine
values. They allow us to sketch sinusoidal signals quickly and understand how phase shifts
translate into horizontal movement.
Additional Examples.
2π
• At θ = 3
(120 degrees): √
2π 1 2π 3
cos =− , sin = .
3 2 3 2
• At θ = − π
:
3 √
π 1 3
π
cos − = , sin − =− .
3 2π 3 2
The point is the reflection of the θ = point across the horizontal axis.
3
Such reference angles appear constantly when analyzing signals with specific phase
offsets or studying the shape of modulated waveforms.
9
Chapter 2. Mathematical Background for DSP
This simple geometric picture is fundamental in DSP. A sinusoid is nothing more than the
horizontal or vertical projection of uniform circular motion. The frequency of the sinusoid
corresponds to how fast the point rotates. A larger ω means the point completes more
revolutions per second, producing a higher-frequency oscillation.
Illustrative Cases.
• If ω = 2π, the point completes one full revolution per second. Thus x(t) =
cos(2πt) has period 1 second.
2π 1
• If ω = 4π, the motion is twice as fast, so the period becomes T = = seconds.
4π 2
• If θ(t) = ωt + φ0, the term φ0 simply indicates that the point starts from a
rotated initial position. This is the geometric origin of phase shift.
This remarkable property makes sinusoids the “eigenfunctions” of LTI systems and
explains why Fourier methods dominate signal analysis.
where:
• t is time.
10
2.2 Sinusoids: Amplitude, Frequency, and Phase
Thus, a sinusoid is not merely an algebraic function but the “shadow” of circular motion.
2.2.2 Periodicity
A sinusoid repeats its values when the angle increases by 2π:
ω(t + T) + φ = ωt + φ + 2π.
Amplitude A. The amplitude sets the “height” of the waveform. Many physical
quantities such as sound pressure, voltage, and mechanical displacement are proportional to
amplitude.
Energy over one period is proportional to A2. Thus:
Phase φ.Phase determines where in its cycle the sinusoid begins at t = 0. A positive phase
shifts the signal to the left; a negative phase shifts it to the right.
Because phase shifts correspond to rotations on the unit circle, they behave additively:
can be combined into a single sinusoid using the angle addition identities.
11
Chapter 2. Mathematical Background for DSP
2 cos(2πt)
2
cos(2πt)
cos(4πt)
cos(2πt + π/2)
x(t
0
)
−2
−0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2
t (seconds)
Figure 2.2: Four sinusoids illustrating the effect of each parameter. Doubling the
amplitude (red) doubles the height. Doubling the frequency (green) doubles the number of
oscillations per second. Adding a phase of π/2 (orange, dashed) shifts the waveform to the
left.
The combined amplitude and phase are found using vector addition on the unit circle:
12
2.2 Sinusoids: Amplitude, Frequency, and Phase
we obtain:
x(t) = 2 cos (π( f1 + f2)t) cos (π( f1 − f2)t) .
This is a high-frequency oscillation modulated by a slow envelope. The envelope fre-
quency |f1 − f2 is called the beat frequency.
|
In acoustics, beats are used for instrument tuning. In communication systems, they relate
to heterodyning and mixing.
f
x[n] = A cos 2π f n + φ .
s
The quantity
Ω f
= 2π
fs
is called the digital (or normalized) frequency in radians/sample.
A remarkable fact in DSP:
Two discrete-time sinusoids with frequencies Ω and Ω + 2πk represent exactly the
same samples.
Thus the discrete-time frequency domain naturally “wraps around” every 2π.
2.2.9 Aliasing
If f > fs/2, the sampled sinusoid appears as a different sinusoid with lower frequency. This
effect is called aliasing:
Aliasing explains why sampling frequency must exceed twice the highest signal fre-
quency (Nyquist-Shannon theorem).
13
Chapter 2. Mathematical Background for DSP
2.2.10 Summary
Sinusoids are the fundamental building blocks of DSP because:
• LTI systems preserve their frequency and shape,
15
2.3 Complex Numbers: Geometry, Algebra, and Their Role in DSP
∑ x[n]x∗[n].
n
16
Chapter 2. Mathematical Background for DSP
2.3.6 Euler
Representation
By Euler’s identity, ejθ = cos θ + j sin θ,
Aej(ωt+φ).
17
2.4 Euler’s Formula and Complex Exponentials
H(ejω),
2.3.8 Summary
• Complex numbers provide a natural geometric description of oscillations.
• Multiplication adds angles and scales magnitudes, which is perfect for representing
phase and amplitude changes.
The introduction of the complex plane transforms sinusoidal analysis from a collection
of trigonometric identities into a coherent geometric framework.
At first glance, this identity seems almost too simple to carry such weight. On the left
side, an exponential function with an imaginary argument. On the right side, the familiar
sine and cosine. Yet this short equation is the bridge that connects geometry, algebra,
and analysis into a single unified framework. It tells us that the exponential function,
when fed an imaginary number, does not grow or decay. Instead, it rotates. The complex
exponential ejθ traces out a circle in the complex plane, and its real and imaginary parts
are the cosine and sine waves that form the backbone of Fourier analysis.
This identity is not merely a convenient rewriting of trigonometric functions; it reveals
that complex exponentials are circular motions. Thus, complex exponentials and sinusoids
represent the same phenomenon in two different languages: the analytic language of expo-
nentials and the geometric language of rotations.
18
Chapter 2. Mathematical Background for DSP
its angle increases steadily. Growth and rotation, two phenomena that appear completely
unrelated in everyday experience, turned out to be two faces of the same mathematical coin.
Nearly a century later, Joseph Fourier (1768–1830) took this insight and pushed it further.
Fourier realized that complex exponentials form the natural basis for representing periodic
signals. In his view, every periodic function, no matter how complicated, is nothing more
than a superposition of rotating exponentials. This was a bold and controversial claim. Many
of his contemporaries, including the great Lagrange, were skeptical. But Fourier was right,
and his insight fundamentally transformed mathematics, physics, and engineering.
Today the entire field of DSP rests on the fact that:
Complex exponentials are the eigenfunctions of all linear time-invariant (LTI)
systems.
|ejθ | = 1.
Interpreting ejθ as a point in the plane, we see that it represents a rotation by angle θ.
Geometric consequences.
Thus,
This fact allows us to treat complex exponentials as “parent objects” and sinusoids as
their projections.
19
2.4 Euler’s Formula and Complex Exponentials
Im
ejπ/2 = j
ej3π/4 ejπ/4
ejθ
ej0 =
Re
1
ej5π/4
Figure 2.3: Complex exponentials ejθ as points on the unit circle. Each phasor is a vector
from the origin to the circle. As θ increases, the phasor rotates counterclockwise; its real part
traces a cosine and its imaginary part traces a sine.
cos θ =
ejθ + e−jθ
jθ
θ e − e−jθ
2 , sin 2j .
=
These identities express sinusoids as combinations of two rotating exponentials: one
rotating forward (+ω) and one rotating backward (−ω).
20
Chapter 2. Mathematical Background for DSP
Consequences.
• magnitude (amplitude),
• angle (phase).
X(ejω) = |X(ω)|ejφ(ω),
where the magnitude tells how much of the frequency ω is present, and the phase describes
how this component is shifted in time.
• frequency-division multiplexing,
• bandpass filtering.
x(t) = ejωt,
21
2.5 Damped Exponentials and Derivatives of Sinusoids
Thus:
To know a system completely, it suffices to know how it acts on complex
exponentials.
2.4.9 Summary
Complex exponentials unify geometry, trigonometry, and analysis:
• They describe uniform circular motion.
• They encode sinusoids compactly.
• Their derivatives and integrals are simple.
• They form a natural basis for representing signals.
• They diagonalize LTI systems.
Virtually every mathematical technique in DSP relies on Euler’s formula, making it one
of the most important identities in all of engineering mathematics.
Interpretation.
• If α = 0, the function is constant.
• If α > 0, the function decreases smoothly to zero.
• The larger α is, the faster the decay.
In physics, α often represents:
• mechanical damping coefficient,
• electrical resistance-induced decay in RLC circuits,
• attenuation constant in acoustic and electromagnetic propagation.
22
Chapter 2. Mathematical Background for DSP
with α > 0.
This waveform oscillates at frequency ω, but its amplitude decreases exponentially with
time. Damped sinusoids appear in:
• room acoustics,
• resonance phenomena.
Later, in the Laplace transform and z-transform chapters, this split becomes vital for
discussing stability and pole locations.
|x(t)| ≈ Ae−αt.
This is the “outer curve” encapsulating the oscillation. For underdamped systems, the
oscillation persists as long as the envelope remains non-negligible.
Two useful quantities:
Time
constant 1
τ=.
α
The amplitude decays to 1/e of its original value in time τ.
23
2.5 Damped Exponentials and Derivatives of Sinusoids
1 e−t
cos(6πt)
0.5 Envelope
x(t
0
)
−0.5
−1
−0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5
t
Figure 2.4: A damped sinusoid and its exponential envelope. The oscillation frequency
remains constant while the amplitude decays exponentially. This waveform is characteristic
of under-damped mechanical and electrical systems.
Half-
life ln 2
t1/2 = α .
These measures directly quantify how quickly oscillations disappear in physical systems.
d
cos(ωt + φ) = −ω sin(ωt + φ),
dt
d
sin(ωt + φ) = ω cos(ωt + φ).
dt
Thus differentiation:
• multiplies amplitude by ω,
• preserves frequency.
d
e−αt cos(ωt + φ) = −αe−αt cos(ωt + φ) − ωe−αt sin(ωt + φ).
dt
24
Chapter 2. Mathematical Background for DSP
x(t) = e(−α+jω)t,
then
d
x(t) = (−α + jω)x(t).
d
Thus the exponential reproduces t itself under differentiation, up to a multiplicative
constant.
This single property is the reason why exponentials are the eigenfunctions of LTI systems
and why differential equations with constant coefficients have exponential solutions.
z = esT.
Thus:
25
2.6 Linear Algebra Essentials for DSP
2.5.10 Summary
• Exponential decay models real-world damping mechanisms.
• Damped sinusoids arise in underdamped oscillatory systems.
• The complex exponential e(−α+jω)t captures both decay and oscillation.
• Derivatives of exponentials reproduce the same form, explaining why exponential
signals diagonalize LTI systems.
• Sampling exponentials naturally leads to z-plane analysis in discrete-time DSP.
26
Chapter 2. Mathematical Background for DSP
2.6.3 Orthogonality
Two signals x and y are orthogonal ⟨ if x, y = 0. Geometrically, orthogonal signals
are “perpendicular”: they share no common ⟩ structure.
Orthogonality is the single most important concept connecting linear algebra to Fourier
analysis. When we decompose a signal into frequency components, we are projecting it onto
a set of orthogonal basis functions. The reason those projections do not interfere with each
other is precisely because the basis functions are orthogonal.
2.6.6 Projection
Given a vector x and a unit vector v, the projection of x onto v is
projv x = ⟨x, v⟩ v.
The scalar ⟨x, v tells us “how much of x points in the direction of v.” This is exactly
what a DFT coefficient
⟩ does: X[k] =⟨ x, vk measures how much of the signal x oscillates
at the k-th frequency. ⟩
27
2.7 Fundamental Discrete-Time Signals
1 7
⟨x, v⟩ = √ (3 + 4) = √ ,
2 2
and the projection of x onto v is √27 · √21 (1, 1) =2 7 (1, 1) = (3.5, 3.5). This is the component of
(3, 4) that lies along the diagonal direction.
The two sinusoids are orthogonal: they occupy independent “directions” in the 8-
dimensional signal space. This is why the DFT can extract the amplitude of each frequency
component independently, without contamination from others.
2.7.2 Un
it Step
(
1, n ≥ 0,
u[n] = 0, n < 0.
2.7.3 Rectangul
ar Pulse
1, 0 ≤ n < L,
rect [n] = 0, otherwise.
L
28
Chapter 2. Mathematical Background for DSP
2.7.4 Sinc
Function
sin(πx)
sinc(x) = .
πx
This is the impulse response of the ideal low-pass filter and the Fourier transform of a
rectangular pulse.
Problems
1. Draw the unit circle and mark the points corresponding to θ = 0, π/6, π/4, π/3, π/2, π.
Write the coordinates (cos θ, sin θ) for each.
2. Show, using the geometry of the unit circle, that cos θ is an even function and sin θ
is an odd function.
4. Two sinusoids x1(t) = cos(2π ·440 t) and x2(t) = cos(2π · 446 t) are added together.
Using the sum-to-product identity, find the beat frequency and describe what a listener
would hear.
5. Let z1 = 3 + 4j and z2 = —
1 2j. Compute: (a) z1 + z2, (b) z1z2, (c)| z|1 and arg(z1), (d)
z1/z2.
6. Express z = 2ejπ/3 in rectangular form x + jy, and verify that |z|2 = x2 + y2.
7. Using Euler’s formula, show that cos2 θ = 12 (1 + cos 2θ). This identity is used in AM
demodulation. Explain briefly why.
8. A damped sinusoid is given by x(t) = 5 e−2t cos(10πt). (a) Find the time constant τ.
(b) After how many seconds has the amplitude decayed to less than 1% of its initial
value?
9. Consider the first-order difference equation y[n] = 0.9 y[n− 1] + x[n] with −y[ 1] =
0. Compute y[0], y[1], y[2], y[3] when the input is the unit impulse x[n] = δ[n].
10. Show that the sinusoids cos(2π f1t) and cos(2π f2t) with ̸f1 = f2 are orthogonal
over the interval [0, T] where T is a common period. What role does this orthogonality
play in Fourier analysis?
11. Write cos(ωt + φ) as a linear combination of cos(ωt) and sin(ωt). A signal x(t) =
4 cos(2π · 50 t) − 3 sin(2π · 50 t) is given; find its amplitude and phase.
12. (Research) The Cooley–Tukey FFT paper of 1965 was not the first time the
algorithm was discovered. Investigate who else discovered similar algorithms before
them, and discuss why the earlier discoveries did not have the same impact.
29
2.7 Fundamental Discrete-Time Signals
• Sinusoids are projections of uniform circular motion; the unit circle unifies
trigonometry with signal analysis.
• Complex exponentials ejθ encode both amplitude and phase, making them the
natural language of DSP.
30
3 CHAPTER
3
Fundamental Concepts
The concepts in this chapter (signals, sampling, convolution, impulse response, stability)
may seem like they belong to the age of digital computers, but their intellectual roots reach
much further back.
The idea that physical phenomena can be represented as mathematical functions
emerged in the 17th century, when Newton and Leibniz developed calculus. The systematic
study of how systems respond to inputs began in the 18th century with Euler’s work on
vibrating strings and d’Alembert’s wave equation. By the 19th century, Fourier had
shown that any periodic function could be decomposed into sinusoids, and Heaviside had
introduced operational calculus, a precursor to the Laplace and Z-transforms, to analyze
electrical circuits.
The transition from continuous to discrete happened gradually. In 1928, Harry Nyquist,
working at Bell Telephone Laboratories, published a paper on telegraph transmission rates
that contained the kernel of the sampling theorem. In 1949, Claude Shannon gave the
theorem its modern form, proving that a band-limited signal can be perfectly reconstructed
from its samples if sampled fast enough. This single result justified the entire enterprise of
digital signal processing: it meant that nothing was lost by converting continuous signals
into sequences of numbers.
With the arrival of digital computers in the 1950s and 1960s, engineers realized that all
the elegant theory of linear systems (superposition, convolution, transfer functions) could be
applied to discrete-time sequences just as well as to continuous-time signals. The concepts
in this chapter are the result of that realization.
x(t), t ∈ R.
The argument t is often physical time measured in seconds. The value x(t) might be a
voltage, a sound pressure level, a temperature, or some other physical quantity.
Examples:
31
3.1 Continuous-Time and Discrete-Time Signals
Discrete-Time Signals
A discrete-time signal is defined only at integer time indices:
x[n], n ∈ Z.
Here n is an integer that usually corresponds to a sample index. We can think of x[n] as a sequence of
numbers:
where Ts is the sampling period in seconds and fs = 1/Ts is the sampling frequency in Hz.
This means that x[0] = x(0), x[1] = x(Ts), x[2] = x(2Ts), and so on. The discrete-
time signal is therefore a snapshot of what happens at discrete times in the continuous
signal.
Understanding how much information about x(t) is preserved in x[n] is one of the main
questions of DSP and leads directly to the sampling theorem.
1 x(t) = cos(2π · 50 t)
Samples x[n]
Amplitude
−1
−1 · 10−2 0 1 · 10−22 · 10−23 · 10−24 · 10−25 · 10−26 · 10−27 · 10−28 · 10−29 · 10−2 0.1 0.11
t (seconds)
Figure 3.1: A continuous-time cosine at 50 Hz sampled at fs = 200 Hz. Four samples per
period are sufficient to capture the waveform; the Nyquist condition fs ≥ 2 f is satisfied.
32
Chapter 3. Fundamental Concepts
Summary
• Continuous-time signals x(t) are defined for all real t.
• Discrete-time signals x[n] are defined only for integer n.
Sampling Process
Sampling is the operation that creates a discrete-time signal from a continuous-time signal.
Mathematically:
x[n] = x(nTs).
The sampling frequency fs determines how many samples we take per second:
1
fs = Ts [Hz].
Intuitively, the faster we sample, the more detailed information we capture about the
original signal. However, sampling too fast can be wasteful, and sampling too slowly can
destroy important information.
33
3.2 Sampling, Nyquist Rate, and Aliasing
falias = | f − k fs| ,
for some integer k chosen so that falias lies in the range [0, fs/2].
We can think of the frequency axis as being periodic and folding back into the
interval [0, fs/2]. High frequencies are folded down into this range, potentially causing
serious distortion.
Examples of Aliasing
Example 1. Suppose we have a sinusoid with frequency f = 900 Hz and we sample
at fs = 1000 Hz. The Nyquist frequency is fN = 500 Hz. It is clear that f > f N , so
aliasing will occur.
We can compute:
falias = |900 − 1 · 1000| = 100 Hz.
The resulting discrete-time samples look exactly like a 100 Hz signal. There is no way to
distinguish the original 900 Hz sinusoid from a 100 Hz sinusoid if we only see the samples.
1
Amplitude
cos(2π · 900
−1 t)
cos(2π · 100
Samples
t) at fs = 1000 Hz
−0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1
t (seconds)
·10−2
Figure 3.2: Aliasing demonstrated. The 900 Hz sinusoid (blue) and the 100 Hz sinusoid
(red) pass through exactly the same sample points (black dots) when sampled at fs = 1000
Hz. From the samples alone, the two signals are indistinguishable.
34
Chapter 3. Fundamental Concepts
Summary
• Sampling must satisfy fs ≥ 2 fmax to avoid aliasing.
Sampling converts a continuous-time signal into a discrete-time signal, but the sample values
are still continuous real numbers with infinite precision. A real digital system must represent
each sample with a finite number of bits. This process is called quantization, and it is the
second essential step in analog-to-digital conversion.
Each sample x[n] is replaced by the nearest quantization level xq[n]. The difference
between the original and quantized values is called the quantization error:
1 Original x[n]
Quantized xq[n]
Amplitude
−1
0 2 4 6 8 10 12 14 16
n
Figure 3.3: A cosine signal quantized with 3 bits (8 levels). The horizontal gray lines show
the quantization levels. The staircase-like quantized signal (red, dashed) follows the original
(blue) but introduces a small error at each sample. Increasing the number of bits reduces this
error.
35
3.4 Basic Classes and Properties of Discrete-Time Signals
2 ∆2
σe = .
12
For a full-scale sinusoidal input, the signal power is V2/2. The Signal-to-Quantization-
Noise Ratio (SQNR) is then
V2/2 3 2B
SQNR
= 2 = ·2 ,
∆ /12 2
which in decibels gives the well-known rule of thumb:
This tells us that every additional bit of resolution improves the SNR by
approximately 6 dB. A 16-bit audio system (CD quality) achieves about 98 dB of dynamic
range, while a 24-bit professional recording system reaches roughly 146 dB.
Practical Considerations
• Clipping: If the input exceeds the range — [ V, +V], the quantizer saturates at the
extreme levels. Clipping produces severe distortion and must be avoided by proper
gain control.
• Oversampling: Sampling at a rate much higher than the Nyquist rate, combined
with digital filtering and decimation, allows the effective resolution to exceed the
nominal bit depth of the ADC.
x[n] ∈ R or x[n] ∈ .
36
Chapter 3. Fundamental Concepts
n.
Every signal can be decomposed into an even and an odd part:
with 1 1
xe[n] = (x[n] + x[−n]), xo[n] = (x[n] − x[−n]).
2 2
This decomposition is useful in Fourier analysis and in understanding symmetry proper-
ties.
If this sum is finite, we call x[n] an energy signal. These are usually signals that exist
only for a finite time or decay to zero as n ∞.
A power signal has infinite energy → but
± finite average power:
P 1
x = lim N
∑ |x[n]|2 .
N
→∞ 2N + 1 n=−N
Periodic signals (such as pure sinusoids) are typical examples of power signals.
These concepts become important when we study Parseval’s theorem and spectral energy
distributions.
Time Shifting
Shifting a signal by n0 samples results in
37
3.6 Linear Time-Invariant (LTI) Systems
Time Reversal
Time reversal (or reflection) is defined as
y[n] = x[−n].
This mirrors the signal with respect to n = 0.
Scaling
Multiplying a signal by a constant a:
y[n] = ax[n],
changes its amplitude but not its shape.
Linearity
A system is linear if for any signals x1[n], x2[n] and any scalars a, b:
S{ax1[n] + bx2[n]} = aS{x1[n]} + bS{x2[n]}.
Linearity means that scaling and addition commute with the system. If you double the
input, you double the output. If you add two inputs together, the response is the sum of the
responses to each input separately.
38
Chapter 3. Fundamental Concepts
Time Invariance
A system is time-invariant if a time shift in the input results in the same time shift in
the output:
If x[n] → y[n], then x[n − n0] → y[n − n0].
In other words, the system behaves the same way at all times. Its behavior does not
depend on the absolute time index, only on relative differences.
ax1 + bx2 = {14, 19, 24}, S{ax1 + bx2} = {28, 38, 48}.
a S{x1} + b S{x2} = {4, 8, 12} + {24, 30, 36} = {28, 38, 48}.
Example 2: A Non-Linear System. Let S{x[n]} = x[n]2. Using the same inputs and
scalars:
S{ax1 + bx2} = {14 2, 19 2, 24 } = {196, 361, 576}.
2
a S{x1} + b S{x2} = {2, 8, 18} + {48, 75, 108} = {50, 83, 126}.
The results differ, so squaring is not linear. This simple test is a powerful way to expose
nonlinearity.
1
y[n] = (x[n] + x[n − 1] + x[n − 2]).
3
This system is both linear and time-invariant. Applying the system to ax1[n] + bx2[n]
yields ay1[n] + by2[n] (linearity), and shifting the input by n0 simply shifts all indices by n0
(time invariance).
39
3.7 Difference Equations for Discrete-Time Systems
S{ } − −
Example 1: Time-Invariant
− x[(n− n ) 2] System. x[n] = x[n 2]. If we replace x[n]
− = x[n (n + 2)]. If instead we first compute by −
x[n
n0], the output becomes 0 0 y[n]
= x[n 2] and then shift,−we get y[n − n0] − = x[(n n0) 2]. Both paths give the same
result, so this system is time-invariant.
S{x[n − n0]} = x[n − n0] + x[(n − n0) − 1] = x[n − n0] + x[n − n0 − 1].
Path (b): Compute y[n] = x[n] + x[n − 1], then shift:
y[n − n0] = x[n − n0] + x[n − n0 − 1].
Both expressions are identical, so this system is time-invariant. The coefficients do not
depend on n, only on relative delays.
• Most practical filters, equalizers, and modulators are designed as LTI systems.
40
Chapter 3. Fundamental Concepts
assuming a0 = 1 for
simplicity.
Here,
• The ak coefficients describe the dependence on past outputs (feedback).
• The bm coefficients describe the dependence on current and past inputs (feedforward).
First-Order Example
Consider
y[n] = a y[n − 1] + b x[n].
This is a first-order system. If |a < 1, the effect of an impulse or any bounded input
decays over time, and the system| is stable. | If a > 1, the recursion will amplify past
outputs and eventually blow up. |
This simple equation can model exponential decay, leaky integration, and simple
feedback processes.
Solution Structure
For a first-order system y[n] = a y[n
— 1] + b x[n], the complete response can be
decomposed into two parts:
y[n] = any[0] n
` ˛¸ x + b ∑ an−kx[k] .
natu ral r esp onse
` k =0 ˛ ¸ x
forced re sponse
The natural response depends only on the initial condition and decays (or grows)
expo-nentially. The forced response is a weighted sum of present and past inputs. It is, in
fact, a convolution. This decomposition foreshadows the general result that every LTI
system response can be expressed as a convolution with the impulse response.
Convolution Sum
For an LTI system with impulse response h[n], the output for an arbitrary input x[n] is given
by the convolution sum:
∞
y[n] = (x ∗ h)[n] ∑ x[k] h[n − k].
= k=−
∞
Intuitively:
41
3.9 Stability and Causality of LTI Systems
If x[n] is any input, then y[n] = (x ∗h)[n] is the local average of the last three samples.
This simple filter is widely used for smoothing noisy data.
1 1
3
0 0
0 1 2 3 4 0 1 2
Output y[n]k= (x ∗
k
h)[n]
0.5
0
0 1 2 3 4 5 6
n
Figure 3.4: Convolution of a rectangular pulse x[n] (length 5) with a moving-average impulse
response h[n] (length 3). The output y[n] is a trapezoidal shape of length— 5 + 3 1 = 7,
illustrating how convolution “spreads” and smooths the input signal.
Step Response
The step response of an LTI system is the output when the input is the unit step u[n]:
n
s[n] = (u ∗ h)
[n] =
∑ h[k].
k=−
∞
For stable systems, h[n] tends to zero and s[n] tends to a constant value. The step response
provides an intuitive picture of how the system reacts to a sudden change from 0 to 1.
42
Chapter 3. Fundamental Concepts
BIBO Stability
A system is BIBO stable (bounded-input, bounded-output) if every bounded input
produces a bounded output. For LTI systems, there is a very important and simple
condition:
∞
The LTI system is BIBO stable ⇐⇒ ∑ |h[n]| < ∞.
n=−∞
If the absolute values of the impulse response samples sum to a finite number, the system
cannot amplify a bounded input into an unbounded output.
Causality
A system is causal if the output at time n depends only on current and past inputs:
y[n] depends only on x[k] for k ≤ n.
For an LTI system, this means h[n] = 0 for all n < 0. In other words, the impulse
response has no support in the negative time indices. This is necessary for real-time
implementation because we cannot react to future inputs.
Problems
1. A continuous-time signal has frequency components at 1, 3, and 5 kHz. What is the
minimum sampling frequency that avoids aliasing? What is the corresponding Nyquist
frequency?
2. A 400 Hz sinusoid is sampled at fs = 600 Hz. Compute the alias frequency that will
appear in the discrete-time domain. Repeat for fs = 500 Hz.
3. Let (
1, 0 ≤ n ≤ 3,
x[n] = 0, otherwise.
Sketch x[n], x[n− 2], and x[−n]. Explain in words what time shifting and time reversal
do to this pulse.
4. Show that any signal x[n] can be decomposed into an even part xe[n] and an
odd part xo[n]. Write down explicit formulas and verify that xe[−n] = xe[n] and
xo[−n] =
−xo[n].
5. Compute the energy of the signal x[n] = (0.8)nu[n]. Is this an energy signal or a
power signal?
6. Determine whether the system y[n] = x[n]· x[n− 1] is (a) linear, (b) time-invariant,
(c) causal. Justify each answer.
43
3.9 Stability and Causality of LTI Systems
7. For the impulse response h[n] = (0.5)nu[n], determine whether the system is
BIBO stable. Then compute the step response s[n] = (u ∗ h)[n] and find its steady-
state value as n → ∞.
8. Given x[n] = {1, 2, 1} and h[n] = {1, −1} (both starting at n = 0), compute y[n]
= (x ∗ h)[n] by hand. State the length of the output sequence.
9. Consider the system y[n] = 0.8 y[n 1] + x[n]. (a) Show that the impulse
response is h[n] = (0.8)nu[n]. (b) Compute| ∑n=0 h[n] and verify that the system is
− changes
stable. (c) What happens if the coefficient from 0.8 to 1.2?
∞ |
10. A moving average filter of length L has impulse response h[n] =L 1 for 0 ≤ n ≤ L −
1 and zero otherwise. For L = 4, compute the convolution of h[n] with x[n] =
δ[n] − δ[n − 3].
11. A system has the difference equation y[n] = x[n] − 2x[n −1] + x[n− 2]. (a) Find the
impulse response. (b) Is the system FIR or IIR? (c) Describe qualitatively what this
filter does to a slowly varying input signal.
12. A 12-bit ADC operates over the range [— 5V, +5V]. (a) How many quantization levels
does it have? (b) What is the step size ∆? (c) Compute the SQNR in dB using the
6.02B + 1.76 formula.
13. Explain in your own words why dithering (adding noise before quantization) can
improve the perceived quality of a quantized audio signal. Under what conditions
does this technique fail?
14. (Research) In 1928, Harry Nyquist published his famous theorem on sampling.
How-ever, the theorem is also attributed to Claude Shannon (1949) and sometimes to
Whit-taker (1915). Investigate the contributions of each and explain why the theorem
carries multiple names.
44
4 CHAPTER
4
The Z-Transform
The idea of associating a power series with a sequence of numbers has deep roots in math-
ematics. Generating functions, which encode sequences as coefficients of a formal power
series, were used by Euler and Laplace in the 18th century to solve combinatorial and proba-
bilistic problems. Abraham de Moivre, as early as 1730, employed generating functions to
analyze the Fibonacci sequence, an approach that is strikingly similar in spirit to modern
Z-transform techniques.
When engineers in the mid-20th century began building digital systems (radar
processors, early computers, sampled-data control loops), they needed a transform that
played the same role for discrete-time signals as the Laplace transform played for
continuous-time systems. The Laplace transform, developed by Pierre-Simon Laplace around
1785 and later systematized by Oliver Heaviside in the 1890s for circuit analysis, had proven
enormously powerful for continuous-time problems. But it could not be applied directly to
sequences of numbers produced by sampling.
The Z-transform emerged to fill that gap. It was formalized in the late 1940s and 1950s by
Lotfi Zadeh and John Ragazzini at Columbia University, who were working on sampled-data
control systems for military applications. Ragazzini is generally credited with
introducing the name “Z-transform” in a 1952 paper, reportedly choosing the letter z
because it was the last letter of the alphabet and suggested “the end of the line” for
transform methods.
The connection between the two transforms is elegant: sampling a continuous-time
signal at intervals T converts the Laplace variable s into the Z-transform variable z =
esT , mapping the left half of the s-plane into the interior of the unit circle. Stability, causality,
and frequency response, all the fundamental system properties, can be read directly from
the
geometry of the z-plane.
Today the Z-transform is indispensable in digital filter design, control system
analysis, and virtually every area of DSP.
where z is a complex variable. This transformation converts the sequence x[n] into a
function X(z) of the complex variable z, encapsulating both magnitude and phase
information across different frequencies.
45
4.2 Key Applications
By converting a discrete signal into its Z-transform, various characteristics of the system,
such as stability, causality, and frequency response, can be analyzed effectively. The inverse
Z-transform can be used to revert these frequency domain representations back into time
domain signals, facilitating the practical implementation of theoretical designs.
• System Analysis: By examining the poles and zeros of the Z-transform, one
can determine the stability of the system.
• Filter Design: Digital filters are designed using the Z-transform to achieve
desired frequency responses.
The application of the Z-transform in these areas not only enhances the performance of
digital signal processing systems but also enriches our understanding of how signals behave
in different processing environments.
Basic Examples
46
u[n]z−n
47
Chapter 4. The Z-Transform
This is a geometric series with the first term a = 1 and common ratio r = z−1. For
the series to converge, |z| > 1. The sum of the geometric series is:
1 z
X(z) = = , |z| > 1
1−z −1 z−1
Thus, the Z-transform of the unit step function u[n] is:
z
X(z) = , |z > 1
z−1 |
x[n] = ( n
a n ≥0
0 n<0
This is a geometric series with the first term a = 1 and common ratio r = az−1. For
the series to converge, |az−1| < 1, or equivalently |z| > |a|. The sum of the geometric
series is:
1 z
X(z) = = , |z| > |a|
1 − az −1 z−a
Thus, the Z-transform of the exponential sequence anu[n] is:
z
X(z) = , |z| > |a|
z−
a
Example 4: Z-Transform of a Cosine Sequence Consider the discrete-time
signal
x[n] = cos(ω0n)u[n], where u[n] is the unit step function:
x[n] = cos(ω0n)u[n]
48
1
x[n] = 2 ejω0 n + e−jω0 n u[n]
49
4.3 Properties of Z-Transform
12
X(z) = Z{ejω0 nu[n]} + Z{e−jω0 nu[n]}
Using the property that the Z-transform of ejω0 nu[n] is z for |z| > |ejω0 |, we get:
z − 0
jω X e
1 z z
(z) = +
2 z− z − e−jω0
Combining the fractions: ejω0
X
z 1 1
(z) = +
2 z − ejω0 z − e−jω0
z z − e−jω0 + z − ejω0
X z
( )= (z − ejω0 )(z −
2
X z e−jω0 ) z(z − ejω0 +
z − e−jω0 )
( )=
2(z2 − (ejω0 +jω0
e−jω0−jω
)z + 1)
X(z z(2z — (e + e 0 ))
)=
2(z2 − 2 cos(ω0)z + 1)
z(2z − 2 cos(ω0))
X(z) = 2(z2 − 2 cos(ω0)z + 1)
z(z − cos(ω0))
X(z) = z2 − 2 cos(ω0)z + 1
Thus, the Z-transform of the cosine sequence cos(ω0n)u[n] is:
z(z − cos(ω0))
X z) =z2 − 2 cos(ω )z + 1, |z| 1
(> 0
4.3.1 Linearity
The linearity property reflects the principle that the Z-transform of a linear combination of
signals is the same linear combination of their Z-transforms. This property is fundamental
in simplifying complex signal operations, making it easier to analyze systems composed of
multiple inputs or outputs.
Example: Let x1[n] = δ[n] and x2[n] = u[n]. Applying the linearity property:
z
z
Z{2δ[n] + 3u[n]} = 2Z{δ[n]} + 3Z{u[n]} = 2(1) + 3 −
1
50
Chapter 4. The Z-Transform
51
4.4 Transfer Function and Frequency Response
Problems
1. Compute the Z-transform of x[n] = 3 u[n] + 2 δ[n
— 1] using the linearity property.
State the ROC.
2. Find the Z-transform of x[n] = δ[n − 3] using the time-shifting property.
3. Determine the Z-transform and ROC of x[n] = 2nu[n]. Is the corresponding
system stable? Why or why not?
z
4. Using the convolution property, find Y(z) for the system with input X(z) = −1
z
and
transfer function H(z) = z
.
z−0.5
5. Given X(z) = z5—z , use the initial value theorem to find x[0] directly from X(z).
Verify your answer
2
by computing x[n] explicitly.
1 n
6. For the signal x[n] = 3
u[n], find X(z) and use the final value theorem to determine
limn→∞ x[n].
7. A system is described by y[n] −0.8 y[n −1] = x[n] + 0.5 x[n− 1]. Find the transfer
function H(z) = Y(z)/X(z). Locate the poles and zeros, and determine whether the
system is stable.
2 −1
8. Sketch the pole-zero diagram for H(z) = z
. Identify all poles and zeros, and
z2 −0.25
shade the ROC assuming a causal system.
9. Using partial fraction expansion, find the inverse Z-transform of
z
X(z) = , |z > 0.8.
(z − 0.5)(z − 0.8) |
10. Two causal LTI systems with impulse responses h1[n] = (0.5)nu[n] and h2[n] =
(0.3)nu[n] are connected in cascade. Find the overall transfer function H(z) = H1(z)
H2(z) and the poles of the combined system.
−2
1−z
11. A system has transfer function H(z) = 1−0.9
z−1
. Evaluate the frequency response
jω
H(e ) at ω = 0, ω = π/2, and ω = π. What type of filter does this system implement?
12. (Research) The connection between the Laplace transform variable s and the Z-
transform variable z is given by z = esT . Investigate how this mapping transforms
the stability boundary (the imaginary axis in the s-plane) and explain why the unit
circle plays the corresponding role in the z-plane.
52
Chapter 4. The Z-Transform
The transfer function is defined as the ratio of output to input in the z-domain:
Y(z) M
H(z) = ∑ m=0bm z−m
= N .
X(z) ∑k= ak z−k
0
This single rational function encodes everything about the system: its impulse response,
its stability, and its frequency-selective behaviour.
we identify the zeros z1, z2, . . . , zM (where the output vanishes) and the poles p1, p2, . . . , pN
(where the system response becomes infinite).
The pole and zero locations determine the system’s character:
• A pole near the unit circle at angle θ creates a resonance: the system amplifies
frequency components near ω = θ.
• A zero near the unit circle at angle θ creates a null: the system attenuates frequency
components near ω = θ.
• The further the poles are from the unit circle (toward the origin), the more damped and
less frequency-selective the system becomes.
Example. Consider the system y[n] = x[n] − 0.9 x[n− 1] (a simple FIR filter). Taking the
Z-transform:
z − 0.9
H(z) = 1—0.9 z−1 = .
z
This has a zero at z = 0.9 (near the unit circle at ω = 0) and a pole at z = 0 (the origin).
Since the zero is close to the point z = 1 on the unit circle, this filter attenuates low
frequencies. It is a high-pass filter.
|
• The magnitude response H(ejω ) tells us by what factor the amplitude of frequency
ω is scaled. |
• The phase response ∠H(ejω ) tells us by how much the phase of frequency ω is
shifted. The magnitude response is often plotted in decibels:
53
4.4 Transfer Function and Frequency Response
Filter terminology. The frequency axis is divided into regions defined by the
magnitude response:
jω
• Passband: the range of frequencies where
| H(e| ≈)1 (the signal passes through
with little attenuation).
• Cutoff frequency: t h e√b oundary of the passband, typically defined as the frequency
where |H| drops to 1/ 2 (i.e., −3 dB).
1
H(ejω) = .
1 − 0.9 e−jω
At ω = 0: H(ej0) =
1
−0.9 = 10, so the DC gain is 20 dB.
1
1
= 1.9 ≈ 0.526, which is −5.6 dB.
At ω = π: H(ejπ ) = +0.
91
1
The gain decreases with frequency, confirming that this is a low-pass filter. The pole
at z = 0.9 (close to the unit circle near ω = 0) creates the low-frequency resonance that is
responsible for the low-pass behaviour.
1
Magnitude response of H(z) =
−0.9 1 z−1
(first-order
low-pass)
20 20 log10 |H(ejω )|
−3 dB cutoff
10
|H(ejω )|
(dB)
−10
—0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1
Normalized frequency ω/π
Figure 4.1: Magnitude response (in dB) of a first-order IIR low-pass filter with pole at z =
0.9. The DC gain is 20 dB and the response rolls off smoothly toward higher frequencies. The
dashed line marks the −3 dB level used to define the cutoff frequency.
jω ∏m |ejω − zm |
|H(e )| = |b0/a0| · .
∏k |ejω − p
k |
54
Chapter 4. The Z-Transform
As ejω sweeps around the unit circle, its distance to a nearby pole becomes very
small, causing the magnitude to spike (a resonance). Similarly, passing near a zero
causes the magnitude to dip. This geometric picture gives an immediate, intuitive
understanding of why a given pole-zero configuration produces a particular frequency
response shape.
55
4.4 Transfer Function and Frequency Response
The Region of Convergence (ROC) is the range of values of z for which the Z-transform
converges. The ROC is crucial for determining the behavior and stability of the system.
Im(z)
pole
zero
Re(z)
|z| =
1
DefinitionThe ROC of X(z) is the set of z values for which the Z-transform sum converges:
∞
ROC = {z ∈ ∑ x[n]z−n converges}
n=−
: ∞
Properties of ROC 1. The ROC does not contain any poles of X(z). 2. If x[n] is a
right-sided sequence, the ROC extends outward from the outermost pole. 3. If x[n] is a left-
sided sequence, the ROC extends inward from the innermost pole. 4. If x[n] is a two-sided
sequence, the ROC is a ring in the z-plane.
X(z) =
—1 −a−1z
1− |z| < |a|
∑ az ) −1
,
( n a−1z
n=−∞
=
X(z) =
∑ (az−1)n
n=−∞
56
Chapter 4. The Z-Transform
Partial Fraction Expansion Decompose X(z) into simpler fractions, each of which
can be easily inverted:
X N(z)
(z) =
D(z)
Express X(z) as a sum of partial fractions and then use standard Z-transform pairs to find
x[n].
where C is a counterclockwise contour enclosing the origin and within the ROC.
z
Examples1. Power Series Expansion: If X(z)
−2 = z :
z 2 4
X(z) = = 1+ + + ···
z− z z2
Thus, x[n] = 2
2nu[n].
z
2. Partial Fraction Expansion: If X(z)) = (z−1 z−2)
:
X A ( B
(z) = +
z−1 z−2
Solving for A and B, we
get:
X 1 1
(z) = −
z−1 z−2
Thus, x[n] = u[n] −
2nu[n].
58
4.5 Inverse Z-Transform
Step 3: Identify poles and zeros. The system has one zero at z = −2 and one pole at
z = 0.5. Since the pole lies inside the unit circle (|0.5| < 1), the system is stable.
Step 4: Partial fraction expansion. To find h[n], write H(z)/z in partial fractions:
H(z) z+2 A B
= = + .
z z(z − 0.5) z z − 0.5
0+ 2 0.5+2
Solving: A = = −4 and B = = 5. Thus
0−0.5 0.5
5z
H(z) = —4 + ,
z − 0.5
and the impulse response is
• Poles determine system dynamics; zeros shape the frequency response. A causal
system is stable if all poles lie inside the unit circle.
• The frequency response H(ejω ) is obtained by evaluating H(z) on the unit
circle; its magnitude and phase describe how the system modifies each
frequency.
• The inverse Z-transform can be computed via power series expansion, partial
fractions, or contour integration.
59
5 CHAPTER
5
The idea that a complex signal can be decomposed into simple oscillatory components is one
of the deepest insights in all of science. Its origins trace back to 1807, when Jean-Baptiste
Joseph Fourier submitted a manuscript to the French Academy of Sciences claiming that
any function, no matter how irregular, could be represented as a sum of sines and cosines.
The claim was so bold that the review committee, which included Laplace, Lagrange, and
Legendre, refused to publish it. Lagrange in particular believed the result to be false.
Fourier was eventually vindicated: under mild conditions, his claim is correct, and the
decomposition now bears his name. The Fourier series for periodic signals and the Fourier
transform for non-periodic signals became cornerstones of 19th- and 20th-century physics
and engineering.
When signals are discrete and finite in length, the natural tool is the Discrete Fourier
Transform (DFT). The DFT takes N time-domain samples and produces N frequency-domain
coefficients, giving a complete and invertible representation of the signal’s spectral content.
Its efficient computation via the Fast Fourier Transform (FFT), discussed later in this chapter,
is what makes real-time spectral analysis practical on modern hardware.
61
Chapter 5. DFT and Fast Fourier Transform (FFT)
X k X N−1
(ej ) −j 2π
kn
[ ] x[ ] e N .
= ω
= n∑
ω=2πk/ n=
N 0
This is precisely the Discrete Fourier Transform (DFT). The DFT is not an
approximation of the DTFT. For a finite-length signal, the N DFT coefficients contain
exactly the same information as the continuous DTFT, and the original signal can be
perfectly recovered via the inverse DFT:
N−1
x[n 1
X [k] j N
2π
kn
.
]
= ∑ e
N k=0
The key insight is that sampling in one domain causes periodicity in the other:
• Sampling in time (which produces x[n] from x(t)) makes the spectrum periodic
with period 2π.
• Sampling in frequency (which produces X[k] from X(ejω )) makes the time-
domain signal periodic with period N.
This duality between sampling and periodicity is one of the most fundamental ideas
in DSP.
DTFT |X(ejω
4 DFT
)| samples
X[k]
|X(ejω
2
)|
0
0 0.25 0.5 0.75 1
ω/π
Figure 5.1: The relationship between DTFT and DFT. The blue curve shows the continuous
DTFT magnitude of a short signal. The red dots show the DFT coefficients, which are equally
spaced samples of the DTFT. The DFT captures the same information in a form that computers
can store and process.
The DFT provides a way to analyze the frequency content of discrete signals and is
widely used in applications such as spectral analysis, filtering, and fast convolution.
62
[Link] the DFT of the signal x[n] = {1, 0, −1, 0} for n = 0, 1, 2, 3.
63
5.1 Frequency Analysis of Signals
X[k 3 3
k = 0:
X[0] = x[0] · 1 + x[1] · 1 + x[2] · 1 + x[3] · 1 = 1 + 0 + (−1) + 0 = 0.
k = 1:
0
X[1] = x[0] · W
4
+ x[1] 4· W1 + x[2]4 · W2 + x[3]
4
· W3 = 1 · 1 + 0 · (−j) + (−1) · (−1) + 0 · j = 1
+ 1 = 2.
k = 2:
0
X[2] = x[0] · W
4
+ x[1] ·4 W2 + x[2]4 · W4 + x[3]
4
· W6 = 1 · 1 + 0 · (−1) + (−1) · 1 + 0 · (−1) =
0.
k = 3:
0
X[3] = x[0] · W
4
+ x[1] ·4 W3 + x[2]4 · W6 + x[3]
4
· W9 = 1 · 1 + 0 · j + (−1) · (−1) + 0 · (−j) =
2.
Resul
t. X[k] = {0, 2, 0, 2}.
1 3
x [n [ ] 2 1 2 ej2 π + 2 = π
] =4 ∑X ej
π
k 2 j 3π n
cos n ,
kn n e
k=
= 2
0
4
which evaluates to {1, 0, −1, 0}, confirming our result.
65
Chapter 5. DFT and Fast Fourier Transform (FFT)
• Linearity: The DFT of a sum of two signals equals the sum of the DFTs of each
individual signal. This property is particularly useful when dealing with multiple
signal components, such as in multi-carrier communication systems, where analyzing
66
5.2 Properties of DFT
combined signals is essential. For example, consider two signals x1[n] and x2[n]; their DFTs
are X1[k] and X2[k], respectively. The DFT of the sum x1[n] + x2[n] is X1[k] + X2[k],
allowing for simplified analysis of complex signals.
• Symmetry: The symmetric properties of DFT, including even and odd symmetry,
simplify calculations, especially for real-valued signals. For real-valued signals, the
DFT exhibits conjugate symmetry, meaning that X[N — k] = X∗[k]. This property
helps reduce computational complexity, which is highly advantageous in
applications like image compression and audio signal processing. Symmetry
properties also play a cru-cial role in efficiently representing data, where only half of
the frequency components need to be calculated for real-valued signals.
• Periodicity: The DFT exhibits periodic behavior, meaning the frequency spectrum
repeats itself. Specifically, the DFT of a signal x[n] with length N is periodic with
a period of N. The implications of this periodicity are particularly evident in the
phenomenon of aliasing, which occurs when sampling signals at insufficient rates,
leading to overlapping frequency components. To avoid aliasing, signals must be
sampled at a rate greater than twice their highest frequency, as per the Nyquist
theorem. Periodicity also means that care must be taken when interpreting the DFT
output, as the frequency domain representation is inherently cyclic.
67
Chapter 5. DFT and Fast Fourier Transform (FFT)
Here G[k] is the N/2-point DFT of the even-indexed samples and H[k] is the N/2-point
DFT of the odd-indexed samples. The crucial point is that both G[k] and H[k] are periodic
with period N/2, so for the second half of the output indices we have:
X[k] = G[k] +
H[k], X[k + N/2] = G[k] − H[k],
Wk N N
Wk
for k = 0, 1, . . . , N/2 − 1. k
Each pair of outputs requires only one complex multiplication (by the twiddle factor
WN ) and two additions. The same splitting can be applied recursively to G[k] and H[k]
until the sub-problems reduce to trivial one-point DFTs.
68
5.3 FFT Algorithms and Computation
Figure 5.2: Signal flow graph for a 4-point Radix-2 decimation-in-time FFT. The input is
reordered by bit reversal. Stage 1 computes two independent 2-point DFTs. Stage 2 combines
them using twiddle factors Wk (shown in red) to produce the final output.
4
69
Chapter 5. DFT and Fast Fourier Transform (FFT)
Zero Padding. Appending zeros to a signal before computing the FFT does not add new
frequency information, but it does interpolate the frequency spectrum onto a finer grid. This
can make spectral peaks easier to identify visually and is essential when using the FFT to
perform linear convolution via the overlap-add or overlap-save methods.
In-Place Computation. The Radix-2 FFT can be implemented in place, meaning that
the output values overwrite the input array. This is possible because the bit-reversal
permutation and the butterfly structure ensure that each value is consumed before it is
overwritten. In-place computation is important for embedded systems and real-time
applications where memory is limited.
• Radix-4 FFT: Groups four samples at each stage, reducing the number of
multiplica-tions by about 25% compared to Radix-2.
• Split-Radix FFT: Combines Radix-2 and Radix-4 butterflies for the lowest
known multiplication count among power-of-two algorithms.
70
5.3 FFT Algorithms and Computation
In practice, highly optimized libraries such as FFTW (“Fastest Fourier Transform in the
West”) automatically select the best algorithm and tune it to the specific hardware at runtime.
Problems
1. Compute the 4-point DFT of x[n] ={ 1, 0,−1, 0} directly from the definition. Identify
the frequency components present in the signal.
3. Verify Parseval’s theorem for the signal x[n] = { 1, 2, 3, 4} by computing the energy in
both the time domain and the frequency domain (using the 4-point DFT result from
the text).
4. The DFT of a length-N signal is periodic with period N. Explain why X[k] and X[k +
N] represent the same frequency, and discuss how this relates to aliasing in the
discrete-time domain.
5. How many complex multiplications are required to compute an N-point DFT directly
for N = 1024? How many are required using a Radix-2 FFT? Express the speedup
factor.
6. Consider the 4-point FFT worked example from the text: x[n] = {1, 2, 3, 4} with
X[k] ={ 10, −2 + 2j,− 2, −2 −2j . Verify by computing the inverse DFT that you
recover the original
} signal.
8. A signal consists of two sinusoids at 100 Hz and 105 Hz, sampled at fs = 1000 Hz. You
take N = 100 samples. What is the frequency resolution ∆ f of the DFT? Can these two
frequencies be resolved? What happens if you increase N to 200?
9. Explain the difference between zero padding and increasing the signal length in terms
of frequency resolution. Which one actually provides new spectral information?
10. A rectangular window of length N is applied before computing the FFT. Describe
qualitatively what happens to the spectrum of a pure sinusoid that does not complete
an integer number of cycles within the window. How does a Hamming window
change this result?
11. The twiddle factor WNk = e−j2πk/N appears throughout the FFT algorithm. Show that
k
Wk+N/2 = N −W . Explain
N why this identity halves the number of required twiddle
factor computations.
12. (Research) The FFT is sometimes called “the most important numerical algorithm
of the 20th century.” Investigate three specific technologies or scientific discoveries
that were made possible (or dramatically accelerated) by the FFT, and explain the role
it played in each.
71
Chapter 5. DFT and Fast Fourier Transform (FFT)
• The FFT reduces the computational cost from O(N2) to O(N log N) by recursively
splitting the DFT into smaller sub-problems.
• Windowing reduces spectral leakage at the cost of frequency resolution; the choice
of window is application-dependent.
72
6 CHAPTER
6
Filtering is one of the oldest problems in electrical engineering. The need arose in the
early days of telephony: long-distance lines picked up interference from power cables
and neighbouring circuits, making speech unintelligible. George Campbell at AT&T
developed the first systematic electrical filter designs around 1910, using networks of
inductors and capacitors arranged to pass voice frequencies while blocking everything else.
His colleague Otto Zobel refined these designs in the 1920s into the “image parameter”
method, which remained the standard approach for decades.
A deeper theoretical framework arrived in the 1930s, when Stephen Butterworth
pub-lished his design for a filter with maximally flat magnitude response (1930), and
shortly afterward, Pafnuty Chebyshev’s earlier work on polynomial approximation was
applied to create filters with equiripple behaviour in the passband. Wilhelm Cauer
extended these ideas to produce elliptic filters, which achieve the sharpest possible
transition for a given filter order. These classical analog designs (Butterworth, Chebyshev,
and elliptic) remain the starting point for many digital filter designs today.
The transition to digital filters began in earnest in the 1960s, when Charles Rader
and Bernard Gold at MIT Lincoln Laboratory showed that difference equations
implemented on digital hardware could replicate, and in many cases surpass, the
performance of analog circuits. James Kaiser at Bell Labs developed the Kaiser window
for FIR filter design, and Thomas Parks and James McClellan introduced the optimal
equiripple FIR design algorithm that bears their names.
Digital filters offer advantages that analog filters cannot match: perfect
reproducibility, easy reconfigurability, and the ability to implement filter characteristics
that are difficult or impossible to achieve with analog components, such as perfectly
linear phase. On the other hand, they introduce quantization effects and require careful
attention to numerical precision.
In this chapter, we cover the two major families of digital filters and the key ideas behind
their design.
73
Chapter 6. Design of Digital Filters
= k=0
]
FIR filters have several attractive properties:
• They can achieve exactly linear phase if the coefficients are symmetric, meaning all
frequency components experience the same delay.
• They have no feedback, which simplifies implementation and avoids limit-cycle oscil-
lations.
The price for these guarantees is that FIR filters typically require more coefficients (a
higher order) than IIR filters to achieve a comparable frequency selectivity.
IIR filters can achieve sharp transitions between passband and stopband with far fewer
coefficients than FIR filters. However, they come with caveats:
• Stability must be verified explicitly (all poles must lie inside the unit circle).
Classical analog filter designs (Butterworth, Chebyshev, and elliptic filters) can be con-
verted to IIR digital filters using techniques such as the bilinear transform or impulse
invariance. This connection to well-understood analog prototypes is one of the main reasons
IIR filters remain popular.
74
6.2 FIR Filter Design Methods
0.5
)|
0
0 0.2 0.3 0.4 0.6 0.8 1
Normalized frequency ω/π
Figure 6.1: Magnitude responses of a 30th-order FIR filter and a 5th-order Butterworth IIR
filter, both targeting the same cutoff frequency. The IIR filter achieves a sharper transition with
far fewer coefficients, but the FIR filter can provide exact linear phase.
sin(ωc n)
hideal[n] =
π ,
n
which extends infinitely in both directions. Multiplying this infinite sequence by a finite
window w[n] of length N yields a realizable FIR filter:
The choice of window controls the trade-off between the sharpness of the transition band
and the level of the side lobes (ripple). Common windows include:
• Rectangular window: sharpest main lobe but highest side lobes (−13 dB).
• Blackman window: very low side lobes (−58 dB) at the cost of a wider main lobe.
75
Chapter 6. Design of Digital Filters
Rectangular
1
Hamming
Blackman
Hanning
w[n
0.5
]
0
−25 −20 −15 −10 −5 0 5 10 15 20 25
Sample index n
Step 1: Compute the ideal impulse response. The ideal low-pass impulse response
is
sin(ωc n) sin(πn/3)
hideal[n] = πn = πn .
76
6.3 IIR Filter Design via the Bilinear Transform
2πn
w[n] = 0.54 − 0.46 cos 6 , n = 0, 1, . . . , 6.
Step 3: Multiply.
h[n] = hideal[n − 3] · w[n] = {0, 0.043, 0.212, 0.333, 0.212, 0.043, 0}.
Observation. The coefficients are symmetric (h[n] = — h[6 n]), guaranteeing linear
phase. The Hamming window has reduced the side lobes compared to a rectangular window,
at the cost of a slightly wider transition band.
2 ωd T π
Ωc = T
tan 2 = 2 tan 8 ≈ 2 × 0.4142 = 0.8284.
−1
1−z
Step 2: Apply the bilinear substitution. Substitute s−1= 2
1+z into Ha(s):
0.8284
H 0.8284 (1 + z−1)
(z) = = .
2 11−z
−1
+ 0.8284 2(1 − z−1) + 0.8284(1 + z−1)
+z−1
Step 4: Verify. The digital filter has a pole at z = 0.4142, which lies inside the unit
circle, so the filter isj0stable.
At ω = 0: H(e ) = 0.2929×2 = 1.0. The DC gain is unity.
1−0.4142 √
At ω = π/4: |H(e π/4)| ≈ j 2 = 0.707, confirming this is indeed the −3 dB cutoff
1/
frequency, exactly where we wanted it.
The pre-warping step was essential: without it, the bilinear transform’s frequency com-
pression would have shifted the cutoff to the wrong location.
Problems
1. An FIR filter has impulse response h[n] = { 1, 2, 3, 2,
} 1 for n = 0, . . . , 4. (a) Is this
filter guaranteed to be stable? Explain. (b) Show that h[n] — = h[4 n] and explain
why this symmetry implies linear phase.
2. Consider the IIR filter y[n] = 0.9 y[n— 1] + 0.1 x[n]. (a) Find the transfer function H(z).
(b) Locate the pole and determine whether the system is stable. (c) Evaluate |H(ejω )
at ω = 0 and ω = π. Is this a low-pass or high-pass filter? |
3. Design a length-5 FIR low-pass filter using the rectangular window method with
nor-malized cutoff frequency ωc = π/2. Compute the ideal impulse response
sin(ωc n)
hideal[n] =
π — for n = 2, . . . , 2 (use L’Hoˆ pital’s rule at n = 0), and apply the
rectangular window.
n
N—
for
4. Repeat the previous problem using a Hamming window: w[n] = 0.54 + 0.46 cos 2πn 1
n = − 2, . . . , 2. Compare the two sets of coefficients and discuss what changes.
H(z) = 1 − z−2
1 − 0.5 z−1 + 0.25 z−2 .
(a) Find the poles and zeros. (b) Is the system stable? (c) Evaluate H(ej0) and
H(ejπ ). What does this tell you about the filter type?
6. Explain in your own words why FIR filters are always stable, regardless of the coeffi-
cient values, while IIR filters require stability verification.
8. An audio signal sampled at fs = 44100 Hz needs a low-pass filter with cutoff at 5000
Hz. To design this using the bilinear transform, compute the pre-warped analog cutoff
frequency Ωa.
9. A digital filter with impulse response h[n] = δ[n] − δ[n − 1] is applied to a slowly
varying signal. What is the output for the input x[n] = c (a constant)? What kind of
operation does this filter perform?
79
6.3 IIR Filter Design via the Bilinear Transform
10. The FIR vs. IIR comparison table in this chapter lists five properties. For each of
the following applications, state whether FIR or IIR would be more appropriate
and explain your reasoning: (a) real-time echo cancellation in a telephone system,
(b) a biomedical monitor measuring EEG signals, (c) a bass-boost equalizer in a
portable music player.
11. (Research) The Parks–McClellan algorithm (also known as the Remez exchange
algo-rithm) is an alternative to the window method for FIR filter design. Investigate
how it works and explain its key advantage: equiripple behaviour in both the passband
and the stopband.
• FIR filters are always stable and can achieve exact linear phase, but require higher
orders for sharp transitions.
• IIR filters achieve sharp cutoffs with fewer coefficients, but stability must be
verified and linear phase is generally not possible.
• The window method designs FIR filters by truncating the ideal impulse response;
the window shape controls the resolution–leakage trade-off.
• The bilinear transform converts classical analog filter designs (Butterworth, Cheby-
shev, elliptic) into stable IIR digital filters, with frequency pre-warping to compen-
sate for axis compression.
80