Digital Signal Processing

Guide to AI and Data Courses · Part III: Signals, Images and Audio
SamplingLinear systemsFourier and FFTFilter designSpectral analysisRelated courses
Sercan KÜLCÜ · Giresun University · Computer Engineering

Introduction

What Question Does It Ask?

How are sampled signals analyzed, filtered and transformed?

Digital signal processing analyzes, filters and transforms audio, vibration, ECG or radio signals that have been sampled at regular intervals, using mathematical transforms. The course rests on exact mathematics, not learning; it is the common foundation of the audio, image and communications courses.

At a glance

Approach

mathematical transforms and filters

Input

sampled signal

Output

filtered signal, spectrum

Success measure

signal-to-noise ratio, frequency response

Math load

high: complex numbers, Fourier

Data needs

no learning; the signal suffices

Introduction

A Short History

1822

In his book on heat, Fourier proposes writing functions as sums of sinusoids.

1949

Shannon publishes sampling theory: a band-limited signal sampled fast enough is recovered exactly.

1965

Cooley and Tukey publish the fast Fourier transform (FFT); computing spectra becomes practical.

1974

Ahmed, Natarajan and Rao introduce the discrete cosine transform (DCT); JPEG and MP3 build on it.

1975

Oppenheim and Schafer's Digital Signal Processing appears; the field becomes a standard course.

1978

Texas Instruments' Speak & Spell brings single-chip digital speech synthesis into homes.

The Course

Core Concepts

Sampling

Measuring a continuous signal at equal intervals to get a sequence of numbers.

Nyquist criterion

Sample faster than twice the highest frequency.

Aliasing

With undersampling, a high frequency shows up as a low one.

Quantization

Rounding amplitude to a finite number of levels; bit depth.

Convolution

The response of a linear time-invariant system to its input.

Fourier and FFT

A fast way to split a signal into frequency components.

FIR and IIR filters

Low-pass, high-pass and band-pass digital filters.

z-transform

Poles and zeros of a filter; stability analysis.

The Course

A Typical Workflow

SampleADC, samplingrateTransformFFT,spectrumFilterFIR / IIRfilterAnalyzepeaks, energy,featuresConvertbackDAC ornext step
Example: An ECG device samples the heart signal 360 times per second. The spectrum shows 50 Hz mains noise; a notch filter suppresses only that frequency. R peaks are found in the cleaned signal and heart rate is computed from the time between them. No step involves learning.

The Course

What Does the Course Cover?

  1. Discrete-time signals and systems
  2. Linear time-invariant systems and convolution
  3. Sampling, aliasing and reconstruction
  4. Discrete-time Fourier transform, frequency response
  5. The z-transform: poles, zeros and stability
  6. The discrete Fourier transform (DFT) and the FFT
  7. Windowing and spectral leakage
  8. FIR filter design: the window method
  9. IIR filter design: Butterworth, Chebyshev
  10. Sample-rate conversion: decimation, interpolation
  11. Short-time Fourier transform and spectrograms
  12. Quantization noise and fixed-point implementation

Skills you will gain

designing filters with scipy.signalplotting spectra in MATLAB or Octavereading pole-zero diagramschoosing a suitable sampling ratefiltering and interpreting a real signal

A typical semester; the order and coverage vary between universities.

Try It

Cleaning a Noisy Pulse

A chest-strap ECG samples at 200 Hz; 50 Hz mains hum and muscle noise have crept into the recording. Change the moving-average window length and watch the signal in both time and frequency.

The dashed line is the filter’s frequency response: at M = 4 its zero falls exactly on 50 Hz. Larger M means less noise, but the sharp R peak gets flattened too.
To separate noise you first look at its frequency. The course teaches you to design a filter from its frequency response, not by trial, and to leave the component you want intact.

Context

Prerequisites

Courses worth knowing before this one, and why they are needed.

CourseWhy it is needed
Calculusintegrals, series and complex numbers: the language of the Fourier transform
Differential Equationsbehavior and stability of linear systems
Programming with Cto write real-time filters on embedded devices

Context

Are You Ready for This Course?

Ask yourself; for every "no", the right-hand column shows where to start.

Ask yourselfIf not, start with
Can you write a complex number in polar form and explain Euler's formula?Complex numbers and Euler's formula from calculus
Can you read the amplitude, frequency and phase of a sinusoid from its plot?A quick review of trigonometry and sinusoid graphs
Can you evaluate a sum (Σ) and a simple integral?Series and integrals from calculus
Can you generate an array in Python or MATLAB and plot it?Intro programming, then a short NumPy and Matplotlib tutorial
If you can say "yes" to most of these, you are ready; one or two gaps can be closed during the semester.

Context

Neighbouring Courses

subfieldbuilds onshares methodsapplication

Overlap

Overlapping Courses

RelationCourseShared ground
builds onImage Processing builds on this course2D signals, convolution, Fourier transform
builds onSpeech Recognition and Audio Processing builds on this coursespectrogram, MFCC, filters
shares methodsShares methods with Time Series Analysis and Forecastingfrequency analysis, filtering
shares methodsShares methods with Information Theorycompression, sampling, channels

