Top Banner
Introduction to DSP Systems Dr. Deepa Kundur University of Toronto Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 1 / 30 Analog vs. Digital Analog and Digital Signals I analog signal = continuous-time + continuous amplitude I digital signal = discrete-time + discrete amplitude t 2 1 2 3 -1 -2 -3 4 -2 -4 x(t) t 1 2 1 2 3 -1 -2 -3 0.5 1.5 2.5 4 0.5 -2 -4 x(t) -1 1 0 n x[n] -2 -3 2 3 1 -1 1 0 n x[n] -2 -3 2 3 2 1 1 continuous-time discrete-time continuous amplitude discrete amplitude Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 2 / 30 Analog vs. Digital Analog and Digital Signals I Analog signals are fundamentally significant because we must interface with the real world which is analog by nature. I Digital signals are important because they facilitate the use of digital signal processing (DSP) systems, which have practical and performance advantages for several applications. Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 3 / 30 Analog vs. Digital Analog and Digital Systems I analog system = analog signal input + analog signal output I advantages : easy to interface to real world, do not need A/D or D/A converters, speed not dependent on clock rate I digital system = digital signal input + digital signal output I advantages : re-configurability using software, greater control over accuracy/resolution, predictable and reproducible behavior Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 4 / 30
8

Analog vs. Digital Analog and Digital Signalsdkundur/course_info/real...Analog vs. Digital Analog-to-Digital Conversion Quantizer Coder x a (t) x(n) x q (n) Analog signal Discrete-time

Jun 25, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Analog vs. Digital Analog and Digital Signalsdkundur/course_info/real...Analog vs. Digital Analog-to-Digital Conversion Quantizer Coder x a (t) x(n) x q (n) Analog signal Discrete-time

Introduction to DSP Systems

Dr. Deepa Kundur

University of Toronto

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 1 / 30

Analog vs. Digital

Analog and Digital Signals

I analog signal = continuous-time + continuous amplitude

I digital signal = discrete-time + discrete amplitude

t

2

1 2 3-1-2-3 4

-2

-4

x(t)

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

continuous-time

discrete-time

continuous amplitude discrete amplitude

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 2 / 30

Analog vs. Digital

Analog and Digital Signals

I Analog signals are fundamentally significant because we mustinterface with the real world which is analog by nature.

I Digital signals are important because they facilitate the use ofdigital signal processing (DSP) systems, which have practicaland performance advantages for several applications.

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 3 / 30

Analog vs. Digital

Analog and Digital Systems

I analog system =analog signal input + analog signal output

I advantages: easy to interface to real world, do not need A/D orD/A converters, speed not dependent on clock rate

I digital system =digital signal input + digital signal output

I advantages: re-configurability using software, greater controlover accuracy/resolution, predictable and reproducible behavior

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 4 / 30

Page 2: Analog vs. Digital Analog and Digital Signalsdkundur/course_info/real...Analog vs. Digital Analog-to-Digital Conversion Quantizer Coder x a (t) x(n) x q (n) Analog signal Discrete-time

Analog vs. Digital

Analog-to-Digital Conversion

CoderQuantizerx(n)x (t)a x (n)q

Analogsignal

Discrete-timesignal

Quantizedsignal

Digitalsignal

A/D converter

0 1 0 1 1 . . .Sampler

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 5 / 30

Analog vs. Digital

Analog-to-Digital Conversion

CoderQuantizerx(n)x (t)a x (n)q

Analogsignal

Discrete-timesignal

Quantizedsignal

Digitalsignal

A/D converter

0 1 0 1 1 . . .Sampler

Sampling:I conversion from cts-time to dst-time by taking “samples” at

discrete time instants

I E.g., uniform sampling: x(n) = xa(nT ) where T is the samplingperiod and n ∈ Z

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 6 / 30

Analog vs. Digital

Analog-to-Digital Conversion

CoderQuantizerx(n)x (t)a x (n)q

Analogsignal

Discrete-timesignal

Quantizedsignal

Digitalsignal

A/D converter

0 1 0 1 1 . . .Sampler

Sampling:

-1 1 0 n

x[n]

-2 -3 2 3

1

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 7 / 30

Analog vs. Digital

Analog-to-Digital Conversion

CoderQuantizerx(n)x (t)a x (n)q

Analogsignal

Discrete-timesignal

Quantizedsignal

Digitalsignal

A/D converter

0 1 0 1 1 . . .Sampler

Quantization:I conversion from dst-time cts-valued signal to a dst-time

dst-valued signal

I quantization error: eq(n) = xq(n)− x(n) for all n ∈ Z

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 8 / 30

Page 3: Analog vs. Digital Analog and Digital Signalsdkundur/course_info/real...Analog vs. Digital Analog-to-Digital Conversion Quantizer Coder x a (t) x(n) x q (n) Analog signal Discrete-time

Analog vs. Digital

Analog-to-Digital Conversion

CoderQuantizerx(n)x (t)a x (n)q

Analogsignal

Discrete-timesignal

