Você está na página 1de 122

Adv Digital Signal Processing

Lecture 1

Introduction: DSP is Everywhere


Source: Internet, CARE/EME Projects

Dr. Shoab Khan

Outline
Introduction of DSP
Applications
Projects
DSP in Biomedical Engineering
DSP in Radars
DSP in Communication Systems

Course Outline, Text Book, Grading

INTRODUCTION TO DSP

Adv DSP:
Focus on DSP Software Design

DSP
Application of mathematical operations (linear
and non-linear) to digitally represented signals
IN

OUT
A/D DSP

x[0]

D/A

x[1]

n
-3 -2 -1 0

Discrete
Time Signal
General Introduction
sequence x[n]

- as opposed to continuous-time
signals x(t)
- time = independent variable

Example- 1D Signal
Sampled continuous-time (analog) signals
- Speech

DSP
Roots in 17-th and 18-th century
mathematics
An important modern tool in a
multitude of fields of science and
technology
Techniques and Applications of DSP
As old as Newton and Gauss
As new as digital computers and integrated
circuits

Purpose
To estimate characteristic parameters
of signals
Statistical Signal Processing

To transform a signal into a more


desirable form
Fourier, Wavelet etc

Classical numerical analysis formulas


are also DSP
interpolation, integration, and
differentiation

2-D Array: A Digital Image

Typical Scenario

Step 1: Analog sensor picking analog signal (e.g., microphone picking sound)
Step 2: Analog to Digital Converter
Step 3: DSP processes the digital signals (e.g., compression, noise suppression)
Step 4: Digital to analog converter to recover the analog signal

10

Real-Time DSP
Digital Signal in

Example:

Real-Time
Digital Processing

Digital Signal out

Time-constrained Operation or Transformation


performed on digital signals within a required period
of time to maintain synchronization with occurring events.

Processor clocked at 120 MHz and can


perform 120MIPS

Sampling rate = 48KHz (Digital Audio Tape - DAT)


number of instructions per sample = (120 x
106)/(48 x 103) = 2500.
Sampling rate = 8KHz (voice-band, telephony)
number of instructions per sample = 15000.
Sampling rate = 75MHz (CIF 360x288 Video at 30
frames per second)
number of instructions per
sample = 1.6.
11

DSP Targets: Cell Phone


Controlled by Power Management Unit
RF

Microprocessor

Cell

Receiver

Chip

Peripherals

RF
Codec

DSP
Chip

Voice
Codec

-Speech Coders
-Speech Recognition
- Equalizers
- Antenna noise cancellation
-Image enhancement techniques

12

DSP Targets: Cell Phone

13

Purpose
DSP SW Design: Availability of highspeed digital computers has fostered
development of increasingly complex
and sophisticated signal processing
algorithms
Digital Design of DSP: Advances in VLSI
technology have made possible
economical implementations of very
complex digital signal processing
algorithms

DSP APPLICATIONS

Adv DSP:
Focus on DSP Software Design

15

DSP is Everywhere

Sound applications
Compression, enhancement, special effects, synthesis, recognition, echo
cancellation,
Cell Phones, MP3 Players, Movies, Dictation, Text-to-speech,

Communication
Modulation, coding, detection, equalization, echo cancellation,
Cell Phones, dial-up modem, DSL modem, Satellite Receiver,

Automotive
ABS, GPS, Active Noise Cancellation, Cruise Control, Parking,

Medical
Magnetic Resonance, Tomography, Electrocardiogram,

Military
Radar, Sonar, Space photographs, remote sensing,

Image and Video Applications


DVD, JPEG, Movie special effects, video conferencing,

Mechanical
Motor control, process control, oil and mineral prospecting,

DSP in Real Time Embedded Systems


Digital
Radiographic
Imaging

Video
Communications

Data Storage
& Transmission

Web wireless
technology

Real- Time DSP

Space
Imaging
Appls

Speech
Recognition

Car Awake
warning system

Optical
Wearable
Computers

Ultrasound
Medical
Imaging

