List of Figures
List of Tables
Listings
Preface
1
Analog and Digital Signals
1.1
To Learn in This Chapter
1.2
Analog, Digital and Discrete-Time Signals
1.2.1
Advanced:
Ambiguous notation: whole signal or single sample
1.2.2
Digitizing Signals
1.2.3
Discrete-time signals
1.3
Basic Signal Manipulation and Representation
1.3.1
Manipulating the independent variable
1.3.2
When the independent variable is not an integer
1.3.3
Frequently used manipulations of the independent variable
1.3.4
Using impulses to represent signals
1.3.5
Using step functions to help representing signals
1.3.6
The rect function
1.4
Block or Window Processing
1.4.1
Advanced:
Block processing with overlapped windows
1.5
Advanced:
Complex-Valued and Sampled Signals
1.5.1
Complex-valued signals
1.5.2
Sampled signals
1.6
Signal Categorization
1.6.1
Even and odd signals
1.6.2
Random signals and their generation
1.6.3
Periodic and aperiodic signals
1.6.4
Power and energy signals
1.7
Modeling the Stages in A/D and D/A Processes
1.7.1
Modeling the sampling stage in A/D
1.7.2
Oversampling
1.7.3
Mathematically modeling the whole A/D process
1.7.4
Sampled to discrete-time (S/D) conversion
1.7.5
Continuous-time to discrete-time (C/D) conversion
1.7.6
Discrete-time to sampled (D/S) conversion
1.7.7
Reconstruction
1.7.8
Discrete-time to continuous-time (D/C) conversion
1.7.9
Analog to digital (A/D) and digital to analog (D/A) conversions
1.7.10
Sampling theorem
1.7.11
Different notations for S/D conversion
1.8
Relating Frequencies of Continuous and Discrete-Time Signals
1.8.1
Units of continuous-time and discrete-time angular frequencies
1.8.2
Mapping frequencies in continuous and discrete-time domains
1.8.3
Nyquist frequency
1.8.4
Frequency normalization in Python and Matlab/Octave
1.9
An Introduction to Quantization
1.9.1
Quantization definitions
1.9.2
Implementation of a generic quantizer
1.9.3
Uniform quantization
1.9.4
Granular and overload regions
1.9.5
Design of uniform quantizers
1.9.6
Design of optimum non-uniform quantizers
1.9.7
Quantization stages: classification and decoding
1.9.8
Binary numbering schemes for quantization decoding
1.9.9
Quantization examples
1.10
Correlation: Finding Trends
1.10.1
Autocorrelation function
1.10.2
Cross-correlation
1.11
Advanced:
A Linear Model for Quantization
1.12
Advanced:
Power and Energy in Discrete-Time
1.12.1
Power and energy of discrete-time signals
1.12.2
Power and energy of signals represented as vectors
1.12.3
Advanced:
Power and energy of vectors whose elements are not time-ordered
1.12.4
Power and energy of discrete-time random signals
1.12.5
Advanced:
Relating Power in Continuous and Discrete-Time
1.13
Applications
1.14
Comments and Further Reading
1.15
Review Exercises
1.16
Exercises
2
Transforms and Signal Representation
2.1
To Learn in This Chapter
2.2
Linear Transform
2.2.1
Matrix multiplication corresponds to a linear transform
2.2.2
Basis: standard, orthogonal and orthonormal
2.3
Advanced:
Inner Products to Obtain the Transform Coefficients
2.4
Block Transforms
2.4.1
Advanced:
Unitary or orthonormal transforms
2.4.2
DCT transform
2.4.3
DFT transform
2.4.4
Haar transform
2.4.5
Advanced:
Properties of orthogonal and unitary transforms
2.5
Fourier Transforms and Series
2.5.1
Fourier series for continuous-time signals
2.5.2
Discrete-time Fourier series (DTFS)
2.5.3
Continuous-time Fourier transform using frequency in Hertz
2.5.4
Continuous-time Fourier transform using frequency in rad/s
2.5.5
Discrete-time Fourier transform (DTFT)
2.6
Relating spectra of digital and analog frequencies
2.7
Advanced:
Summary of equations for DFT / FFT Usage
2.7.1
Advanced:
Three normalization options for DFT / FFT pairs
2.8
Laplace Transform
2.8.1
Motivation to the Laplace transform
2.8.2
Advanced:
Laplace transform basis functions
2.8.3
Laplace transform of one-sided exponentials
2.8.4
Region of convergence for a Laplace transform
2.8.5
Inverse Laplace of rational functions via partial fractions
2.8.6
Calculating the Fourier transform from a Laplace transform
2.9
Z Transform
2.9.1
Relation between Laplace and Z transforms
2.9.2
Advanced:
Z transform basis functions
2.9.3
Some pairs and properties of the Z-transform
2.9.4
Region of convergence for a Z transform
2.9.5
Inverse Z of rational functions via partial fractions
2.9.6
Calculating the DTFT from a Z transform
2.10
Applications
2.11
Comments and Further Reading
2.12
Review Exercises
2.13
Exercises
3
Analog and Digital Systems
3.1
To Learn in This Chapter
3.2
Contrasting Signals and Systems
3.3
A Quick Discussion About Filters
3.3.1
Cutoff and natural frequencies
3.4
Linear Time-Invariant Systems
3.4.1
Impulse response and convolution for LTI systems
3.4.2
Advanced:
Convolution properties
3.4.3
Advanced:
Convolution via correlation and vice-versa
3.4.4
Advanced:
Discrete-time convolution in matrix notation
3.4.5
Approximating continuous-time via discrete-time convolution
3.4.6
Frequency response: Fourier transform of the impulse response
3.4.7
Fourier convolution property
3.4.8
Circular and fast convolutions using FFT
3.5
Advanced:
Sampling and Signal Reconstruction Revisited
3.5.1
A proof sketch of the sampling theorem
3.5.2
Energy and power of a sampled signal
3.5.3
Energy / power conservation after sampling and reconstruction
3.5.4
Sampling theorem uses a strict inequality
3.5.5
Undersampling or passband sampling
3.5.6
Sampling a complex-valued signal
3.5.7
Signal reconstruction and D/S conversion revisited
3.6
Advanced:
First and Second-Order Analog Systems
3.6.1
First-order systems
3.6.2
Second-order systems
3.7
Advanced:
Bandwidth and Quality Factor
3.7.1
Bandwidth and Quality Factor of Poles
3.7.2
Bandwidth and Quality Factor of Filters
3.8
Importance of Linear Phase (or Constant Group Delay)
3.9
Advanced:
Filtering technologies: Surface acoustic wave (SAW) and others
3.10
Introduction to Digital Filters
3.10.1
Designing simple filters using specialized software
3.10.2
Distinct ways of specifying the “ripple” / deviation in filter design
3.10.3
LCCDE digital filters
3.10.4
FIR, IIR, AR, MA and ARMA systems
3.10.5
Filter frequency scaling
3.10.6
Filter bandform transformation: Lowpass to highpass, etc.
3.11
IIR Filter Design
3.11.1
Direct IIR filter design
3.11.2
Indirect IIR filter design
3.11.3
Methods to convert continuous into discrete-time system functions
3.11.4
Summary of methods to convert continuous-time system function into discrete-time
3.12
Bilinear Transformation: Definition and Properties
3.12.1
Bilinear mapping between s and z planes and vice-versa
3.12.2
Non-linear frequency warping imposed by bilinear
3.12.3
Tracking the frequency warping provoked by bilinear
3.12.4
Advanced:
Properties of the bilinear transformation
3.13
System Design with Bilinear Transformation
3.13.1
Bilinear for IIR filter design
3.13.2
Bilinear for matching a single frequency
3.13.3
Bilinear for mimicking G(s)
3.14
FIR Filter Design
3.14.1
A FIR filter does not have finite poles
3.14.2
The coefficients of a FIR coincide with its impulse response
3.14.3
Algorithms for FIR filter design
3.14.4
FIR design via least-squares
3.14.5
FIR design via windowing
3.14.6
Two important characteristics: FIRs are always stable and can have linear phase
3.14.7
Examples of linear and non-linear phase filters
3.14.8
Zeros close to the unit circle may impact the phase linearity
3.14.9
Four types of symmetric FIR filters
3.15
Realization of Digital Filters
3.15.1
Structures for FIR filters
3.15.2
Structures for IIR filters
3.15.3
Running a digital filter using filter or conv
3.15.4
Advanced:
Effects of finite precision
3.16
Advanced:
Minimum phase systems
3.17
Advanced:
Multirate Processing
3.17.1
Upsampler and interpolator
3.17.2
Downsampler and decimator
3.18
Applications
3.19
Comments and Further Reading
3.20
Exercises
3.21
Extra Exercises
4
Spectral Estimation Techniques
4.1
To Learn in This Chapter
4.2
Introduction
4.3
Windows for spectral analysis
4.3.1
Popular windows
4.3.2
Figures of merit applied to windows
4.3.3
Leakage
4.3.4
Picket-fence effect
4.3.5
Advanced:
Only a bin-centered sinusoid leads to an FFT without visible leakage
4.3.6
Summarizing leakage and picket-fence effect
4.3.7
Example of using windows in spectral analysis
4.4
The ESD, PSD and MS Spectrum functions
4.4.1
Energy spectral density (ESD)
4.4.2
Advanced:
Units of ESD when angular frequencies are adopted
4.4.3
Power spectral density (PSD)
4.4.4
Advanced:
Fourier modulation theorem applied to PSDs
4.4.5
Mean-square (MS) spectrum
4.5
Filtering Random Signals and the Impact on PSDs
4.5.1
Response of LTI systems to random inputs
4.5.2
Filtering continuous-time signals that have a white PSD
4.5.3
Advanced:
Filtering discrete-time signals that have a white PSD
4.6
Nonparametric PSD Estimation via Periodogram
4.6.1
Periodogram of periodic signals and energy signals
4.6.2
Examples of continuous-time PSD estimation using periodograms
4.6.3
Relation between MS spectrum and periodogram
4.6.4
Estimation of discrete-time PSDs using the periodogram
4.6.5
Examples of discrete-time PSD estimation
4.6.6
Estimating the PSD from Autocorrelation
4.7
Nonparametric PSD Estimation via Welch’s method
4.7.1
The periodogram variance does not decrease with
N
4.7.2
Welch’s method for PSD estimation
4.8
Parametric PSD Estimation via Autoregressive (AR) Modeling
4.8.1
Advanced:
Spectral factorization
4.8.2
AR modeling of a discrete-time PSD
4.8.3
AR modeling of a continuous-time PSD
4.8.4
Advanced:
Yule-Walker equations and LPC
4.8.5
Examples of autoregressive PSD estimation
4.9
Time-frequency Analysis using the Spectrogram
4.9.1
Definitions of STFT and spectrogram
4.9.2
Advanced:
Wide and narrowband spectrograms
4.10
Applications
4.11
Comments and Further Reading
4.12
Exercises
4.13
Extra Exercises
A
Useful Mathematics
A.1
Euler’s equation
A.2
Trigonometry
A.3
Manipulating complex numbers and rational functions
A.4
Manipulating complex exponentials
A.5
Q function
A.6
Matched filter and Cauchy-Schwarz’s inequality
A.7
Geometric series
A.8
Sum of squares
A.9
Summations and integrals
A.10
Partial fraction decomposition
A.11
Calculus
A.12
Sinc Function
A.13
Rectangular Integration to Define Normalization Factors for Functions
A.13.1
Two normalizations for the histogram
A.13.2
Two normalizations for power distribution using FFT
A.14
Linear Algebra
A.14.1
Inner products and norms
A.14.2
Projection of a vector using inner product
A.14.3
Orthogonal basis allows inner products to transform signals
A.14.4
Moore-Penrose pseudoinverse
A.15
Gram-Schmidt orthonormalization procedure
A.16
Principal component analysis (PCA)
A.17
Fourier Analysis: Properties
A.18
Fourier Analysis: Pairs
A.19
Probability and Stochastic Processes
A.19.1
Joint and Conditional probability
A.19.2
Random variables
A.19.3
Expected value
A.19.4
Orthogonal versus uncorrelated
A.19.5
PDF of a sum of two independent random variables
A.20
Stochastic Processes
A.20.1
Cyclostationary random processes
A.20.2
Two cyclostationary signals: sampled and discrete-time upsampled
A.20.3
Converting a WSC into WSS by randomizing the phase
A.21
Estimation Theory
A.21.1
Probabilistic estimation theory
A.21.2
Minimum mean square error (MMSE) estimators
A.21.3
Orthogonality principle
A.22
One-dimensional linear prediction over time
A.22.1
The innovations process
A.23
Vector prediction exploring spatial correlation
A.24
Decibel (dB) and Related Definitions
A.25
Insertion loss and insertion frequency response
A.26
Discrete and Continuous-Time Impulses
A.26.1
Discrete-time impulse function
A.26.2
Why defining the continuous-time impulse? Some motivation
A.26.3
Definition of the continuous-time impulse as a limit
A.26.4
Continuous-time impulse is a distribution, not a function
A.26.5
Mathematical properties of the continuous-time impulse
A.26.6
Convolution with an impulse
A.26.7
Applications of the impulse
A.27
System Properties
A.27.1
Linearity (additivity and homogeneity)
A.27.2
Time-invariance (or shift-invariance)
A.27.3
Memory
A.27.4
Causality
A.27.5
Invertibility
A.27.6
Stability
A.27.7
Properties of Linear and time-invariant (LTI) systems
A.28
Fixed and Floating-Point Number Representations
A.28.1
Representing numbers in fixed-point
A.28.2
IEEE 754 floating-point standard
B
Useful Softwares and Programming Tricks
B.1
Matlab and Octave
B.1.1
Octave Installation
B.2
Manipulating signals stored in files
B.2.1
Hex / Binary File Editors
B.2.2
ASCII Text Files: Unix/Linux versus Windows
B.2.3
Binary Files: Big versus Little-endian
B.2.4
Some Useful Code to Manipulate Files
B.2.5
Interpreting binary files with complex headers
Glossary
1
Text Conventions
2
Main Abbreviations
3
Main Symbols
Bibliography
Index
Digital Signal Processing with Python, Matlab or Octave
GitHub
PDF
Home
⇐
Previous
⇑
Up
Next
⇒
List of Tables
1.1
Notation used for continuous and discrete-time signals.
1.2
New signals
y
1
[
n
]
=
x
[
n
−
2
]
,
y
2
[
n
]
=
x
[
−
n
+
3
]
,
y
3
[
n
]
=
x
[
2
n
]
and
y
4
[
n
]
=
x
[
n
2
]
, obtained by manipulating
x
[
n
]
=
n
2
(
u
[
n
−
3
]
−
u
[
n
−
7
]
)
.
1.3
Total energy
E
and average power
P
for two kinds of signal assuming an infinite time interval.
1.4
Typical sampling frequencies.
1.5
The notation and values of the Nyquist frequency in distinct domains.
1.6
Input/output mapping for the quantizer specified by
ℳ
=
{
−
4
,
−
1
,
0
,
3
}
of Figure 1.46.
1.7
Input/output mapping for a generic quantizer designed for a Gaussian input with variance
σ
2
=
1
0
.
1.8
Examples of binary numbering schemes used as output codes in A/D conversion for
b
=
3
bits.
1.9
Autocorrelation functions and their respective equation numbers.
1.10
Example of autocorrelation for a real signal
[
1
,
2
,
3
]
(
n
=
0
,
1
,
2
).
1.11
Example of calculating the unscaled autocorrelation for a complex-valued signal
[
1
+
j
,
2
,
3
]
(
n
=
0
,
1
,
2
), where
j
=
−
1
.
2.1
Examples of transforms and applications.
2.2
Examples of inner product definitions.
2.3
The four pair of equations for Fourier analysis with eternal sinusoids and the description of their spectra:
c
k
,
X
(
f
)
(or
X
(
ω
)
),
X
[
k
]
and
X
(
e
j
Ω
. For periodic continuous and discrete-time signals the periods are
T
0
and
N
0
, respectively, with fundamental (angular) frequencies
ω
0
=
2
π
∕
T
0
rad/s and
Ω
=
2
π
∕
N
0
rad. For continuous-time signals, one can alternatively use the linear frequency
f
instead of
ω
=
2
π
f
, such that
f
0
=
1
∕
T
0
is the fundamental frequency in Hz.
2.4
Duality of periodicity and discreteness in Fourier analysis.
2.5
Units for each pair of Fourier equations in Table 2.3.
2.6
Summary of equations useful for signal processing with FFT.
3.1
Relations of the impulse response to the system function and frequency response of LTI systems.
3.2
Some distinct options for the numerator of a SOS.
3.3
Parameters of a second-order system as described by Eq. (3.28).
3.4
Specifications of a commercial SAW filter.
3.5
Specifications of a commercial ceramic filter where
f
n
=
4
5
5
kHz is the nominal frequency and
f
c
is the center of the 6-dB BW.
3.6
Methods to convert
H
(
s
)
into
H
(
z
)
.
3.7
Main approximations adopted in the design of continuous-time filters
H
(
s
)
with their pros and cons with respect to phase and magnitude (mag.).
3.8
Pre-warped bilinear as a method to convert
H
(
s
)
into
H
(
z
)
.
3.9
Types of linear-phase FIR filters
3.10
Matlab/Octave functions to convert among the formats: transfer function (tf), zero-pole (zp) and second order sections (sos)
4.1
Difference in dB between the window main lobe and highest sidelobe amplitudes.
4.2
ESD functions.
E
is the total energy and the column “Variable” indicates the units and symbols used for the independent variable of each function. The units of
G
(
f
)
,
G
(
ω
)
∕
(
2
π
)
and
G
(
e
j
Ω
∕
(
2
π
)
are J/Hz, J/(rad/s) and J/rad, respectively.
4.3
PSD functions.
P
is the average power and the column “Variable” indicates the units and symbols used for the independent variable of each function.
F
f
and
F
ω
denote the Fourier transform in Hertz and rad/s, respectively. The units of
S
(
f
)
,
S
(
ω
)
∕
(
2
π
)
and
S
(
e
j
Ω
∕
(
2
π
)
are W/Hz, W/(rad/s) and W/rad, respectively.
4.4
LPC result for different orders
P
for a ramp signal with added noise.
4.5
LPC result for different orders
P
for an AR(2) realization.
A.1
Analogy between using the histogram and DFT for estimation, where
ĝ
(
x
[
n
]
)
is the estimated function and
f
^
(
x
[
n
]
)
=
κ
ĝ
(
x
[
n
]
)
its normalized version. The unit of
f
^
(
x
[
n
]
)
is indicated within parentheses.
1
Nomenclature of special frequencies.
Digital Signal Processing with Python, Matlab or Octave
GitHub
PDF
Home
⇐
Previous
⇑
Up
Next
⇒