Digital Signal Processingcsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture13.pdf · ADC { Analog to Digital Converter Mixed-Signal Transform { Converts analog signal to digital signal

Post on 22-Mar-2020

9 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

Digital Signal Processing

Alexander Nelson

October 14, 2019

University of Arkansas - Department of Computer Science and Computer Engineering

Digital Signal Processing

Digital Signal Processing – signal processing in the discrete domain

Signal Processing – “analysis, synthesis, and modification of

signals”

Signals – “functions conveying information about behavior or

attributes of some phenomenon”

1

Signals

Signals – “functions conveying information about behavior or

attributes of some phenomenon”

Real world signals are typically analog

Often sinusoidal in nature

2

Information

Information – “Any entity or form that provides the answer to a

question or resolves uncertainty”

Signals provide information about a phenomenon

Information resolves uncertainty about a question or phenomenon

3

Information: Example

Example:

Question – What is the temperature of an object?

Temperature – physical quality of a material

Signal – Analog quantity of temperature over time

Thermometer – Instrument that measures the physical quantity

Digital Signal – Discrete value of the signal measured by the

thermometer

Information – How much uncertainty the signal resolves

4

Entropy – Information Theory

Entropy – Average amount of information produced by stochastic

source of data

Coin toss - 1 bit of entropy per toss

5

Entropy Example

Assume I have a properly shuffled card deck

What is the uncertainty?

6

Entropy Example

Assume I have a properly shuffled card deck

What is the uncertainty?

What is the probability of drawing any particular card? = 1/52

7

Entropy Example

Assume I have a properly shuffled card deck

What is the uncertainty?

What is the probability of drawing any particular card? = 1/52

Bits of information = log2(52) = 5.7 bits of information

8

Entropy Example

How many bits if you knew it wasn’t a heart?

How many bits if you knew it was a spade?

How many bits if you knew it was the 3 of clubs?

9

Digital Signal Processing

Sensors

Sensor – Component that measures physical phenomena

Usually provides an Analog signal – Need to convert to digital

Raw analog signals carry information

Signal processing enables understanding of that information

10

Sensor Limits

Limitations:

• Range – How wide the physical quantity can be measured

• Resolution – How specific can the measurement be

• Accuracy/Precision – How close is measured value to actual

value

• Raw – Typically measuring voltage or other physical quantity

that relates to the actual value – Requires processing

11

Example

Range – 4-34pF

Sensitivity – 4pf/10000

count = 0.4fF

Non-linear – Above 25pf,

non-linear response

Raw – Capacitance must

be related to physical

quantity

12

Example

Capacitance to position

Fabric sensors detect distance to

person

13

Actuator

Actuator – Component with in input that converts input to energy

e.g.

• Servo – Kinetic Energy

• LED – Light Energy

• Thermal – Heating elements

14

Example – Servo

Servo – Converts PWM signal to angle

15

Transform

Transform – Takes input, modifies, & generates output

Examples:

Smart streetlight – Samples light sensor, turns on streetlight

gradually at sunset

Stereo – Samples CD input and volume dial, plays sound on

speakers

Conceptually:

Input→Transform→Output

16

ADC – Analog to Digital Converter

Mixed-Signal Transform – Converts analog signal to digital signal

DAC is also a mixed-signal transform – converts digital to analog

ADC has the following characteristics:

• Input Range – Voltage of the high and low values

• Output Range/Quantization – Number of bits that the value

can map to

• Sampling Rate – Frequency of measuring the value

17

ADC – Amplification

Many signals don’t have enough peak-to-peak variance to

recognize with high sensitivity

Signal under-loading – ADC isn’t sensitive enough

Amplifier – Transform – Multiplies signal by some value (called

Gain)

Gain – Multiple that signal is multiplied by

Gain > 1 – Amplifier, Gain <1 – attenuator, Gain = 1 – buffer

18

ADC – Amplification

Goal of gain – Obtain peak-to-peak value of signal near the input

range of ADC

Signal overloading – Too much gain; signal outside range of ADC

Clipping – Loss of signal values beyond input range

Signal underloading – Not enough gain; ADC not sensitive

19

Overloading

20

Bias

Bias – Signal average is not centered at center of ADC value

i.e. For ADC with range [-1,1], if x̂ != 0, biased in some direction

For periodic signals (e.g. Alternating Current) removing bias often

referred to as removing the DC (Direct Current)

21

Bias/DC

Recall Lab 7 with the FFT of the

siren

The DC is the first component of

the FFT

Can be completely subtracted

from the signal with no effect on

the periodic signals

22

Recap

Signal is:

• Analog

• Has bias

• Needs amplification to range of ADC

• Needs to be sampled by ADC

These processes are called “signal conditioning”

23

Signal Fidelity

Fidelity – Correspondence of output signal to input signal

(“accuracy”)

Affected by two parameters:

• Sampling Rate – Affects loss of value in time

• Resolution/Quantization – Affects loss of value in space

These two are related – Faster ADCs often have fewer bits

24

Dynamic Range

Dynamic Range – Measure of the precision of a device w/ respect

to range of values it can convert

Difference b/w dynamic range & range?

25

Dynamic Range

Dynamic Range – Measure of the precision of a device w/ respect

to range of values it can convert

Difference b/w dynamic range & range?

Range = peak-to-peak gap

Dynamic range = Ratio of max range to minimum precision of the

converter

All (static range) N-Bit ADCs have the same dynamic range

Often expressed in decibel logarithmic scale

26

Dynamic Range

range = Vmax − Vmin (1)

gap =range

2N(2)

dynamic range =range

gap(3)

=Vmax − Vmin(

Vmax−Vmin

2N

) (4)

=Vmax − Vmin

Vmax − Vmin× 2N (5)

= 2N (6)

Dynamic Range directly related to number of bits

27

Dynamic Range

dynamic range (dB) = 10× log

(range2

gap2

)(7)

= 10× log

(range

gap

)2

(8)

= 20× log

(range

gap

)(9)

= 20× log(2)N (10)

= N × 20× log(2) (11)

= 6.02× N (12)

e.g. 12-bit ADC has dynamic range of 6.02× 12 = 72.2dB

Human ear has approx. 130dB dynamic range

28

Sampling Rate

Sampling Rate should be responsive to application

Sampling sound at 2KHz results in just 2 samples in 1 ms

Clearly underlying signal cannot be reconstructed

29

Sampling Rate

Nyquist Rate – 2× f of highest frequency signal

Nyquist rate guarantees signal can be reconstructed from samples

Hearing Range of Humans ≈ 20Hz-20kHz

Need to sample at least 40kHz for Nyquist rate

MP3 sampling rate = 44.1kHz

30

Noise & Aliasing

Noise – Unwanted signal; e.g. Microwave oven vs. WiFi/Bluetooth

Noise Reduction – Techniques to remove noise from signal path

Shielding – Electrical considerations to reduce noise

Signal-to-noise ratio – Ratio of desired signal to noise

Aliasing – Presence of unexpected signal in the signal path

Source of noise if unhandled

Example: Car wheel in commercials

31

Aliasing Noise

If we are only trying to reconstruct lower frequency signals, can we

just ignore higher frequencies?

High frequency signals subsampled can alias onto our existing

signal, creating noise

32

Removing Aliasing Noise

Two approaches:

1. Sample fast enough to digitally eliminate noise – Overampling

2. Filter higher frequency signal

Oversampling is expensive in terms of storage & processing

33

Low Pass Filter

Filter – “pass through a device to remove unwanted material”

Signal Filter – Remove unwanted signal/noise

Low Pass Filter – Filter that lets low frequency signals through

sometimes called anti-aliasing filter

Center Frequency – Frequency that all signals below should go

through, all above should stop

Ideal filter 34

Low-Pass Filter

Realistic Low-Pass Filter

Unfortunately, real filters don’t respond perfectly

Some noise will get into the system

35

Complete Input Path

We now have the trappings of a full input DSP Path

36

Playback Path

What about the other direction?

37

Playback Path

What about the other direction?

Playback path – reconstruct the original signal

38

Playback Path

Speaker – Actuator for a sound system

Amplifier/Filter swap places – Don’t amplify sound then try to

remove

39

Digital to Analog Converter (DAC)

Digital to Analog Converter has:

• Input Range – Number of bits

• Output Range – Real quality (e.g. Volts)

• Sampling Rate – Rate at which DAC consumes input,

produces output

40

Complete DSP System

What about modifications?

41

top related