Spy
Satellite
Imaging
Military
Appls

Real-Time
Video-Camera
Cell-Phones

Digital Signal Processing

Represent signals by a sequence of numbers


Sampling or analog-to-digital conversions

Perform processing on these numbers with a program or HW


Digital signal processing

Reconstruct analog signal from processed numbers


Reconstruction or digital-to-analog conversion
analog
signal

A/D

digital
signal

DSP

Analog input analog output


Speech in Mobile Phone

Analog input digital output


Speech to text

Digital input analog output


Text to speech

Digital input digital output


Compression of a file on computer
Data minning

digital
signal

D/A

analog
signal

EEG electroencephalogram signal


Records the electrical activity of the brain obtained from
electrodes placed on the scalp.

A computer aided system capable of processing biological signals of learners in real-time to


monitor their level of attention, cognition and engagement.

Intra-cardiac Signals

fMRI

fMRI measures brain activity by detecting associated changes in


blood flow

3-D Accelerometers

Powergloves: body pose estimation using a network of 3D


accelerometers

Thallium scans

Fundus Image

The fundus of the eye is the interior surface of the eye, opposite the lens, and
includes the retina, optic disc, macula and fovea,

DSP in CARE / EME


Projects related to signal processing

Intelligent Medical Equipment based Unified Networked


Hospital
Digitization and net-enabling of medical equipment
Incorporation of intelligent diagnostics
Image and signal processing & artificial intelligence

The virtual hospital and workflows in SW


Need to add payment system in the SW

National Storage for Decision Aiding

Cardiac ECG
Intra Cardiac
Holter Monitor

Nuclear
Cardiac & CT
Angiography

Diabetic
Retinopathy,
Maculopathy,
OCT

Hess
Charting

i-Hospital
Use ICT as a Catalyst

Gastroenterology

National
Repository &
Analytics

Eye Care

Diabetic Retinopathy (DR)


Diabetic Maculopathy (DM)
Detection of AMD using OCT
Glaucoma Detection
Diagnosis of Paralytic Strabismus using Hess
Screening
Funded by
AFIO
Dr Mazhar Ishaq
Dr Ubaidullah Yasin
Dr Yasir
CASE/College of EME
Dr Shafaat A Bazaz
Dr Usman Akram
Dr Waheed
Dr Shahzad

Human Retina and Fundus Image

The retina is the layer of tissue at the back of the inner eye
Optic Disc - brightest circular spot
Macula - main central part of retina responsible for fine
details and sharp vision

Blood Vessels

Retinal Image

Feature
Extraction

Feature Selection

Candidate Lesions

Feature Set
Optic Disc
Microaneurysms

Normal

Mild

Moderate

Severe

G
R
A
D
I
N
G

Haemorrhage

Hard Exudates

Soft Exudates

C
L
A
S
S
I
F
I
E
R

A Tele-Cardiac &
i-Diagnostic System
Corporate Social Responsibility

AFIC / NIHD
National ICT R&D Fund

Doctor on the move

Tele-cardiac node at
District hospital

Deployed System in AFIC

Wireless
Internet
ONT

Ambulance
ONT

WebSerices
and NMS
Server

Local Area Network


PDA

WiFi Router
Patient

Doctors
Terminal

Operator

49

ECG Wave

50

ECG View

52

Advanced ECG View

53

Advanced ECG View

54

ECG Streaming View

55

Doctors Comment View

56

Decision Aiding Tools

57

ECG Wave

58

ECG signal
Morphology Comprehension and location of fiducial points

RR

ST

QT

PP

PR

Time Domain Parameters

SDNN

NN50
count

HRV
Triangular
index

Dispersion

Different
ial index

VLF

TINN

ApEn

LF10m

ULF

MSE

LF
Total
Power

HF

HR

Nonlinear Analysis
Parameters

Frequency Domain
Parameters

SDNN
index

RMSSD

SDANN

QRS

pNN50

SEn

DFA

MFA
HRT

Alpha

Logarithm
ic index

HF10m