Quantizedsignal

Digitalsignal

A/D converter

0 1 0 1 1 . . .Sampler

Quantization:

-1 1 0 n

x [n]

-2 -3 2 3

1

q

01234567

01234567

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 9 / 30

Analog vs. Digital

Analog-to-Digital Conversion

CoderQuantizerx(n)x (t)a x (n)q

Analogsignal

Discrete-timesignal

Quantizedsignal

Digitalsignal

A/D converter

0 1 0 1 1 . . .Sampler

Coding:I representation of each dst-value xq(n) by a

b-bit binary sequence

I e.g., if for any n, xq(n) ∈ {0, 1, . . . , 6, 7}, then the coder mayuse the following mapping to code the quantized amplitude:

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 10 / 30

Analog vs. Digital

Analog-to-Digital Conversion

CoderQuantizerx(n)x (t)a x (n)q

Analogsignal

Discrete-timesignal

Quantizedsignal

Digitalsignal

A/D converter

0 1 0 1 1 . . .Sampler

Example coder:

0 000 4 1001 001 5 1012 010 6 1103 011 7 111

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 11 / 30

Analog vs. Digital

Sampling Theorem

If the highest frequency contained in an analog signal xa(t) isFmax = B and the signal is sampled at a rate

Fs > 2Fmax = 2B

then xa(t) can be exactly recovered from its sample values using theinterpolation function

g(t) =sin(2πBt)

2πBt

Note: FN = 2B = 2Fmax is called the Nyquist rate.

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 12 / 30

Page 4: Analog vs. Digital Analog and Digital Signalsdkundur/course_info/real...Analog vs. Digital Analog-to-Digital Conversion Quantizer Coder x a (t) x(n) x q (n) Analog signal Discrete-time

Analog vs. Digital

Sampling Theorem

Sampling Period = T =1

Fs=

1

Sampling Frequency

Therefore, given the interpolation relation, xa(t) can be written as

xa(t) =∞∑

n=−∞

xa(nT )g(t − nT )

xa(t) =∞∑

n=−∞

x(n) g(t − nT )

where xa(nT ) = x(n); called bandlimited interpolation.

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 13 / 30

Analog vs. Digital

Digital-to-Analog Conversion

-1 1 0 n

x[n]

-2 -3 2 3

1

original/bandlimitedinterpolated signal

I Common interpolation approaches: bandlimited interpolation,zero-order hold, linear interpolation, higher-order interpolationtechniques, e.g., using splines

I In practice, “cheap” interpolation along with a smoothing filteris employed.

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 14 / 30

Analog vs. Digital

Digital-to-Analog Conversion

-T T0 t

-2T 2T 3T

1

original/bandlimitedinterpolated signal

zero-orderhold

-3T

I Common interpolation approaches: bandlimited interpolation,zero-order hold, linear interpolation, higher-order interpolationtechniques, e.g., using splines

I In practice, “cheap” interpolation along with a smoothing filteris employed.

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 15 / 30

Analog vs. Digital

Digital-to-Analog Conversion

-T T0 t

-2T 2T 3T

1

-3T

linearinterpolation

original/bandlimitedinterpolated signal

I Common interpolation approaches: bandlimited interpolation,zero-order hold, linear interpolation, higher-order interpolationtechniques, e.g., using splines

I In practice, “cheap” interpolation along with a smoothing filteris employed.

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 16 / 30

Page 5: Analog vs. Digital Analog and Digital Signalsdkundur/course_info/real...Analog vs. Digital Analog-to-Digital Conversion Quantizer Coder x a (t) x(n) x q (n) Analog signal Discrete-time

DSP Systems

A DSP System

A/D DSP D/A

Analogsignal

Analogsignal

Sampled datasignal

Analogsignal

Cts-time dst-amp “staricase” signal

Digitalsignal

Digitalsignal

DSP System

AntialiasingFilter

Sample and Hold

Reconstruction

Filter

I In practice, a DSP system does not use idealized A/D or D/Amodels.

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 17 / 30

DSP Systems

A DSP System

A/D DSP D/A

Analogsignal

Analogsignal

Sampled datasignal

Analogsignal

Cts-time dst-amp “staricase” signal

Digitalsignal

Digitalsignal

DSP System

AntialiasingFilter

Sample and Hold

Reconstruction

Filter

Anti-aliasing Filter:I ensures that analog input signal does not contain frequency

components higher than half of the sampling frequency (to obeythe sampling theorem)

I this process is irreversible

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 18 / 30

DSP Systems

A DSP System

t

2

1 2 3-1-2-3 4

-2

-4

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

Input Signal

t

2

1 2 3-1-2-3 4

-2

-4

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

Anti-aliased Signal

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 19 / 30

DSP Systems

A DSP System

A/D DSP D/A

Analogsignal

Analogsignal

Sampled datasignal

Analogsignal

Cts-time dst-amp “staricase” signal

Digitalsignal

Digitalsignal

DSP System

AntialiasingFilter

Sample and Hold

