digital signal processing (dsp) michael j. piovoso · pdf filedigital signal processing (dsp)...

41
Digital Signal Processing (DSP) Michael J. Piovoso Student Handouts: Course materials for this program are the sole property of Michael J. Piovoso and cannot be reproduced or used for any purposes without his expressed consent.

Upload: ledieu

Post on 06-Feb-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Digital Signal Processing (DSP) Michael J. Piovoso

Student Handouts: Course materials for this program are the sole property of Michael J. Piovoso and cannot be reproduced or used for any purposes without his expressed consent.

Page 2: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

What we’ll cover today �  Signals - Analog and Digital �  What is Digital Signal Processing (DSP) ◦  Processing in the time domain ◦  Processing in the frequency domain

�  Applications �  Analog vs. Digital �  Advantages and Disadvantages of DSP �  History �  Key Requirements

Page 3: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

What is a Signal?

� A function of independent variables such as time, distance, position, temperature, pressure, etc.

� A signal carries information

� Examples: speech, music, seismic, image and video

Page 4: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

What is a Signal?

• A signal can be a function of one, two or N independent variables

• Speech is a 1-D signal as a function of time • An image is a 2-D signal as a function of space

• Video is a 3-D signal as a function of space and time

Page 5: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Analog signals

• Signals that are continuous in both the dependant and independent variable(e.g., amplitude and time) • Most environmental signals are continuous-time signals

Page 6: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Discrete signals

• Signals that are continuous in the dependant variable (e.g., amplitude) but discrete in the independent variable (e.g., time). • They are typically associated with sampling of continuous-time signals.

Page 7: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Digital Signals

•  Signals that are discrete in both the dependent and independent variables (amplitude and time). They are generated by quantizing the amplitude of a signal at specific points in time (output of an A/D convertor) or naturally (Stock prices).

Page 8: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Examples of Signals

• Stock price & volume • EEG

• time

• pos

ition

• Video

• Dual Tone Multi-frequency

Page 9: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Comparison

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1

0

1 Analog signal

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1

0

1 Discrete signal

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1

0

1 Digital signal

Page 10: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

What is DSP?

• DSP is the process of extracting information from digital signals. • There are two broad classes

- Filtering – information is in the amplitude history of the signal - Spectral Analysis – information is in frequency makeup of the signal.

Page 11: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Filtering

0 1 2 3 4 5 6 7-2

-1.5

-1

-0.5

0

0.5

1

1.5

ADC DSP DAC

0 1 2 3 4 5 6 7-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Page 12: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Spectral Analysis

0 1 2 3 4 5 6 7-2

-1.5

-1

-0.5

0

0.5

1

1.5

ADC DSP Display

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

• DSP= NUMERICAL PROCESSING OF SIGNALS

Page 13: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Spectral Analysis

• Can you tell the difference?

Page 14: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Spectral Analysis

Page 15: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Features of DSP

• Signals come from the real world • Need to react in real time • Need to measure signals and convert them to digital numbers

• Signals are discrete • Information in between discrete samples is lost

Page 16: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Real-Time Processing • Most of the signals in our environment are analog such as sound, temperature and light • To processes these signals with a computer, we must:

1. convert the analog signals into electrical signals, e.g., using a transducer such as a microphone to convert sound into electrical signal

2. digitize these signals, or convert them from analog to digital, using an ADC (Analog to Digital Converter)

Page 17: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Real-Time Processing

• In digital form, signal can be manipulated • Processed signal may need to be converted back to an analog signal before being passed to an actuator (e.g., a loudspeaker)

• Digital to analog conversion and can be done by a DAC (Digital to Analog Converter)

Page 18: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

DSP Components

• Input lowpass filter (anti-aliasing filter) • Analog to digital converter (ADC) • Digital computer or digital signal processor • Digital to analog converter (DAC) • Output lowpass filter (anti-imaging filter)

Page 19: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

DSP Components

Page 20: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Steps in Digital Signal Processing

• Analog input signal is filtered to be a band-limited signal by an input lowpass filter • Signal is then sampled and quantized by an ADC • Digital signal is processed by a digital circuit, often a computer or a digital signal processor • Processed digital signal is then converted back to an analog signal by a DAC • The resulting step waveform is converted to a smooth signal by a reconstruction filter called an anti-imaging filter

Page 21: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Advantages of DSP

• No drifting effects (except at the front end (ADC) and the backend (DAC))

• Age • Temperature

• Exact reproducibility • High degree of accuracy (determined by the number of bits) • Flexibility

Page 22: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Advantages

• Changes and modifications (reprogram sources and coefficients) • Handle multiple functions simultaneously • Performance o >100th order filters o Adaptive filters o Linear phase filters o Parallel filter bank (FFT)

Page 23: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Disadvantages

• DSP techniques are limited to signals with relatively low bandwidths • The point at which DSP becomes too expensive will depend on the application and the current state of conversion and digital processing technology

• Currently DSP systems are used for signals up to video bandwidths (about 10 MHz) • The cost of high-speed ADCs and DACs and the amount of digital circuitry required to implement very high-speed designs (> 100 MHz) makes them impractical for many applications • As conversion and digital technology improve, the bandwidths for which DSP is economical continue to increase

Page 24: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Disadvantages

• The need for an ADC and DAC makes DSP not economical for simple applications (e.g., a simple filter) • Higher power consumption and size of a DSP implementation can make it unsuitable for simple very low-power or small size applications

Page 25: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Applications