TWA

IBSI

MKLT

LF/ HF

Input Space Classifier 3rd Stage

Output Space

Membership functions

N
59

Start

Perform Analysis

Acquire Digital ECG data

Perform Time Domain Analysis

no

Ectopic Beat

Perform Frequency Domain Analysis

yes

Set sampling and bit resolution parameters

Perform Nonlinear Analysis

Classify Ectopic Beat


ECG preprocessing and noise removal

Locate fiducial points

Get total no. of


Ectopic beats

Locate P wave, QRS complex and T wave

Eliminate Ectopic Beats

Beat Classification

Repopulate signal
of normal beats

Calculate RR
intervals (Heart
Rate Variability)

Perform Analysis

Calculate QT
interval

Perform Analysis

Calculate ST
segment duration

Perform Analysis

Template
Matching

Morphology
Analysis

Calculate P, QRS and


T wave Statistical
parameters (onset, Offset,
duration, amplitude etc)
Perform Analysis

Calculate T wave
alternans

Calculate Heart
Rate Turbulence

Perform Analysis

Perform Analysis

A Hybrid Classifier

Compute Abnormality Factor

Abnormality
Found?
yes
Transmit
Data

no
Generate Report

Local
Database
End

60

Acquire ECG Data

Remove Baseline Wandering


Remove Powerline Interference
Remove Wideband Noise (AWGN)
Remove Muscle Artifacts such as EMG signals

Bandpass Filter
0.5/1 Hz < fs < 40Hz

Bandpass Filter
0.05 Hz < fs < 150Hz

Signal Smoothing through


polynomial fitting

Signal Smoothing through


higher order polynomial fitting

Gaussian Modeling for


high quality filtering
Monitoring Mode ECG

Raw ECG

Diagnostic Quality ECG

61

Start

ECG Signal

Overall Median Calculation


Measure discrepancy
and eliminate
Sample by Sample shifting in
accordance with median

R waves and RR intervals


are detected

Fourth Degree Polynomial Fit


Median corrected in
each RR interval

Calculate deviation of the signal


with respect to zero line

Baseline wandering free signal

62

Start
Acquire ECG Signal

Compute power spectral density

Slide a 1Hz window on power


spectrum ranging from 40Hz to 70Hz

Create a digital notch filter with


sampling frequency fs, notch
frequency fnotch and attenuation
constant of at least 10dBs

Filter ECG
Compute frequency component
fnotch with highest energy
in the sliding window

Powerline Interface
removed signal

63

Start

Acquire ECG data

Select a mother wavelet e.g. db6

Decompose into subbands

Modify the coefficients by


applying a threshold function

Reconstruct the signal

Diagnosed ECG signal

64

Start

Acquire Digital ECG data

Beats Splitting
and Assignment

Inter-beat
decorrelating transform

Intra-beat
decorrelating transform

Noise Estimation

Diagnosed ECG

QRS Detection

Pilot Signal Estimation

Transform Domain
Wiener Filter

Beats Merging

Inverse Transform

Inverse Transform

65

Start

Digital ECG data


Multiscale Wavelet Transform
using a Quadratic Spline wavelet
Selection of
Characteristic Scales
Determination of Modulus
Maximum Lines of R waves
Calculation of
Singular Degree

Calculation of Time
Window before R peak

Calculation of Time
Window after R peak

Detection of
Modulus Maxima Pair

Detection of
Modulus Maxima Pair

Multiscale Zero-crossing
point and edge detection

Multiscale Zero-crossing
point and edge detection

Elimination of Redundant and


Isolation Modulus Maximum Lines
Detection of R peak
Multiscale Zero-crossing
point and edge detection

R point

Detection of
QRS onset

Detection of
QRS offset

Detection of
Q point

Detection of
S point

QRS onset
and Q point

QRS offset
and S point

Detection of
T point

Detection of P point

Detection of P
wave onset

P point

P wave Onset

Detection of P
wave offset

P wave Offset

T point

Detection of T
wave onset

Detection of T
wave offset