Differences

Where It Differs (1/2)

CriterionSignal ProcessingImage ProcessingSpeech and Audio
Core questionHow are sampled signals analyzed, filtered and transformed?How is an image enhanced, transformed and divided into regions?How are words, speakers and events extracted from a sound wave?
Approachmathematical transforms and filterspixel-level transformationsacoustic signal and language model
Inputsampled signalimageaudio waveform
Outputfiltered signal, spectrumprocessed image or regionstext, speaker, sound event
Success measuresignal-to-noise ratio, frequency responsevisual quality, PSNRword error rate (WER)
Math loadhigh: complex numbers, Fouriermedium: convolution, Fouriermedium-high
Data needsno learning; the signal sufficeslittle; learning not requiredmany hours of recordings
  • Image Processing: Signal processing works with one-dimensional, time-dependent signals; image processing carries the same tools to a 2D pixel grid.
  • Speech and Audio: Signal processing provides general tools; speech recognition combines them with language models and learning to output words.

Differences

Where It Differs (2/2)

CriterionSignal ProcessingTime SeriesInformation Theory
Core questionHow are sampled signals analyzed, filtered and transformed?How do we find structure in measurements over time and forecast the future?How is information measured, and how is it compressed and transmitted with the least loss?
Approachmathematical transforms and filterstime-dependent statistical modelsmeasuring information with probability
Inputsampled signaltimestamped measurementssource and channel model
Outputfiltered signal, spectrumforecast, trend, seasonalitybounds, codes, compression rate
Success measuresignal-to-noise ratio, frequency responseforecast error (MAE, RMSE)bits, channel capacity
Math loadhigh: complex numbers, Fouriermedium-highhigh: probability
Data needsno learning; the signal sufficeslong historynone
  • Time Series: Both look at time-dependent data; time series analysis needs forecasting and statistics, signal processing needs frequency and filters.
  • Information Theory: Information theory gives the measure of information and the limits of compression; signal processing gives the algorithms that act on the signal.

Practice

Applications

Audio and music

Equalizers, noise suppression, MP3 compression.

Communications

Modems, Wi-Fi, 4G/5G modulation.

Biomedical

Filtering ECG and EEG, finding peaks.

Radar and sonar

Measuring range and speed from echoes.

Vibration monitoring

Detecting machine faults from the spectrum.

Image and video

Transforms in JPEG and video coding.

Practice

Risks and Ethics

Aliasing

Without a low-pass filter before sampling, high frequencies show up as fake low ones and cannot be undone.

Unstable IIR filters

A pole outside the unit circle makes the output blow up; coefficient rounding in fixed point can push it there.

Spectral leakage

An FFT taken without a suitable window shows frequency components that are not there and leads to wrong diagnoses.

Phase distortion

The nonlinear phase of an IIR filter distorts waveforms such as ECG, which can affect a diagnosis.

In depth: Explainable AI and AI Ethics.

Practice

Tools and Datasets

Tools and libraries

MATLABGNU OctaveNumPySciPy (scipy.signal)librosaGNU Radio

Sample signals and datasets

MIT-BIH Arrhythmia (ECG)PhysioNetTIMIT (speech)CWRU bearing vibration dataSynthetic sines and noise
In class a synthetic signal is often enough: summing known frequencies and adding noise shows clearly what a filter does.

Practice

Common Misconceptions

Common beliefIn fact
A higher sampling rate is always better.Beyond the Nyquist limit you gain no information; only data and computation grow.
The FFT is a different transform from the Fourier transform.The FFT is an algorithm that computes the discrete Fourier transform (DFT) fast; the result is the same.
A filter tells noise from signal and removes it.A filter separates by frequency; if noise shares the signal's band, the filter cannot separate it.
Deep learning has made signal processing obsolete.Audio and sensor models usually take a spectrogram or a filtered signal as input.

Next Steps

After This Course

Courses that build on or extend this one

Related careers

DSP engineerAudio software engineerCommunications engineerEmbedded systems engineerBiomedical engineer
Digital signal processing is the gateway to the third part: extended to two dimensions it becomes image processing, combined with language models it becomes speech recognition. Time series analysis and information theory also use its tools. On the hardware side, you can move on to embedded AI and communications.

Next Steps

Further Reading

  • Oppenheim and Schafer, Discrete-Time Signal Processing, 3rd ed., Pearson, 2010.
  • Proakis and Manolakis, Digital Signal Processing: Principles, Algorithms, and Applications, 4th ed., Pearson, 2007.
  • Smith, The Scientist and Engineer's Guide to Digital Signal Processing, California Technical Publishing, 1997.
  • Cooley and Tukey, "An Algorithm for the Machine Calculation of Complex Fourier Series", Mathematics of Computation 19(90), 1965.

The End

Chapter 16: Digital Signal Processing
← Previous chapter · Map of the field · Next chapter →
1 / 1 Sercan KÜLCÜ. All rights reserved.