ece 420-embedded dsp laboratory
Post on 19-Apr-2022
7 Views
Preview:
TRANSCRIPT
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)
top related