T wave Onset

T wave Offset66

ECG signal with fiducial points marked with cross. P


wave in pink, QRS in blue and S wave in red color
67

AR coefficients
Calculate Y1 APC/
PVC/ NSR/ SVT or VT/ VF

APC/ PVC/ NSR/ SVT

VT/ VF

Calculate Y3 APC/ PVC/ NSR/ SVT

Calculate Y2 VT/ VF

SVT

APC/ PVC/ NSR

VT

VF

Calculate Y4 APC or PVC

APC/ NSR

PVC/ NSR

Calculate Y5 APC or NSR

Calculate Y6 PVC or NSR

APC

NSR

PVC

NSR

68

RR intervals

HRV Preprocessing

DWT

Soft/ hard Thresholding

iDWT

Clean RR intervals

69

T1 T3

P
Q

T3 T4

T1 T2

P
Q

T2 T4

IfS(|T1 T3| < |T1 T2|) and (|T2 ST4| < |T3 T4|) and (|T2 T4| S
< |T1 T2|) and (|T1 T3| < |T3 ST4|)
Then T wave Alternans in this window is present
Here Tn is the nth T wave in a Four Beat Window (n=1,2,3,4)

70

Type

PP
Interval
Variation
(s)

PR
Interval
Variation
(s)

PP
Interval
Duration
(s)

RR
Interval
Duration
(s)

Atrial
Rate
(1/s)

Ventricular
Rate (1/s)

P-wave

PR
Interval
Duration
(s)

QRS
Interval
Duration
(s)

T wave

QT
Interval
Duration
(s)

ST
segment
shift
(mV)

Normal

<0.16

<0.16

0.6 - 1

0.6 - 1

60 - 100

60 - 100

Present,
upright,
round
and
smooth

0.12
0.2

0.06
0.1

Present,
upright and
round

0.36
0.44

-0.05 - 1

FDB

Normal

Normal

Normal

Normal

Normal

Normal

Normal

>0.2

Normal

Normal

Normal

SDB-I

Normal

>0.16

0.33
0.6

0.33
0.6

Normal

Normal

Normal

>0.2

Normal

Normal

Normal

TDB

Normal

>1

Normal

<60

Normal

Normal

Normal

Normal

Myo. In

>1

Ischemia

<-0.05

VER

Normal

Normal

>1

>1

<40

<40

Normal

Normal

>0.1

Normal

SAr

>0.16

>0.16

>0.33

>0.33

Normal

Normal

Normal

Normal

Normal

Normal

Normal

SB

Normal

Normal

>1

>1

<60

<60

Normal

Normal

Normal

Normal

Normal

ST

Normal

Normal

0.33
0.6

0.33
0.6

100 180

100 - 180

Normal

Normal

Normal

Normal

Normal

VF

1 1.5

VT

Normal

Normal

>100

Absent

>0.1

VA

> 1.5

PAC

> 0.16

> 0.16

0.33
0.6

0.33
0.6

Normal

Normal

PVC

Absent

>0.1

Opposite in
direction to
QRS

AT

Normal

Normal

0.24
0.4

150 250

Normal

Normal

AFr

Normal

Normal

Normal

250 400

Normal

Abnorma
l

Normal

AFn

0.33

>400

100 - 180

Abnorma

Normal

71
-

STM: Coherent Burst Satellite Receiver


32 kbps 512 Kbps BPSK/QPSK
HSP52014

DSP Algorithms
Burst Receiver

SBSRAM
A/D

From RF
Board

B-bit DAC & LFP

FEC

To RF
Board

Xlllnx 4062

TMS320C6201

DDS

Carrier recovery and PLL

Flash
68332
SRAM

DSP Software
Embedded Software

49.162 MHz Sine


wave clock
Amplifier &
squarer

Square
wave outpt

Output
Bitsream

Glue Logic in Xilinx


System Board
Integration and testing

72

73

A Pakistani Engineering Team Making History

Voice processing @ 32 ms LEC


