Professional Documents
Culture Documents
Table of Contents
0.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
Introduction
Sinusoidal Generation
Discrete-Time Periodicity
Sampling Unit Step Function
Introduction to Digital
Signal Processors
BIBO Stability
Parallel and Cascade Forms
16.
17.
18.
19.
20.
21.
QAM Receiver
Fast Fourier Transform
DSL Modems
Analog Sinusoidal Mod.
Wireless OFDM Systems
Spread Spectrum
Communications
Review for Midterm #2
Handouts
A.
B.
C.
D.
E.
F.
G.
H.
I.
J.
K.
L.
M.
N.
O.
P.
Q.
R.
S.
Course Description
Instructional Staff/Resources
Learning Resource Center
Matlab
Convolution Example
Fundamental Theorem of
Linear Systems
Raised Cosine Pulse
Modulation Example
Modulation Summary
Noise-Shaped Feedback
Sample Quizzes
Direct Sequence Spreading
Symbol Timing Recovery
Tapped Delay Line on C6700
All-Pass Filters
QAM vs. PAM
Four Ways To Filter
Intro to Fourier Transforms
Adding Random Variables
Lab
Reading
NONE
Introduction
-
Tools
Aug.
NO
CLASS
DAY
Introduction
22nd
Introduction
Aug.
Sinusoidal
29th
Generation
Sinusoidal
Generation
Discussion
of
homework
#0
solutions
Introduction
to
Digital
Signal
Processors
(DSPs)
Introduction
to
Sine
Wave
Digital
Signal
Generation
Processors
Discussion
of
Signals
and
Systems
homework
#1
solutions
Sine
Wave
Generation
Finite
Impulse
Digital
Filters
Response
Filters
Discussion
of
homework
#2
solutions
Digital Filters
Infinite
Impulse
Digital
Filters
Response
Filters
Midterm #1
Sampling
and
Aliasing
Digital Filters
For the second half of the semester, the weekly schedule of lecture and lab topics follows.
Week
Monday
Lecture
Wednesday
Lecture
Friday
Lecture
Lab
Reading
Monday:
Pre-lab
Quiz
Wednesday:
JSK
4.6,
8.1,
8.2
Discussion
of
Oct.
midterm
#1
17th
solutions
Interpolation
and
Pulse
Shaping
Interpolation
and
Pulse
Shaping
Data Scramblers
Digital
Pulse
Oct.
Amplitude
24th
Modulation
Digital
Pulse
Amplitude
Modulation
Digital
Pulse
Amplitude
Modulation
Matched Filtering
Discussion
of
homework
#5
solutions
Matched Filtering
Matched
Filtering
QAM Transmitter
Quadrature
QAM
Receiver
Amplitude
Modulation
Quadrature
THANKSGIVING
Amplitude
HOLIDAY
Modulation
Oct.
Channel
31st
Impairments
Nov.
Matched
7th
Filtering
Quadature
Nov.
Amplitude
14th
Modulation
Transmitter
Nov.
THANKSGIVING
QAM
Receiver
21st
HOLIDAY
Nov.
Quantization
28th
Guitar
Special
Effects
Data Conversion
Review
Dec.
Midterm
#2
5th
NO CLASS DAY
TMS320C6000
DSP
Advanced
Data
Conversion
Fast
Fourier
Transforms
DSL
Modems
Analog
Sinusoidal
M odulation
Wireless
OFDM
Systems
WiMAX
In 2014, 1.2B smart phones were sold. It was the first year that more than 1B smart phones were sold.
High-end cars now have more than 150 embedded processors in them. More than 2.5B products are sold
each year with multiple embedded digital signal processing systems in them. In fact, there are more
embedded programmable processors in the world than people.
Texas is a worldwide epicenter for microprocessors for control, signal processing, and communication
systems. Texas Instruments (Dallas, TX) and NXP (Austin, TX) are market leaders in the embedded
programmable microcontroller market, esp. for the automotive sector. Texas Instruments and NXP design
their microcontrollers and digital signal processors in Texas. Qualcomm designs their Snapdragon
processors in Austin, Texas, among other places. Cirrus Logic designs their audio data converter and
audio digital signal processor chipsets for the iPhone in Austin. To boot, Austin is a worldwide leader in
ARM-based digital VLSI design centers.
Through this undergraduate elective, I hope that students gain an intuitive feel for basic discrete-time
signal processing concepts and how to translate these concepts into real-time software using digital signal
processor technology. The course will review some of the mathematical foundations of the course
material, but emphasize the qualitative concepts. The qualitative concepts are reinforced by hands-on
laboratory work and homework assignments.
In the laboratory and lecture, the course will cover
digital signal processing: signals, sampling, filtering, quantization, oversampling, noise shaping,
and data converters.
digital communications: Analog/digital modulation, analog/digital demodulation, pulse shaping,
pseudo-noise sequences, ADSL transceivers, and wireless LAN transceivers.
digital signal processor architectures: Harvard architecture, special addressing modes, parallel
instructions, pipelining, real-time programming, and modern digital signal processor
architectures.
In particular, we will discuss design tradeoffs between implementation complexity and signal
quality/communication performance.
In the laboratory component, students implement transceiver subsystems in C on a Texas Instruments
TMS320C6748 floating-point dual-core programmable digital signal processor. The C6000 family is used
in DSL modems, wireless LAN modems, cellular basestations, and video conferencing systems. For
professional audio systems, the C6700 floating-point sub-family empowers guitar effects and intelligent
mixing boards. Students test their implementations using rack equipment, Texas Instruments Code
Composer Studio software, and National Instruments LabVIEW software. A voiceband transceiver
reference design and simulation is available in LabVIEW.
In addition to learning about transceiver design in the lab and lecture, students will also learn in lecture
about the design of modern analog-to-digital and digital-to-analog converters, which employ
oversampling, filtering, and dithering to obtain high resolution. Whereas the voiceband modem is a single
carrier system, lectures will also cover modern multicarrier modulation systems, as used in cellular LTE
communications and Wi-Fi systems. Last, we spend several lectures on digital signal processor
architectures, esp. the architectural features adopted to accelerate digital signal processing algorithms.
For the lab component, I chose a floating-point DSP over a fixed-point DSP. The primary reason was to
avoid overwhelming the students with the severe fixed-point precision effects so that the students could
focus on the design and implementation of real-time digital communications systems. That said, floatingpoint DSPs are used in industry to prototype algorithms, e.g. to see if real-time performance can be met. If
the prototype is successful, then it might be modified for low-volume applications or it might be mapped
onto a fixed-point DSP for high-volume applications (where the engineering time for the mapping can
potentially be recovered).
Instructional Staff
Instructional Staff
Fall 2016
Introduction
Lecture 0
http://www.ece.utexas.edu/~bevans/courses/realtime
Instructional Staff
Instructional Staff
System
ADSL
Contribution
Prototype
Funding
System
Contributions
SW release
Prototype
Funding
equalization
Matlab
DSP/C
Freescale, TI
interference reduction;
real-time testbeds
LabVIEW
2x2 testbed
Smart grid
comm
Freescale &
TI modems
Freescale
IBM, TI
Wi-Fi
interference reduction
Matlab
NI FPGA
Intel, NI
Matlab
IBM 45nm
TSMC 180nm
Cellular
(LTE)
baseband compression
Matlab
Huawei
Matlab
Huawei
Image
Quality
computer graphics;
high-dynamic range
Databases;
Matlab
EDA
system-level reliability
LabVIEW
LabVIEW/PXI
Oil&Gas
Cellular
(LTE)
resource allocation
LabVIEW
DSP/C
Freescale, TI
LabVIEW
NI FPGA
NI
Underwater
Matlab
Lake testbed
ARL:UT
Camera
image acquisition
Matlab
DSP/C
Intel, Ricoh
video acquisition
Matlab
Android
TI
image halftoning
Matlab
HP, Xerox
video halftoning
Matlab
Display
SW release
Qualcomm
Matlab
FPGA
Intel, NI
Linux/C++
Navy sonar
Navy, NI
DSP
LTE
0-3
EDA
LTE
LabVIEW
NI FPGA
NI
0-4
Course Overview
Course Overview
Course Overview
Measures of
signal quality?
Implementation
complexity?
Objectives
6.6
6.5
6.4
6.3
6.2
6.1
6.0
5.9
5.8
5.7
6.5
6.4
6.3
0-5
SymMinSSNR
SymMMSE
6.2
MinSSNR
SymMinISI
6.1
MMSE
MinISI
MDS
DualPath
5.9
5.8
5.7
5.6
4.5
105
5
5.5
106
6
6.5
107
7
Course Overview
Course Overview
Detailed Topics
Smart meters
DSL modems
Wireless Wearable
Multichannel EEG
Consumer audio
IP camera
Video conferencing
Microscopes
Communications
In-car entertainment
Mixing
board
MRI noise
cancelling
headphones
Amp
Pro-audio
Tablets
Multimedia
Biomedical
0-8
Course Overview
Course Overview
Required Textbooks
U
T
Thad Welch
(Boise State)
Cameron
Michael
Wright
Morrow
0-9
(Wyoming) (Wisconsin)
Matlab simulation
Mapping algorithms to C
Signal/image processing
Communication/networking
Embedded Systems
Embedded & Real-Time Systems
Real-Time Dig. Sig. Proc. Lab
Digital System Design (FPGAs)
Computer Architecture
Introduction to VLSI Design
0-9
0-10
Course Overview
Course Overview
Grading
Grading
Average GPA
21% midterm #1
has been ~3.1
21% midterm #2
MyEdu.com
14% homework (drop lowest grade of eight)
No final
5% pre-lab quizzes (drop lowest grade of six)
exam
39% lab reports (drop lowest grade of seven)
Communication Systems
Communication Systems
Information sources
m(t)
Baseband
Processing
Carrier
Circuits
TRANSMITTER
Transmission
Medium
s(t)
CHANNEL
Carrier
Circuits
r(t)
Baseband
Processing m (t )
RECEIVER
-1
Baseband signal
-0 - 1
-0
-0 + 1
0 - 1
Upconverted signal
0 + 1
Baseband
Processing
Carrier
Circuits
TRANSMITTER
Transmission
Medium
s(t)
CHANNEL
Carrier
Circuits
r(t)
Baseband
Processing m (t )
RECEIVER
0-13
Communication Systems
Receiver
Carrier circuits downconvert bandpass signal to baseband
Baseband processing extracts/enhances message signal
m(t)
0-14
Communication Systems
Baseband
Processing
Carrier
Circuits
TRANSMITTER
Transmission
Medium
s(t)
CHANNEL
Carrier
Circuits
r(t)
Baseband
Processing m (t )
RECEIVER
0-15
Laboratory
1 introduction
2 sinusoidal generation
3(a) finite impulse response filter
3(b) infinite impulse response filter
Transceiver Subsystems
block diagram of transmitter
sinusoidal mod/demodulation
pulse shaping, 90o phase shift
transmit and receive filters,
carrier detection, clock recovery
4 pseudo-noise generation
training sequences
5 pulse amplitude mod/demodulation training during modem startup
6 quadrature amplitude mod (QAM)
data transmission
7 digital audio effects
not applicable
5/23/16
Outline
Fall 2016
Bandwidth
Lecture 1
Design tradeoffs
http://www.ece.utexas.edu/~bevans/courses/realtime
1-2
Bandwidth
Bandwidth
Bandwidth
-fmax fmax
Bandwidth fmax
f2
f1
f1
f2
Bandwidth W = f2 f1
min
f ma x
f ma x
H ( f ) df 0.9 Energy
f
Idealized Lowpass
Spectrum
f
where Energy = H ( f ) df
0
Lowpass Spectrum
in Noise
approximate
-fmax fmax
1-4
5/23/16
Bandwidth
Amplitude Modulation
min
W
- fc
fc
approximate
f2
f1
f1
f2
X1()
Y1()
X1( + c)
X1( - c)
lower sidebands
- 1
- c - 1
-c
- c + 1
c - 1
c + 1
H ( f ) df 0.9 Energy
1
1
1
X1 ( ) * ( ( + c ) + ( c )) = X1 ( + c ) + X1 ( c )
2
2
2
1-5
1-6
Amplitude Modulation
Amplitude Modulation
c
lower sidebands
c 2
c + 2
j
- 2
- c 2
-c
- c + 2
-j
s(t)
+
sin(c t)
1
(X 1 ( + c ) + X 1 ( c )) j 1 ( X 2 ( + c ) X 2 ( c ))
2
2
1-8
5/23/16
Sinusoidal Generation
Sinusoidal Waveforms
Function call
Lookup table
Difference equation
cos(0 n) u[n]
cos(2 f0 t) u(t)
See handout on
sampling unit
Sample at rate fs by substituting t = n Ts = n / fs
step function
(1/Ts) cos(2 (f0 / fs) n) u[n]
Discrete-time frequency 0 = 2 f0 / fs in units of rad/sample
Example: f0 = 1200 Hz and fs = 8000 Hz, 0 = 3/10
1-10
Comparison
Realization
Direct form
Horners form
Multiply
Addition
Operations Operations
66
11
10
10
Memory
Usage
13
12
1-12
5/23/16
Difference Equation
Difference Equation
Implementation complexity
Computation: 2 multiplications and 3 additions per cosine value
Memory Usage: 2 coefficients, 2 previous values of y[n] and
1 previous value of x[n]
Drawbacks
Buildup in error as n increases due to feedback
Fixed value for 0
1-13
1-14
Lookup Table
Design Tradeoffs
MACs/ ROM
RAM
Quality in Quality in
sample (words) (words) floating pt. fixed point
C math
library call
30
22
Second
Best
N/A
Difference
equation
Worst
Second
Best
Lookup
table
Best
Best
MAC Multiplication-accumulation
RAM Random Access Memory (writeable)
1-16
INTRODUCTION TO
DIGITAL SIGNAL
PROCESSORS
Outline
Accumulator architecture
Memory-register architecture
Load-store architecture
register
file
Pipelining
Conclusion
on-chip
memory
2 -2
n
n
Touchscreen: Broadcom
(probably 2 ARM cores)
Apps: Samsung
(2 ARM + 3 GPU cores)
Audio: Cirrus Logic
(1 DSP core + 1 codec)
Wi-Fi: Broadcom
Baseband: Qualcomm
Inertial sensors:
STMicroelectronics
iPhone 5 Tear Down
2 -4
Fixed-Point
Floating-Point
$2 and up
$2 and up
Long
Short
Battery-powered
products
Cell phones
Digital cameras
Very few
Other products
DSL modems
Cellular basestations
Prototyping
2 -6
Addr
Program RAM
or Cache
Data RAM
Internal Buses
Data
High
Low
External
Memory
-Sync
-Async
.D1
.D2
.M1
.M2
.L1
.L2
.S1
.S2
Control Regs
CPU
Regs (B0-B15)
1-3 W
Sales volume
Multiple
multicore
DSPs
Regs (A0-A15)
10 mw - 1 W
Power consumption
Multiple DSP
chips or cores
+ accelerators
2 -5
Prototyping time
Single
DSP
DMA
Serial Port
Host Port
Boot Load
Timers
Pwr Down
2 -8
.L Unit
ABS
NOT
ADD
OR
AND
SADD
CMPEQ
SAT
CMPGT
SSUB
CMPLT
SUB
LMBD
SUBC
MV
XOR
NEG
ZERO
NORM
.D Unit
ADD
ST
ADDA
SUB
LD
SUBA
MV
ZERO
NEG
.M Unit
MPY
SMPY
MPYH
SMPYH
NOP
2 -10
Other
IDLE
Six of the eight functional units can perform integer add, subtract, and
move operations
2 -11
Logical
AND
CMPEQ
CMPGT
CMPLT
NOT
OR
SHL
SHR
SSHL
XOR
Bit
Management
CLR
EXT
LMBD
NORM
SET
Data
Management
LD
MV
MVC
MVK
MVKH
ST
Program
Control
B
IDLE
NOP
C6000 Instruction
Set by Category
(un)signed multiplication
saturation/packed arithmetic
2 -12
TI C5000
Immediate
TI C6000
ADD #0Fh
(implied)
ADD 010h
not supported
Register
C6700 Extensions
C6700 Floating Point Extensions by Unit
.S Unit
ABSDP
CMPLTSP
ABSSP
RCPDP
CMPEQDP RCPSP
CMPEQSP RSARDP
CMPGTDP RSQRSP
CMPGTSP SPDP
CMPLTDP
Direct
.M Unit
MPYDP
MPYID
MPYI
MPYSP
.D Unit
ADDAD
LDDW
Indirect
.L Unit
ADDDP
INTSP
ADDSP
SPINT
DPINT
SPTRUNC
DPSP
SUBDP
DPTRUNC SUBSP
INTDP
ADD *
+[8],A1
Four functional units perform IEEE single-precision (SP) and doubleprecision (DP) floating-point add, subtract, and move.
Operations beginning with R are reciprocal (i.e. 1/x) calculations.
2 -13
2 -14
MHz MIPS
150
167
150
250
1200
1336
1200
2000
C6712
150
1200
32
32
512
C6713
167
225
300
1336
1800
2400
32
32
32
32
32
32
1000
1000
1000
C6722
250
2000
1000
3072
256
$ 10 Professional audio
C6726
266
2128
2000
3072
256
$ 15 Professional audio
C6727
300
350
300
375
2400
2800
2400
3000
2000
2000
256
256
3072
3072
256
256
256
256
2048
2048
C6701
C6711
C6748
MHz MIPS
250
300
250
300
2000
2400
2000
2400
$ 14
C6204
200
1600
512
512
$ 19
$ 25 C6713 DSK board
$ 33
C6416
720
1000
500
600
500
600
500
720
900
5760
8000
4000
4800
4000
4800
4000
5760
7200
128
128
128
128
128
128
128
128
512
128
128
128
128
128
128
128
128
512
$ 22
$ 30
$ 18
$ 20
C6418
DM641
DM642
DM648
$114
$227
$ 49
$ 49
$ 28
$ 31
$ 37
$ 57
$ 64
ADSL2 modems
3G basestations
Video conferencing
Video conferencing
Video conferencing
200
$
200
$
$ 11
8000
8000
5000
5000
1000
1000
2000
2000
4000
2 -16
http://processors.wiki.ti.com/index.php/CCSv4
n
TI software
development
environment
http://www.ti.com/lit/ug/spru198k/spru198k.pdf
n
4Ping-pong buffering
http://focus.ti.com/lit/ug/sprufe8b/sprufe8b.pdf
n
C6748 Board
2 -17
2 -18
Linear buffer
Sort by time index
Update: discard oldest
data, copy old data
left, insert new data
Circular buffer
Oldest data index
Update: insert new data
at oldest index,
update oldest index
4Delayed branches
n
Used in processing
streaming data
Buffers
Time
Buffer contents
n=N
xN-K+1 xN-K+2
n=N+1
n=N+2
Next sample
xN-1
xN
xN+1
xN-K+2 xN-K+3
xN
xN+1
xN+2
xN-K+3 xN-K+4
xN+1
xN+2
xN+3
Time
Buffer contents
Next sample
n=N
xN-2
xN-1
xN
n=N+1
xN-2
xN-1
xN
xN+1
n=N+2
xN-2
xN-1
xNN
xN+1
xN-K+1 xN-K+2
xN+1
xN-K+2
xN-K+3
xN+2
xN-K+3
xxN-K+4
N-K+4
xN+2
xN+3
2 -20
Fixed-Point
$2 - $79
Accumulator
Floating-Point
$2 - $381
load-store or
memory-register
2-4 data
8 or 16 data
8 address
8 or 16 address
16 or 24 bit integer
32 bit integer and
and fixed-point
fixed/floating-point
2-64 kwords data
8-64 kwords data
2-64 kwords program
8-64 kwords program
16-128 kw data
16 Mw 4Gw data
16-64 kw program
16 Mw 4 Gw program
C, C++ compilers;
C, C++ compilers;
poor code generation better code generation
TI TMS320C5000;
TI TMS320C30;
Freescale DSP56000 Analog Devices SHARC
Cost/Unit
Architecture
Registers
Data Words
On-Chip
Memory
Address
Space
Compilers
Examples
2 -21
2 -22
Pipelining
Pipelining: Operation
Fetch
Decode
Execute
Fetch
Decode
Read
Execute
Superscalar (Pentium)
Fetch
Decode
Read
Fetch
Decode
Read
MAC X0,Y0,A
Pipelining
Read
X:(R0)+,X0 Y:(R4)-,Y0
Managing Pipelines
Interlocked pipeline
Protection from pipeline effects
May not be reported by simulators:
inner loops may take extra cycles
Compiler or programmer
Pipeline interlocking
Execute
2 -23
F
D
R
E
D
E
F
G
H
I
J
K
L
L
C
D
E
F
G
H
I
J
K
-
L
B
C
D
E
F
G
H
I
J
K
-
L
A
B
C
D
E
F
G
H
I
J
K
-
L
2 -24
F D R E
4Intended by programmer, or
4Interlock hardware inserts bubble
4TI TMS320C5000 (20 CPU & 16 I/O
registers, one accumulator, and one
address pointer ARP implied by *)
LAR AR2, ADDR ; load address reg.
LACC *; load accumulator w/
D
E
F
br
G
-
-
X
Y
Y
Z
C
D
E
F
br
-
-
-
X
-
Y
Z
; contents of AR2
B
C
D
E
F
br
-
-
-
X
-
Y
Z
A
B
C
D
E
F
br
-
-
-
X
-
Y
Z
Decode Read
F
D
E
F
rpt
X
X
X
X
X
X
X
X
Execute
D
R
E
C
B
AB
D
C
C
E
D
D
F
E
E
rpt
F
F
-
rpt
rpt
-
-
-
X
-
-
X
X
X
X
X
X
X
X
X
X
X
2 -25
2 -26
Fetch
Pentium IV pipeline
has more than 20 stages
Load/store
Memory
Floating-Point Unit
Integer Unit
Load/store
Load/store
Memory
ALU
2 -27
Multiplier
Address
2 -28
Concluding Remarks
RISC
Registers
Out
of
order
I/D
Cache
TLB
DSP
Registers
External
memories
DMA Controller
Internal
memories
I Cache
Physical
memory
2 -30
Optional
References
n
Wireless
Consumer
Video
Automotive
Wireline
Computer
2 -31
Annual
Revenue
7
6
5
Billions of
Dollars
4
3
2
1
0
1999
2001
2003
2005
2007
70
Share
60
50
TI
Freescale
Agere
Analog Dev
Philips
Other
40
30
20
10
0
2004
2005
2006
2007
IEEE Signal Processing Magazine, Special Issue on Signal Processing on Platforms with Multiple Cores, Nov. 2009
Electrical Engineering Dept., Arizona State University, Tempe, AZ 85287-5706, {ismail.alkamal, karam}@asu.edu
Texas Instruments, 12500 TI Boulevard MS 8635, Dallas, TX 75243, {genf, gatherer}@ti.com
School of Electrical and Computer Engineering, Georgia Tech, Atlanta, GA 30332-0250, dva@ece.gatech.edu
Electrical & Computer Engineering Dept., The University of Texas at Austin, Austin, TX 78712, bevans@ece.utexas.edu
**
1. INTRODUCTION
ULTI-CORE
IEEE Signal Processing Magazine, Special Issue on Signal Processing on Platforms with Multiple Cores, Nov. 2009
IEEE Signal Processing Magazine, Special Issue on Signal Processing on Platforms with Multiple Cores, Nov. 2009
IEEE Signal Processing Magazine, Special Issue on Signal Processing on Platforms with Multiple Cores, Nov. 2009
Freescale [9]
picoChip [10]
Tilera [11]
Processor
Architecture
TNETV3020
Homogeneous
MSC8156
Homogeneous
PC205
Heterogeneous
248 DSPs
1 GPP
TILE64
Homogeneous
No. of Cores
6 DSPs
6 DSPs
Interconnect
Topology
Hierarchical
Hierarchical
Applications
Wireless
Video
VoIP
Wireless
64 DSPs
Sandbridge
[12-13]
SB3500
Heterogeneous
3 DSPs
1 GPP
Mesh
Mesh
Hierarchical
Wireless
Wireless
Networking
Video
Wireless
IEEE Signal Processing Magazine, Special Issue on Signal Processing on Platforms with Multiple Cores, Nov. 2009
IEEE Signal Processing Magazine, Special Issue on Signal Processing on Platforms with Multiple Cores, Nov. 2009
TI TMS320C6455
Clock
(MHz)
1200
DSP
cores
1
symbol
synchronization,
and
frequency-domain
equalization.
Table 2 shows relative results for maximizing the
number of simultaneous non-overlapping OFDM channels
that can be processed in real time, as would be needed for an
access point or a base station. These results show that the
four considered multi-core DSPs can process in real time a
higher number of OFDM channels as compared to the
considered single-core processor using this specific
simplified benchmark.
However, it should be noted that this application
benchmark does not necessarily fit the use cases for which
the candidate processors were designed. In other words,
different results can be produced using different benchmarks
since single and multi-core embedded processors are
generally developed to solve a particular class of functions
which may or may not match the benchmark in use. At the
end, what matters most is the actual performance achieved
when the chips are tested for the desired customers end
solution.
OFDM
channels
Lowest
Freescale MSC8144
1000
Low
Sandbridge SB3500
500
Medium
picoChip PC102
Tilera TILE64
160
866
344
64
High
Highest
IEEE Signal Processing Magazine, Special Issue on Signal Processing on Platforms with Multiple Cores, Nov. 2009
tables that reflect the current global state of the system are
shared by the tasks running on different cores. This allows
the processes to share the same global view of the system
state. On the other hand, TIs DSP/BIOS and Eneas OSEck
supports a message passing programming model. In this
model, the cores can be viewed as "islands with bridges" as
contrasted with the "global view" that is provided by SMP
Linux. Control and management middleware platforms,
such as Eneas dSpeed [23], extend the capabilities of the
OS to allow enhanced monitoring, error handling, trace,
diagnostics, and inter-process communications.
As in memory organization, programming models in
multi-core processors include Symmetric Multiprocessing
(SMP) models and Asymmetric Multiprocessing (AMP)
models [24]. In an SMP model, the cores form a shared set
of resources that can be accessed by the OS.
The OS is responsible for assigning processes to
different cores while balancing the load between all the
cores. An example of such OS is SMP Linux [18-19] which
boasts a huge community of developers and lots of
inexpensive software and mature tools. Although SMP
Linux has been used on AMP architectures such as the mesh
interconnected Tilera architecture, SMP Linux is more
suitable for SMP architectures (Section 3.1) because it
provides a shared symmetric view. In comparison, TIs
DSP/BIOS and Enea's OSE can better support AMP
architectures since they allow the programmer to have more
control over task assignments and execution. The AMP
approach does not balance processes evenly between the
cores and so can restrict which processes get executed on
what cores. This model of multi-core processing includes
classic AMP, processor affinity and virtualization [23].
Classic AMP is the oldest multi-core programming
approach. A separate OS is installed on each core and is
responsible for handling resources on that core only. This
significantly simplifies the programming approach but
makes it extremely difficult to manage shared resources and
I/O. The developer is responsible for ensuring that different
cores do not access the same shared resource as well as be
able to communicate with each other.
In processor affinity, the SMP OS scheduler is modified
to allow programmers to assign a certain process to a
specific core. All other processes are then assigned by the
OS. SMP Linux has features to allow such modifications. A
number of programming languages following this approach
have appeared to extend or replace C in order to better allow
programmers to express parallelism. These include OpenMP
[25], MPI [26], X10 [27], MCAPI [28], GlobalArrays [29],
and Uniform Parallel C [30]. In addition, functional
languages such as Erlang [31] and Haskell [32] as well as
stream languages such as ACOTES [33] and StreamIT [34]
have been introduced. Several of these languages have been
ported to multi-core DSPs. OpenMP is an example of that. It
is a widely-adopted shared memory parallel programming
interface providing high level programming constructs that
enable the user to easily expose an applications task and
IEEE Signal Processing Magazine, Special Issue on Signal Processing on Platforms with Multiple Cores, Nov. 2009
IEEE Signal Processing Magazine, Special Issue on Signal Processing on Platforms with Multiple Cores, Nov. 2009
6.
7. REFERENCES
[1]
IEEE Signal Processing Magazine, Special Issue on Signal Processing on Platforms with Multiple Cores, Nov. 2009
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
[26]
[27]
[28]
[29]
[30]
[31]
[32]
[33]
[34]
[35]
[36]
[37]
[38]
[39]
[40]
[41]
[42]
[43]
[44]
10
http://www.ibm.com/developerworks/library/l-linux-smp/
TI DSP/BIOS, [Online]
http://focus.ti.com/docs/toolsw/folders/print/dspbios.html
Enea, [Online]
http://www.enea.com/
K. Williston, Multi-core software: strategies for success,
Embedded Innovator, pp. 10-12, Fall 2008.
OpenMP, [Online] http://openmp.org/wp/
MPI, [Online]
http://www.mcs.anl.gov/research/projects/mpi/
P. Charles, C. Grothoff, V. Saraswat, C. Donawa, A.
Kielstra, K. Ebcioglu, C. von Praun, and V. Sarkar,
X10: an object-oriented approach to non-uniform cluster
computing, in ACM OOPSLA, pp. 519-538, Oct. 2005.
MCAPI, [Online] http://www.multicoreassociation.org/workgroup/comapi.php
Global Arrays [Online]
http://www.emsl.pnl.gov/docs/global/
Unified Parallel C, [Online] http://upc.lbl.gov/
Erlang, [Online] http://erlang.org/
Haskell [Online] http://www.haskell.org/
ACOTES, [Online]
http://www.hitech-projects.com/euprojects/ACOTES/
StreamIT, [Online] http://www.cag.lcs.mit.edu/streamit/
B. Chapman, L. Huang, E. Biscondi, E. Stotzer, A.
Shrivastava, and A. Gatherer, Implementing OpenMP on a
high performance embedded multi-core MPSoC, accepted
and to appear the Proceedings of IEEE International
Parallel & Distributed Processing Symposium, 2009.
VirtualLogix [Online]
http://www.virtuallogix.com/products/vlx-for-embeddedsystems/vlx-for-es-supporting-ti-dsp-processors.html
E. Heikkila and E. Gulliksen, Embedded processors 2009
global market demand analysis, VDC Research.
A. Gatherer, Base station modems: Why multi-core? Why
now?, ECN Magazine, Aug. 2008. [Online]
http://www.ecnmag.com/supplements-Base-StationModems-Why_Multicore.aspx?menuid=580
Software
Communications
Architecture,
[Online]
http://sca.jpeojtrs.mil/
Y. Lin, H. Lee, M. Who, Y. Harel, S. Mahlke, T. Mudge,
C. Chakrabarti, K. Flautner, "SODA: A high-performance
DSP architecture for Software-Defined Radio," IEEE
Micro, vol.27, no.1, pp.114-123, Jan.-Feb. 2007
D. N. Truong et al., A 167-Processor computational
platform in 65nm, IEEE JSSC, vol. 44, No. 4, Apr. 2009.
M. Butts, Addressing software development challenges for
multicore and massively parallel embedded systems,
Multicore Expo, 2008.
J. H. Kelm, D. R. Johnson, A. Mahesri, S. S. Lumetta, M.
Frank, and S. Patel, SChISM: Scalable Cache Incoherent
Shared Memory, Tech. Rep. UILU-ENG-08-2212, Univ.
of Illinois at Urbana-Champaign, Aug. 2008. [Online]
http://www.crhc.illinois.edu/TechReports/2008reports/082212-kelm-tr-with-acks.pdf
E. A. Lee, The problem with threads, UCB Technical
Report, Jan. 2006 [Online]
http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS2006-1.pdf
By
Gene Frantz, TI Principal Fellow, Business Development Manager, DSP
Ray Simar, Fellow and Manager of Advanced DSP Architectures
System developers, especially those who are new to digital signal processors (DSPs),
are sometimes uncertain whether they need to use fixed- or floating-point DSPs for
their systems. Both fixed- and floating-point DSPs are designed to perform the highspeed computations that underlie real-time signal processing. Both feature system-ona-chip (SOC) integration with on-chip memory and a variety of high-speed peripherals
to ensure fast throughput and design flexibility. Tradeoffs of cost and ease of use often
heavily influenced the fixed- or floating-point decision in the past. Today, though, selecting either type of DSP depends mainly on whether the added computational capabilities
of the floating-point format are required by the application.
SPRY061
SPRY061
Floating-point accuracy
provide visibility into code execution. The advantage of implementing real arithmetic
directly in floating-point hardware still remains; but today advanced mathematical modeling tools, comprehensive libraries of mathematical functions, and off-the-shelf algorithms reduce the difficulty of developing complex applicationswith or without real
numbersfor fixed-point devices. Overall, fixed-point DSPs still have an edge in cost
and floating-point DSPs in ease of use, but the edge has narrowed until these factors
should no longer be overriding in the design decision.
Floating-point accuracy
As the cost of floating-point DSPs has continued to fall, Tthe choice of using a fixed- or
floating-point DSP boils down to whether floating-point math is needed by the application data set. In general, designers need to resolve two questions: What degree of
accuracy is required by the data set? and How predictable is the data set?
The greater accuracy of the floating-point format results from three factors. First, the
24-bit word width in TI C67x floating-point DSPs yields greater precision than the
C62x 16-bit fixed-point word width, in integer as well as real values. Second, exponentiation vastly increases the dynamic range available for the application. A wide
dynamic range is important in dealing with extremely large data sets and with data sets
where the range cannot be easily predicted. Third, the internal representations of data
in floating-point DSPs are more exact than in fixed-point, ensuring greater accuracy in
end results.
The final point deserves some explanation. Three data word widths are important to
consider in the internal architecture of a DSP. The first is the I/O signal word width,
already discussed, which is 24 bits for C67x floating-point, 16 bits for C62x fixed-point,
and can be 8, 16, or 32 bits for C64x fixed-point DSPs. The second word width is
that of the coefficients used in multiplications. While fixed-point coefficients are 16 bits,
the same as the signal data in C62x DSPs, floating-point coefficients can be 24 bits or
53 bits of precision, depending whether single or double precision is used. The precision can be extended beyond the 24 and 53 bits in some cases when the exponent
can represent significant zeroes in the coefficient.
Finally, there is the word width for holding the intermediate products of iterated multiplyaccumulate (MAC) operations. For a single 16-bit by 16-bit multiplication, a 32-bit product would be needed, or a 48-bit product for a single 24-bit by 24-bit multiplication.
(Exponents have a separate data path and are not included in this discussion.)
However, iterated MACs require additional bits for overflow headroom. In C62x fixedpoint devices, this overflow headroom is 8 bits, making the total intermediate product
word width 40 bits (16 signal + 16 coefficient + 8 overflow). Integrating the same
SPRY061
Coefficient
Intermediate
result
fixed
16
16
40
C5x/C62x
fixed
16
16
40
C64x
fixed
8/16/32
16
40
C3x
floating
24 (mantissa)
24
32
C67x(SP)
floating
24 (mantissa)
24
24/53
C67x(DP)
floating
53
53
53
TI DSP(s)
Format
C25x
SPRY061
SPRY061
SPRY061
SPRY061
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,
enhancements, improvements, and other changes to its products and services at any time and to discontinue
any product or service without notice. Customers should obtain the latest relevant information before placing
orders and should verify that such information is current and complete. All products are sold subject to TIs terms
and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in
accordance with TIs standard warranty. Testing and other quality control techniques are used to the extent TI
deems necessary to support this warranty. Except where mandated by government requirements, testing of all
parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for
their products and applications using TI components. To minimize the risks associated with customer products
and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right,
copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process
in which TI products or services are used. Information published by TI regarding third-party products or services
does not constitute a license from TI to use such products or services or a warranty or endorsement thereof.
Use of such information may require a license from a third party under the patents or other intellectual property
of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction
of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for
such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that
product or service voids all express and any implied warranties for the associated TI product or service and
is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Following are URLs where you can obtain information on other Texas Instruments products and application
solutions:
Products
Applications
Amplifiers
amplifier.ti.com
Audio
www.ti.com/audio
Data Converters
dataconverter.ti.com
Automotive
www.ti.com/automotive
DSP
dsp.ti.com
Broadband
www.ti.com/broadband
Interface
interface.ti.com
Digital Control
www.ti.com/digitalcontrol
Logic
logic.ti.com
Military
www.ti.com/military
Power Mgmt
power.ti.com
Optical Networking
www.ti.com/opticalnetwork
Microcontrollers
microcontroller.ti.com
Security
www.ti.com/security
Telephony
www.ti.com/telephony
www.ti.com/video
Wireless
www.ti.com/wireless
Mailing Address:
Texas Instruments
Post Office Box 655303 Dallas, Texas 75265
Copyright 2004, Texas Instruments Incorporated
Outline
Fall 2016
Signals
Sampling
Discrete-Time System Properties
Lecture 3
http://www.ece.utexas.edu/~bevans/courses/realtime
3-2
Review
Review
Signals As Functions
Continuous-time x(t)
Analog amplitude
Discrete-time x[n]
n {...-3,-2,-1,0,1,2,3...}
Integer time index, e.g. n
Real or complex-valued
Digital amplitude
From discrete set of values
1
-1
Discrete Time
Review
Review
Unit Impulse
Mathematical idealism for
an instantaneous event
Dirac delta as generalized
function (a.k.a. functional)
Selected properties
Unit area:
Sifting
Unit Impulse
1
t
P (t ) =
rect
2
2
(t ) (t )dt = (0)
1
2
(t ) = lim P (t )
0
2
Area = lim
=1
0 2
(t ) dt = 1
(t )
g (t ) (t ) dt = g (0)
Other examples
(t ) e j t dt = 1
Scaling: (at ) dt = 1 if a 0
What about?
1
(t ) (t )dt = ?
What
about?
(t ) (t T )dt = ?
(1)
(t ) * x(t) =
3-5
x( ) (t ) d = x(t)
(t T ) * x(t) = x(t T )
By substitution of variables,
0
(t + T ) (t )dt = (T )
$ 1 t>0
&
d = % ? t = 0
(
)
&
' 0 t<0
t
= u(t)
L. B. Jackson, A correction to impulse invariance, IEEE Sig. Proc. Letters, Oct. 2000.
3-6
Review
Review
Systems
Let x(t), x1(t), and x2(t) be inputs to a continuoustime linear system and let y(t), y1(t), and y2(t) be
their corresponding outputs
A linear system satisfies
Quick test to identify
x(t)
T{}
y(t)
x[n]
T{}
y[n]
y[n] = T { x[n] }
y(t ) = T { x(t ) }
() dt
y(t)
y (t ) =
x(u ) du =
y(t)
() dt + C
t0
C0 =
t0
x(u ) du +
x(u ) du
t0
x(u ) du
t0
C0 is the initial
condition w/r
to observation
System at rest is necessary for linear and timeinvariant (LTI) properties to hold
Role of initial
conditions?
y(t ) = x(t T )
Linear? Time-invariant?
y(t)
y(t)
x(t)
a0
y(t)
y(t ) = a0 x(t )
a0
Linear? Time-invariant?
3-9
3 - 10
x(t T )
T
T
x(t )
a0
a1
y (t ) = am x(t m T )
aM 2
T
aM 1
m =0
y (t )
Linear? Time-invariant?
h ( t ) = am ( t m T )
m=0
Role of initial
conditions?
3 - 11
y(t)
cos(2 fc t)
Linear? Time-invariant?
Review
Review
[n]
Using a formula
n
-3
-2
-1
3 - 13
x[n]
z
a0
a1
aM 2
aM 1
y[n] = am x[n m]
m =0
Coefficients a0 a1aM-1
are impulse response:
3 - 14
d
()
dt
y(t)
d
{ f (t )}
dt
f (t ) f (t t )
= lim
t 0
t
y[n]
Linear? Time-invariant?
h[n] = am [n m]
m=0
f[n]
d
()
dt
y[n]
d
{ f (t )}
dt
t = nTs
f (nTs ) f (nTs Ts )
= lim
Ts 0
Ts
= f [n] f [n 1]
y (t ) =
y[n] = y (nTs ) =
Linear? Time-invariant?
Linear? Time-invariant?
M 1
Discrete time
Role of initial
conditions?
3 - 15
3 - 16
Outline
Fall 2016
Data conversion
Sampling
Aliasing
Bandpass sampling
Rolling shutter artifacts
Conclusion
Lecture 4
http://www.ece.utexas.edu/~bevans/courses/realtime
4-2
Data Conversion
Sampling - Review
Data Conversion
Analog-to-Digital Conversion
Lowpass filter has
Analog
stopband frequency
Lowpass
Filter
less than fs to reduce
aliasing at sampler output
(enforce sampling theorem)
Digital-to-Analog Conversion
Discrete-to-continuous
conversion could be as
simple as sample and hold
Lowpass filter has stopband
frequency less than fs to
reduce artificial high frequencies
Lecture 4
Lecture 8
Quantizer
Sampler at
sampling
rate of fs
f sampled (t )
f [n] = f (n Ts )
Lecture 7
Discrete to
Continuous
Conversion
Analog
Lowpass
Filter
Ts
t
Ts
f(t)
f sampled (t ) = f (t ) (t n Ts )
n =
fs
4-3
impulse train
Sampling - Review
Sampling - Review
Sampling Theorem
1
T (t ) = (t n Ts ) = (1 + 2 cos(s t ) + 2 cos(2 s t ) + . . . )
Ts
n =
g (t ) = f (t ) Ts (t ) =
1
( f (t ) + 2 f (t ) cos( s t ) + 2 f (t ) cos(2 s t ) + . . . )
Ts
Modulation
by cos(2 s t)
Modulation
by cos(s t)
F()
G()
-2fmax 2fmax
-2s
-s
2s
How to
recover
F()?
What happens
if fs = 2 fmax?
4-5
4-6
Sampling
Sampling
Sampling Theorem
Assumption
Continuous-time signal has
absolutely no frequency
content above fmax
Sampling time is exactly the
same between any two
samples
Sequence of numbers
obtained by sampling is
represented in exact
precision
Conversion of sequence to
continuous time is ideal
In Practice
link
link
4-7
4-8
Aliasing
Aliasing
Aliasing
Aliasing
Continuous-time
sinusoid
y[n] = y(Tsn)
= A cos(2(f0 + lfs)Tsn + )
= A cos(2f0Tsn + 2lfsTsn + )
= A cos(2f0Tsn + 2ln + )
= A cos(2f0Tsn + )
= x[n]
x(t) = A cos(2 f0 t + )
Sample at Ts = 1/fs
x[n] = x(Tsn) =
A cos(2 f0 Ts n + )
where l is an integer
Here, fsTs = 1
Since l is an integer,
cos(x + 2 l) = cos(x)
y[n] indistinguishable
from x[n]
4-9
Apparent
frequency (Hz)
4 - 10
Aliasing
Bandpass Sampling
Aliasing
Bandpass Sampling
fs = 2000 samples/s
1000
1000
2000
3000
4000
link
f2
f1
f1
f2
Sample at fs
Sampled Ideal Bandpass Spectrum
Practical issues
Sampling clock tolerance: fcenter = k fs
Effects of noise
f2
f1
f1
f2
Lowpass filter to
extract baseband
4 - 12
Bandpass Sampling
Upconversion method
Downconversion method
f
-fmax fmax
-fIF
-fs
fs
Sample
at fs
fIF
f2
f2 f1
f1
-fIF
f2
f1
fIF
4 - 13
Figure from tutorial by Forssen et al. at 2012 IEEE Conf. on Computer Vision & Pattern Recognition
Conclusion
video
video
Warped frame
Compensated using
gyroscope readings
(i.e. camera rotation)
and video features
Outline
Fall 2016
Convolution
Z-transforms
Lecture 5
http://www.ece.utexas.edu/~bevans/courses/realtime
Noise removal
x[n-1]
x[n]
h[0]
z-1
z-1
z-1
h[1]
h[2]
h[M-1]
Spectral shaping
Data conversion (lectures 10 and 11)
Channel equalization (slides 16-8 to 16-10)
Symbol timing recovery (slides 13-17 to 13-20 and slide 16-7)
Carrier frequency and phase recovery
5-3
y[n]
Discrete-time
convolution
5-4
Review
Review
y[n] = T {x[n]}
y[n] = T x[m] [n m]
m=
y[n] =
y[n] =
h[n]
Averaging filter
impulse response
x[m]T { [n m]}
m =
m =
m =
m =
h[m] x[n m]
LTI system
Characterized uniquely by its impulse response
Its output is convolution of input and impulse response
y[n] =
x[m] h[n m]
m =
1
2
Convolution Comparison
5-5
5-6
Review
Convolution Demos
Z-transform Definition
http://pages.jh.edu/~signals
Convolution applet to animate convolution of simple signals
and hand-sketched signals
Convolving two rectangular pulses of same width gives
triangle with width of twice the width of rectangular pulses
(see Appendix E in course reader for intermediate work)
x(t)
h(t)
y(t)
*
=
1
Ts
Ts
H ( z) =
Ts
2Ts
n =
h[n] z n
h[n] =
1
H ( z ) z n+1dz
2 j R
Ts
5-8
Review
Review
n =
n =0
[n] z n = [n] z n = 1
n =
h[n] = [n-1]
H (z ) =
[n 1] z
n =
= [n 1] z
=z
h[n] = an u[n]
H (z ) = a n u[n] z n
h[n] = [n]
n =1
a
= a n z n =
n =0
n = 0 z
1
a
=
if
<1
a
z
1
z
Region of Convergence
Im{z}
Entire
plane
Region of convergence
for summation: |z| > |a|
|z| > |a| is the complement
of a disk
Four possibilities (z = 0 is
special case that may or
may not be included)
Im{z}
Disk
Re{z}
Re{z}
Im{z}
Complement
of a disk
Im{z}
Re{z}
Intersection
of a disk and
complement
of a disk
Re{z}
5-9
Infinite extent sequence
5 - 10
Review
Continuous Time
Delay by T seconds
M 1
H ( z ) = h[n] z n = h[n] z n = h[0] + h[1] z 1 + ... + h[ M 1] z ( M 1)
n =
n =0
n =0
5 - 11
x(t)
y(t)
y(t ) = x(t T )
Impulse response
h(t ) = (t T )
Frequency response
H () = e j T
Discrete Time
Delay by 1 sample
x[n]
z 1
y[n]
y[n] = x[n 1]
Impulse response
h[n] = [n 1]
Frequency response
H ( ) = e j
| H () | = 1
| H ( ) | = 1
H () = T
H ( ) =
5 - 12
jt
e (
j
nm )
h[m] = e j n
m =
h[m] e
j m
= e j n H ( )
H()
Linear
phase
stopband
passband
delay( ) =
d
H ( ) = kdelay
d
( )
( )
2 H (e ) cos ( n + H (e ))
5 - 14
|H()|
p stop
cos( n)
5 - 13
-stop -p
( )
H (e ) cos( n + H (e ))
H e j e j n
h[n]
H e j e jH (e ) e j n + H e j e jH (e ) e j n =
Frequency Response
stopband
|H()|
Discrete-time
LTI system
H ( j) cos( t + H ( j))
j n
Output H (e j ) e j n + H (e j ) e j n = H * (e j ) e j n + H (e j ) e j n =
m =
x[n] * h[n]
H ( j) e j t
Continuous-time e
h (t )
LTI system
cos( t )
Frequency Response
5 - 15
forbidden
forbidden
1-p
Achtung!
forbidden
stop
pass
Passband
stop
Transition Stopband
band
p passband ripple
s stopband ripple
Red region
is forbidden
5 - 16
Input-output relationship
1
1
y[n] = x[n] + x[n 1]
2
2
x[n-1]
Frequency response
1 1
x[n]
H ( ) = + e j
2 2
1
1
1
1 j + j j
H ( ) = e 2 e 2 + e 2
2
1
j
H ( ) = cos e 2
2
h[1]
y[n]
5 - 17
n
2
1 1 j
e
2 2
1
1
1
1 j + j j
H ( ) = e 2 e 2 e 2
2
1
1
1
j
j j
j
H ( ) = sin j e 2 = sin e 2 e 2 = sin e 2 2
2
2
2
5 - 18
n
-1
h[n]
1
1
h[n] = [n] [n 1]
2
2
H ( ) =
First-order difference
Frequency response
z-1
h[0]
h[n]
1
1
y[n] = x[n] x[n 1]
2
2
Impulse response
1
1
h[n] = [n] + [n 1]
2
2
Input-output relationship
Impulse response
5 - 19
Speech signals
Linear
phase response
phase distortion in speech
Need FIR filters
from that speaker
Realizable IIR filters
Used in speech compression
cannot achieve linear
in cell phones)
d = c t phase response over all
frequencies
5 - 21
5 - 22
5 - 23
M 1
m =
m =0
Outline
Fall 2016
Biquad structure
Direct form implementations
Stability
Z and Laplace transforms
Cascade of biquads
Analog and digital IIR filters
Quality factors
Conclusion
Lecture 6
http://www.ece.utexas.edu/~bevans/courses/realtime
6-2
1
h[n] = u[n]
2
1
1
1
1
H ( z ) = z n = z 1 = 1 + z 1 + . . . =
1
2
n = 0 2
n = 0 2
1 z 1
2
1
X ( z)
1
1 z 1
2
1
Y ( z ) z 1 Y ( z ) = X ( z )
2
Y ( z) =
1
y[n 1] = x[n]
2
1
y[n] = y[n 1] + x[n]
2
y[n]
6-3
Difference equation
y[n] =
1
1
y[n 1] + y[n 2] + x[n]
2
8
Recursive computation
needs y[-1] and y[-2]
For the filter to be LTI,
y[-1] = 0 and y[-2] = 0
Transfer function
Assumes LTI system
1 1
1
z Y ( z ) + z 2Y ( z ) + X ( z )
2
8
Y ( z)
1
H ( z) =
=
X ( z ) 1 1 z 1 1 z 2
2
8
Y ( z) =
Block diagram
representation
x[n]
y[n]
Unit
Delay
1/2
y[n-1]
Unit
Delay
1/8
y[n-2]
6-4
v[n]
a1
a2
Unit
Delay
v[n-1]
Unit
Delay
v[n-2]
b0
b1
b2
Magnitude response
y[n]
Im(z)
H ( e j ) = C
X
X
Im(z)
code
O
X
Re(z)
Re(z)
X
O
X
O
Demonstrations
(e
(e
)(
)(
)
)
z0 e j z1
p0 e j p1
e j z0 e j z1
e j p0 e j p1
lowpass
highpass
bandpass
Re(z)
bandstop
allpass
notch?
6-6
code
(z z0 )(z z1 )
(z p0 )(z p1 )
H (e j ) = C
Im(z)
code
O
O
Y ( z ) V ( z ) Y ( z ) b0 + b1 z 1 + b2 z 2
=
=
X ( z ) X ( z ) V ( z ) 1 a1 z 1 a2 z 2
H ( z) = C
H ( z) =
link
6-7
Y ( z ) B( z ) b0 + b1 z 1 + ... + bN z N
=
=
X ( z ) A( z ) 1 a1 z 1 aM z M
M
N
Y ( z ) 1 am z m = X ( z ) bk z k
k =0
m=1
y[n]
b0
Unit
Delay
Unit
Delay
b1
x[n-1]
a1
Unit
Delay
y[n-1]
a2
Feedforward
X ( z ) B( z )
X ( z)
= V ( z ) B( z ) where V ( z ) =
A( z )
A( z )
y[n-2]
aM
y[n m]
Full Precision
Wordlength of
y[0] is 2 words.
Wordlength of
y[n] increases
with n for n > 0.
Unit
Delay
bN
m =1
Feedback
Unit
Delay
x[n-N]
k =0
Unit
Delay
b2
x[n-2]
y[n] = bk x[n k ] +
M and N may
6-9
be different
y[n-M]
y[n] = bk v[n k ]
k =0
6 - 10
Review
v[n]
a1
a2
Unit
Delay
v[n-1]
Unit
Delay
v[n-2]
Feedback
aM
Unit
Delay
v[n-M]
b0
y[n]
M
b1
y[n] = bk v[n k ]
k =0
b2
Feedforward
bN
Full Precision
Wordlength of y[0] is
2 words and wordlength
of v[0] is 1 word.
Wordlength of v[n] and
y[n] increases with n.
M=2 yields
a biquad
M and N may
6 - 11
be different
Stability
A discrete-time LTI system is bounded-input
bounded-output (BIBO) stable if for any bounded
input x[n] such that | x[n] | B1 < , then the filter
response y[n] is also bounded | y[n] | B2 <
Proposition: A discrete-time filter with an impulse
response of h[n] is BIBO stable if and only if
| h[n] | <
n =
handout
Review
BIBO Stability
6 - 13
max = 1 f max =
1
1
fs >
2
Im{z}
Let fs = 1 Hz
-1
Re{s}
Re{z}
-1
Laplace Domain
Z Domain
Left-hand plane
Inside unit circle
Imaginary axis
Unit circle
Right-hand plane Outside unit circle
lowpass, highpass
bandpass, bandstop
allpass or notch?
6 - 14
Im{s}
s = j 2 f
a2 + b2
2a
(1 + r 2 ) 2 y 2
1
where
Q<
2 (1 r 2 )
2
Filter design/analysis
FIR filter equiripple
Also called Remez Exchange or
Lowpass filter design
Parks-McClellan design
specification (all demos)
Design Method
Passband
Stopband
Butterworth
Monotonic
Monotonic
Chebyshev type I
Monotonic
Ripples
Chebyshev type II
Ripples
Monotonic
Elliptical
Ripples
Ripples
Implementation
Filter of order n will have n/2 conjugate poles if n is even OR
one real root and (n-1)/2 conjugate poles if n is odd
Cascade biquads from input to output in order of ascending
quality factors (first-order section has lowest quality factor)
For each biquad, choose conjugate zeros closest to pole pair
6 - 17
fpass = 9600 Hz
fstop = 12000 Hz
fsampling = 48000 Hz
Apass = 1 dB
Astop = 80 dB
Minimum order is 50
Change Wstop to 80
Order 100 gives Astop 100 dB
Order 200 gives Astop 175 dB
Order 300 does not converge
how to get higher order filter?
Conclusion
FIR Filters
IIR Filters
Implementation
complexity (1)
Higher
Lower (sometimes by
factor of four)
Minimum order
design
Parks-McClellan (Remez
exchange) algorithm (2)
Always
If impulse response is
symmetric or antisymmetric about midpoint
Stable?
Linear phase
6 - 21
Conclusion
Conclusion
Outline
Lecture 7
Discrete-to-continuous conversion
Interpolation
Pulse shapes
Rectangular
Triangular
Sinc
Raised cosine
http://www.ece.utexas.edu/~bevans/courses/realtime
7-2
Data Conversion
Data Conversion
Analog-to-Digital Conversion
Lowpass filter has
Analog
stopband frequency
Lowpass
Filter
less than fs to reduce
aliasing at sampler output
(enforce sampling theorem)
Digital-to-Analog Conversion
Discrete-to-continuous
conversion could be as
simple as sample and hold
Lowpass filter has stopband
frequency less than fs to
reduce artificial high frequencies
Lecture 4
Discrete-to-Continuous Conversion
Lecture 8
Quantizer
Sampler at
sampling
rate of fs
y[n]
If f0 < fs , then
y[n] = A cos(2 f 0 Ts n + )
Lecture 7
Discrete to
Continuous
Conversion
Analog
Lowpass
Filter
would be converted to
~
y (t ) = A cos(2 f t + )
3
1
~
y (t )
fs
7-3
7-4
Discrete-to-Continuous Conversion
General form of interpolation is sum of weighted
pulses
~
y (t ) =
y[n] p(t Ts n)
n =
f(x)
0
1
0.0
1.0
2
3
4.0
9.0
7-5
x
0
sin (x )
x
How to compute sinc(0)?
sinc (x ) =
sinc(x) 1
P( f ) = Ts sinc ( f Ts ) = Ts
Sinc Function
Zero-order hold
7-6
Rectangular Pulse
t 1 if 1 Ts < t 1 Ts
p(t ) = rect =
2
2
Ts 0
otherwise
~
f ( x)
p(t)
1
- Ts
Ts
sin( f Ts )
sin (x )
where sinc ( x) =
f Ts
x
x
-3
-2
As x 0, numerator and
denominator are both going
to 0. How to handle it?
7-8
Triangular Pulse
Sinc Pulse
Linear interpolation
p (t ) = sinc
Ts
1
-Ts
Ts
Overlap between p(t) and its adjacent pulses p(t - Ts) and
p(t + Ts) but with no others
Fourier transform is
P( f ) = Ts sinc 2 ( f Ts )
sin
Ts
Ts
P( f ) =
f
1
rect
Ts
Ts
W=
1
2 Ts
T 1 16 2 W 2 t 2
s
W is bandwidth of an
ideal lowpass response
[0, 1] rolloff factor
Zero crossings at
t = Ts , 2 Ts ,
t =
if 0 | f |< f1
2W
(
)
1
|
f
|
1 sin
if f1 | f | < 2W f1
P( f ) =
2 W 2 f1
4W
0
otherwise
W=
1
2 Ts
= 1
f1
W
7 - 12
http://www.ece.gatech.edu/research/DSP/DSPFirstCD/
~
y (t ) =
y[n] p(t T
n)
n =
s[n]
Interpolation
7 - 14
r[n]
Conclusion
Discrete-to-continuous time conversion involves
interpolating between known discrete-time samples
y[n]
y[n] using pulse shape p(t)
FIR
Filter
6
Upsampling
Upsampling by L
48000 Hz
x[n]
+
r[n]
8000 Hz
7 - 13
Audio Demonstration
Analog to
Digital
Converter
FIR
Filter
y[n]
~
y (t ) =
y[n] p(t T
n =
n)
3
1
~
y (t )
Outline
Fall 2016
Introduction
Quantization
Lecture 8
http://www.ece.utexas.edu/~bevans/courses/realtime
8-2
Resolution
Data Conversion
Analog-to-Digital Conversion
Human eyes
Sample received light on 2-D grid
Photoreceptor density in retina
falls off exponentially away
from fovea (point of focus)
Respond logarithmically to
intensity (amplitude) of light
Human ears
Foveated grid:
point of focus in middle
Lecture 4
Lecture 8
Quantizer
Sampler at
sampling
rate of fs
8-4
Q[x]
1
-2
1
-2
1 ( 2) 3
= =1
22 1 3
Q[x]
1
-2
x
-1
Signal Power
Noise Power
= 10 log10 Signal Power
SNR dB = 10 log10
Quantizer
8-5
Dynamic Range
Signal-to-noise ratio in dB
Analog
Lowpass
Filter
8-6
Why 10 log10 ?
For amplitude A,
|A|dB = 20 log10 |A|
With power P |A|2 ,
PdB = 10 log10 |A|2
PdB = 20 log10 |A|
8-7
Anechoic room 10 dB
Whisper 30 dB
Rainfall 50 dB
Dishwasher 60 dB
City Traffic 85 dB
Leaf Blower 110 dB
Siren 120 dB
Slide by Dr. Thomas D.
Kite, Audio Precision
Signal-to-noise ratio
(SNR) derivation
Quantize to B bits
QB[ ]
Quantization error
q = QB [m] m = v m
Assumptions
m (-mmax, mmax)
Uniform midrise quantizer
Input does not overload
quantizer
Quantization error (noise)
is uniformly distributed
Number of quantization
levels L = 2B is large
enough
1
1
so that
L 1 L
Pn ( f ) = F { Rn ( ) }
Fourier transform may not exist, but power spectrum exists
Rn ( ) = E{ n(t ) n* (t + ) }= n(t ) n* (t + ) dt
time-averaged
{
{
}
}
Rn ( ) = E n(t ) n* (t ) = n(t ) n* (t ) dt = n( ) * n* ( )
approximate
noise floor
8 - 11
Autocorrelation of x(t)
Rx ( ) = x( ) * x* ( )
Maximum value (when it
exists) is at Rx(0)
Rx() is even symmetric,
i.e. Rx() = Rx(-)
X ( f ) X * ( f ) = F x( ) * x* ( )
8-9
x(t)
1
0
Rx()
-Ts
Ts
Ts
Ts
8 - 10
2 mmax 2 mmax
L 1
L
Quantization error
q
2
2
q is sample of zero-mean
random process Q
q is uniformly distributed
Q2 = E{Q 2 } Q2
zero
Q2 =
1 2 2 B
= mmax 2
12 3
SNR exponential in B
Adding 1 bit increases SNR
by factor of 4
Derivation of SNR in
deciBels on next slide
8 - 12
Loose
upper
3Paverage,m 2 B
bound
2
10 log10 SNR =
10 log10
2
mmax
Example
System is ADC
Calibrated DAC
Signal is x(t)
Noise is n(t)
x(t)
D/A
Converter
A/D
Converter
1 kHz
n(t)
fs
Delay
Conclusion
Amplitude quantization approximates its input by
a discrete amplitude taken from finite set of values
Loose upper bound in signal-to-noise ratio of a
uniform amplitude quantizer with output of B bits
Best case: 6 dB of SNR gained for each bit added to quantizer
Key limitation: assumes large number of levels L = 2B
Optional
Optional
Handling Overflow
Standard twos
complement
behavior
8 - 17
Optional
V0 + (v V0 )
for v > V0
A( v ) =
v
for V0 v V0
V (V v )1 / 3
for v < V0
0
0
for v > V0
V0
D(v ) = v for V0 v V0
V
for v < V0
0
Outline
INTRODUCTION TO
THE TMS320C6000
VLIW DSP
Accumulator architecture
Memory-register architecture
Load-store architecture
Pipelining
Conclusion
Program RAM
or Cache
Data RAM
Addr
Internal Buses
DMA
Data
.D2
.M1
.M2
.L1
.L2
.S1
.S2
Regs (B0-B15)
Regs (A0-A15)
External
Memory
-Sync
-Async
.D1
Serial Port
Boot Load
Timers
Control Regs
Pwr Down
C6200 fixed point
C6400 fixed point
C6700 floating point
Host Port
CPU
9-4
.M multiplication unit
Data path 2 (1) can read one A (B) register per instruction
cycle with one-cycle latency
.S shifter unit
.D data unit
Load/store to memory
9-6
FIR Filter
i 0
x(n)
-1
z
2
-1
Tapped
delay line
z-1
y(n)
FIR Filter
z-1
z-1
Y a (n ) x(n )
Fetching coefficient
n 1
Fetching operand
Multiplying two numbers
Accumulating multiplication result
9-10
Coefficients a(n)
Prologue
Initialize pointers: A5 for a(n), A6 for x(n), and A7 for Y
Move number of times to loop (N) into A2
Inner loop
Put a(n) into A0 and x(n) into A1
Multiply a(n) and x(n)
Accumulate multiplication result into A4
Decrement loop counter (A2)
Continue inner loop if counter is not zero
Epilogue
Store the result into Y
Assuming
coefficients &
data are 16
bits wide
Data x(n)
Reg Mea n in g
A0
A1
a(n )
x(n )
A2
A3
N -n
a(n ) x(n )
A4
A5
A6
A7
Y
&a
&x
&Y
9-11
; clear A4
MVK
loop
LDH
LDH
MPY
ADD
SUB
[A2]
B
STH
and initialize
.S1 40,A2
.D1 *A5++,A0
.D1 *A6++,A1
.M1 A0,A1,A3
.L1 A3,A4,A4
.L1 A2,1,A2
.S1 loop
.D1 A4,*A7
A0
A1
a(n)
x(n)
A2
A3
N-n
a(n) x(n)
A4
Y
A5
&a
A6
&x
A7
&Y
pointers A5, A6, and A7
; A2 = 40 (loop counter)
; A0 = a(n), H = halfword
; A1 = x(n), H = halfword
; A3 = a(n) * x(n)
; Y = Y + A3
; decrement loop counter
; if A2 != 0, then branch
; *A7 = Y
9-12
Pipelining
MoVeKonstant
Decode instruction
Conditional branch
[condition] B .S loop
sequential implementation
Separate parallel functional units
Loading registers
9-13
9-14
Pipelining
TMS320C6000 Pipeline
Read
Only A1, A2, B0, B1, and B2 can be used (not symmetric)
CPU operations
MVK .S 40,A2 ; A2 = 40
Deep pipeline
Execute
Read
Execute
Managing Pipelines
compiler or programmer
(TMS320C6000)
Fetch
Decode Read
Superpipelined
Execute
(TMS320C6000)
pipeline interlocking
in processor (TMS320C30)
hardware instruction
scheduling
Fetch
Decode
Execute
9-15
9-16
FR
DP
C6000
Memory
Memory
FG
FS
DC
C6000
FW
FS
FG
FW
9-17
Execute
Phase
Description
Single cycle
Multiply
Load
Branch
# Instr
38
2
3
1
; clear A4
MVK
loop
LDH
LDH
MPY
ADD
SUB
[A2]
B
STH
0
1
4
5
Description
E1
E2
Multiplication has a
delay of 1 cycle
E3
E4
E5
E6
9-18
Load has a
delay of four cycles
pipeline
9-20
Fetch packet
F
DP
DC
E1
E2
E3
Dispatch
E4
E5
E6
MVK
LDH
LDH
MPY
ADD
SUB
B
STH
DP
F(2-5)
DC
E1
E2
E3
E4
E5
E6
MVK
LDH
LDH
MPY
ADD
SUB
B
STH
(F1-4)
9-21
Decode
F
DP
DC
E1
E2
Execute (E1)
E3
E4
E5
E6
DP
DC
MVK
F(2-5)
E1
E2
E3
E4
E5
E6
MVK
LDH
LDH
MPY
ADD
SUB
B
STH
9-22
LDH
F(2-5)
9-23
LDH
MPY
ADD
SUB
B
STH
9-24
DP
DC
E1
E2
E3
E4
E6
MVK Done
LDH
LDH
F(2-5)
MPY
ADD
SUB
B
STH
; clear A4
MVK
loop
LDH
LDH
NOP
MPY
NOP
ADD
SUB
[A2]
B
NOP
STH
A3,A4,A4
A2,1,A2
loop
; Y = Y + A3
; decrement loop counter
; if A2 != 0, then branch
A4,*A7
; *A7 = Y
9-25
Prologue
16-bit data/
coefficients
Inner loop
Put a(n) and a(n+1) in A0 and
x(n) and x(n+1) in A1 (packed data)
Multiply a(n) x(n) and a(n+1) x(n+1)
Accumulate even (odd) indexed
terms in A4 (B4)
Decrement loop counter (A2)
Store result
Reg Meaning
A0
B1
a(n) ||a(n+1)
x(n) || x(n+1)
A2
A3
B3
A4
B4
A5
B6
A7
(N n)/2
a(n) x(n)
a(n+1) x(n+1)
yeven(n)
yodd(n)
&a
&x
&Y
9-26
9-28
Conclusion
Conclusion
Web resources
comp.dsp news group: FAQ
www.bdti.com/faq/dsp_faq.html
References
R. Bhargava, R. Radhakrishnan, B. L. Evans, and L. K. John,
Evaluating MMX Technology Using DSP and Multimedia
Applications, Proc. IEEE Sym. Microarchitecture, pp. 37-46,
1998.http://www.ece.utexas.edu/~ravib/mmxdsp/
B. L. Evans, EE345S Real-Time DSP Laboratory, UT Austin.
http://www.ece.utexas.edu/~bevans/courses/realtime/
B. L. Evans, EE382C Embedded Software Systems, UT
Austin.http://www.ece.utexas.edu/~bevans/courses/ee382c/
9-29
9-30
Supplemental Slides
Supplemental Slides
Coefficients
Data
C6200
S140
8
2
6
-8
8
8
256
16
4
4
8
6 + branch
11
2
128
Total instructions
48
180
Number of registers
Register size (bits)
32
32
51
40
32 or 40
40
7-11
9-32
Image Halftoning
Fall 2016
Data Conversion
Slides by Prof. Brian L. Evans, Dept. of ECE, UT Austin, and
Dr. Thomas D. Kite, Audio Precision, Beaverton, OR
tomk@audioprecision.com
Dr. Ming Ding, when he was at the Dept. of ECE, UT Austin,
converted slides by Dr. Kite to PowerPoint format
Some figures are from Ken C. Pohlmann, Principles of Digital
Audio, McGraw-Hill, 1995.
Lecture 10
No noise
shaping
No noise
shaping
10 - 2
Image Halftoning
Error Diffusion
FM Halftoning 1975
Blue-noise Mask
FM Halftoning 1993
Green-noise Halftoning
AM-FM Halftoning 1992
10 - 4
x(m)
Error Diffusion
Halftone
current pixel
threshold
u(m)
b(m)
7/16
_
h(m )
Thresholds =
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
, , , , , , , , , , , , , , , * 256
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
10 - 5
e(m)
shape
compute
error (noise) error (noise)
Spectrum
weights
10 - 6
Analog
Lowpass
Filter
Quantizer
Sampler at
sampling
rate of fs
D/A Converter
Lowpass filter has
stopband frequency
of fs or less
Discrete-to-continuous
conversion could be as
simple as sample and hold
Discrete to
Continuous
Conversion
Analog
Lowpass
Filter
fs
10 - 7
Pohlmann Fig. 3-5 Two examples of passive Chebyshev lowpass filters and their
frequency responses. A. A passive low-order filter schematic. B. Low-order filter
frequency response. C. Attenuation to -90 dB is obtained by adding sections to
10 - 8
increase the filters order. D. Steepness of slope and depth of attenuation are improved.
Solutions
Oversampling eases analog filter design
Also creates spectrum to put noise at inaudible frequencies
10 - 9
Solution 1: Oversampling
Oversampling
Quantization
Additive dither
Noise shaping
Dynamic range
64x
8 bits
2-bit PDF
5th / 7th order
110 dB
256x
6 bits
2-bit PDF
5th / 7th order
120 dB
512x
5 bits
2-bit PDF
5th / 7th order
120 dB 10 - 10
Pohlmann Fig. 2-8 Adding dither at quantizer input alleviates effects of quantization error.
A. An undithered input signal with amplitude on the order of one LSB.
B. Quantization results in a coarse coding over two levels. C. Dithered input signal.
10 - 12
D. Quantization yields a PWM waveform that codes information below the LSB.
10 - 13
We have a two-bit DAC and four-bit input signal words. Both are unsigned.
4
To
DAC
1 sample
delay
Adder Inputs
Upper Lower
1001
00
1001
01
1001
10
1001
11
Output
Sum to DAC
1001 10
1010 10
1011 10
1100 11
Periodic
added
noise
x(t)
12 dB
(2 bits)
Sample
and hold
x[m]
+
_
v[m]
M fs
b[m]
FIR
Filter
quantizer
If signal is in
this band, you are
better off!
dithered
Pohlmann Fig. 2-9 Dither permits encoding of information below the least significant bit.
Input
signal
words
undithered
dithered
_
h[m]
e[m]
+
10 - 16
Solutions
Fall 2016
Data Conversion
Lecture 11
16 bits
FIR Filter
176.4 kHz
28 bits
176.4 kHz
Upsampling by 4 (denoted by 4)
For each input sample, output the input
sample followed by three zeros
Four times the samples on output as input
Increases sampling rate by factor of 4
64x
8 bits
2-bit PDF
5th / 7th order
110 dB
256x
6 bits
2-bit PDF
5th / 7th order
120 dB
512x
5 bits
2-bit PDF
5th / 7th order
120 dB 11 - 2
Input to Upsampler by 4
Output of Upsampler by 4
176 kHz
1 2 3 4 5 6 7 8
Output of FIR Filter
1 2 3 4 5 6 7 8
Pohlmann Fig. 4-17 Noise shaping following oversampling decreases in-band quantization
error. A. Simple noise-shaping loop. B. Noise shaping suppresses noise in the audio band;
boosted noise outside the audio band is filtered out.
11 - 4
Pohlmann Fig. 16-4 With 1-bit conversion, quantization noise is quite high.
In-band noise is reduced with oversampling. With noise shaping, quantization
noise is shifted away from the audio band, further reducing in-band noise.
Pohlmann Fig. 16- 6 Higher orders of noise shaping result
in more pronounced shifts in requantization noise.
11 - 5
Continuous time:
1
s
1
1 z 1
1
Y ( z ) = ( X ( z ) Y ( z ))
+ N ( z)
1 z 1
Discrete time:
X ( s) Y ( s)
+ N ( s)
s
1
s
Y ( s) =
X ( s) +
N ( s)
s +1
s +1
Y ( s) =
signal transfer
function (STF)
Y ( z) =
noise transfer
function (NTF)
STF
NTF
1
Highpass
1
1 1 z 1
2
X ( z) +
N( z )
1 1
2 1 1 z 1
1 z
2
2
signal transfer
function (STF)
Lowpass
1
Lowpass
Bs (z )
K
=
X ( z ) 1 + (K 1) H (z )
u(m)
noise transfer
function (NTF)
Highpass
Higher-order modulators
Add more integrators
Stability is a major issue
11 - 7
11 - 6
NTF =
Q[]
b(m)
Bn (z )
= 1 H ( z)
N ( z)
K us(m)
us(m)
K
n(m)
un(m)
Signal Path
un(m) + n(m)
Noise Path
11 - 8
11 - 10
11 - 11
Audio-Only DVDs
Sampling rate of 96 kHz with resolution of 24 bits
11 - 13
11 - 14
Review
Fall 2016
Information sources
Channel Impairments
Transmitter
m(t)
Lecture 12
baseband
Signal
Processing
TRANSMITTER
http://www.ece.utexas.edu/~bevans/courses/realtime
bandpass
Carrier
Circuits
bandpass
Transmission
Medium
s(t)
CHANNEL
baseband
Carrier
Circuits
r(t)
baseband
Signal
Processing m (t )
RECEIVER
12 - 2
Review
Communication Channel
Transmission medium
y0 (t )
x0 (t )
input
b
t
x(t)
-A
baseband
m(t)
baseband
Signal
Processing
bandpass
Carrier
Circuits
TRANSMITTER
bandpass
Transmission
Medium
s(t)
CHANNEL
baseband
Carrier
Circuits
r(t)
baseband
Signal
Processing m (t )
x1 (t )
A
RECEIVER
12 - 3
Bit of 0 or 1
output
Communication
Channel
Model channel as
LTI system with
impulse response
h(t)
y(t)
-A Th
y1 (t )
h (t )
h+b
A Th
h+b
12 - 4
fc = 1;
Tc = 1 / fc;
fs = 100*fc;
Ts = 1/fs;
t = Ts : Ts : Tc;
numPeriods = 10;
figure;
hold on;
for i = 1 : numPeriods
phase = 0.05*randn(1, length(t));
plot(t, cos(2*pi*fc*t + phase));
pause(1);
end
hold off;
12 - 5
EN S
O PERATION
-75
x 10
-80
6
4
frq-drift
frq-drift
Power/frequency (dB/Hz)
+
Vm
-
interference envelope
Nonlinear effects
Magnetron
-85
-90
-95
-100
-105
-110
-115
-120
-125
0
10
20
30
40
50
60
70
80
90
Frequency (kHz)
12 - 8
Fig. 4. Spectrogram of oven RFI in the 2.4GHz band. This shows how the
TF D and TM parameters for channel 11 relate to the same parameters in
Fig. 3.
-75
-75
-80
-80
Power/frequency (dB/Hz)
Power/frequency (dB/Hz)
-85
-90
-95
-100
-105
-110
-115
Spectrally-Shaped
Background Noise
-120
-125
0
10
20
30
40
Narrowband Interference
-85
-90
-95
-100
-105
-110
-115
Spectrally-Shaped
Background Noise
-120
50
60
70
80
-125
0
90
10
20
Frequency (kHz)
12 - 9
Periodic and
Asynchronous
Interference
-75
Power/frequency (dB/Hz)
40
50
60
70
80
90
Frequency (kHz)
-80
30
Narrowband Interference
-85
12 - 10
-90
-95
-100
-105
-110
-115
Spectrally-Shaped
Background Noise
-120
-125
0
10
20
30
40
a0
50
60
70
80
Frequency (kHz)
FIR
90
noise
12 - 11
12 - 12
Optional
Optional
Analog PAM
Transmitted
signal
p(t)
m(0)
h(t)
s (t ) =
m(T
n =
h(t ) = 1 / 2 for t = 0, t = T
0
otherwise
m(t)
m(Ts)
t
Ts T+Ts 2Ts
Analog PAM
n) ( (t Ts n) * h(t ) )
n =
= m(Ts n) (t Ts n) * h(t )
n =
msampled(t)
Fourier transform
S( f ) =
=
M sampled ( f ) H ( f )
fs
M( f f
k) H ( f )
k =
H ( f ) = T sinc( f T ) e j 2
= T sinc( f T ) e
f T /2
j f T
Equalization of sample
and hold distortion
added in transmitter
H(f) causes amplitude
distortion and delay of T/2
Equalize amplitude
distortion by post-filtering
with magnitude response
1
1
f
=
=
H ( f ) T sinc( f T ) sin( f T )
Negligible distortion
(less than 0.5%) if
T
0.1
Ts
12 - 15
As T 0,
1
h(t ) (t )
T
Ts T+Ts 2Ts
Analog PAM
n =
m(T
t
T
Optional
Optional
Transmitted signal
s (t ) =
m(T n) h(t T n)
12 - 13
hold
n) h(t Ts n)
sample
12 - 14
Outline
Fall 2016
Introduction
Pulse shaping
Pulse shaping filter bank
Lecture 13
Design tradeoffs
FIR 1
http://www.ece.utexas.edu/~bevans/courses/realtime
FIR L-1
Introduction
input
output
01
3d
00
10
-d
11
-3 d
Serial/
Parallel
bit
stream
Map to PAM
constellation
J bits per
symbol
an
Impulse
modulator
symbol
amplitude
impulse
train
13 - 2
Pulse Shaping
FIR 0
Symbol recovery
4-PAM
Constellation
Map
Pulse
shaper
gTsym(t) s*(t)
baseband
waveform
(t k Tsym )
k =
k is a symbol index
13 - 3
s * (t ) =
Serial/
Parallel
bit
stream
Map to PAM
constellation
J bits per
symbol
an
Impulse
modulator
symbol
amplitude
impulse
train
Pulse
shaper
gTsym(t) s*(t)
baseband
waveform
13 - 4
2-PAM Transmission
PAM Transmission
Transmitted
signal
s * (t ) =
gTsym (t k Tsym )
k =
s *[ Ln + m] =
k =
1
Serial/
Parallel
bit
stream
Map to PAM
constellation
an
Impulse
modulator
symbol
amplitude
J bits per
symbol
impulse
train
Pulse
shaper
gTsym(t) s*(t)
baseband
waveform
13 - 5
gTsym[m]
sampling
rate
D/A
sampling
rate
s*(t)
cont.
time
Serial/
Parallel
bit
stream
gTsym [ L (n k ) + m]
Map to PAM
constellation
J bits per
symbol
an
symbol
amplitude
Pulse
shaper
gTsym[m]
impulse
train
D/A
s*(t)
baseband
waveform
baseband
waveform
Transmit
Filter
16 bits
44.1 kHz
cont.
time
16 bits
FIR Filter
176.4 kHz
Input to Upsampler by 4
28 bits
176.4 kHz
Output of Upsampler by 4
Upsampling by 4 (denoted by 4)
Upsampling by L denoted as L
0 1 2 3 4 5 6 7 8
Output of FIR Filter
0 1 2 3 4 5 6 7 8
encoding
a2a1a0
s[0] = a0 g[0]
s[1] = a0 g[1]
s[2] = a0 g[2]
s[3] = a0 g[3]
L polyphase filters
000a1000a0
x[m]
s[m]
,s[6],s[2]
{g[2],g[6]}
,s[7],s[3]
{g[3],g[7]}
s[m]
Commutator
(Periodic)
s [ L n + m] =
k =n2
gTsym [ L (n k ) + m]
Filter
Bank
13 - 9
m
m
n +3
k =n 2
m = 0, 1,..., L 1
symbol
rate
m = 0, 1,..., L 1
n+3
s* nTsym + Tsym = ak gT ,m [n k ]
L
k =n2
gTsym[m]
sampling
rate
Transmit
Filter
D/A
sampling
rate
cont.
time
cont.
time
an
m=0
,s[5],s[1]
{g[1],g[5]}
g[m]
,s[4],s[0]
{g[0],g[4]}
,a1,a0
an
gTsym,1[n]
gTsym,L-1[n]
s(Ln+1)
D/A
Transmit
Filter
Filter Bank
Implementation
s(Ln+(L-1))
13 - 10
24 samples
in pulse
4 samples
per symbol
sym
13 - 11
13 - 12
24 samples
in pulse
gTsym,2[n]
24 samples
in pulse
4 samples
per symbol
4 samples
per symbol
x marks
samples of
polyphase
filter
x marks
samples of
polyphase
filter
13 - 13
13 - 14
24 samples
in pulse
4 samples
per symbol
Computation
in MACs/s
Direct
structure
(slide 13-7)
(L Ng)(L fsym)
Filter bank
structure
(slide 13-10)
L Ng fsym
Memory
size in
words
Memory
reads in
words/s
Memory
writes in
words/s
13 - 16
13 - 17
13 - 18
Optional
Optional
g1 (t kTsym )
k =
p(t ) = q 2 (t ) =
am g1 (t kTsym ) g1 (t mTsym )
k = m =
E{ p(t )} =
E{a
k = m =
2
2
1
k =
=a
x(t)
am } g1 (t kTsym ) g1 (t mTsym )
g (t kT
Receive
B()
sym
)
p(t)
BPF
H()
Squarer
q(t)
g1(t) is
deterministic
q2(t)
PLL
z(t)
13 - 20
Optional
Optional
Fourier series
representation of E{ p(t) }
E{ p(t )} =
pk e
j k sym t
where
k =
1
Tsym
pk =
Tsym
E{ p(t )}e
j k sym t
dt
a2
Tsym
2
1
g (t )e
jk symt
dt =
a2
2 Tsym
G ( )G (k
1
sym
)d
Receive
B()
G ( )G (k
1
q2(t)
sym
)d
jk symt
=e
j symt
+e
j symt
= 2 cos( symt )
PLL
z(t)
E{z (t )} = Z k e
k
BPF
H()
Squarer
q(t)
a2
2Tsym
a2
Z k = pk H (k sym ) = H (k sym )
G1 ( )G1 (k sym )d
2 Tsym
Choose H() to pass sym Zk = 0 except k = -1, 1
x(t)
13 - 21
Receive
B()
BPF
H()
Squarer
q(t)
q2(t)
PLL
z(t)
13 - 22
Outline
Fall 2016
Lecture 14
http://www.ece.utexas.edu/~bevans/courses/realtime
14 - 2
0 bit
input
b
t
x(t)
-A
x1 (t )
A
1 bit
Additive Noise
Channel
output
y(t)
x0 (t )
receive
0 bit
y0 (t )
0 bit
input
t
t
x(t)
-A
-A
x1 (t )
receive
1 bit
y1 (t )
A
b
b
t
14 - 3
1 bit
output
LTI
Channel
Model channel as
LTI system with
impulse response
c(t)
y(t)
y0 (t )
receive
0 bit
h+b
y1 (t )
receive
1 bit
h+b
-A Th
c(t )
A Th
x (t )
1 bit
-A Th
0 bit
1 bit
1 bit
0 bit
Intersymbol
interference
bi
bits
PAM
g(t)
Clock Tb
pulse
shaper
x(t)
c(t)
14 - 5
filter
N(0, N0/2)
Transmitter
Channel
t=iTb
bits
Threshold
Clock Tb
p
N
opt = 0 ln 0
Receiver
g (t k Tb )
1
0
Decision
Sample at Maker
w(t) matched
AWGN
0 bit
1 bit
0 bit
14 - 6
Matched Filter
y(t) y(ti)
h(t)
-A Th
h b
Disadvantages?
h+b
h
y (t )
h+b
h+b
2b
c(t )
x (t )
y (t )
4 ATb
p1
p0 is the
probability
bit 0 sent
x(t)
h(t)
Matched
filter
w(t)
Additive white Gaussian
noise (AWGN) with zero
mean and variance N0 /2
y(T)
y(t)
t=T
T is the
symbol
period
Power Spectra
T is the
symbol
period
| g 0 (T ) |2 instantaneous power
=
E{n 2 (t )}
average power
g(t)
x(t)
Pulse
signal
h(t)
Matched
filter
w(t)
y(T)
y(t)
t=T
{
{
}
}
Rn ( ) = E n(t ) n* (t ) = n(t ) n* (t ) dt = n( ) * n* ( )
spectrum in Matlab
N = 16384; % finite no. of samples
gaussianNoise = randn(N,1);
plot( abs(fft(gaussianNoise)) .^ 2 );
1
0
Rx()
Ts
Ts
-Ts
Ts
14 - 10
Rn ( ) = E{ n(t ) n* (t + ) }= n(t ) n* (t + ) dt
time-averaged
x(t)
14 - 9
Power Spectra
Autocorrelation of x(t)
Rx ( ) = x( ) * x* ( )
Maximum value (when it
exists) is at Rx(0)
Rx() is even symmetric,
i.e. Rx() = Rx(-)
approximate
noise floor
14 - 11
g(t)
x(t)
y(T)
y(t)
h(t)
Noise power
spectrum SW(f)
t=T
Pulse
signal
w(t)
Matched filter
E{ n 2 (t ) } = S N ( f ) df =
N0
2
S N ( f ) = SW ( f ) S H ( f ) =
N0
2
AWGN
2
| H ( f ) | df
Matched
filter
N0
| H ( f ) |2
2
Signal g0 (t ) = g (t ) * h(t )
G0 ( f ) = H ( f )G( f )
g 0 (t ) =
H ( f ) G( f ) e
| g 0 (T ) | = |
j 2 f t
df
H ( f ) G( f ) e
j 2 f T
df |
T is the
symbol
period
14 - 12
H ( f ) G( f ) e
j 2 f T
df |2
N0
2
| H ( f ) |
Schwartzs inequality
| H ( f ) G ( f ) e j 2 f T df |2
-
aT b
| a b | || a || || b || cos =
|| a || || b ||
For vectors:
For functions:
( x)
1
| G( f ) |
df
df
| H ( f ) G ( f ) e j 2 f T df |2 | H ( f ) |2 df
*
2
( x) dx
( x)
1
dx
( x)
N0
2
| H ( f ) |2 df
2
N0
| G( f ) |
df
T is the
symbol
period
dx
Matched Filter
2
| G ( f ) |2 df , which occurs when
N 0
H opt ( f ) = k G * ( f ) e j 2 f T k by Schwartz ' s inequality
max =
Hence, hopt (t ) = k g * (T t )
14 - 14
2E
2
2
max =
| G ( f ) |2 df =
| g (t ) |2 dt = b = SNR
N 0
N 0
N0
h(t) = ___
t=nT
T
14 - 16
PAM
Clock Tb
g(t)
x(t)
c(t)
y(t) y(ti)
AWGN
filter
N(0, N0/2)
Transmitter
Sample at Maker
t=iTb
w(t) matched
pulse
shaper
Channel
bits
Threshold
Clock Tb
p
N
opt = 0 ln 0
4 ATb
Receiver
1
0
Decision
h(t)
g (t k Tb )
p1
p0 is the
probability
bit 0 sent
14 - 17
intersymbol
interference (ISI)
p(t) is
centered
at origin
noise
14 - 18
1
,W < f < W
P( f ) = 2 W
0
, | f |> W
P( f ) =
s(t ) = ak (t k Tb )
k ,k i
1
f
rect (
)
2W
2W
1
P( f ) =
4W
1
0 | f | < f1
2W
(| f | W )
1 sin
f1 | f | < 2W f1
2W 2 f
0
2W f1 | f | 2W
= 1
f1
W
of bandwidth W for ideal Nyquist channel
Raised cosine pulse p(t ) = sinc t cos(2 2 W2 t )2 See slides
7-11 to 7-13
Ts 1 16 W t
has zero ISI when
Nyquist channel dampening adjusted by
sampled correctly idealimpulse
response rolloff factor
Let g(t) and h(t) be square root raised cosine pulses
14 - 19
14 - 20
h(t)
Matched
r (t ) = s(t ) + w(t )
Sample at
t = nT
Noise power
= E{ gT ( 1 ) w(nT 1 ) gT ( 2 ) w(nT 2 )d 1d 2 }
1
= 2 h 2 ( )d = 2
2
2 (12)
sym / 2
( )d =
sym / 2
Random variable
= A + vn
Tb = 1
PDF for vn /
vn
is Gaussian with
zero mean and
variance of one
rn
PDF for
N(0, 1)
A/
2
A
1 v2
v
A
P(error | s(nT ) = A) = P n > =
e dv = Q
A 2
14 - 22
A
v
P(error | s (nTb ) = A) = P( A + vn > 0) = P(vn > A) = P n >
w(t ) dt
n +1
T = Tsym
E v 2 (nT ) = E h( ) w(nT )d
b
r(t) = h(t) * r(t)
w(t)
filter
w(t) is AWGN with zero mean and variance 2
= A+
Filtered noise
v(nT ) = h( ) w(nT )d
Q Function
Q function
1 y2 / 2
Q( x) =
dy
e
2 x
P(error | s(nTb ) = A) = Q( A / )
Complementary error
function erfc
2 t 2
erfc( x) =
e dt
Erfc[x] in Mathematica
1
x
Q( x) = erfc
2
2
erfc(x) in Matlab
|G
2
n
( ) | d = E{a }
1
=
M
M
2
2
M l = M
i = +1
2
i
M
2
-d
-d
2
(d (2i 1) ) = ( M 1) d
3
i =1
2
14 - 26
4-PAM
Constellation points
with receiver
decision boundaries
1
2
sym / 2
sym
/2
N0
N
d = 0
2
2
-3 d
2-PAM
Q( )
14 - 25
1
= E{a }
2
A2
where, = SNR = 2
1 e 2
( )
Relationship
2
n
Tb = 1
SNR =
PSignal
PNoise
2( M 2 1) d 2
3
N0
14 - 27
levels in constellation
Error only if | vn |> d
where 2 = N 0 / 2
Probability of error is
d
P(| vn |> d ) = 2 Q
levels in constellation
d
P(vn > d ) = Q
14 - 28
Visualizing ISI
+
g (nTsym kTsym )
g (0)
k =
k =
k n
M 2
2 d 2( M 1) d
d
2 Q +
Q =
Q
M
M
M
M-2 interior points
2 exterior points
D ( M 1) d
k = , k n
PSignal
M 1 3
d2
2
Q 2
SNR since SNR =
=
M 2 1
M
PNoise 3 2
M 1
g (nTsym kTsym )
g (0)
= ( M 1) d
k = , k n
14 - 30
and troubleshooting
3d
Sampling instant
M=2
-d
t - Tsym
g (0)
14 - 29
Slope indicates
sensitivity to
timing error
g (kTsym )
t + Tsym
-3d
Due to
startup
transients.
Fix is to
discard first
few symbols
equal to
number of
symbol
periods in
pulse shape.
14 - 32
Introduction
Fall 2016
http://www.ece.utexas.edu/~bevans/courses/realtime
15 - 2
Review
Review
1
1
Y1 ( ) = X 1 ( + c ) + X 1 ( c )
2
2
- 1
X1( + c)
Y1()
j
j
X 2 ( + c ) X 2 ( c )
2
2
Assume x2(t) is an ideal lowpass signal with bandwidth 2
Assume 2 << c
Y2() is imaginary-valued if X2() is real-valued
X2()
X1( - c)
Y2 ( ) =
j X2( + c)
Baseband signal
- c - 1
-c
- c + 1
c - 1
Upconverted signal
c + 1
Y2()
- 2
Baseband signal
-j X2( - c)
c 2
- c 2
- c
c + 2
- c + 2
-j
Upconverted signal
i[n]
Index
Bits
1
Serial/
parallel
converter
q[n]
gT(t)
Pulse shapers
(FIR filters)
Map to 2-D
constellation
Impulse
modulator
Local
Oscillator
s(t)
Delay
+
90o
| H( f )|
-d
1
1
cos(2 f 0 t ) ( f + f 0 ) + ( f f 0 )
2
2
j
j
sin( 2 f 0 t ) ( f + f 0 ) ( f f 0 )
2
2
Magnitude Response
gT(t)
d
-d
H ( f )
4-level QAM
Constellation
90o
15 - 5
Hilbert Transformer
Continuous-time ideal
Hilbert transformer
H ( f ) = j sgn( f )
H ( ) = j sgn( )
h(t) =
h[n] =
0
if t = 0
h(t)
2 sin 2 (n / 2)
n
if n0
if n=0
h[n]
t
15 - 6
Discrete-time ideal
Hilbert transformer
1/( t) if t 0
-90o
n
Even-indexed
samples are
zero
15 - 7
Impulse
modulator
Index
Bits
1
Serial/
parallel
converter
q[n]
Impulse
modulator
i[n]
s(t)
Delay
Local
Oscillator
gT[m]
cos(0 m)
sin(0 m)
s(t)
D/A
gT[m]
d
-d
-3 d
4-level PAM
Matched filter has impulse response gr(t) Constellation
M 2
1
1
2( M 1) d
PI (e) +
PO (e) +
PO (e) =
Q
Tsym
M
M +
M
M
O-
-7d
-5d
-3d
-d
3d
5d
15 - 10
Decision error
for inner points
Decision error
for outer points
8-level PAM
Constellation
3d
15 - 9
P (e) =
gT(t)
Pulse shapers
(FIR filters)
q[n]
+
90o
s[m]
Index
Serial/
Map to 2-D
parallel
constellation
J
converter
L samples/symbol
(upsampling factor)
gT(t)
Pulse shapers
(FIR filters)
Map to 2-D
constellation
O+
7d
15 - 11
-d
-d
4-level QAM
Constellation
For error probability analysis, assume noise terms independent
and each term is Gaussian random variable ~ N(0; 2/Tsym)
In reality, noise terms have common source of additive noise in
channel
15 - 12
)(
( (
))( (
T)
d
= 1 2Q
Tsym
2Q(
))
1
2
16-QAM
d
d
= 1 Q
Tsym 1 2Q
Tsym
16-QAM
4
4
d
d
1 2Q
Tsym + 1 Q
Tsym
16
16
d
= 1 Q
Tsym
3d
T)
8
d
d
1 Q
Tsym 1 2Q
Tsym
16
d
9 d
= 1 3Q
Tsym + Q 2
Tsym
4
d
-d
-3 d
4-level PAM
Constellation
P(e) = 1 P(c) = 3Q
Tsym Q 2
Tsym
4
Q
d
-d
-d
4-level QAM
15 - 16
Constellation
Outline
Fall 2016
Introduction
Automatic gain control
Carrier detection
Channel equalization
Symbol clock recovery
QAM demodulation
QAM transmitter demonstration
Lecture 16
http://www.ece.utexas.edu/~bevans/courses/realtime
16 - 2
Introduction
Baseband QAM
Transmitter
Channel impairments
Bits
1
Serial/
parallel
converter
s[m]
r1(t)
Downconverted
signal r1(t)
Carrier recovery
is not shown
Pulse shapers
(FIR filters)
Map to 2-D
constellation
L samples/symbol
m sample index
n symbol index
Receiver
gT[m]
Index
Fading
Additive noise
Linear distortion
Carrier mismatch
Symbol timing mismatch
i[m]
i[n]
s(t)
D/A
q[m]
q[n]
c(t)
cos(c m)
sin(c m)
Carrier
Detect
AGC
r(t)
A/D
r[m]
fs
gT[m]
Channel
Equalizer
Symbol
Clock
Recovery
LPF
i[ n ]
L
2 cos(c m)
q[m]
X
-2 sin(c m)
LPF
q[n]
L
16 - 4
Carrier Detection
c(t)
r1(t)
r(t)
AGC
A/D
16 - 5
16 - 6
Channel Equalizer
Channel Equalizer
IIR equalizer
Ignore noise nm
Ideal channel
z-
FIR equalizer
sequence
Receiver
generates
xm
Ideal Channel
z-
nm
ym Equalizerrm em e[m] = r[m] s[m]
w
s[m] = g x[m ]
+
+
h
+Training
r[m] = y[m] + w1 y[m 1]
sequence
Ideal Channel
Receiver
sm w1[m + 1] = w1[m] J LMS [m]
generates
w1 w = w [ m ]
-
g
z
xm
1 2
Using least mean squares (LMS) J LMS [m] = e [m]
2
Step size 0 < < 1
w1[m + 1] = w1[m] e[m] y[m 1]
xm
Channel
Matched filters
i[m]
q[m]
LPF
x[m]
2 cos(c m)
baseband
LPF
-2 sin(c m)
Maximize SNR at downsampler output
Hence minimize symbol error at downsampler output
1
cos2 = (1 + cos 2 )
2
16 - 11
1
sin 2 = (1 cos 2 )
2
16 - 12
Design/implement transceiver
Lab 6
QAM
Encoder
Laboratory
1 introduction
2 sinusoidal generation
3(a) finite impulse response filter
3(b) infinite impulse response filter
Transceiver Subsystems
block diagram of transmitter
sinusoidal mod/demodulation
pulse shaping, 90o phase shift
transmit and receive filters,
carrier detection, clock recovery
4 pseudo-noise generation
training sequences
5 pulse amplitude mod/demodulation training during modem startup
6 quadrature amplitude mod (QAM)
data transmission
7 digital audio effects
not applicable
Lab 3
Tx Filters
Eye
diagram
LabVIEW demo by Zukang Shen (UT Austin)
Lab 2
Bandpass
Signal
channel
carrier
subchannel
frequency
0-15
16 - 16
5/23/16
Outline
Wireless Networking and Communications Group
IntroducGon
Signal
processing
building
blocks
Filters
Data
conversion
Rate
changers
CommunicaGon
systems
Introduction
Signal
representaGons
Bits,
symbols
Often iterative
Communication
signal quality plot
Do not need
recursion
a0
op
High-throughput input/output
z 1
x[k ]
Always stable
Dominated by mulGplicaGon/addiGon
z m
Finite
impulse
response
lter
Algorithm implementaGon
a0
Delay by m samples
a0
produces
one
output
sample
DSP processor
architecture
FIR
a1
z 1
aM 2
z 1
aM 1
y[k ]
M 1
y[k ] = am x[k m]
m =0
5/23/16
Data Conversion
x[k]
Each
input
sample
produces
one
output
sample
Pole
locaGons
perturbed
when
expanding
transfer
funcGon
into
unfactored
form
20+
lter
structures
Direct
form
Cascade
biquads
La[ce
b0
y[k]
Unit
Delay
a1
b2
a2
Unit
Delay
bN
x[k-N]
N
n =0
m =1
Feedback
Unit
Delay
IIR
aM
Signal Power
Noise Power
= 10 log10 P signal 10 log10 P noise
SNR dB = 10 log10
y[k-M]
SNR dB
Discrete to
Continuous
Conversion
Analog
Lowpass
Filter
fs
QuanGze
to
B
bits
QuanGzaGon
error
=
noise
SNRdB
C0
+
6.02
B
Dynamic
range
SNR
y[k-2]
Digital-to-Analog
B
Sample at
rate of fs
Unit
Delay
Feedforward
Quantizer
y[k-1]
Unit
Delay
x[k-2]
Analog-to-Digital
Analog
Lowpass
Filter
Unit
Delay
b1
x[k-1]
Upsampling
by
L
denoted
as
L
Outputs
input
sample
followed
by
L-1
zeros
Increases
sampling
rate
by
factor
of
L
Input to Upsampler by 4
g[m]
Output of Upsampler by 4
L
m
g0[n]
s(Ln)
g1[n]
s(Ln+1)
g[m]
Multiplies by zero
(L-1)/L of the time
0 1 2 3 4 5 6 7 8
gL-1[n]
s(Ln+(L-1))
0 1 2 3 4 5 6 7 8
FIR
8
5/23/16
10
g[m]
0 1 2 3 4 5 6 7 8
Output of Downsampler
s[m]
h[m]
Downsampling
by
L
denoted
as
L
Inputs
L
samples
Outputs
rst
sample
and
discards
L-1
samples
Decreases
sampling
rate
by
factor
of
L
Input to Downsampler
v[m]
s(Ln)
h0[n]
s(Ln+1)
y[n]
h1[n]
s[m]
y[n]
Outputs discarded
(L-1)/L of the time
hL-1[n]
s(Ln+(L-1))
y[1] = v[L] = h[0] s[L] + h[1] s[L-1] + + h[L-1] s[1] + h[L] s[0]
FIR
10
Communication Systems
Communication Systems
11
12
m[k ]
Carrier
Circuits
TRANSMITTER
11
Transmission
Medium
s(t)
CHANNEL
Carrier
Circuits
r(t)
Baseband
Processing m [k ]
m[k ]
RECEIVER
Carrier
Circuits
TRANSMITTER
Transmission
Medium
s(t)
CHANNEL
Carrier
Circuits
r(t)
Baseband
Processing m [k ]
RECEIVER
12
5/23/16
Transmitter
Baseband
Processing
Bits
1
i[n]
Index
Serial/
parallel
converter
Pulse
cos(0 m)
shaper
(FIR filter)
Map to 2-D
constellation
q[n]
Baseband
Processing
Carrier
Circuits
TRANSMITTER
CHANNEL
cos(0 m)
Channel
equalizer
(FIR filter)
Carrier
Circuits
r(t)
m[k ]
RECEIVER
Baseband
Processing
Carrier
Circuits
TRANSMITTER
13
Decision
Device
Symbol
Transmission
Medium
s(t)
Parallel/
serial
converter
Bits
qest[n]
-sin(0 m)
Baseband
Processing m [k ]
iest[n]
Matched
filter
(FIR filter)
hopt[m]
sin(0 m)
Transmission
Medium
s(t)
hopt[m]
heq[m]
gT[m]
L samples per
symbol (upsampling)
m[k ]
Receiver
Baseband
Processing
gT[m]
CHANNEL
Carrier
Circuits
r(t)
Baseband
Processing m [k ]
RECEIVER
14
15
16
m[k ]
Carrier
Circuits
TRANSMITTER
FIR
a0
Transmission
Medium
s(t)
noise
Baseband
Processing
AssumpGons
CHANNEL
Carrier
Circuits
r(t)
Baseband
Processing m [k ]
RECEIVER
16-QAM
d
9 d
P(e) = 3Q
Tsym Q 2
Tsym
4
d
Tsym is proportional to SNR
This course covers basic discrete-time signal processing concepts and gives hands-on experience in translating these concepts into real-time digital communications software. The goal
is to understand design tradeoffs in signal quality vs. implementation complexity.
Prerequisites
EE 312 and 319K with a grade of at least C- in each; BME 343 or EE 313 with a grade of
at least C-; credit with a grade of at least C- or registration for BME 333T or EE 333T; and
credit with a grade of at least C- or registration for BME 335 or EE 351K.
Topical Outline
System-level design tradeoffs in signal quality vs. implementation complexity; prototyping
of baseband transceivers in real-time embedded software; addressing nodes, parallel instructions, pipelining, and interfacing in digital signal processors; sampling, filtering, quantization,
and data conversion; modulation, pulse shaping, pseudo-noise sequences, carrier recovery,
and equalization; and desktop simulation of digital communication systems.
Required Texts
1. C. R. Johnson Jr., W. A. Sethares and A. G. Klein, Software Receiver Design, Cambridge
University Press, Oct. 2011, ISBN 978-0521189446. Paperback. Matlab code. Available as
an e-book from UT Austin Libaries.
2. T. B. Welch, C. H. G. Wright and M. G. Morrow, Real-Time Digital Signal Processing
from MATLAB to C with the TMS320C6x DSPs, CRC Press, 2nd ed., Dec. 2011, ISBN
978-1439883037.
3. B. L. Evans, EE 445S Real-Time DSP Lab Course Reader. Available on course Web page.
Supplemental Texts
4. B. P. Lathi, Linear Systems and Signals, 2nd ed., Oxford, ISBN 0-19-515833-4, 2005.
5. A. O. Oppenheim and R. W. Schafer, Signals and Systems, 2nd ed., Prentice Hall, 1999.
6. J. H. McClellan, R. W. Schafer, and M. A. Yoder, DSP First: A Multimedia Approach,
Prentice-Hall, ISBN 0-13-243171-8, 1998. On-line Multimedia CD ROM.
Grading
14% Homework, 21% Midterm #1, 21% Midterm #2, 5% Pre-lab quizzes, 39% Laboratory.
Midterms will be held during lecture, with midterm #1 on Friday, Oct. 14th, and midterm
#2 on Monday, Dec. 5th. Attendance/participation in laboratory is mandatory and graded.
Lecture attendance is mandatory because it helps connect together all of the pieces of the
class and is critical in landing internships and permanent positions. Plus and minus letter
grades may be assigned. There is no final exam. Request for regrading an assignment must
be made in writing within one (1) week of the graded assignment being made available to
students in the class. Discussion of homework questions is encouraged. Please submit your
own independent homework solutions. Late assignments will not be accepted.
University Honor Code
The core values of The University of Texas at Austin are learning, discovery, freedom,
leadership, individual opportunity, and responsibility. Each member of the University is
expected to uphold these values through integrity, honesty, fairness, and respect toward
peers and community. http://www.utexas.edu/about/mission-and-values.
Religious Holidays
By UT Austin policy, you must notify the instructor of any pending absence at least fourteen
(14) days prior to the date of observance of a religious holy day, or on the first class day if the
observance takes place during the first fourteen days of the semester. If you must miss class,
lab section, exam, or assignment to observe a religious holiday, you will have an opportunity
to complete the missed work within a reasonable amount of time after the absence.
College of Engineering Drop/Add Policy
The Dean must approve adding or dropping courses after the fourth class day of the semester.
Students with Disabilities
UT provides upon request appropriate academic accommodations for qualified students with
disabilities. Disabilities range from visual, hearing, and movement impairments to ADHD,
psychological disorders (e.g. depression and bipolar disorder), and chronic health conditions
(e.g. diabetes and cancer). These also include from temporary disabilities such as broken
bones and recovery from surgery. For more information, contact Services for Students with
Disabilities at (512) 471-6259 [voice], (866) 329-3986 [video phone], ssd@uts.cc.utexas.edu,
or http://ddce.utexas.edu/disability.
Mental Health Counseling
Counselors are available Monday-Friday 8am-5pm at the UTs Counseling and Mental Health
Center (CMHC) on the 5th floor of the Student Services Building (SSB) in person and by
phone (512-471-3515). The 24/7 UT Crisis Line is 512-471-2255.
Campus Carry
The University of Texas at Austin is committed to providing a safe environment for students,
employees, university affiliates, and visitors, and to respecting the right of individuals who
are licensed to carry a handgun as permitted by Texas state law. For more information,
please see http://campuscarry.utexas.edu/students.
Lecture Topics
Sinusoidal Generation Digital Signal Processors Signals and Systems Sampling and
Aliasing Finite Impulse Response Filters Infinite Impulse Response Filters Interpolation
and Pulse Shaping Quantization Data Conversion Channel Impairments Digital Pulse
Amplitude Modulation Matched Filtering Digital Quadrature Amplitude Modulation
Supplemental Information
MIT OpenCourseWare:
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-341-discrete-time-signalprocessing-fall-2005/
*Advantages: Exceptional Lecture Notes! The readings are more in depth than lecture material,
but still quite fascinating.
*Disadvantages: The homework assignments and solutions were Advantages for practice, but many
problems outside the scope of the 445S class
UC-Berkeley DSP Class Page:
http://www-inst.eecs.berkeley.edu/ ee123/fa09/#resources
*Advantages: The articles and applets under Resources are quite interesting and useful
*Disadvantages: Seemingly no actual Berkeley work actually on website, everything taken from
other sources . . .
Carnegie Mellon DSP Class Page:
http://www.ece.cmu.edu/ ee791/
*Advantages: Lectures had a lot of Matlab code for personal demonstration purposes
*Disadvantages: The lecture notes themselves are far more math-y than the context of 445S - still
interesting though
Purdue DSP Class Lecture Notes Page:
http://cobweb.ecn.purdue.edu/ ipollak/ee438/FALL04/notes/notes.html
*Advantages: the notes are super simple and easy to understand
*Disadvantages: only covers first half of 445S coursework
Doing a search on Apples iTunes U[niversity] for DSP provided numerous FREE lectures from
MIT, UNSW, IIT, etc. for download as well.
Youtube Video Resources:
http://www.youtube.com/watch?v=7H4sJdyDztI&feature=related
Signal
Processing Tutorial: Nyquist Sampling Theorem and Anti-Aliasing (Part 1)
*Advantages: visuals
*Disadvantages: . . . a bit slow
http://www.youtube.com/watch?v=Fy9dJgGCWZI
Sampling
Rate, Nyquist Frequency, and Aliasing
*Advantages: visualization of basic concepts
*Disadvantages: very short, would have liked more explanation
http://www.youtube.com/watch?v=RJrEaTJuX A&feature=related
Simple
Filters Lecture, IIT-Delhi Lecture
*Advantages: explanations of going to and from magnitude/phase
*Disadvantages: watch out for lecturers accent
http://www.youtube.com/watch?v=Xl5bJgOkCGU&feature=channel
FIR
Filter Design, IIT-Delhi Lecture
*Advantages: significantly deeper explanations of math than in class
*Disadvantages: lecturers accent, video gets stuck about 30 seconds in
http://www.youtube.com/watch?v=vyNyx00DZBc
Digital
Filter Design
*Advantages: information - especially on design TRADEOFFs
*Disadvantages: sound quality, better off just reading slides while he lectures
Available Hardware
The ECE LRC has about 200 workstations, including Unix workstations and Windows
machines. Several Linux workstations are available for remote connection: bowser, daisy,
kamek, koopa, luigi, mario, toad, wario and yoshi. All are in the domain ece.utexas.edu. For
more information, see http://www.ece.utexas.edu/it/remote-linux.
The following programs are installed on all of the ECE LRC machines unless otherwise
noted. On the Unix machines, they are installed in the /usr/local/bin directory.
Matlab is a number crunching tool for matrix-vector calculations which is well-suited for
algorithm development and testing. It comes with a signal processing toolbox (FFTs, filter
design, etc.). It is run by typing matlab. Matlab is licensed to run on the Windows PCs
in the ECE LRC, as well as Unix machines luigi, mario and princess in the ECE LRC. On
the Unix machines, be sure to type module load matlab before running Matlab. For more
information about using Matlab, please see Appendix D in this reader.
Mathematica is a environment for solving algebraic equations, solving differential and difference equations in closed-form, performing indefinite integration, and computing Laplace,
Fourier, and other transforms. The command-line interface is run by typing math. The
graphical user interface is run by typing mathematica. On ECE LRC machines, Mathematica is only licensed to run on sunfire1.
The GNU C compiler gcc and GNU C++ compiler g++ are available.
LabVIEW software environment, which is a graphical programming environment that is
useful for signal processing and communication systems developed at National Instruments,
is also installed. LabVIEWs Mathscript facility can execute many Matlab scripts and functions. We have a site license for LabVIEW that allows faculty, staff and students to install
LabVIEW on their personally-owned computers. For more information, see
http://users.ece.utexas.edu/ bevans/courses/realtime/homework/index.html#labview
H ( z) =
1/8];
3 ];
For an asymptotically stable transfer function, i.e. one for which the region of convergence
includes the unit circle, the frequency response can be obtained from the transfer function by
substituting z = exp(j ). The Matlab command freqz implements this substitution:
[h, w] = freqz(b, a, 1000);
The third argument for freqz indicates how many points to use in uniformly sampling the points
on the unit circle. In this example, freqz returns two arguments: the vector of frequency
response values h at samples of the frequency domain given by w. One can plot the magnitude
response on a linear scale or a decibel scale:
plot(w, abs(h));
plot(w, 20*log10(abs(h)));
The phase response can be computed using a smooth phase plot or a discontinous phase plot:
plot(w, unwrap(angle(h)));
plot(w, angle(h));
One can obtain help on any function by using the help command, e.g.
help freqz
D-
As an example of defining and computing with matrices, the following lines would define a 2 x 3
matrix A, then define a 3 x 2 matrix B, and finally compute the matrix C that is the inverse of the
transpose of the product of the two matrices A and B:
A = [1 2 3; 4 5 6];
B = [7 8; 9 10; 11 12];
C = inv((A*B)');
Matlab Tutorials, Help and Training
Here are excellent Matlab tutorials:
https://stat.utexas.edu/training/software-tutorials#matlab
http://www.mathworks.com/academia/student_center/tutorials/mltutorial_launchpad.html
The following Matlab tutorial book is a useful reference:
Duane C. Hanselman and Bruce Littlefield, Mastering MATLAB, ISBN 9780136013303,
Prentice Hall, 2011.
A full version of Matlab is available for your personal computers via a university site license:
http://www.ece.utexas.edu/it/matlab
Although the first few computer homework assignments will help step you through Matlab, it is
strongly suggested that you take the free short courses that the Department of Statistics and Data
Sciences will be offering. The schedule of those courses is available online at
https://stat.utexas.edu/training/software-short-courses
Technical support is provided through free consulting services from the Department of Statistics
and Data Sciences. Simple queries can be e-mailed to stat.consulting@austin.utexas.edu. For
more complicated inquiries, please go in person to their offices located in GDC 7.404. You can
walk in or schedule an appointment online.
Running Matlab in Unix
On the Unix machines in the ECE Learning Resource Center, you can run Matlab by typing
module load matlab
matlab
When Matlab begins running, it will automatically execute the commands in your Matlab
initialization file, if you have one. On Unix systems, the initialization file must be
~/matlab/startup.m where ~ means your home directory.
D-
x(t)
R
y(t)
C
1 1 t
e RC u(t)
RC
y(t) =
=
x(t )h() d
ej2f (t)
j2f t
= e
=
"
1
RC
1
RC
1
RC
1 1
e RC u() d
RC
1
j2f RC
ej2f t
j2f +
= g(ef (.), 0) ef (t)
So, g(ef (.), 0) = H(f ), which is the transfer function of the system.
1
, W f W
W
(1)
We may devise several band-limited functions to satisfy (1). A particular form of P (f ) that
embodies many desirable features is provided by a raised cosine spectrum. This frequency
characteristic consists of a flat portion and a rolloff portion that has a sinusoidal form, as
follows:
for 0 |f | < f1
2W
(|f | W )
1
(2)
P (f ) =
1 sin
for f1 |f | < 2W f1
4W
2W
2f
0 for |f | 2W f1
The frequency parameter f1 and bandwidth W are related by
=1
f1
W
(3)
The parameter is called the rolloff factor; it indicates the excess bandwidth over the ideal
solution, W . Specifically, the transmission bandwidth BT is defined by 2W f1 = W (1 + ).
The frequency response P (f ), normalized by multiplying it by 2W , is shown plotted in
Fig. 1 for three values of , namely, 0, 0.5, and 1. We see that for = 0.5 or 1, the function
P (f ) cuts off gradually as compared with the ideal Nyquist channel (i.e., = 0) and is
therefore easier to implement in practice. Also the function P (f ) exhibits odd symmetry
with respect to the Nyquist bandwidth W , making it possible to satisfy the condition of (1).
The time response p(t) is the inverse Fourier transform of the function P (f ). Hence, using
the P (f ) defined in (2), we obtain the result (see Problem 7.9)
p(t) = sinc(2W t)
cos 2W t
1 162W 2 t2
(4)
which is shown plotted in Fig. 2 for = 0, 0.5, and 1. The function p(t) consists of the
product of two factors: the factor sinc(2W t) characterizing the ideal Nyquist channel and a
second factor that decreases as 1/|t|2 for large |t|. The first factor ensures zero crossings of
p(t) at the desired sampling instants of time t = iT with i an integer (positive and negative).
The second factor reduces the tails of the pulse considerably below that obtained from the
ideal Nyquist channel, so that the transmission of binary waves using such pulses is relatively
insensitive to sampling time errors. In fact, for = 1, we have the most gradual rolloff in that
the amplitudes of the oscillatory tails of p(t) are smallest. Thus, the amount of intersymbol
interference resulting from timing error decreases as the rolloff factor is increased from
zero to unity.
P (f ) =
1
4W
f
1 + cos
2W
0 if |f | 2W
sinc(4W t)
1 16W 2 t2
(5)
These two properties are extremely useful in extracting a timing signal from the received
signal for the purpose of synchronization. However, the price paid for this desirable property is the use of a channel bandwidth double that required for the ideal Nyquist channel
corresponding to = 0.
A(t)
Ac [1 + ka m(t)]
Ac m(t)
Ac m(t) +
q
Ac m2 (t) + [m(t) ? h(t)]2
q
(t)
0
0
0
Carrier
Yes
No
Yes
Type
Amplitude
Amplitude
Amplitude
Use
AM radio
)
arctan( m(t)?h(t)
m(t)
No
Amplitude
Marine radios
2 (t)
arctan( m
)
m1 (t)
0 + kp m(t)
No
No
Hybrid
Angle
No
Angle
Satellite
Underwater
modems
FM radio
TV audio
2kf
Rt
0
m(t) dt
h(t) is the impulse response of a bandpass filter or phase shifter to effect a cancellation of one
pair of redundant sidebands. For ideal filters and phase shifters, the modulation is amplitude
modulation because the phase would not carry any information about m(t).
Each analog TV channel is allocated a bandwidth of 6 MHz. The picture intensity and color
information are transmitted using vestigal sideband modulation. Vestigal sideband modulation
is a variant of amplitude modulation (not shown above) in which the upper sideband is kept and
a fraction of the lower sideband is kept, or vice-versa. In an analog TV signal, the audio portion
is frequency modulated.
The following quantity is known as the complex envelope
x(t) = A(t) ej (t) = xI (t) + j xQ (t)
where xI (t) is called the in-phase component and xQ (t) is called the quadrature component. Both
xI (t) and xQ (t) are lowpass signals, and hence, the complex envelope x(t) is a lowpass signal.
An alterative representation for the modulated signal x(t) is
x(t) = <e{
x(t) ej2fc t }
I- 2
Simple Threshold
Original
Clustered-dot dither
Halftone Comparison
Error diffusion
J- 2
Name:
Last,
First
Problem
1
2
3
4
5
Total
Point Value
20
20
20
20
20
100
Your score
Topic
Digital Filter Analysis
IIR Filter
Sampling and Reconstruction
Linear Systems
Assembly Language
K-
(b) What are the initial conditions and what values should they be assigned? 4 points.
(c) Find the equation for the transfer function in the z-domain including the region of
convergence. 4 points.
(d) Find the equation for the frequency response of the filter. 4 points.
(e) Is this filter lowpass, bandpass, bandstop, highpass, notch, or allpass? Why? 4 points.
K-
x( t)
C-to-D
x [ n]
T = 1/ f s
LTI
System
H(z)
y( t)
y [ n]
D-to-C
T = 1/ f s
( 1 z ) ( 1 e z ) ( 1 e
H ( z) =
( 1 0.9e z ) ( 1 0.9e
1
j / 2 1
j 2 / 3 1
j / 2 1
j 2 / 3 1
)
)
If f s = 1000 samples/sec, determine an expression for y ( t ) , the output of the Discrete-toContinuous converter.
K-
D-to-C
Ts = 1/fs
y(t)
K - 10
h1[n]
h2[n]
y[k ]
a) Show that the end-to-end system from x[k] to y[k] is equivalent to the following system
where the order of the systems have been replaced, or give a counter-example. 10 points
x[k ]
y[k ]
h2[n]
h1[n]
b) What practical considerations have to be taken into account when switching the order of two
systems in practice? 10 points
K - 11
x[n]
y[n]
Unit
Delay
y[n-1]
(c) Write a linear TI C6700 assembly language routine to implement the difference equation.
Assume that the address for x is in A4 and the address to y is in A5. Assume that the input
and output data as well as the coefficient consist of single precision floating point complex
numbers. Assume that the assembler will insert the correct number of no-operation (NOP)
instructions to prevent pipeline hazards. 12 points.
K - 12
Set
Last,
Name:
Solution
First
Problem
1
2
3
4
Total
Point Value
25
30
25
20
100
Your score
Topic
Digital Filter Analysis
Upconversion
Digital Filter Design
Potpourri
K - 25
x[k]
y[k]
Delay
y[k-1]
Delay
a2
y[k-2]
(c) What are the initial conditions and what values should they be assigned? 4 points.
y[0] = a2 y[2] + (1 a) x[0]
Hence, the initial conditions are y[-1] and y[-2],
2
y[1] = a y[1] + (1 a) x[1]
i.e., the initial values of the memory locations for
y[2] = a2 y[0] + (1 a) x[2]
y[k 1] and y[k 2]. These initial conditions should
be set to zero for the filter to be linear & time-invariant
(d) Find the equation for the transfer function in the z-domain including the region of convergence.
5 points.
Take the z-transform of both sides of the difference equation:
Y(z) = a2 z-2 Y(z) + (1 a) X(z)
Y(z) a2 z-2 Y(z) = (1 a) X(z)
(1 a2 z-2) Y(z) = (1 a) X(z)
Y ( z)
1 a
1 a
H ( z) =
=
=
Hence, poles are located at z = a and z = a.
2 2
1
X ( z) 1 a z
(1 az )(1 + az 1 )
Since the system is causal, the region of convergence is |z| > a.
(e) Find the equation for the frequency response of the filter. 5 points.
System is stable because the two poles are located inside the unit circle since 0 < a < 1.
Because the system is stable, we can convert the transfer function to a frequency response:
1 a
H freq ( ) = H ( z ) z =e j =
1 a 2 e j 2
(f) Is this filter lowpass, bandpass, bandstop, highpass, notch, or allpass? Why? What value of the
parameter a would you use? 5 points.
Poles are at angles 0 rad/sample (low frequency) and rad/sample (high frequency).
When a 0, the filter is close to allpass.
When a 1, the filter is bandstop. Poles close to the unit circle indicate the passband(s).
K - 26
x(t)
w(t)
Filter #1
h1(t)
Filter #2
h2(t)
y(t)
Sampler at
sampling
rate of fs
The output y(t) should contain an AM radio signal at carrier frequency 590 kHz and an AM radio
signal at carrier frequency 1300 kHz. The input x(t) = 1 + ka m(t), where m(t) is the speech/audio
signal to be broadcast. Since m(t) could come from an audio CD, the bandwidth of m(t) could be as
high as 22 kHz. Note: Filter #1 is anti-aliasing filter. Filter #2 is a two-passband bandpass filter.
(a) Continuous-Time Analysis. 15 points.
1) Specify a passband frequency, passband deviation, stopband frequency, and stopband
attenuation for filter #1. Speech/audio bandwidth for AM radio is limited to 5 kHz.
Filter #1 enforces this requirement (see homework problems 2.3 and 3.3). Assuming
the ideal passband response is 0 dB, Apass = -1 dB and Astop = -90 dB. The 90 dB of
comes from the dynamic range of the audio CD. Also, fstop < 5 kHz. Well choose
fpass = 4.3 kHz and fstop = 4.8 kHz. The transition region is roughly 10% of fpass.
2) Give the sampling rate fs of the sampler. We want to produce replicas of filter #1 output
centered at 590 kHz and 1300 kHz. Also fs > 2 fmax and fmax = 4.8 kHz. So, fs = 10 kHz.
3) Draw the spectrum of w(t). Each lobe below is 2 fmax wide.
W(f)
2fs
fs
fs
2fs
4) Give the filter specifications to design filter #2. Filter #2 passbands are 585.7594.3 kHz
and 1295.71304.3 kHz, and stopbands are 0585 kHz, 5951295 kHz, and greater
than 1305 kHz. These bands have counterparts in negative frequencies.
5) Draw the spectrum of y(t). Each lobe below is 2 fmax wide.
Y ( f)
f
1300 kHz 590 kHz
The block diagram for the system is repeated here for convenience:
x(t)
Filter #1
h1(t)
w(t)
Filter #2
h2(t)
y(t)
Sampler at
sampling
rate of fs
(b) Discrete-Time Implementation. 15 points.
1) Give a second sampling rate to convert the continuous-time system to a discrete-time
system. There are two conditions on the second sampling rate, as seen in homework
problem 3.2. First, well need to pick a second sampling rate fs2 for x(t), w(t), and y(t)
that minimizes aliasing. The maximum frequencies of interest for x(t) and y(t) are 22
kHz and 1305 kHz, respectively. In theory, w(t) is not bandlimited. Second, well
need to pick the second sampling rate to be an integer multiple of fs. In summary,
fs2 > 2 (1305 kHz) and fs2 = k fs, where k is an integer
2) Would you use a finite impulse response (FIR) or infinite impulse response (IIR) filter for
filter #1? Why? In audio, phase is important. AM radio stations generally broadcast
single-channel audio. (AM stereo had gains in popularity in the 1990s, but has been in
decline due to digital radio.) Assuming single-channel transmission, filter #1 should
have linear phase. Hence, filter #1 should be FIR.
3) What filter design method would you use to design filter #1? Why?
I would use the Parks-McClellan (Remez exchange) algorithm to design the shortest
linear phase FIR filter.
4) Would you use a finite impulse response (FIR) or infinite impulse response (IIR) filter for
filter #2? Why? As per part (2), filter #2 should have linear phase, and hence be FIR.
Also, filter #2 is a multiband bandpass filter. It is not clear how to use classical IIR
filter design methods to design such a filter.
5) What filter design method would you use to design filter #2? Why? Through homework
assignments, we have designed multiband FIR filters using the Parks-McClellan
(Remez exchange) algorithm. The Kaiser window method is for lowpass FIR filters.
The FIR Least Squares method could be used. I would use the Parks-McClellan
(Remez exchange) algorithm to design the shortest multiband linear phase FIR filter.
K - 28
Filter #1
h1[n]
x[n]
w[n]
Filter #2
h2[n]
y[n]
h1[n]
n
-1
The (group) delay through filter #1 is sample. Note: Filter #1 is a first-order difference filter.
Design filter #2 so that it satisfies all three of the following conditions:
a. Cascade of filter #1 and filter #2 has a bandpass magnitude response,
b. Cascade of filter #1 and filter #2 has (group) delay that is an integer number of samples, and
c. Filter #2 has minimum computational complexity.
Group delay is defined as the negative of the derivative (with respect to frequency) of the phase
response. As discussed in lecture, a linear phase FIR filter with N coefficients has a group delay
of (N-1)/2 samples for all frequencies. So, a first-order difference filter has a delay of samples.
As we saw in the mandrill (baboon) image processing demonstration, a cascade of a highpass
filter (first-order differencer) and a lowpass filter (averaging filter) has a bandpass response,
provided that there is overlap in their passbands.
A two-tap averaging filter has a group delay of samples. A cascade of a first-order difference
filter and a two-tap averaging filter would have a group delay of 1 sample.
A two-tap averaging filter with coefficients equal to one would only require 1 addition per
output sample. No multiplications required. This is indeed low computational complexity.
h2[n] = [n] + [n-1]
K - 29
Name:
Last,
First
Problem
1
2
3
4
Total
Point Value
25
25
30
20
100
Your score
Topic
Digital Filter Analysis
Sinusoidal Generation
Digital Filter Design
Potpourri
K - 31
(c) What are the initial conditions and what values should they be assigned? 4 points.
(d) Find the equation for the transfer function in the z-domain including the region of
convergence. 5 points.
(e) Find the equation for the frequency response of the filter. 5 points.
(f) Is this filter lowpass, bandpass, bandstop, highpass, notch, or allpass? Why? 5 points.
K - 32
(a) If the array c[n] were repeatedly sent through a digital-to-analog (D/A) converter with a
sampling rate of 8000 Hz, what continuous-time frequency would be generated? 5 points.
(b) How would you most efficiently use the above ROM table c[n] to compute s[n] given below.
5 points.
s[n] = sin
n for n = 0, 1, ..., 359?
180
(c) How would you most efficiently use the above ROM table c[n] to compute d[n] given below.
5 points.
d [n] = cos n for n = 0, 1, ..., 179
90
(d) How would you most efficiently use the above ROM table c[n] to compute x[n] given below.
10 points.
d [n] = cos
n for n = 0, 1, ..., 719
360
K - 33
Filter #1
h1[n]
x[n]
w[n]
Filter #2
h2[n]
y[n]
(a) Poles (X) and zeros (O) for filter #1 are shown below. Assume that the poles have radii of
0.9, and the zeros have radii of 1.2. Is filter #1 a lowpass, highpass, bandpass, bandstop,
allpass or notch filter? Why? 10 points.
H1(z)
Im(z)
O
Re(z)
O
(b) Give the transfer function for H1(z). 5 points.
(c) Design filter #2 by placing the minimum number of poles and zeros on the pole-zero
diagram below so that the cascade of filter #1 and filter #2 is allpass. 10 points.
H2(z)
Im(z)
Re(z)
K - 34
(b) Consider the cascade of two discrete-time linear time-invariant systems shown below.
x[n]
Filter #1
h1[n]
Filter #2
h2[n]
y[n]
If the order of the filters in cascade is switched, then the relationship between x[n] and y[n]
will always be the same as in the original system. 5 points.
(c) Continuous-time analog signals conform nicely to the Nyquist Sampling Theorem because
they are always ideally bandlimited. 5 points.
(d) If [n] were input to a discrete-time system and the output were also [n], then system could
only be the identity system, i.e. the output is always equal to the input. 5 points.
K - 35
Name:
Last,
First
Problem
1
2
3
4
Total
Point Value
28
30
24
18
100
Your score
Topic
Digital Filter Analysis
Filter Design Tradeoffs
Downconversion
Potpourri
x[n]
-1
x[n-1]
-1
-a2
x[n-2]
y[n]
+
(c) What are the initial conditions? What values should they be assigned and why? 4 points.
y[0] = x[0] a2 x[-2]
Hence, the initial conditions are x[-1] and x[-2],
2
y[1] = x[1] a x[-1]
i.e., the initial values of the memory locations for
y[2] = x[2] a2 x[0]
x[n 1] and x[n 2]. These initial conditions should
be set to zero for the filter to be linear & time-invariant
(d) Find the equation for the transfer function of the filter in the z-domain including the region of
convergence. 5 points. Taking z-transform of both sides of difference equation gives
Y ( z)
Y(z) = X(z) a2 z-2 X(z), which gives Y(z) = (1 a2 z-2) X(z): H ( z ) =
= 1 a 2 z 2
X ( z)
Two zeros at z=a and z=a, and two poles at origin. ROC is entire z plane except origin.
(e) Find the equation for the frequency response of the filter. 5 points. Since the ROC includes
the unit circle, we can convert the transfer function to a frequency response as follows:
H freq ( ) = H ( z ) z =e j = 1 a 2 e j 2
(f) For this part, assume that 0.9 < a < 1.1. Draw the pole-zero diagram. Would the frequency
selectivity of the filter be best described as lowpass, bandpass, bandstop, highpass, notch, or
allpass? Why? 8 points. Zeros on or near the unit circle indicate the stopband. There
are two zeros at z = a and z = a, which correspond to
Im(z)
frequencies = 0 rad/sample and = rad/sample,
respectively. This corresponds to a bandpass filter.
Re(z)
Consider the following filter specification for a narrowband lowpass discrete-time filter:
Evaluate the following filter implementations on the C6700 digital signal processor in terms of
linear phase, bounded-input bounded-output (BIBO) stability, and number of instruction cycles
to compute one output value. Assume that the filter implementations below use only singleprecision floating-point data format and arithmetic, and are written in the most efficient C6700
assembly language possible.
(a) .Finite impulse response (FIR) filter of order 83 designed using the Parks-McClellan
algorithm and implemented as a tapped delay line. 9 points. Problem implies that the
Parks-McClellan algorithm has converged. After convergence, the Parks-McClellan
algorithm always gives an FIR filter whose impulse response is even symmetric about
the midpoint, which guarantees linear phase over all frequencies.
Linear phase:
BIBO stability:
Instruction cycles:
(b) Infinite impulse response (IIR) filter of order 4 designed using the elliptic algorithm and
implemented as cascade of biquads. One pole pair has radius 0.992 and quality factor 3.9.
The other has radius 0.9785 and quality factor of 0.8. 9 points. Homework problem 3.3
concerned the design of IIR filters using the elliptic design algorithm. The solution to
homework problem 3.3 plotted magnitude and phase response of an elliptic design.
Linear phase:
BIBO stability:
YES or NO. Why? Yes, the poles are inside the unit circle. The
quality factors are quite low; hence, the poles are unlikely to
become BIBO unstable when implemented.
Instruction cycles:
(c) IIR filter with 2 poles and 62 zeros. Poles were manually placed to correspond to 10 Hz and
have radii of 0.95. Zeros were designed using the Parks-McClellan algorithm with the above
specifications. Implementation is a tapped delay line followed by all-pole biquad. 12 points.
Linear phase:
BIBO stability:
YES or NO. Why? Yes, the poles are inside the unit circle. The
quality factor is quite low; hence, the poles are unlikely to
become BIBO unstable when implemented.
Instruction cycles:
Pole locations:
Matlab code to design the filter for part (c), which was not required for the test:
numerCoeffs = firpm(62, [0 .02 0.08 1], [1 1 0 0]) / 165;
denomCoeffs = conv([1 -0.95*exp(j*2*pi*10/1000)], [1 -0.95*exp(-j*2*pi*10/1000)]);
freqz(numerCoeffs, denomCoeffs)
X(f)
f
f1
f2
f1
f2
v[n]
x[n]
fc f2
cos( 0 n )
V(f)
fc f1
B/2
B/2
m [n]
Lowpass
filter
fc+f2
f
fc+f1
fc
fs
B/2
= 2
fs
0 = 2
f s > 2(2 f c + B / 2)
pass
stop = 2
f c + f1
fs
(b)
x[n]
w[n]
2
()
Lowpass
filter
()
W(f)
2fc B
2fc +B
2fc B
pass = 2
B
fs
stop = 2
2 fc B
fs
2fc+B
f
f s > 2(2 f c + B)
m [n]
Please determine whether the following claims are true or false. If you believe the claim to be
false, then provide a counterexample. If you believe the claim to be true, then give supporting
evidence that may include formulas and graphs as appropriate. If you give a true or false answer
without any justification, then you will be awarded zero points for that answer. If you answer
by simply rephrasing the claim, you will be awarded zero points for that answer.
(a) Consider an infinite impulse response (IIR) filter with four complex-valued poles (occurring
in conjugate symmetric pairs) and no zeros. When implemented in handwritten assembly on
the C6713 digital signal processor using only single-precision floating-point data format and
arithmetic, a cascade of four first-order IIR sections would be more efficient in computation
than implementing the filter as a cascade of two second-order IIR sections. 9 points.
False. Assume input x[n] is real-valued. Poles located at p1, p2, p3 and p4. Outputs for
the four first-order sections follow:
y1[n] = x[n] + p1 y1[n-1]
y2[n] = y1[n] + p2 y2[n-1]
y3[n] = y2[n] + p3 y3[n-1]
y4[n] = y3[n] + p4 y4[n-1]
For the cascade of first-order sections, the final output value can be calculated as
y4[n] = x[n] + p1 y1[n-1] + p2 y2[n-1] + p3 y3[n-1] + p4 y4[n-1]
Cascade of biquads has real-valued feedback coefficients. Its final output value is
v2[n] = x[n] + b1 v1[n-1] + b2 v1[n-2] + b3 v2[n-1] + b4 v2[n-2]
Case #1: All poles are real-valued. Cascade of first-order sections requires the same
execution time as a tapped delay line with five coefficients, or 33 instruction cycles,
according to Appendix N in course reader. Same goes for the cascade of biquads.
Case #2: Poles are complex-valued and occur in conjugate symmetric pairs. Cascade
of biquads still takes 33 instruction cycles. For cascade of first-order sections, the
first section output x[n] + p1 y1[n-1] is complex-valued. In subsequent sections, the
complex-valued multiply-add operation will require four times the number of realvalued multiply-add operations. Cascade of biquads will hence require fewer cycles.
(b) Consider implementing an infinite impulse response (IIR) filter solely in single-precision
floating-point data format and arithmetic. There are no conditions under which the
implemented filter would be linear and time-invariant. 9 points.
False. Counterexample: y[n] = x[n] + y[n-1] where y[-1] = 0 and x[n] = [n]. The
system passes the all-zero test. The system is linear and time-invariant only for a
limited set of input signals.
True. Although a necessary condition for linear and time-invariance is that the initial
conditions are zero, exact precision calculations in IIR filters require increasing
precision as n increases in the worst case. (This is mentioned in lecture 6 slides when
the block diagram for each of the three IIR direct form structures was discussed).
Eventually, the increase in precision will exceed the precision of the single-precision
floating-point data format. The clipping that results will cause linearity to be lost.
Name:
Last,
First
Problem
1
2
3
4
Total
Point Value
28
30
24
18
100
Your score
Topic
Digital Filter Analysis
Sinusoidal Generation
Upconversion
Potpourri
(c) What are the initial conditions? What values should they be assigned and why? 4 points.
(d) Find the equation for the transfer function of the filter in the z-domain including the region of
convergence. 5 points.
(e) Find the equation for the frequency response of the filter. 5 points.
(f) Draw the pole-zero diagram. Would the frequency selectivity of the filter be best described
as lowpass, bandpass, bandstop, highpass, notch, or allpass? Why? 8 points.
Operation
Throughput
addition
1 cycle
multiplication 1 cycle
addition
1 cycle
multiplication 1 cycle
addition
2 cycles
multiplication 4 cycles
Delay Slots
0 cycles
1 cycle
3 cycles
3 cycles
6 cycles
9 cycles
Multiplicationadd operations
per output
sample
Difference equation
using 32-bit floatingpoint data/arithmetic
Difference equation
using arithmetic on
16-bit (short) data
and coefficients
(c) Which method would you advocate using? Why? 6 points.
M(f)
v[n]
m[n]
Bandpass
filter
s[n]
cos( 0 n )
B=
stop1 =
pass1 =
pass2 =
stop2 =
fs >
(b) Upconversion method #2. 10 points.
Uses a squaring device and the
bandpass filter from part (a).
m[n]
w[n]
()
=
fs >
cos( 0 n )
Bandpass
filter
s[n]
(b) For a system design, you have determined that you need a discrete-time biquad notch filter to
remove a narrowband interferer at discrete-time frequency 0. The actual discrete-time
frequency will vary over time when the system is deployed in the field. Give the poles and
zeros for the notch filter. Set the biquad gain to 1. 9 points.
Team ,
Name:
Last,
High 5
First
Problem
1
2
3
4
Total
Point Value
28
24
24
24
100
Your score
Topic
Discrete-Time Filter Analysis
Improving Signal Quality
Filter Bank Design
Potpourri
Name:
Last,
First
Problem
1
2
3
4
Total
Point Value
28
24
24
24
100
Your score
Topic
Discrete-Time Filter Analysis
Discrete-Time Filter Design
Audio Effects System
Potpourri
The frequencies at f0, 2 f0 and 4 f0 are visible in the spectrum (bottom plot above).
One can playback the audio signal without and with DC removal. The Matlab command sound assumes
that the vector of samples to be played is in the range of [-1, 1] inclusive.
sound(v, fs);
sound(y, fs);
To avoid clipping of amplitude values outside of the range [-1, 1], try
sound(v / max(abs(v)), fs);
Last,
Course: EE 345S
First
Please determine whether the following claims are true or false and support each answer with a brief justication. If you put a true/false answer without any justication,
(a) The receiver (demodulator) design for digital communications is always more complicated than the transmitter (modulator) design.
(b) Pulse shaping lters are designed to contain the spectrum of a digital communication signal. They will introduce ISI except that we sample at certain particular time
instances.
(c) The eye diagram does not tell you anything about intersymbol interference but only
tells you how noisy or how clean the channel is.
(d) QAM is more popular than PAM because it is easier to build a QAM receiver than a
PAM receiver.
(e) It is less accurate to use a DSP to realize in-phase/quadrature (I/Q) modulation and
demodulation than to use an analog I/Q modulator and demodulator due to the quantization errors.
(f) A low-cost DSP cannot be used for doing in-phase/quadrature (I/Q) modulation and
demodulation for high carrier frequency (e.g., 100 MHz) since it does not have enough
MIPS to implement it.
(g) PAM and QAM will have the same bit-error-rate (BER) performance given the same
signal-to-noise ratio (SNR).
(h) Digital communication systems are better than analog communication systems since
digital communication systems are more reliable and more immune to noise and interference.
(i) FM and Spread Spectrum communications are examples of wideband communications.
The excess frequency makes transmission more resistant to degradation by the channel.
(j) Analog PAM generally requires channel equalization.
00
01
2d
I
00
01
10
11
2d
11
10
QAM -4
PAM-4
(b) Please accurately calculate the power of the QPSK signal given d. Please compare the
power dierence of PAM-4 and QAM-4 for the same d. 5 points.
(c) Are the bit assignments for the PAM or QAM optimal in Figure 1? If not, then
please suggest another assignment scheme to achieve lower bit error rate given the
same scenario, i.e., the same SNR. The optimal bit assignment is commonly referred
to as Gray coding. 5 points.
Consider doing pulse shaping for a 2-PAM signal also known as BPSK signal. Assume
the pulse shaping lter has 24 coecients fh0; : : : ; h23 g and the oversampling rate is 4.
(a) Draw a block diagram of a lter bank scheme to implement the pulse shaping. Please
also specify the number of the lters in the lter bank and express the coecients of
each lter in terms of h0, . . . , h23 . 5 points.
(b) Evaluate the number of MACs and the amount of RAM space required to accomplish
the pulse shaping via the approach in (a). 5 points.
(c) Since the data symbols coming into the lters in (a) are 1's or -1's (BPSK) and the
lter coecients are xed, the pulse shaping lter can be implemented via a lookup
table approach on a DSP (similar to the implementation of sine and cosine signals).
Please describe one way of implementing the lookup table approach, including how to
build the lookup table. 5 points.
(d) If a bit shift operation and a MAC instruction each takes one instruction cycle (omitting
the data move instructions), how many instructions and how much RAM space are
required to implement the pulse shaping via the lookup table approach. Please compare
the results with those in (b). 5 points.
(b) Estimate the number of multiply-accumulates per second for the upstream and downstream fast Fourier transform. 4 points.
(d) Compare discrete multitone (DMT) modulation, such as the ADSL standards, with
orthogonal frequency division multiplexing (OFDM), such as for the physical layer of
the IEEE 802.11a wireless local area network standard.
1. Give three similarities between DMT and OFDM. 3 points.
(b) You are designing an A/D converter to produce audio sampled at 96 kHz with 24 bits
per sample. When an analog sinusoid is input to the A/D converter, the converter
should produce one sinusoid at the right frequency and no harmonics. The converter
should give true 24 bits of precision at low frequencies, but can give lower resolution
at higher frequencies. Draw a block diagram of the A/D converter you would design.
9 points.
Course: EE 345S
Name:
Last,
First
Problem
1
2
3
4
5
Total
Point Value
15
15
30
20
20
100
Your score
Topic
Phase Modulation
Equalizer Design
8-QAM
ADSL Receivers
Potpourri
s FM (t ) = Ac cos 2 f c t + 2 k f m( ) d
0
(a) Show that one can use a frequency modulator to generate a phase modulated signal using
the block diagram below. Give kp in terms of frequency modulation parameters. 5 points.
m(t )
d
dt
Frequency
Modulator
s PM (t )
(b) Give a version of Carsons rule for the transmission bandwidth of phase modulation. You
do not have to derive it. 10 points.
(c) For this channel, design a stable linear time-invariant equalizer for the receiver so that the
impulse response of the cascade of the discretized channel and equalizer yields a delayed
impulse. Please state any assumptions on the value of a. 5 points.
Q
I
2d
2d
2d
2d
(a) Compute the average power for each 8-QAM constellation. 5 points.
(b) Compute the formula for probability of symbol error for each 8-QAM in terms of the Q
function. Draw the decision regions you are using on the above constellations. 15 points.
(c) Draw the optimal bit assignments for each symbol you would use for each of the
constellations above on the constellations directly. 5 points.
(d) How would you choose which 8-QAM constellation to use in a modem? 5 points.
N real
samples
S/P remove
cyclic
prefix
N real
samples
N/2 subchannels
P/S
QAM
demod
invert
channel
=
decoder
frequency
domain
equalizer
Function
Time domain equalizer
Remove cyclic prefix
Serial-to-parallel converter
Fast Fourier Transform
Remove mirrored data
Frequency domain equalizer
QAM decoder
Parallel-to-serial converter
receive
filter
+
A/D
N-FFT
and
remove
mirrored
data
Multiplyaccumulates
Compares
Words of
memory
Please determine whether the following claims are true or false and support each answer
with a brief justification. If you give a true or false answer without any justification, then you
will receive zero points for that answer.
(a) In a communication system design, digital communication should always be chosen over
analog communications because digital communication systems are more reliable and more
immune to noise and interference. 4 points.
(b) Digital QAM is more popular than Digital PAM because it is easier to build a Digital QAM
transmitter than a Digital PAM transmitter. 4 points.
(c) Pulse shaping filters are designed to contain the spectrum of a digital communication
signal. They are chosen to aid the receiver in locking onto the carrier frequency and phase.
4 points.
(d) IEEE 802.11a wireless LAN modems and ADSL/VDSL wireline modems employ
multicarrier modulation. 802.11a modems achieve higher bit rates than ADSL/VDSL
because 802.11a systems deliver the highest bits/s/Hz of transmission bandwidth. 4 points.
(e) FM radio uses excess frequency to make transmission more resistant to fading in wireless
channels. 4 points.
Course: EE 345S
Name:
Last,
First
Problem
1
2
3
4
5
Total
Point Value
15
15
40
15
15
100
Your score
Topic
Digital PAM Transmission
Equalizer Design
8-PAM vs. 8-QAM
Multicarrier Communications
Potpourri
K - 67
ak
gT[m]
D/A
Transmit
Filter
(a) Give a formula using the appropriate system parameters for the bit rate being transmitted.
2 points.
(b) The leftmost block performs upsampling by L samples. What communication system parameter
does L represent? 2 points.
(c) Give a formula using the appropriate system parameters for the sampling rate for the D/A
converter. 3 points.
(d) Give a formula using the appropriate system parameters for the number of multiplicationaccumulation operations per second that would be required to compute the two leftmost blocks in
the above block diagram (i.e., the blocks before the D/A converter)
I. as shown in the block diagram? 4 points.
K - 68
(b) Does the channel have a lowpass, highpass, bandpass, bandstop, allpass, or notch response?
2 points.
(c) Design a causal stable discrete-time filter to equalize the above channel for a single-carrier
communication system. 4 points.
(d) Does the channel equalizer you designed in part (c) have a lowpass, highpass, bandpass, bandstop,
allpass, or notch response? 2 points.
(e) Using your answer in part (c), give the impulse response of the equalized channel. 5 points.
K - 69
8-QAM
2d
2d
2d
(b) Draw your decision regions on the 8-QAM constellation shown above. 5 points.
(c) Based on the decision regions in part (b), derive the formula for the probability of symbol error at
the sampled output of the matched filter for the 8-QAM constellation in terms of the Q function
and the SNR. 10 points.
K - 70
8-PAM
(e) Compute the average power for the 8-PAM constellation. 5 points.
(f) Derive the formula for the probability of symbol error at the sampled output of the matched filter
in the receiver for the 8-PAM constellation in terms of the Q function and the SNR. 5 points.
(g) Which constellation, the 8-PAM constellation on this page or the 8-QAM constellation on the
previous page, is better to use and why? 5 points.
K - 71
(a) What is the ratio of the computational complexity of the downstream fast Fourier transform to the
upstream fast Fourier transform in terms of real multiplication-accumulation (MAC) operations per
second? 4 points.
(b) During data transmission, what is the longest time domain equalizer that could be computed in real
time on the C6701 digital signal processing board you have been using in lab? 4 points.
(c) Which block in a multicarrier transceiver implements pulse shaping? What is the pulse shape?
4 points.
(d) Every 69th frame in an ADSL transmission is a synchronization frame. For use between
synchronization frames, describe in words a method for symbol synchronization. 3 points.
K - 72
(b) Pulse shaping filters are designed to contain the spectrum of a transmitted signal in a
communication system. In a communication system, the pulse shape should be zero at non-zero
integer multiples of the symbol duration and have its maximum value at the origin. 3 points.
(c) Although wired and wireless channels have impulse responses of infinite duration, each can be
modeled as an FIR filter. Wired channel impulse responses do not change over time, whereas
wireless channel impulse responses change over time. 3 points.
(d) A receiver in a digital communication system employs a variety of adaptive subsystems, including
automatic gain control, carrier recovery, and timing recovery. A transmitter in a digital
communication system does not employ any adaptive systems. 3 points.
(e) All consumer modems for high-speed Internet access (i.e. capable of bit rates at or above 1 Mbps)
employ multicarrier modulation. 3 points.
K - 73
Course: EE 345S
Name:
Last,
First
Problem
1
2
3
4
Total
Point Value
28
24
24
24
100
Your score
Topic
Digital PAM Transmission
Digital PAM Reception
Equalizer Design
Potpourri
K - 74
ak
gT[m]
Transmit
Filter
D/A
(a) What does ak represent? Give a formula using the appropriate system parameters for the values
that ak could take. 3 points
(b) What communication system parameter does the upsampling factor L represent? 3 points.
(c) Give a formula for the data rate in bits per second of the transmitter. 4 points.
(d) Give formulas using the appropriate system parameters for the implementation complexity
measures in the table below that would be required to compute the two leftmost blocks in the
above block diagram (i.e., the blocks before the D/A converter). 18 points.
Multiplication-accumulation
operations per second
As shown
above
Using a
filter bank
K - 75
ak
gT[m]
D/A
Transmit
Filter
(a)
A/D
(b)
(c)
a k
The blocks in the baseband digital PAM receiver are analogous to the blocks in the digital baseband
PAM transmitter. The hat above the ak term in the receiver means an estimate of ak in the transmitter.
Assume that the channel only consists of additive white Gaussian noise. Assume synchronization.
Please describe in words each of the missing blocks (a)-(c) and how to choose the parameters (e.g.
filter coefficients) for each block. Each part is worth 8 points.
(a)
(b)
(c)
K - 76
x[n]
r[n]
h[n]
y[n]
c[n]
Equalizer
Channel
Model
w[n]
During modem training, the transmitter transmits a short training signal that is a pseudo-noise
sequence of length seven that is known to the receiver. The bit pattern is 1 1 1 0 1 0 0. The bits are
encoded using 2-level pulse amplitude modulation (but without pulse shaping) so that
(a) Assuming that h[n] has two non-zero coefficients, i.e. h[0] and h[1], estimate their values to three
significant digits. 6 points.
(b) Using the result in (a), estimate the coefficients for a two-tap FIR filter c[n] to equalize the
channel. What value of the delay are you assuming? 6 points.
(c) Without changing the training sequence, describe an algorithm that the receiver can use to estimate
the true length of the FIR filter h[n]. You do not have to compute the length. 6 points.
(d) In a receiver, for a training sequence of 8000 samples and an FIR equalizer of 100 coefficients,
would you advocate using a least-squares equalizer design algorithm or an adaptive equalizer
design algorithm for real-time implementation on a DSP processor? Why? 6 points.
K - 77
(b) When a Gaussian random process is input to a linear time-invariant system, the output is also a
Gaussian random process where the mean is scaled by the DC response of the linear time-invariant
system and the variance is scaled by twice the bandwidth. 4 points.
(c) Frequency shift keying is another type of multicarrier modulation method in which one or more
subcarriers are turned on to represent the digital information being transmitted. The only use of
frequency shift keying in a consumer electronics product is in telephone touchtone dialing (i.e.
dual-tone multiple frequency signaling). 4 points.
(d) All modems in currently available consumer electronics products for very high-speed Internet
access (i.e. capable of bit rates at or above 5 Mbps) employ multicarrier modulation.
4 points.
(e) The TI TMS320C6713 digital signal processing board you have been using in lab can compute the
fast Fourier transform operation for downstream ADSL reception in real time using singleprecision floating-point arithmetic. 4 points.
(f) In ADSL, the pulse shape used in the transmitter is a square root raised cosine. 4 points.
K - 78
Course: EE 345S
Name:
Last,
First
Problem
1
2
3
4
Total
Point Value
27
27
30
16
100
Your score
Topic
Baseband Digital PAM Transmission
Digital PAM Reception
QAM
Equalizer Design
K - 79
ak
gT[m]
Transmit
Filter
D/A
(a) What does ak represent? Give a formula using the appropriate system parameters for the values
that ak could take. 3 points
(b) What communication system parameter does the upsampling factor L represent? 3 points.
(c) Give a formula for the bit rate in bits per second of the transmitter. 3 points.
(d) Give formulas using the appropriate system parameters for the implementation complexity
measures in the table below that would be required to compute the two leftmost blocks in the
above block diagram (i.e., the blocks before the D/A converter). 18 points.
Multiplication-accumulation
operations per second
As shown
above
Using a
filter bank
K - 80
ak
Transmit
Filter
D/A
gT[m]
Channel Model
Additive white Gaussian noise.
First Four Blocks of the Digital PAM Receiver
Receive
Filter
(a)
(b)
(c)
a k
The hat above the ak term in the receiver means an estimate of ak in the transmitter.
Assume that the receiver is synchronized to the transmitter.
Each block in the baseband digital PAM receiver is analogous to one block in the digital baseband
PAM transmitter; e.g., the receive filter is analogous to the transmit filter.
Please describe in words each of the missing blocks (a)-(c) and how to choose the parameters (e.g.
filter coefficients) for each block. Each part is worth 9 points.
(a)
(b)
(c)
K - 81
Constellation #2
Q
I
2d
2d
2d
2d
2d
2d
(a) Compute the average signal power for each of the QAM constellations above. 6 points.
(b) Draw your decision regions on the 12-QAM constellations shown above. 6 points.
(c) Based on your decision regions in part (b), give a formula for the probability of symbol error at
the sampled output of the matched filter for each of the 12-QAM constellations in terms of the Q
function, i.e. Q(d/). 12 points.
(d) Given the above assumptions and answers, which 12-QAM constellation would you choose?
6 points.
K - 82
x[n]
r[n]
h[n]
Channel
Model
c[n]
w[n]
During modem training, the transmitter transmits a short training signal that is a pseudo-noise
sequence of length seven that is known to the receiver. The bit pattern is 1 1 1 0 1 0 0. The bits are
encoded using 2-level pulse amplitude modulation (but without pulse shaping) so that
(a) Assume that the equalizer is a two-tap LTI FIR filter. Compute an equalizer impulse response c[n]
for a transmission delay of zero. 7 points.
(b) In a receiver, for a training sequence of 8000 symbols and an FIR equalizer of 100 coefficients,
would you advocate using a least-squares equalizer design algorithm or an adaptive equalizer
design algorithm for real-time implementation on a digital signal processor? Why? 9 points.
K - 83
Name:
Danny
D.J.
Stephanie
Michelle
Course: EE 445S
House,
Full
Last,
First
Problem
1
2
3
4
Total
Point Value
21
27
30
22
100
Your score
Topic
Equalizer Design
QAM Communication Performance
Automatic Gain Control
Data Converter Design
Name:
Course: EE 445S
Potter,
Harry
Last,
First
Problem
1
2
3
4
Total
Point Value
21
27
28
24
100
Your score
Topic
Ideal Channel Model
QAM Communication Performance
Narrowband Interference
Potpourri
Assume that the delay is positive and the gain g is not zero.
(a) Give an algorithm to recover x[m] from y[m] assuming that the values of and g are known.
6 points.
y[m] = g x[m-] or equivalently x[m] = (1/g) y[m+]
Discard the first samples of y[m] and scale by 1/g
(b) For a pseudo-noise training sequence known to the transmitter and receiver, give an algorithm for
the receiver to estimate the delay and gain g. 9 points.
Assume that pseudo-noise training sequence x[m] has values of +1 and -1.
Correlate y[m] with x[m].
Location of the first peak gives .
Discard the first samples of y[m] to obtain y1[m].
Compute g as the average value of | y1[m] | divided by the average value of | x[m] |.
Using averaging of all samples gives a more accurate estimate the ideal channel model for
an actual physical channel.
(c) Given a sequence of -1 and +1 values, how could you verify whether or not it is a maximal length
pseudo-noise sequence? 6 points.
The sequence length N must be 2r 1 where r is an integer and r > 1
The normalized autocorrelation R[m] of the sequence is 1 at the origin and -1/N otherwise.
[] = [][ + ]
The magnitude of the discrete Fourier transform of the sequence is constant except at DC
where it has a much smaller value of 1.
III
III
2d
I
III
III
2d
2d
Energy in the pulse shape is 1. Symbol time Tsym is 1s. The constellation on the left includes the
decision regions with boundaries shown by the in-phase (I) axis, quadrature (Q) axis and dashed lines.
(a) Peak transmit power
(b) Average transmit power
(c) Number of type I regions
(d) Number of type II regions
(e) Number of type III regions
(f) Probability of symbol error
for additive Gaussian noise
with zero mean & variance 2
Left Constellation
18 d2
10 d2
4
8
4
d 9 d
3Q Q 2
4
Right Constellation
34 d2
18 d2
0
12
4
11 d 7 2 d
Q - Q
4 s 4 s
Draw the decision regions for the right constellation on top of the right constellation. 3 points.
The I and Q axes are decision boundaries. The decision regions must cover the entire I-Q plane.
Fill in each entry (a)-(f) in the above table for the right constellation. Each entry is worth 3 points.
Due to symmetry in the constellation, one can compute parts (a) and (b) from one quadrant.
Transmit power for each constellation point is 2 d2, 10 d2, 26 d2 and 34 d2.
Peak power is 34 d2 and average power is 18 d2.
For part (f), P(correct) = 1 P(error) and
() =
( ( )) ( ( )) +
( ( )) =
( ) + ( )
Which of the two constellations would you advocate using? Why? Please give at least two reasons.
6 points. The left constellation is the better choice because it has
Lower peak transmit power
Lower average transmit power
Lower peak-to-average transmit power
Lower probability of symbol error vs. signal-to-noise ratio (SNR)
Gray coding whereas the right constellation does not
[] =
[]
where
[] = ( ) [ ] ( ) [ ] + ( ) [ ] [ ]
(d) Based on your answers in (a), (b), and (c), derive an update equation to adapt 0. 6 points.
[ + ] = []
([])
]
= [] []
= []
[]
]
= []
[ + ] = [] [] []
[] = [] ( []) [ ] + [ ] + ( []) [ ] [ ]
[] = ( []) [ ] ( []) [ ] + ( []) [ ] [ ]
(e) For the answer in (d), what value of the step size would you recommend? Why? 4 points.
We need a very small > 0, e.g. = 0.001, to ensure that the adaptation converges.
Or apply fixed-point theorem to 0[m+1] = f(0[m]) and solve for for | f (0[m]) | < 1
Simulation of Problem 2.3 is provided below for additional information and insight. A Matlab
simulation was neither required nor expected to answer this or any other problem on the test.
Using the Matlab code below to simulate the solution to problem 2.3, we generate 10,000 samples
of a narrowband interferer centered at a discrete-time frequency of 0.65 rad/sample for x[m]
and pass it through the adaptive IIR notch filter to generate y[m]. We set = 0.001. The
adaptive IIR notch filter properly adapts the notch frequency 0 from 0.5 rad/sample to 0.65
rad/sample (about 2.04). After the adaptive IIR notch filter converges, the reduction in average
power was about 240 dB. Average power in x[m] is 5 x 10-5, and average power in y[m] after
sample index 3000 is 4.1 x 10-29.
%%%
%%%
%%%
%%%
Here, a0 represents time-varying fading gain and the FIR filter models the channel impulse response.
(a) Describe why the channel impulse response is modeled by a finite impulse response. 6 points.
Wireless channels Model reflection and absorption of propagating electromagnetic waves in
air. Truncate infinite impulse response after significant decay has occurred.
Wired channels Model transmission line as RLC circuit. Truncate the infinite impulse
response after significant decay has occurred.
(b) Describe what a channel equalizer tries to do. 6 points.
Time domain Shortens channel impulse response to reduce intersymbol interference.
Impulse response of the cascade of the channel and the channel equalizer would ideally be a
single impulse at index with gain g. See the ideal channel model in problem 2.1.
Frequency domain Compensates for frequency distortion in the channel. Frequency
response of the cascade of the channel and the channel equalizer would ideally be allpass.
(c) When the transmitter is transmitting a known training sequence, would you recommend using a
least squares method or an adaptive least mean squares method for the channel equalizer? Please
justify your answer for each criterion below. 6 points. Adaptive LMS method.
Communication performance The channel model has time-varying fading gain. The adaptive
LMS equalizer tracks the channel during training. LS equalizer gives best average equalizer
over the training sequence and may be mismatched to the current state of the channel.
Implementation complexity The adaptive LMS method is based on vector additions and
scalar-vector multiplications, whereas the LS equalizer is based on matrix multiplication and
inversion. The adaptive LMS method requires less computation and far less memory.
(d) If the noise contained a narrowband interferer in the transmission band, would a separate notch
filter be needed in addition to the channel equalizer? Why or why not? 6 points.
An adaptive LMS equalizer or an LS equalizer seeks to make the cascade of the channel and
the equalizer have an allpass frequency response. The equalizer will seek to equalize not only
the channel impulse response but fading, noise and interference. Hence, the equalizer will try
to notch out narrowband interference; however, because it is an FIR filter, the equalizers
notch will only have a mild reduction when compared to an IIR notch filter. See next page.
Note: Certain multicarrier systems will simply not transmit data over parts of the transmission
band corrupted by narrowband interference. This is known as interference avoidance.
Simulation of Problem 2.4(d) provided below for additional information and insight. A Matlab
simulation was neither required nor expected to answer this or any other problem on the test.
To simulate problem 2.4(d), we can add a narrowband interferer to the channel equalizer design
problems in homework assignment 7.1 (least squares equalizer) and 7.2 (adaptive least mean
squares equalizer) from the spring 2014 version of the course:
http://users.ece.utexas.edu/~bevans/courses/rtdsp/homework/solution7.pdf
We add the following code to add a sinusoidal narrowband interferer at 0.65 rad/sample:
w0 = 0.65*pi;
samples = length(r);
nindex = 0 : (samples-1);
r = r + cos(w0*nindex);
% output of channel
The average power in the narrowband interferer is one-seventh of the average power of the
transmitted signal after passing through the FIR filter in the channel model.
The best LS equalizer has a length of 40 and delay = 23, and gave 46 symbol (bit) errors.
Without the narrowband interferer, there are 0 bit errors.
The best adaptive LMS equalizer has a length of 40 and delay = 29, and gave 128 symbol (bit)
errors. Without the narrowband interferer, there are 0 bit errors.
Here are the magnitude responses of the equalized channels. Please note the notches at the
narrowband frequency of 0.65 rad/sample:
LS equalized channel
(20 dB notch at 0.65
An IIR notch filter can deliver 50 dB (or more) of attenuation at the narrowband frequency. See
the simulations for an adaptive IIR notch filter in problem 2.3.
Name:
Course: EE 445S
Scooby-Doo
Last,
Shaggy
Velma
Daphne
Fred
First
Point Value
21
27
28
24
100
Your score
Topic
Steepest Descent Algorithm
QAM Communication Performance
Estimating SNR at a Receiver
Acoustics of a Concert Hall
the negative of the gradient points left. When the current est
left of the minimum, the negative gradient points to the right.
as long as the stepsize is suitably small, the new estimate x[
to the minimum than the old estimate x[k]; that is, J(x[k +
J(x[k]).
JSK, Figure 6.15
J(x)
Gradient direction
has same sign as
the derivative
Derivative is
slope of line
tangent to
J(x) at x
xn
Minimum
xp
(a) We seek to minimize J(x) = (x x0)2 where x0 is a constant. Write the update equation for
To make this explicit, the iteration defined by (6.5) is
x[k+1] in terms of x[k]. 6 points.
Homework
5.1 solution
x[k + 1] = x[k] (2x[k] 4),
J(x)
and
its
in-class
discussion
x[k +1] = x[k]
x=x[k ]
or, rearranging,
x[k + 1] = (1 2)x[k] + 4.
(b) The update equation in part (a) can be interpreted as a first-order linear time invariant (LTI) system
with output x[k+1] and previous output x[k] for k 0.
Give a formula for the input signal for the linear time-invariant system? 3 points.
x0 u[k]
ii.
1
iv.
Give the range of step size values that make the LTI system bounded-input boundedoutput stable. 3 points.
What values of the step size lead to the first-order LTI system being a lowpass filter?
3 points.
The angle of a pole near the unit circle indicates the center of the passband.
A real positive pole near the unit circle indicates a lowpass filter.
With the pole at 1 , we would like to be small and positive (0 < < 0.25).
Homework 6.3
Fall 2015 Midterm 2.2
Energy in the pulse shape is 1. Symbol time Tsym is 1s. The constellation on the left includes the
decision regions with boundaries shown by the in-phase (I) axis, quadrature (Q) axis and dashed lines.
Each part below is worth 3 points. Please fully justify your answers.
Left Constellation
Right Constellation
2
(a) Peak transmit power
34d
26d 2
2
(b) Average transmit power
18d
14d 2
(c) Draw the decision regions for the right constellation on top of the right constellation.
(d) Number of type I regions
0
4
(e) Number of type II regions
12
8
(f) Number of type III regions
4
4
(g) Probability of symbol error
11 ! d $ 7 2 ! d $
Q
#
&
#
&
for additive Gaussian noise
"
%
"
%
4
No
No
For parts (a) and (b), due to symmetry in the constellation on the right, we can look at upper
right quadrant for power calculations: d+jd, 3d+jd, 3d+j3d, 5d+jd. Power is proportional to I2 +
Q2, i.e. 2d2, 10d2, 18d2, and 26d2, respectively. Peak power is 26d2. Average power is 14d2.
For part (g), the constellation on the right has the same number of type I, II and III constellation
regions as a standard 16-QAM constellation (i.e. 4-PAM in in-phase and 4-PAM in quadrature
directions). We can reuse symbol error probability from the standard 16-QAM constellation.
(i) Give a fast algorithm to decode a received symbol amplitude into a symbol of bits using the left
constellation above. Using divide & conquer, we need J comparisons for a constellation of J bits.
Bit #1: Q > 0
Bit #2: I > 0. Now we know which of the four quadrants were in.
Upper right quadrant:
Bit #3 is set to I > 4d.
Bit #4 is set to I > 2d if Bit #3 set and set to Q < 2d otherwise.
Homework 4.1
i.
for m = 0, 1, , M-1
for m = 0, 1, , M-1
1
M
M 1
M 1
2
1
M 1
M 1
m=0
ii.
m=0
1
M
m=0
m=0
M 1
m=0
How long should we wait between the two transmissions of x1[m]? 5 points.
Group delay of FIR filter h[m] to prevent overlap in the two transmissions at receiver.
(b) In a pulse amplitude modulation (PAM) system, the received signal r[m] goes through a matched
filter and downsampler. The downsampler output is the received symbol amplitude.
i.
ii.
During training, transmitted and received symbol amplitudes are known. Use this fact to
estimate the SNR for each training symbol at the downsampler output. 9 points.
Let be the transmitted symbol amplitude and be the received symbol amplitude
for symbol index n. (Index m is the sample index.) Noise power is .
Signal Power
!!
SNR =
=
Noise Power
! ! !
Based on the noise power at the downsampler output, give a formula for 2. 5 points
A continuous-time matched filter changes the additive noise power 2 by 1/Tsym.
In discrete-time, a matched filter changes the additive noise power by 1/L where L is the
number of samples per symbol period. So, = .
(a) Give two examples of the training signal x[m] you could use.
Why? 6 points.
Audio track
(b) Set up steepest descent algorithm to update h[m] so that r[m] is as close to h[m] * x[m] as possible.
i. Give an objective function to be minimized. 6 points.
Homework 7.2
Fall 2014 Midterm 2.3
ii. Give the update equation for the vector of FIR coefficients. 6 points.
h[m]* x[m] = h[0] x[m]+ h[1] x[m 1]+ h[2] x[m 2]+... + h[M 1] x[m (M 1)]
Homework 7.2
Fall 2014 Midterm 2.3
J(y[m])
y[m]
h[m +1] = h[m]
= h[m] y[m]
= h[m]+ y[m] x[m]
h[m]
h[m]
iii. What values would you recommend for the step size ? 6 points.
We would like small positive values, e.g. = 0.001.
K - 134
M- 2
Instruction
LDW x[n] || LDW h0
LDW x[n-1] || LDW h1 || ZERO accumulator0
LDW x[n-2] || LDW h2 || ZERO accumulator1
LDW x[n-3] || LDW h3 || ZERO accumulator2
LDW x[n-4] || LDW h4 || ZERO accumulator3
LDW x[n-5] || LDW h5 || MPYSP x[n], h0, product0
LDW x[n-6] || LDW h6 || MPYSP x[n-1], h1, product1
LDW x[n-7] || LDW h7 || MPYSP x[n-2], h2, product2
LDW x[n-8] || LDW h8 || MPYSP x[n-3], h3, product3
LDW x[n-9] || LDW h9 || MPYSP x[n-4], h4, product4 ||
ADDSP product0, accumulator0, accumulator0
LDW x[n-10] || LDW h10 || MPYSP x[n-5], h5, product5 ||
ADDSP product1, accumulator1, accumulator1
LDW x[n-11] || LDW h11 || MPYSP x[n-6], h6 , product6 ||
ADDSP product2, accumulator2, accumulator2
LDW x[n-12] || LDW h12 || MPYSP x[n-7], h7 , product7 ||
ADDSP product3, accumulator3, accumulator3
LDW x[n-13] || LDW h13 || MPYSP x[n-8], h8, product8 ||
ADDSP product4, accumulator0, accumulator0
The total number of execute cycles to compute a tapped delay line of N coefficients is the delay
line length (N) + LDW throughput (1) + LDW delay (4) + MPYSP throughput (1) + MPYSP
delay (3) + ADDSP throughput (1) + ADDSP delay (3) + adding four accumulators together (8)
+ STW throughput (1) + STW delay (4) = N + 26 cycles. If we were to include two instructions
to set up the modulo addressing for the circular buffer, then the total number of execute cycles
would be N + 28 cycles.
N-
N-
2 2
Given the 4-QAM and 4-PAM constellations below,
(a) Derive the symbol error probability formula for 4-QAM, also known as Quadrature Phase
Shift Keying (QPSK), shown in Figure 1.
(b) Calculate the average power of the QPSK signal given d.
(c) Write the probability of symbol error for 4-PAM and 4-QAM as functions of the signal-tonoise ratio (SNR). Superimposed on the same plot, plot the probability of symbol error for 4PAM and 4-QAM as a function of SNR. For the horizontal axis, let the SNR take on values
from 0 dB to 20 dB. Comment on the differences in the symbol error rate vs. SNR curves.
(d) Are the bit assignments for the PAM or QAM optimal with respect to bit error rate in Figure
1? If not, then please suggest another bit assignment to achieve a lower bit error rate given
the same scenario, i.e., the same SNR. The optimal bit assignment (in terms of bit error
probability) is commonly referred to as Gray coding.
P- 1
a) Based on lecture notes on slides 15-13 through 15-15, the case of 4-QAM corresponds to
having the four corner points in the 16-QAM constellation. So, the probability of correct
detection is given by type 3 correct detection given on page 15-4 in the lecture notes. Since
T=1, then the formula for the probability of correct detection is given
by
d
P3 c 1 Q
Thus
the
probability
of
error
is
given
d
d
d
by Pe 1 P3 c 1 1 Q 2Q Q 2 .
b) To obtain the energy of si , we notice that the sum of the squared coordinates will give you the
energy of the signal si . To see this, notice that si is represented by the following vector
1
PAVG 4 2d 2 2d 2 .
4
PSignal E / T
E
2d 2 d 2
c) SNR is defined as SNR
for the 4-QAM. For the 4
PNoise 2 2 2 2 2 2 2
1
2 2 9d 2 5d 2
PSignal E / T
E
PAM, SNR
. Substituting this into the Pe
2
2
PNoise 2
2
2 2
2 2
formula we obtain the following formulas:
d
d
PeQAM 2Q Q 2 2Q SNR Q 2 SNR
Pe PAM
3 SNR
Q
2
5
P- 2
QAM performs much better than the PAM system due to the following reasons: first the
noise variance in the PAM system is higher so we expect its error rate to be higher; on the
other hand the PAM system is not fully utilizing the bandwidth as opposed to QAM.
d) The bit assignments are not optimal because the difference between the bits across the
decision regions are more than one bit while they can be made one by using Gray Coding
since each decision region has only two neighbors. The following bit assignment is optimal.
P- 3
P- 4
3 0 0 0 5 0 0 0 7 0 0 0]
In the code provided by Johnson, Sethares & Klein, please replace plot with stem so that the
discrete-time signals are plotted in discrete time instead of continuous time.
Please comment on the different outputs. Please state whether each method implements linear
convolution or circular convolution or something else. Please see the online homework hints.
Hints: To compute the values of h, please use the "rcosine" command in Matlab and not the
"SRRC" command. The length of h should be 16. The syntax of the "rcosine" command is
rcosine(Fd, Fs, TYPE_FLAG, beta)
The ratio Fs/Fd must be a positive integer. Since the the number of samples per symbol is 4,
Fs/Fd must be 4. The rcosine function is defined in the Matlab communications toolbox.
Running the rcosine function with these parameters gives a pulse shape of 25 samples. We want
to keep four symbol periods of the pulse shape. That is, we want to keep two symbol periods to
the left of the maximum value, the symbol period containing the maximum value as the first
sample, and the symbol period immediately following that:
rcosinelen25 = rcosine(1, 4, 'fir', 0.75);
h = rcosinelen25(5:20);
stem(h)
Q-1
Some of the methods yield linear convolution, and some do not. With an input signal of 32
samples in length and a pulse shaping filter with an impulse response of 16 samples in length,
linear convolution would produce a result that is 47 samples in length (i.e., 32 + 16 - 1).
For the FFT-based method, the length of the FFT determines the length of the filtered result. An
FFT length of less than 47 would yield circular convolution, but it wouldn't be linear
convolution. When the FFT length is long enough, the answer computed by circular convolution
is the same as by linear convolution.
Consider when the filter is a block in a block diagram, as would be found in Simulink or
LabVIEW. When executing, the filter block would take in one sample from the input and
produce one sample on the output. How many times to execute the block? As many times as
there are samples on the input. How many samples would be produced? As many times as the
block would be executed.
In particular, pay attention to the use of the FFT to implement linear filtering. A similar trick is
used in multicarrier communication systems, such as DSL, WiFi (IEEE 802.11a/g), WiMax
(IEEE 802.16e-2005), next-generation cellular data transmission (LTE), terrestrial digital audio
broadcast, and handheld and terrestrial digital video broadcast.
Solution: The filter is given by its impulse response h[n] that has a length of Lh samples. The
signal is given by x[n] and it has a length of Lx samples. Both the impulse response and input
signal are causal. In this problem, Lh is 16 samples and Lx is 32 samples.
The first way of filtering computes the output signal as the linear convolution of x[n] and h[n]:
Lh 1
h[m] x[n m]
m 0
Q-2
The FFT of the circular convolution of x[n] and h[n] is the product of their individual FFTs. In
circular convolution, the signals x[n] and h[n] are considered to be periodic with period N. One
period of N samples of the circular convolution is defined as
N 1
where (())N means that the argument is taken modulo N. We will henceforth refer to the circular
convolution between periodic signals of length N as circular convolution of length N. On a
programmable digital signal processor, we would use the modulo addressing mode to accelerate
the computation of circular convolution.
Circular convolution of two finite-length sequences x[n] and h[n] is equivalent to linear
convolution of those sequences by padding (appending) Lx-1 zeros to h[n] and Lh-1 zeros to x[n]
so that both of them are of the same length and using a circular convolution length of Lx+Lh-1
samples. This is the approach used in the FFT-based method in this problem.
The FFT-based method to compute the linear convolution uses an FFT length of N of Lx+Lh-1.
First, the FFT of length N of the zero-padded x[n] is computed to give X[k], and the FFT of
length N of the zero-padded h[n] is computed to give H[k]. Second, the product Ycircular[k] = X[k]
H[k] for k = 0,, N-1 is computed. Then, the inverse FFT of length N of Ycircular[k] is computed
to find ycircular[n]. This third way results in an output signal of Lx+Lh-1 = 47 samples.
The fourth way to filter a signal uses a time-domain formula. It is an alternate implementation
of the same approach used by the filter command. Hence, this approach gives an output of
length Lx = 32 samples.
% waystofilt.m "conv" vs. "filter" vs. "freq domain" vs. "time domain"
over=4; % 4 samples/symbol
r=0.75; % roll-off
rcosinelen25 = rcosine(1, 4, 'fir', 0.75);
h = rcosinelen25(5:20);
x= [-7 0 0 0
-5 0 0 0
-3 0 0 0 -1 0 0 0 1 0 0 0 3 0 0 0 5 0 0 0 7 0 0 0];
yconv=conv(h,x) ;
% (a) convolve x[n] * h[n]
n=1:length(yconv);stem(n,yconv)
xlabel('Time');ylabel('yconv');title('Using conv function'); figure
yfilt=filter(h,1,x) ;
% (b) filter x[n] with h[n]
n=1:length(yfilt);stem(n,yfilt)
xlabel('Time');ylabel('yfilt');title('Using the filter command'); figure
N=length(h)+length(x)-1;
% pad length for FFT
ffth=fft([h zeros(1,N-length(h))]);
% FFT of impulse response = H[k]
fftx=fft([x, zeros(1,N-length(x))]);
% FFT of input = X[k]
ffty=ffth .* fftx;
% product of H[k] and X[k]
yfreq=real(ifft(ffty));
% (c)IFFT of product gives y[n]
% its complex due to roundoff
n=1:length(yfreq); stem(n,yfreq)
xlabel('Time');ylabel('yfreq');title('Using FFT'); figure
z=[zeros(1,length(h)-1),x];
% initial state in filter = 0
for k=1:length(x)
% (d) time domain method
ytim(k)=fliplr(h)*z(k:k+length(h)-1)';
% iterates once for each x[k]
end
% to directly calculate y[k]
n=1:length(ytim); stem(n,ytim)
xlabel('Time');ylabel('ytim');title('Using the time domain formula');
%end of function
Q-3
yfilt
yconv
0
0
-2
-2
-4
-4
-6
-6
-8
10
15
20
25
Time
30
35
40
45
-8
0
50
10
15
20
25
30
35
30
35
Time
Using the time domain formula
Using FFT
8
2
ytim
yfreq
-2
-2
-4
-4
-6
-6
-8
10
15
20
25
Time
30
35
40
45
50
-8
0
10
15
20
25
Time
Q-4
Spring 2014
Prof. Evans
P(z)
1/36
2/36
Page S-1
4
5
6
7
8
9
10
11
12
3/36
4/36
5/36
6/36
5/36
4/36
3/36
2/36
1/36
(2) Adding the two random variables results in another random variable Z = X + Y which takes on
values between 2 and 12, inclusive. Since the dice are rolled independently, the numbers generated are
independent.
.
The result of the convolution of P x and P y
0.18
0.16
0.14
0.12
PZ(z)
0.1
0.08
0.06
0.04
0.02
0
7
Z
10
11
12
The convolution of two rectangular pulses of the same length N samples gives a triangular pulse of
length 2N 1 samples. Example calculations:
Evaluating the above convolution, we get the same pdf as obtained in the table. The output of the
Matlab simulation of the convolution is displayed in the above graph. The conv method was used for
the convolution. The stem method was used for plotting.
(b) X is uniformly distributed on [0, 2]. Therefore
uniformly distributed on [0, 4],
Adding Random Variables
fZ(z)
1/4
( x C )dx 1
shifts f X (z ) by 2.
Page S-3
Page S-4