• Audio and speech processing - generating CDs. • Sonar and radar signal processing – target detection, position and velocity determination, tracking. • Sensor array processing • Spectral estimation •  Statistical signal processing •  Digital image processing

Page 26: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Applications • Signal processing for communications • Biomedical signal processing - analysis of biomedical signals, diagnosis, patient monitoring, preventive health care, artificial organs • Seismic data processing • Noise cancellation • Adaptive filtering • Communication – encoding, decoding, detection, equalization, filtering, etc.

Page 27: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Image Processing Example

Page 28: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

History of DSP

• Up to 1950’s: signal processing done with analog systems using electronic circuits or mechanical devices • 1950’s: digital computers used to simulate signal processing systems before implementing in analog hardware – cheap way to vary parameters and test system output

Page 29: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

History of DSP

• 1965: Cooley and Tukey (re)discover efficient algorithm for Fast Fourier Transforms (FFTs) – made feasible real-time signal processing as well as algorithms previously thought impossible to implement on digital computers • 1980’s: IC technology advancements led to very fast fixed-point and floating-point microprocessors for digital signal processing • 2000s – FPGA primarily used for DSP

Page 30: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

DSP Functionality

• Common features of DSP applications Ø They use a lot of multiplying and adding operations Ø They deal with signals that come from the real world Ø They require a certain response time

• Key DSP operations Ø Filtering Ø Correlation Ø Discrete transformation

Page 31: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Why do we need DSPs

• DSP operations require many calculations of the form: A = B*C + D • This simple equation involves a multiply and an add operation • The multiply instruction of a GPP is very slow compared with the add instruction

Ø Motorola 68000 microprocessor uses o 10 clock cycles for add o 74 clock cycles for multiply

Page 32: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Why do we need DSPs • Digital signal processors can perform the multiply and the add operation in just one clock cycle

Ø Most DSPs have a specialized instruction that causes them to multiply, add and save the result in a single cycle Ø This instruction is called a MAC (Multiply, Add, and Accumulate)

• DSPs aim to minimize cost, power, memory use, and development time

Page 33: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Digital Signal Processor Architectures

• Von Neuman Ø Von Neumann machines store program and data in the same memory area with a single bus Ø An instruction contains the operation command and the address of data to be operated on (operand) Ø Most of the general-purpose microprocessors such as Motorola 68000 and Intel 80x86 use this architecture Ø It is simple in hardware implementation, but the data and program are required to share a single bus

Page 34: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Digital Signal Processing Processors

• Harvard architecture Ø The only difference in Harvard architecture is that program and data memories are separated and use physically separate transmission paths Ø Enables the machine to transfer instructions and data simultaneously-- enhances performance Ø The Harvard architecture is more commonly used in specialized microprocessors for real-time and embedded applications Ø However, only the early DSP chips use the Harvard architecture because of the cost

Page 35: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Digital Signal Processing Architecture

• Modified Harvard architecture Ø Cost penalty with the Harvard architecture, which needs twice as many address and data pins on the chip Ø To balance cost and performance, modified Harvard architecture is used in most DSPs Ø Uses single data and address bus externally but internally there are two separate busses for program and data Ø The separation of program and data information is done by timing (multiplexing) Ø For one clock cycle, program information flows on the pins, and in second cycle data follows on the same pins

Page 36: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Texas Instruments TMS 320 Series

• C1X, C2X Ø Fixed-point devices with 16-bit data bus width Ø Used in toys, hard disk drives, modems and active car suspensions

• C3X Ø Floating-point devices with 32-bit data bus width, which provides much wider dynamic range as compared to fixed-point devices Ø Because of higher accuracy, used in hi-fi systems, voice mail systems and 3D graphic processing

Page 37: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Texas Instruments TMS 320 Series

• C4X Ø 32-bit floating-point device designed for parallel processing Ø Optimized on-chip communication channel enables several devices to be put together to form a parallel cluster Ø Used in virtual reality, recognition and parallel processing systems

• C5X Ø Low power fixed-point DSPs Ø Used for personal and portable electronics such as cell phones, digital music players, and digital cameras

Page 38: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Texas Instruments TMS 320 Series

• C6X Ø High performance DSPs, with speeds up to 1 GHz Ø Both fixed and floating-point devices Ø Used in wired and wireless broadband networks, imaging applications and professional audio

•  C8X Ø Multimedia processors, with parallel processing on a single chip with advanced DSPs and a controlling RISC processor Ø Used in high performance telephony, 3D computer graphics, virtual reality and a number of multimedia applications

Page 39: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Key Requirements

• Bits Ø A/D Converter o Quantization noise (-6*Nb) o Linearity(spurs and harmonics) (-6*Nb)

Ø Arithmetic

o 16, 24, 32 bit fixed point o 32 or 64 bit floating point

Page 40: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Key Requirements

• Horsepower Ø Raw multiply rates

Ø Architecture to support multiplication rates Ø Addressing capabilities

Ø Memory and I/O speeds

Page 41: Digital Signal Processing (DSP) Michael J. Piovoso · PDF fileDigital Signal Processing (DSP) Michael J. Piovoso ... •Currently DSP systems are used for signals up to video ... •Sonar

Key Requirements

• Stream oriented processing Ø x(t)àanalog filter àS/HàADCàReg-àDSPàRegàD/Aày(t) •  Block oriented processing Ø x(t)àanalog filteràS/HàADCàInput bufferàDSP FFTàOutput bufferàDisplay