CAN310 Signal Processing and Digital Filtering
Lecture 1 Introduction
Kaizhe Xu
[Link]@[Link]
1
1.1 Module Information
• Module Code: CAN310
• Module Title: Signal Processing and Digital
Filtering
• Module Credit: 5 credits
• Module Leader: Kaizhe Xu
– My office: SC240
– Office hour: 8:00 – 11:00, Mon.
2
1.1 Module Information
• In-class Lectures & Lab
– 4 hours per week
– On-site / online / recording
• After-class self-study
– Problem sheets (and answers)
– Programming practices
• In-semester: Matlab lab report (15%) *2
• Final Exam (3 hours, 70%)
3
1.1 Module Information
• Module Schedule (tentative)
Mon Thu
Week 1 1. Introduction 2. Math and Matlab Review Lab
Week 2 3. Signals TD 4. Systems in TD
Week 3 5. Signals in FD 6. Systems in FD
Week 4 7. Z-transform 8. Sampling CT-DT
Week 5 9. Reconstruction and Sampling DT-DT 10. Quantization and error evaluation
Week 6 Qingming Festival 11. DFT
Week 7 Revision
Week 8 [Link] 13. Digital Fitlers' Structure
Week 9 14. Digital Filters Classification_1 15. Digital Filters Classification_2
Week 10 16. Simple Filters Design 17. FIR Filters Design
Week 11 18. IIR Filters Design Lab 1
Week 12 Lab 2 19. Revision
Week 13 Revision
4
1.2 Resources
• On Learning Mall:
– Recorded lectures
– Problem sheets and programming practices
• Reference books
– 0. S. K. Mitra, Digital Signal Processing: A Computer-Based
Approach, 4th., McGraw-Hill, 2006.
– 1. [Link], Discrete Time Signal Processing, Prentice Hall,
1999.
– 2. R.G.Lyons_Understanding Digital Signal Processing
– 3. J.G.Proakis_Digital Signal Processing Using MATLAB, 3rd
Edition.
– 4. B.P.Lathi_Essentials of Digital Signal Processing.
5
1.2 More resources
• Online courses:
– “Digital Signal Processing” on Coursera
• Provided by École Polytechnique Fédérale de Lausanne
• [Link]
– “Digital Signal Processing” on OCW
• Provided by MIT
• [Link]
2011/[Link]
• Softwares
– Matlab (vR2025b or other compatible versions)
• Signal Processing Toolbox, DSP System Toolbox, Audio System Toolbox, …
– Audacity, Sonic Visualiser, etc.
6
1.3 What’s this module about?
Digital Signal Digital Signal Processing and
Processing + Filtering = Digital Filtering
Digital Signal Processing
• What is “Signal”? Section 2
• What is “Signal Processing”? Section 3
• What is “Digital Signal Processing”? Section 4
• Where is Digital Signal Processing used? Section 5
• DSP for Digital Signal Processing or
Digital Signal Processor? Section 6
7
1.4 Relatioship between SaS and DSP
• SaS - Signals and Systems (CAN207)
• DSP - Digital Signal Processing (CAN310)
SaS
DSP
CT time domain
DT time domain DFS DFT -> FFT
LTI systems DTFT
Quantization
DFT
CT frequency domain DT sampling
z-trans
(Fourier Series, CTFT
Laplace transform) Filters (CT, FIR
and IIR)
Sampling
8
1.4 Extended DSP area
Spectral
Adaptive analysis Hilbert transform
filters Wavelet analysis
Statistical signal Compressive
processing sensing
SaS
DSP
CT time domain Quantization
DT time domain DFS DFT -> FFT
LTI systems DTFT
Quantization
DFT
CT frequency domain DT sampling
z-trans
(Fourier Series, CTFT
Filters (CT, FIR
Laplace transform)
and IIR)
Sampling
Deterministic signal
LTI system
9
1.5 How to learn this module?
• 1. Key background knowledge: “Calculus” and “SaS”
– Notice: SaS covers more than 50% of DSP
• 2. Different reference books
– Same topic, different presentation and examples
• 3. Online resources
– Blog, forum, video, etc.
• 4. Practices
– Problem sheets.
– Programming
10
1. Summary
• Fundamentals of this module
11
2.1 Digital Signal Processing
• Signal – physical quantity that is represented as a
function of independent variables.
– Some examples:
• Temperature
• Sound
• Photograph
• Video
12
2.1 Digital Signal Processing
• Every signal carries information.
13
2.2 Digital Signal Processing
• Signal Processing
– Analyze – understanding the information carried by the
signal
– Synthesize – creating a signal to contain the given
information
• System: “something” that can manipulate, change,
record, or transmit input signals.
– Example: CD/DVD player, digital thermalmeter, etc.
14
2.3 Classification of Signals
• Continuity in time:
– Continuous time signals vs. discrete time signals
• Continuity in value:
– Continuous valued signals vs. digital signals
• Value of the signals:
– Real valued signals vs. complex valued signals
• Number of channels:
– Single channel signals vs. multichannel signals
• Certainty:
– Deterministic vs. random signal
• Number of dimensions:
– One-dimensional vs. two dimensional vs. multidimensional signals
15
2.3 Characterization of Signals
Analog
ADC
Digital
Sampling
Quantizing
Quantised
Holding
Sampled
16
2.4 Example of Typical Signals (1/5)
• Speech and music signals -
Represent air pressure as a
function of time at a point in
space
– “I like digital signal processing”:
– Which one sounds better?
– What has been done to it?
17
2.4 Example of Typical Signals (2/5)
• Electrocardiography (ECG) Signal - Represents the
electrical activity of heart
One period of the waveform
18
2.4 Example of Typical Signals (3/5)
• Black-and-white picture - Represents light intensity as a
function of two spatial coordinates
BW Digital Image
• Resolution: 1024x1024
• Quantization depth: 8 bits/pixel
• Storage: 1024x1024 pixel/picture * 8
bits/pixel = 8 Mbits = 1 Mbytes (for
uncompressed digital photo)
19
2.4 Example of Typical Signals (4/5)
• Color Image – Consists of Red, Green, and Blue (RGB)
components
Digital Image
• Resolution: 1024x1024
• Quantization depth: 8 bits/pixel/color,
(RGB full-color space, i.e. 24 bits/pixel)
• Storage: 1024x1024 pixel/picture * 24
bits/pixel = 24 Mbits = 3 Mbytes (for
uncompressed digital photo) 20
2.4 Example of Typical Signals (5/5)
• Video signals - Consists of a sequence of images, called
frames, and is a function of 3 variables: 2 spatial coordinates
and time
Digital Video:
• Resolution: 640 x 480
• Frame rate: 20 fps
• Color: RGB
• Quantization depth: 10 bits / pixel
• Bit rate:
21
2.5 Quiz
• 1. What is the compression ratio of JPEG used in your digital camera?
– JPEG format: YCbCr mode with 12 bits/pixel, resolution 3024x4032
– Compressed, final size is 12 MB (megabytes).
• 2. How long can a 512GB SD card store of the uncompressed videos
with the following parameters:
– Resolution: 1080p (1920x1080);
– Frame rate: 30 fps;
– Color: RGB
– Quantization depth: 10 bits/pixel.
• 3. The data rate of a 4K video using H.264 coding with the resolution of
4096x2160 is about 75 mbps (mega-bits-per-second). What is the
compression rate?
22
3.1 Signal Processing
A signal carries information.
The objective of signal processing is to extract
the information carried by the signal
• Signal processing is concerned with the mathematical
representation of the signal and the algorithmic
operation carried out to extract the information.
– DSP: signal processing in the digital domain
23
3.2 Typical Signal Processing Operations
• Most signal processing operations of analog signals are
carried out in the time-domain;
• In the case of discrete-time signals, both time-domain or
frequency-domain operations are usually employed.
• Examples of typical signal processing operations:
– Time domain operations
• Elementary operations: scaling, delay, arithmetic operations
– Frequency domain operations
• Filtering
• Modulation (Amplitude modulation)
• Multiplexing and demultiplexing
24
3.3 Elementary Time-domain Operations (1/3)
• Scaling – the multiplication of a signal by a
positive or negative constant.
• If x(t) is an analog signal that is scaled by a
constant α, then the scaling operation generates:
𝑦𝑦 𝑡𝑡 = 𝛼𝛼𝑥𝑥(𝑡𝑡)
– If |α|>1, the operation is called amplification;
• Where the constant α is called “gain”.
– If |α|<1, the operation is called attenuation.
25
3.3 Elementary Time-domain Operations (2/3)
• Delay – the delay operation generates a delayed
replica of the original signal.
• For an analog signal x(t),
𝑦𝑦 𝑡𝑡 = 𝑥𝑥(𝑡𝑡 − 𝑡𝑡0)
is the signal obtained by delaying x(t) by the amount
of time t0, which is assumed to be a positive value.
– If t0 is negative, then it is an advance operation.
26
3.3 Elementary Time-domain Operations (3/3)
• Most applications require operations involving two
or more signals to generate a new signal
• Addition • Subtraction
𝑦𝑦 𝑡𝑡 = 𝑥𝑥1 𝑡𝑡 + 𝑥𝑥2(𝑡𝑡) 𝑦𝑦 𝑡𝑡 = 𝑥𝑥1 𝑡𝑡 − 𝑥𝑥2(𝑡𝑡)
• Production • Division
𝑦𝑦 𝑡𝑡 = 𝑥𝑥1 𝑡𝑡 � 𝑥𝑥2(𝑡𝑡) 𝑦𝑦 𝑡𝑡 = 𝑥𝑥1 𝑡𝑡 /𝑥𝑥2(𝑡𝑡)
• Most complex operations are implemented by
combining two or more elementary operations.
27
3.4 FD Processing - Filtering (1/4)
• Filtering – deliberately changing the frequency content of the
signal.
• An ideal filter passes certain frequency components without
distortion and blocks other frequency components.
Ideal Lowpass Filter Practical Lowpass Filter
28
3.4 FD Processing - Filtering (2/4)
• Typical types of filters
– Lowpass (LPF) – removes high freqs, and retains low freqs
– Highpass (HPF) – removes low freqs, and retains high freqs
– Bandpass (BPF) – retains an interval of freqs within a band, removes
others
– Bandstop(BSF) – removes an interval of freqs within a band, retains
others
– Notch filter – removes a specific frequency
– Comb filter – removes a series of frequencies (integral multiples of a
low frequency)
29
3.4 FD Processing - Filtering (3/4)
𝑦𝑦 𝑡𝑡 = 𝑥𝑥1 𝑡𝑡 + 𝑥𝑥2 𝑡𝑡 + 𝑥𝑥3 𝑡𝑡
30
3.4 FD Processing - Filtering (4/4)
Frequency domain Time domain
31
3.5 FD Processing - Modulation and Demodulation (1/2)
• In Amplitude Modulation:
– Carrier signal 𝑐𝑐 𝑡𝑡 = 𝐴𝐴 cos Ω0 𝑡𝑡
– Modulating signal 𝑥𝑥 𝑡𝑡 = cos Ω1 𝑡𝑡
– Modulated signal 𝑦𝑦 𝑡𝑡 = c(t) � 𝑥𝑥 𝑡𝑡
𝐴𝐴 𝐴𝐴
𝑦𝑦 𝑡𝑡 = cos Ω0 + Ω1 𝑡𝑡 + cos Ω0 − Ω1 𝑡𝑡
2 2
𝐴𝐴 𝐴𝐴
𝑌𝑌 𝑗𝑗Ω = 𝑋𝑋 𝑗𝑗 Ω0 + Ω1 + 𝑋𝑋 𝑗𝑗 Ω0 − Ω1
2 2
32
3.5 FD Processing - Modulation and Demodulation (2/2)
• Demodulation is carried out in two stages:
– Multiply the modulated signal y(t) with a sinusoidal signal of the
same frequency as the carrier:
𝑟𝑟 𝑡𝑡 = 𝑦𝑦 𝑡𝑡 cos Ω0 𝑡𝑡 = 𝐴𝐴𝑥𝑥(𝑡𝑡) 𝑐𝑐𝑐𝑐𝑐𝑐 2 Ω0 𝑡𝑡
𝐴𝐴 𝐴𝐴
= 𝑥𝑥(𝑡𝑡) + 𝑥𝑥(𝑡𝑡) cos 2Ω0 𝑡𝑡
2 2
– Use a lowpass filter to recover the original modulated signal. The
cut-off frequency of this lowpass filter should be Ω0
33
3.6 FD Processing - Multiplexing and Demultiplexing
• Multiplexing - to efficiently utilize a wideband transmission
channel, many narrowband low-frequency signals are
combined for a composite wideband signal that is transmitted
as a single signal.
34
3. Summary
• What is “Signal processing”?
• Typical signal processing operations
– TD
– FD
• Filtering
• Modulation
• Multiplexing
35
4.1 Analogue Signal Processing
• Most real-world signals are analogue
– They are continuous in time and amplitude
• Analogue circuits process these signals using
– Resistors, Capacitors, Inductors, Amplifiers,…
• Limitations of Analogue Signal Processing
– Low anti-interference;
– Unstable;
– Unsecure;
– Complexity;
– Inflexibility.
36
4.2 Digital Signal Processing - Advantages
• Anti-interference and high precision
Analogue signal is jammed by
the external noise.
Digital signal is jammed by the external
noise.
37
4.2 Digital Signal Processing - Advantages
• Stability
Tape recorder quality
Old picture
Digital picture
CD quality
38
4.3 Digital Signal Processing - Advantages
• Security
pseudo-random
code
39
4.3 Digital Signal Processing - Advantages
• Easy processing
Reverberation
Original track After reverberation
40
4.3 Digital Signal Processing - Advantages
• Flexibility
Original scale signal
Bandpass Bandstop
41
4.3 Digital Signal Processing - Disadvantages
• Limited Frequency Range of Operation
– Frequency range technologically limited to values corresponding to
maximum computing capacities (e.g., A/D converter) that can be
developed and exploited
• Digital systems are active devices, thereby consuming more
power and being less reliable
• Additional Complexity in the Processing of Analog Signals
– A/D and D/A converters must be introduced adding complexity to
overall system
• Inaccuracy due to finite precision arithmetic
– Quantization and round-off errors
42
4.4 What is Digital Signal Processing?
digital digital
signal signal
analogue Processed
signal A/D DSP D/A analogue signal
• 1. Represent signals by a sequence of numbers
– Sampling and analog-to-digital conversions
• 2. Perform processing on these numbers with a digital processor
– Digital signal processing
• 3. Reconstruct analog signal from processed numbers
– Reconstruction or digital-to-analog conversion 43
𝑥𝑥𝑎𝑎 (𝑡𝑡) Anti-aliasing 𝑥𝑥[𝑛𝑛] 𝑦𝑦[𝑛𝑛] Reconstruction 𝑦𝑦𝑎𝑎 (𝑡𝑡)
Filter
S/H ADC DSP DAC Filter
44
4. Summary
• Why do we use DSP?
• What is DSP?
– System block diagram (structure)
45
5.1 Where is DSP used? (Optional)
• Digitalized daily living equipments:
46
5.1 Where is DSP used?
• Digitalized living environment
47
5.1 Where is DSP used?
• Digitalized living environment
Embedded system
using DSP and MCU
Digital Home Digital Kitchen
48
5.1 Where is DSP used?
• Digitalized living environment
Digital Hospital Digital Agriculture
49
5.1 Where is DSP used?
• Digitalized living style
Communication Transportation
Shopping Reading Teaching
50
5.1 Where is DSP used?
• Digitalized daily techniques
Identity recognition
Music sharing Digital modelling
51
5.2 List of Applications_1
• Telecommunication
– For echo cancellation.
– Equalization – Think about tuning your radio for bass and treble).
– Filtering – Removing unwanted signals using specially designed filters like
the Infinite Impulse Response Filter (IIR).
– Multiplexing and repeating signals.
• Instrumentation and Control
– In designing Phase Locked Logic (PLL).
– Noise reduction circuits.
– Compression of signals.
– Function generators.
• Digital Image Processing
– Compression of an image.
– Enhancement, reconstruction, and restoration of an image.
– Analysis or face detection (like Snapchat). 52
5.2 List of Applications_2
• Speech Processing
– Digital audio synthesis.
– Speech recognition and analysis.
• Medicine
– X-rays, ECGs, EEGs.
• Signal filtering
– Noise removal and shaping of signal spectrums.
• Military
– Sonar and navigation.
– Analysis after tracking in radars.
• Consumer electronics
– Music players
– Professional music turntables (like the ones DJs use).
53
6.1 Digital Signal Processor
• A DSP (Digital Signal Processor) is a highly specialized
microprocessor that is specifically designed and optimized
for DSP (Digital Signal Processing) operations.
• The first successful dedicated DSP chip was the Texas
Instruments, TMS 32010 (1983).
– Separate data and instruction memory
– Special instruction set for load / multiply / accumulate
– 16 bits. 390ns for a single multiply-add operation
• TI then built many variations of this chip, with the C2000,
C5000, C6000 and DaVinci series. TI is the largest
producers of DSP chips today.
54
6.2 Other related terms
• DSP implementation
– Purely software (on computer, algorithm only, using
Matlab or Python)
– Software-hardware collaboration (on DSP or ARM,
usually using C)
• ARM - typical MCU
• DSP - special MCU, particularly designed for computation
and data processing
– Hardware (on FPGA, specificly designed ASIC for
certain task / application, usually using HDL)
55
Next …
• Review of Mathematics
• Review of Matlab
56