VZM1004L, 256 x G.711 or 168 x G.726

VAD, CNG & LPC (Lost Packet Compensation)

Voice band signaling: CAS, DTMF, MF

~6 mw/channel in .18m Standard Cell

World Highest Density


Media Processing Chip
Developed in Pakistan in 2000

User Applications

AVAZ System Components & Resources Manager

Media
Processing
Apps &
Devices

Cell &
Packet
Processing
Apps &
Devices

Call
Control &
Signaling
Protocols
& Apps

RTOS Abstraction Layer

AVAZ
SNMP
Agent
& MIB
Utilities

74

VoIP Platform for PTCL

VoIP platform with multiple applications in


telecom like call centers, IVR, CTI, ACD,
PBX etc

Passive Navigation System

75

Universal Radio Receiver COMINT System


Universal Demodulator
IF up
to 70
MHz

DRSE Demodulator

Ethernet

SD

DATAX

PORT A
SD

RD

SD

PROLIANT

1850R

SD

ONLINE

PORT B
RD

iZ 9200
BWD

PORT SEL

ENTER

DISC

DATA

Test

DRSE Demodulator
Load

On
Line

On
Battery

Smart Replace
Boost Battery Battery

Universal DemultiplexerControl & Operator


Console Computer

Multi Frame Generation


76

Channel Activity Status

Software Defined Radio

SDR

The Technology

From Other
Channels

1010010

Analog
input

Analog to
Digital
Converter

Digital Bandpass
waveform

Bits

Bandpass
modulate

10110
Source
Encode

Pulse
modulated
waveform

Encrypt

Encoded
Bits
Channel
Encoded
Data
Bit to Sym.
& Pulse
Modulate

01101
Encrypted
Data

Multiplexed Data
Scrambled
data
Channel
Encode

1001101
Digital
Bandpass
waveform

De-modulate

Digital
Baseband
waveform

Source
Decoded
Bits
Analog
output

D/A
1010010

Decrypted
Bits
Source
Decode
10110

01101
01010

10101
Scrambler

10001

Bits
Equalizer,
Timing and
Sym. to Bits

Multiplex

Channel
Decode

Channel
Decoded
Data
01101

Descramble

Descrambled Bits
Demultiplexed
Bits
10001
DeDecrypt
Multiplex
To other
Channels

Software Defined Radio (Frequency


Hopping)

80

Software Defined Radio (Equilizer)

81

SDR (Equalizer)

82

Speaker Identification System: Speech Playback

Selected Speech File


for Playback and
Spectrum Analysis

Speech playback with


Spectrum Analysis

KLT (PCA)
Eigenimages examples:
Facial
image
set

Corresponding
eigenfaces

3 eigenimages and the individual variations on those components

Face
aproximation,
from rough to
detailed, as more
coefficients are
added

COURSE OUTLINE
&
LEARNING OUTCOMES

Adv DSP:
Focus on DSP Software Design

85

Course Learning Outcomes


1. To review basic concepts of DSP
a. Use basic concepts of convolution, system analysis,
transformations and design in solution of DSP Problems

2. To build advanced concepts in DSP

a. Learn advanced topics in DSP relating to Multi-rate systems,


Bandpass sampling, Statistical Signal Processing, Wavelet
transform
b. Use these advanced concepts in designing signal processing
systems

3. To learn key areas in DSP Software Design

a. To design DSP SW Systems relating to 1 and 2


b. To develop software relating to 1 and 2 for mapping it on DSP
Processors

Course Outline
Basic Concepts
Fundamentals of discrete-time, linear, shift-invariant signals
and systems in
Representation and Analysis: sampling, quantization, Fourier and
z-transform;
Implementation: filtering and transform techniques;
Design: filter & processing algorithm design.
Efficient computational algorithms for FFT and their implementation.

Course Outline
Advanced Topics
Sampling rate conversion in multirate systems,
multirate signal processing, bandpass sampling
and advanced transforms
Signal Modeling, Least Square Method, Pade
Approximation, Pronys Method, Finite Data
Record and Stochastic Models
Levinson Recursion

