Download - ECE 420-Embedded DSP Laboratory
ECE 420- Embedded DSP LaboratoryLecture 1 β Course Overview & Audio Processing
Thomas MoonJanuary 27, 2020
D S Pigital ignal rocessing
-signal processing done by βcomputerβ
Signalsspeech/acoustic signalsmotion signals
images videos
Signals
RF signals
seismic signals stock prices
Extract useful information from the signal
filtering
low-pass filter
high-pass filter
Signal Processing
transforming
Signal Processing
Fourier Transform (FT) Wavelet Transform
modulation & demodulation
Signal Processing
frequency conversion
0 π#βπ#
0 π΅βπ΅
Baseband
Passband
β3 +3+1β1
β3
+3
+1
β1
πΌ
π
16 QAM signal
Digital Signal Processingsampling
t
ADC DAC
t
β’ β’ β’
Analog Digital Analog
Why DSP?
β’ Digital circuits are less sensitive to external parameters (temperature, aging, etc).
β’ Easy to adjust system characteristics (ex: changing filter response).
β’ Digital signal can be stored almost indefinitely.
β’ More suitable to process low-frequency signals.
Why DSP?
9
In this course:β’ Implement the fundamental DSP concepts from
ECE 310.β’ Learn to prototype & implement real-time DSP
systems.
Embedded Digital Signal Processing
10
How we learn:β’ Work with hardware.β’ Run practical experiment.
But, we will not build real-time DSP systems from scratch. Γ Not a circuit course!
Embedded Digital Signal Processing
11
We will use Android Tablet!
β’ CPU: 2.2 GHz ARM Cortex A15β’ GPU: 192 core Keplerβ’ RAM: 2 GBβ’ Display: 8-inch 1920x1200 multi-touch Full-HD displayβ’ Motion sensors: 3-axis gyro, 3-axis accelerometer, 3-axis compassβ’ Cameras: Front 5MP HDR, Back 5MP auto-focus HDRβ’ Stereo speakers & microphone
NVIDIA SHIELD Tablets
β’ CPU: 2.2 GHz ARM Cortex A15β’ GPU: 192 core Keplerβ’ RAM: 2 GBβ’ Display: 8-inch 1920x1200 multi-touch Full-HD displayβ’ Motion sensors: 3-axis gyro, 3-axis accelerometer, 3-axis compassβ’ Cameras: Front 5MP HDR, Back 5MP auto-focus HDRβ’ Stereo speakers & microphone
NVIDIA SHIELD Tablets
YOU are responsible for the tablets.Please, use it carefully!
Software Tools You Need
PyCharm & Jupyterβ’ run python script for simulation.
Android Studioβ’ Upload algorithms into
Android platform.
1. Develop & Test DSP algorithms in high-level languages (Python or MATLAB)
β’ More rapid developmentβ’ Test/training signals available β’ Provide a reference against embedded
implementation
2. Port tested algorithms into embedded platform
Basic Practice in Developing DSP Software
15
prelab + lab (1/2)
lab (2/2)
β’ Webpage: https://courses.engr.illinois.edu/ece420/sp2020
β’ Lectures: Mondays 2:00-2:50PM, 4070 ECEBβ’ Learn theory/concept for the associated labβ’ Come to lecture and ask questions
β’ Labs: 5072 ECEBβ’ ABA: 2:00-3:50 Tueβ’ ABC: 2:00-3:50 Wedβ’ ABD: 2:00-3:50 Thuβ’ ABE: 2:00-3:50 Fri
β’ TAsβ’ Dimitrios Gotsisβ’ Spencer Markowitz
Course Info
16
β’ Prerequisite: ECE 310(We assume you know basic DSP concepts!)
Course Timeline
17
Backgroundfor Labs
Special Topics/ Guest Lectures
Final Quiz
Structured Labs
Assigned Project
Final Project Demo
Final Project
Lecture Labst = 0
t = End of Semester
β’ First half: 7 Structured Labs
β’ Embedded DSP development frameworkβ’ High-level (Python) Γ Embedded (Android with Java/C)
β’ Different signal modalities and interfaces: IMU, audio, visual
β’ Basic DSP algorithmsβ’ Digital filtering (lab2)β’ Spectral analysis (lab3)β’ Auto-correlation analysis: pitch detection/correction (lab4,5)β’ Image and multidimensional signal processing (lab6,7)
Course Overview
18
β’ First half: 7 Structured Labs - Format
β’ Prelab [Individual]β’ Complete individually prior to lab, submit to TA
β’ Quiz [Individual]β’ Overview of concepts from previous lecture & lab
β’ Demo [Group]β’ Demonstrate work from previous week to TA, answer questions
β’ Lab work [Group]
Please refer to βSubmission Instructionβ page for details.
Course Overview
β’ Second half: βStudent Choiceβ Group Projects (subj. to approval)
β’ Start with an Assigned Project Labβ’ Explore implementation of a DSP algorithm from the literatureβ’ In Python, 2-week durationβ’ Jumping off point for the Final Project
β’ Final projectβ’ Proposal and Design Reviewβ’ Deliverable, 2 weekly milestones, validation and test planβ’ Final Project Demo and Presentationβ’ Final Report (and optional Video)
β’ Recommended not to wait until week 7 to start exploring options
Course Overview
20
β’ Gradingβ’ Structured Labs β 40%β’ Assigned Project Lab β 15%β’ Final Project β 40%β’ Final Quiz β 5%
β’ We use Gradescope for grading. If you are not invited, please contact us.
β’ Office hourβ’ TA Dimitrios Gotsis: Thursday 1-2pm, Friday 11am-2pm.β’ Piazza
Course Overview
21
β’ Goal: 1. Sample audio signals,2. Perform digital-filtering (notch filter),3. Generate a filtered sound.
Lab2 β Audio Filtering
22
Sampling Digital Filtering+
Sampling
23
Ts
ADC
π₯- π‘ π₯[π]π₯ π = π₯-(ππ5)
How/when can we reconstruct π₯- π‘perfectly from π₯[π]?
ππ‘
Ts
DAC
π₯[π]
π
π₯- π‘π‘
24
π- πΞ© = :;<
<π₯- π‘ π;>?@ππ‘
0 π΅βπ΅
π- πΞ©
Ξ© = 2ππ
To avoid the overlap, π΅ < EFG
(or π < HIFG
)
Nyquist rate : πΉK =HFG> 2π
CTFT
π ππ =N;<
<
π₯ π π;>OP
0 π΅π5βπ΅π5
π ππ
π2πβ2π
π
1. Scale by Ts
2. Periodic by 2π
β’ β’ β’β’ β’ β’
DTFT
Audio Signal
25
0π΅ = 2π Q 20ππ»π§
βπ΅
π- πΞ©
Ξ© = 2ππ
Highest frequency audible by humans
Hence, the sampling rate we need is HFG> 2 Q 20ππ»π§ = 40ππ»π§
We will use 48kHz sampling rate.
π- πΞ© = :;<
<π₯- π‘ π;>?@ππ‘
0 π΅βπ΅
π- πΞ©
Ξ© = 2ππ
CTFT
βπ΅π5 π2πβ2π
π ππ =N;<
<
π₯ π π;>OP
0 π΅π5
π πππ
β’ β’ β’β’ β’ β’
DTFT
0
π[π]
π[π] = NPVW
X;H
π₯ π π;>IEYP/X
DFT
π β 1
CTFT vs DTFT vs DFT
0 π΅βπ΅
π- πΞ©
Ξ© = 2ππ
0 π΅π5βπ΅π5
π ππ
π2πβ2π
π
β’ β’ β’β’ β’ β’
CTFT
DTFT
0
π[π] DFT
π β 1
Relation
3rd DFT bin
π?
π?
Given π5, π
0 π΅βπ΅
π- πΞ©
Ξ© = 2ππ
0 π΅π5βπ΅π5
π ππ
π2πβ2π
π
β’ β’ β’β’ β’ β’
CTFT
DTFT
0
π[π] DFT
π β 1
Relation
k?
π?
10.3ππ»π§
Given π5, π
0 π΅βπ΅
π- πΞ©
Ξ© = 2ππ
0 π΅π5βπ΅π5
π ππ
π2πβ2π
π
β’ β’ β’β’ β’ β’
CTFT
DTFT
0
π[π] DFT
π β 1
Relation
2πππ = π
ππΉ5=
π2π
π2π
=ππ
ππΉ5=
π2π
=ππ
Digital Filter
30
+
+
+
π₯[π] π¦[π]
π;H
π;H
π;H
π;H
πW
πH
πI
βπH
βπI
β’ β’ β’
β’ β’ β’
π¦ π = πWπ₯ π + πH π β 1 +β―+ πcπ₯ π β πΎ β (πHπ¦ π β 1 +β―+ πeπ¦ π β πΏ )
β’ L = 0, FIRβ’ L > 0, IIR
Examples of Filters
31
Low-pass High-pass
Band-stop Band-pass
Ramp
β’ Large N (filter order)βΊ Close to desired responseβΊ Sharper transitionβΊ Less ripplesβΉ More
computation/memoryβΉ Longer delay
Filter Design Spec
32
β’ FIR vs IIRβΊ StableβΊ Linear phaseβΉ Worse magnitude
response with same order
β’ In lab2, we will implement the convolution using a circular buffer and process sample-by-sample.
Convolution
33
π¦ π = NYV;<
<
β π π₯[π β π]
π¦ π = NYVW
c
β π π₯[π β π] FIR filter (causal)