Reconstruction

Filter

Sample and Hold:I holds a sampled analog value for a short time while the A/D

converts and interprets the value as a digital

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 20 / 30

Page 6: Analog vs. Digital Analog and Digital Signalsdkundur/course_info/real...Analog vs. Digital Analog-to-Digital Conversion Quantizer Coder x a (t) x(n) x q (n) Analog signal Discrete-time

DSP Systems

A DSP System

t

2

1 2 3-1-2-3 4

-2

-4

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

Anti-aliased Signal

t

2

1 2 3-1-2-3 4

-2

-4

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

Sampled Data Signal

anti-aliased signal

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 21 / 30

DSP Systems

A DSP System

A/D DSP D/A

Analogsignal

Analogsignal

Sampled datasignal

Analogsignal

Cts-time dst-amp “staricase” signal

Digitalsignal

Digitalsignal

DSP System

AntialiasingFilter

Sample and Hold

Reconstruction

Filter

A/D:I converts a sampled data signal value into a digital number, in

part, through quantization of the amplitude

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 22 / 30

DSP Systems

A DSP System

t

2

1 2 3-1-2-3 4

-2

-4

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

Sampled Data Signal

anti-aliased signal

t

2

1 2 3-1-2-3 4

-2

-4

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

Digital Signal

sampled data signal

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 23 / 30

DSP Systems

A DSP System

A/D DSP D/A

Analogsignal

Analogsignal

Sampled datasignal

Analogsignal

Cts-time dst-amp “staricase” signal

Digitalsignal

Digitalsignal

DSP System

AntialiasingFilter

Sample and Hold

Reconstruction

Filter

D/A:I converts a digital signal into a “staircase”-like signal

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 24 / 30

Page 7: Analog vs. Digital Analog and Digital Signalsdkundur/course_info/real...Analog vs. Digital Analog-to-Digital Conversion Quantizer Coder x a (t) x(n) x q (n) Analog signal Discrete-time

DSP Systems

A DSP System

t

2

1 2 3-1-2-3 4

-2

-4

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

Digital Signal

sampled data signal

t

2

1 2 3-1-2-3 4

-2

-4

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

Staircase Signaldigital signal

sampled data signal

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 25 / 30

DSP Systems

A DSP System

A/D DSP D/A

Analogsignal

Analogsignal

Sampled datasignal

Analogsignal

Cts-time dst-amp “staricase” signal

Digitalsignal

Digitalsignal

DSP System

AntialiasingFilter

Sample and Hold

Reconstruction

Filter

Reconstruction Filter:I converts a “staircase”-like signal into an analog signal through

lowpass filtering similar to the type used for anti-aliasing

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 26 / 30

DSP Systems

A DSP System

t

2

1 2 3-1-2-3 4

-2

-4

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

Staircase Signaldigital signal

sampled data signal

t

2

1 2 3-1-2-3 4

-2

-4

t1

2

1 2 3-1-2-3 0.5 1.5 2.5 4

0.5

-2

-4

x(t)

-1 10n

x[n]

-2-3 2 3

1

-1 10n

x[n]

-2-3 2 3

2

1 1

Reconstructed Signal

anti-aliased signal

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 27 / 30

DSP Systems

Real-time DSP Considerations

Q: What are initial considerations when designing a DSP system thatmust run in real-time?

I Algorithm: related to computational operations and accuracyrequired by the application

I Sample rate: the rate at which input samples are received forprocessing

I Speed: to meet an application throughput requirement with agiven sample rate, it must be possible to operate the DSP at aparticular speed

I Numeric representation: format and number of bits used fordata representation; depends on required computationalprecision and dynamic range required for application

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 28 / 30

Page 8: Analog vs. Digital Analog and Digital Signalsdkundur/course_info/real...Analog vs. Digital Analog-to-Digital Conversion Quantizer Coder x a (t) x(n) x q (n) Analog signal Discrete-time

DSP Systems

Real-time DSP Considerations

Q: Is a DSP technology suitable for a real-time application?

I Clock rate: rate at which a DSP performs its most basic unit of

work; to meet the timing requirement with a given sampling rate, it

must be possible to operate the DSP at a particular clock rate

I Throughput: rate of multiply and accumulates (MACs) performed;

measured in number of MACs per second

I Arithmetic and addressing capability: requirements related to the

algorithm complexity, precision and data access

I Precision: associated with format (fixed vs. floating), number of bits

used for data representation, and required dynamic range

I Size, cost and power consumption: technology-dependent

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 29 / 30

DSP Systems

Programmable DSPs

I Application-specific: designed to perform one function moreaccurately, faster or more cost-effectively

I examples: FFT chips, digital filtersI can be programmable within confines of a function; e.g.,

coefficients of a digital filter

I General purpose: microprocessor whose architecture is optimizedto process sampled data at high rates via pipelining andparallelism

I programmable and more cost-effective for general computingI short system design cycle time

Dr. Deepa Kundur (University of Toronto) Introduction to DSP Systems 30 / 30