Course Outline
DSP SW Design

Hybrid System: DSPs, GPPs and FPGAs


Fixed Point & Floating Point Arithmetic
DSP Architectures and HW interfaces
DSP Processor Programming
DSP BIOS, Programming DMA & Interrupts
DSP Software Engineering Processes
DSP Software Architecture Design

Course Outline
DSP SW
Design

Band-pass
sampling

Multi-rate
Signal
Processing

Signal
Modeling

DSP Fundamentals

Prerequisite
A fundamental course in signal
processing
Liner System analysis and transform
analysis
convolution and filtering
Fourier transforms
Laplace and z transforms

Textbook
Oppenheim, Schafer and
Buck, Discrete-Time
Signal Processing, 2nd
edition (Prentice-Hall,
1999)
Refrences:
Hayes, Digital Signal
Processing (Schaums
Outlines Series), 1999
McClellan, Schafer, &
Yoder, DSP First

Text
Monson H. Hayes
Statistical Digital Signal
Modeling
John Wiley & Sons, Inc

Processing

and

J. G. Proakis, C. M. Rader, F. Ling, & L. Nikias


Advanced Digital Signal Processing

References:
Ifeachor Jervis
Digital Signal Processing- A Practical Approach
Prentice Hall

Marks Distribution
Grading

Sessional #1:
Sessional #2:
Quizzes
Assignments
Term Paper
Term Project:
Final:

20%
20%
5%
5%
2%
5%-10%
40-45%

Homework: Due at the beginning of next week class from


the date of issuing of assignment
Problems from the book / previous exams
MATLAB simulations
Code of DSP Processors

DSP FUNDAMENTALS

Adv DSP:
Focus on DSP Software Design

95

Signals
Basic Types

Discrete-Time Signals: Sequences


Discrete-time signals are represented by sequence of numbers
The nth number in the sequence is represented with x[n]

Sampling of continuous time signal


x[n] is value of the analog signal at xc(nT)
Where T is the sampling period
10

-10
0
10

t (ms)

20

40

60

80

100

10

20

30

40

50 n (samples)

-10
0

Basic Signals
1.5

Unit sample (impulse) sequence


0 n 0
[n]
1 n 0

Unit step sequence


0 n 0
u[n]
1 n 0

1
0.5
0
-10

-5

10

-5

10

-5

10

1.5
1
0.5
0
-10
1

Exponential sequences
0.5

x[n] a n

0
-10

Sinusoidal Sequences
Sinusoid
xn A coson

A complex exponential
x[n] Ae

jon

xn A coson jA sinon
sindemo

Sine and Exp Using Matlab


% sine generation: A*sin(omega*n+theta)
% exponential generation: A^n
n = 0: 1: 50;
% amplitude
A = 0.87;
% phase
theta = 0.4;
% frequency
omega = 2*pi / 20;

% sin generation
xn1 = A*sin(omega*n+theta);
% exp generation

xn2 = A.^n;

Basic Operations

operations

Operations in Matlab

xn1 = [1 0 3 2 -1 0 0 0 0 0];
xn2 = [1 3 -1 1 0 0 1 2 0 0];
yn = xn1 + xn2;

x[n] via impulse functions

Input: sum of weighted shifted impulses

Time Domain Analysis

Linear Time-Invariant Systems

Linear

linearity

Linear
Time-Invariant
System
Linear
Time-Invariant Systems

Linear Time-Invariant System

Input: sum of weighted shifted impulses

Using Linearity and Time-Invariance for the impulses

Sum of wt. Shifted impulses sum of wt. Shifted impulse responses

LTI System

The Spatial Filtering Process


Origin

Simple 3*3
Neighbourhood

3*3 Filter

Image f (x, y)

Original Image
Pixels

Filter (w)

eprocessed = n*e +
j*a + k*b + l*c +
m*d + o*f +
p*g + q*h + r*i

The above is repeated for every pixel in the


original image to generate the filtered image

Você também pode gostar