Anda di halaman 1dari 102

PEMP ESD2521

Session 2 : Review On Signals

Session delivered by: Chandan N.

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP ESD2521

Session Objectives
To understand basics operation on signals To understand the Time-Domain Characterization of LTI system To understand the effects of under sampling and over sampling To understand the concept of convloution To review on Time domain and Frequency domain signals

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP ESD2521

Session Topics
Types of Signals Discrete time Systems Sampling Signal processing Aliasing

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP ESD2521

Basic Sequences

1, n = 0 - [ n] = Unit sample sequence 1 0, n 0


n
4
3 2 1 0 1 2 3 4 5 6

Unit step sequence 1

1, n 0 [ n] = 0, n < 0

n
4

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP ESD2521

Basic Sequences Real sinusoidal sequence x[n] = A cos(o n + ) where A is the amplitude, o is the angular frequency, and is the phase of x[n] Example = 0.1
o

2 1 Amplitude 0 -1 -2

10

20 Time index n

30

40

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP

Basic Sequences
n

ESD2521

Exponential sequencex[ n] = A , < n <

, =e where A and are real or complex numbers If we write A = A e j , x[n] = then we can express xre [n] = A e
o n j ( o + jo ) n Ae e

( o + jo )

= xre [n] + j xim [n],

where o n xim [n] = A e sin(o n + )

cos(o n + ),

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP ESD2521

Basic Sequences
1 0.5

xre [n]

Amplitude

0 -0.5 -1

and xim [n] of a complex exponential (o = 0) sequence are real sinusoidal sequences with(o > 0) constant (o < 0), growing and decaying Imaginary part amplitudes for n > 0 1
Real part 10

Amplitude

20 Time index n

30

40

0.5 0 -0.5 -1

10

20 Time index n

30

40

x[n] = exp( + j 6 )n
1 12
M.S. Ramaiah School of Advanced Studies, Bengaluru 7

PEMP ESD2521

Basic Sequences
Real exponential sequence where A and a are real numbers

x[ n] = A n ,

< n <

= 1.2 50 40

= 0.9 20 15

Amplitude

20 10 0 0 5 10 20 15 Time index n 25 30

Amplitude

30

10 5 0 0

10

15 20 Time index n

25

30

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP ESD2521

Basic Sequences
Sinusoidal sequence A cos(o n + ) and complex exponential sequence B exp( jo n) are periodic sequences of period N if o N = 2r where N and r are positive integers Smallest value of N satisfying o N = 2r is the fundamental period of the sequence To verify the above fact, consider

x1[n] = cos(o n + ) x2 [n] = cos(o (n + N ) + )


M.S. Ramaiah School of Advanced Studies, Bengaluru 9

PEMP ESD2521

Basic Sequences
Now

x2 [n] = cos(o (n + N ) + ) = cos(o n + ) cos o N sin(o n + ) sin o N cos o N = 1

which will be equal to only if and cos(o n + ) = x1[n]

sin o N = 0

These two conditions are met if and only if or

o N = 2 r

2 = N o r
10

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP ESD2521

Basic Sequences
If 2 /o is a noninteger rational number, then the period will be a multiple of 2 /o Otherwise, the sequence is aperiodic Example - x[n] = sin( 3n + ) is an aperiodic sequence

M.S. Ramaiah School of Advanced Studies, Bengaluru

11

PEMP

Basic Sequences
=0
0

ESD2521

2 1.5

Amplitude

1 0.5 0 0

o = 0

10

20 Time index n

30

40

Here

2 r N= =1 0

Hence period

for r = 0
12

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP

Basic Sequences
= 0.1
0

ESD2521

2 1

Amplitude

0 -1

o = 0.1
0.1

-2

10

20 Time index n

30

40

Here N = 2 r = 20 Hence for r = 1


M.S. Ramaiah School of Advanced Studies, Bengaluru 13

PEMP

Basic Sequences An arbitrary sequence can be represented in the time-domain as a weighted sum of some basic sequence and its delayed (advanced) versions

ESD2521

x[n] = 0.5[n+2] + 1.5[n-1] [n-2] + [n-4] + 0.75 [n-6]

M.S. Ramaiah School of Advanced Studies, Bengaluru

14

PEMP ESD2521

Discrete-Time Systems
A discrete-time system processes a given input sequence x[n] to generates an output sequence y[n] with more desirable properties In most applications, the discrete-time system is a single-input, single-output system:
Discrete time System

x[n] Input sequence

y[n] Output sequence

M.S. Ramaiah School of Advanced Studies, Bengaluru

15

PEMP

Discrete-Time Systems: Examples

ESD2521

2-input, 1-output discrete-time systems Modulator, adder 1-input, 1-output discrete-time systems Multiplier, unit delay, unit advance

M.S. Ramaiah School of Advanced Studies, Bengaluru

16

PEMP ESD2521

Discrete-Time Systems
M-point moving-average system M 1 1 y[n] = x[n k ] M k =0

Used in smoothing random variations in data An application: Consider x[n] = s[n] + d[n], where s[n] is the signal corrupted by a noise d[n]

M.S. Ramaiah School of Advanced Studies, Bengaluru

17

PEMP ESD2521

Discrete-Time Systems
s[n] = 2[n(0.9) n ], d[n] - random signal
8 6 Amplitude 4 2 0 -2 d[n] s[n] x[n]

10

20 30 Time index n

40

50

7 6 5 Amplitude 4 3 2 1 0 0 10 20 30 Time index n 40 50 s[n] y[n]

M.S. Ramaiah School of Advanced Studies, Bengaluru

18

PEMP ESD2521

Discrete-Time Systems Linear interpolation - Employed to estimate sample values between pairs of adjacent sample values of a discrete-time sequence Factor-of-4 interpolation

y[n]

3 0 1 2

4 5 6 7 8 9 10 11 12

M.S. Ramaiah School of Advanced Studies, Bengaluru

19

PEMP ESD2521

Discrete-Time Systems: Examples Factor-of-2 interpolator -

y[n] = xu [n] + 1 ( xu [n 1] + xu [n + 1]) 2 Factor-of-3 interpolator y[n] = xu [n] + 1 ( xu [n 1] + xu [n + 2]) 3 2 + ( xu [n 2] + xu [n + 1]) 3

M.S. Ramaiah School of Advanced Studies, Bengaluru

20

PEMP ESD2521

Impulse And Step Responses


The response of a discrete-time system to a unit sample sequence {d[n]} is called the unit sample response or simply, the impulse response, and is denoted by {h[n]} The response of a discrete-time system to a unit step sequence {m[n]} is called the unit step response or simply, the step response, and is denoted by {s[n]}

M.S. Ramaiah School of Advanced Studies, Bengaluru

21

PEMP ESD2521

Impulse Response Example - The impulse response of the system is obtained by setting x[n] = [n] resulting in
y[n] = 1x[n] + 2 x[n 1] + 3 x[n 2] + 4 x[n 3]
h[n] = 1 [n] + 2 [n 1] + 3 [n 2] + 4 [n 3]

The impulse response is thus a finite-length sequence of length 4 given by {h[n]} = {1, 2 , 3 , 4}

M.S. Ramaiah School of Advanced Studies, Bengaluru 22

PEMP

Impulse Response

ESD2521

Example - The impulse response of the discrete-time accumulator

y[n] =

x[]

is obtained by setting x[n] = [n] resulting in


h[n] =
=

[] = [n]
23

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP ESD2521

Impulse Response
Example - The impulse response {h[n]} of the factor-of-2 interpolator 1 y[n] = xu [n] + ( xu [n 1] + xu [n + 1])
2

is obtained by setting xu [n] = [n]and is given by 1 h[n] = [n] + ( [n 1] + [n + 1])


2

The impulse response is thus a finite-length sequence of length 3: {h[n]} = {0.5, 1 0.5}

M.S. Ramaiah School of Advanced Studies, Bengaluru

24

Time-Domain Characterization of LTI Discrete-Time System


Input-Output Relationship - A consequence of the linear, time-invariance property is that an LTI discrete-time system is completely characterized by its impulse response Knowing the impulse response one can compute the output of the system for any arbitrary input

PEMP ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

25

Time-Domain Characterization of LTI Discrete-Time System Let h[n] denote the impulse response of a LTI discrete-time system We compute its output y[n] for the input:
x[n] = 0.5[n + 2] + 1.5[n 1] [n 2] + 0.75[n 5]

PEMP ESD2521

As the system is linear, we can compute its outputs for each member of the input separately and add the individual outputs to determine y[n]
M.S. Ramaiah School of Advanced Studies, Bengaluru 26

PEMP ESD2521

Convolution Sum The summation


y[n] =
k =

x[k ] h[n k ] = x[n k ] h[n]


k =

is called the convolution sum of the sequences x[n] and h[n] and represented compactly as y[n] = x[n] * h[n]

M.S. Ramaiah School of Advanced Studies, Bengaluru

27

PEMP ESD2521

Convolution Sum
Properties Commutative property: x[n] * h[n] = h[n] * x[n] Associative property : (x[n] * h[n])* y[n] = x[n] * (h[n] * y[n]) Distributive property : x[n] * (h[n] + y[n]) = x[n] * h[n] + x[n] * y[n]
M.S. Ramaiah School of Advanced Studies, Bengaluru 28

PEMP ESD2521

Convolution Sum
Interpretation 1) Time-reverse h[k] to form h[k ] 2) Shift h[-k] to the right by n sampling periods if n > 0 or shift to the left by n sampling periods if h[n k ] n < 0 to form 3) Form the product v[k ] = x[k ]h[n k ] 4) Sum all samples of v[k] to develop the n-th sample of y[n] of the convolution sum

M.S. Ramaiah School of Advanced Studies, Bengaluru

29

PEMP ESD2521

Convolution Sum
Schematic Representation -

h[ k ]

h[n k ] v[k ] z
n
k

y[n]

The computation of an output sample using the convolution sum is simply a sum of products Involves fairly simple operations such as additions, multiplications, and delays

x[k ]

M.S. Ramaiah School of Advanced Studies, Bengaluru

30

Time-Domain Characterization of LTI Discrete-Time System


In practice, if either the input or the impulse response is of finite length, the convolution sum can be used to compute the output sample as it involves a finite sum of products If both the input sequence and the impulse response sequence are of finite length, the output sequence is also of finite length

PEMP ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

31

Time-Domain Characterization of LTI Discrete-Time System


If both the input sequence and the impulse response sequence are of infinite length, convolution sum cannot be used to compute the output For systems characterized by an infinite impulse response sequence, an alternate time-domain description involving a finite sum of products will be considered

PEMP ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

32

PEMP

Convolution Example Example - Develop the sequence y[n] generated by the convolution of the sequences x[n] and h[n] shown below
x[n]
3 1
0 1 2 3 4

ESD2521

h[n]
2 1

3 0 1 2

n
1

1 2

M.S. Ramaiah School of Advanced Studies, Bengaluru

33

PEMP ESD2521

Convolution Example The sequence {y[n]} generated by the convolution sum is shown below
y[n]
5 3 1
2 3

0 2 1

1
4 5

1
7 6 8 9

2 3 4

M.S. Ramaiah School of Advanced Studies, Bengaluru

34

PEMP ESD2521

Simple Interconnection Schemes

Two simple interconnection schemes are:


Cascade Connection Parallel Connection

M.S. Ramaiah School of Advanced Studies, Bengaluru

35

PEMP ESD2521

Cascade Connection
h1[n] h2[n]

h2[n]

h1[n]

h1[n] * hh [n ] = h 2 [n ] [ n ]
h1[n]
h 2[n]

Impulse response h[n] of the cascade of two LTI discrete-time systems with impulse responses and is given by

h[n] = h1[n] * h 2[n]

M.S. Ramaiah School of Advanced Studies, Bengaluru

36

PEMP

Cascade Connection

ESD2521

The ordering of the systems in the cascade has no effect on the overall impulse response because of the commutative property of convolution A cascade connection of two stable systems is stable A cascade connection of two passive (lossless) systems is passive (lossless)

M.S. Ramaiah School of Advanced Studies, Bengaluru

37

PEMP

Cascade Connection
An application is in the development of an inverse system If the cascade connection satisfies the relation
h1 [ n] h 2[n ] = [ n ]

ESD2521

then the LTI system is said to be the inverse of and vice-versa

h1[n]

h 2[n]

M.S. Ramaiah School of Advanced Studies, Bengaluru

38

PEMP ESD2521

Parallel Connection

h1[n] h2[n]

h1[n] + hh [n ] = h 2 [n ] [ n ]
1

Impulse response h[n] of the parallel connection of two h1[n] h2[n] LTI discrete-time systems with impulse responses and is given by

h[n] = h1[n] + h2[n]


M.S. Ramaiah School of Advanced Studies, Bengaluru 39

PEMP ESD2521

Simple Interconnection Schemes Consider the discrete-time system where h1[n] = [n] + 0.5[n 1],

h2[n] = 0.5[n] 0.25[n 1],


h3[n] = 2[n],
h1[n]
n

+ +

h4[n] = 2(0.5) [n]

h2[n]
h3[n]

h4[n]
M.S. Ramaiah School of Advanced Studies, Bengaluru 40

PEMP ESD2521

Simple Interconnection Schemes Simplifying the block-diagram we obtain

h1[n] h2[n]
h3[ n ] + h 4[ n ]

h1[n]
h 2[ n ] * ( h3[ n ]+ h 4[ n ])

M.S. Ramaiah School of Advanced Studies, Bengaluru

41

PEMP ESD2521

Simple Interconnection Schemes Overall impulse response h[n] is given by


h[n] = h1[n] + h 2[n] * ( h3[n] + h 4[n]) = h1[n] + h 2[n] * h3[n] + h 2[n] * h 4[n]

Now, h2 [n] * h3[n] = ( 1 [n] 1 [n 1]) * 2[n]

= [n] 1 [n 1]
2

Finally

1 [ n 1] [ n] = [ n] h[n] = [n] + 1 [ n 1 ] + [ n ] 2 2
M.S. Ramaiah School of Advanced Studies, Bengaluru 42

PEMP

Classification of LTI Discrete-Time Systems


Based on Impulse Response Length If the impulse response h[n] is of finite length, i.e.,

ESD2521

h[n] = 0 for n < N1 and n > N 2 , N1 < N 2


then it is known as a finite impulse response (FIR) discretetime system The convolution sum description here is

y[n] =

N2

k = N1

h[k ]x[n k ]

M.S. Ramaiah School of Advanced Studies, Bengaluru

43

PEMP

Classification of LTI Discrete-Time Systems


The output y[n] of an FIR LTI discrete-time system can be computed directly from the convolution sum as it is a finite sum of products Examples of FIR LTI discrete-time systems are the moving-average system and the linear interpolators

ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

44

PEMP

Classification of LTI Discrete-Time Systems


If the impulse response is of infinite length, then it is known as an infinite impulse response (IIR) discrete-time system The class of IIR systems we are concerned with in this course are characterized by linear constant coefficient difference equations

ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

45

PEMP

Classification of LTI Discrete-Time Systems Example - The discrete-time accumulator defined by y[n] = y[n 1] + x[n] is an IIR system

ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

46

PEMP

Classification of LTI Discrete-Time Systems


Based on the Output Calculation Process Nonrecursive System - Here the output can be calculated sequentially, knowing only the present and past input samples Recursive System - Here the output computation involves past output samples in addition to the present and past input samples

ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

47

PEMP

Classification of LTI Discrete-Time Systems


Based on the Coefficients Real Discrete-Time System - The impulse response samples are real valued Complex Discrete-Time System - The impulse response samples are complex valued

ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

48

PEMP ESD2521

Correlation of Signals
Definitions A measure of similarity between a pair of energy signals, x[n] and y[n], is given by the cross-correlation sequence rxy [] defined by

rxy [] =

n =

x[n] y[n ], = 0, 1, 2, ...

The parameter called lag, indicates the time-shift between the pair of signals

M.S. Ramaiah School of Advanced Studies, Bengaluru

49

PEMP ESD2521

Correlation of Signals
There are applications where it is necessary to compare one reference signal with one or more signals to determine the similarity between the pair and to determine additional information based on the similarity For example, in digital communications, a set of data symbols are represented by a set of unique discrete-time sequences If one of these sequences has been transmitted, the receiver has to determine which particular sequence has been received by comparing the received signal with every member of possible sequences from the set Similarly, in radar and sonar applications, the received signal reflected from the target is a delayed version of the transmitted signal and by measuring the delay, one can determine the location of the target The detection problem gets more complicated in practice, as often the received signal is corrupted by additive ransom noise

M.S. Ramaiah School of Advanced Studies, Bengaluru

50

PEMP

Correlation of Signals

ESD2521

y[n] is said to be shifted by samples to the right with respect to the reference sequence x[n] for positive values of , and shifted by samples to the left for negative values of The ordering of the subscripts xy in the definition of rxy [] specifies that x[n] is the reference sequence which remains fixed in time while y[n] is being shifted with respect to x[n]

M.S. Ramaiah School of Advanced Studies, Bengaluru

51

PEMP

Correlation of Signals
If y[n] is made the reference signal and shift x[n] with respect to y[n], then the corresponding cross-correlation sequence is given by ryx [] = n = y[n]x[n ]

ESD2521

Thus, ryx [] is obtained by time-reversing rxy [] = m = y[m + ]x[m] = rxy []

M.S. Ramaiah School of Advanced Studies, Bengaluru

52

PEMP ESD2521

Modern Communication System


Function View
Channel encoder Higher-layer Network protocols Channel decoder
Deinterleaver

Interelaver

Modulator

Tx filter Analog front end

Demodulator

Equalizer

Rx filter

Chip Architecture View


Synchronizer
PLL

SDRAM controller
Digital filters Equalizer

I-RAM D-RAM0 D-RAM1 D-cache I-cache

...

DSP core RISC core


peripheral bus PCMCIA bus

Viterbi decoder

Hardwired
signal processing / channel coding Digital Circuit

Logics for other peripheral

DMA controller

M.S. Ramaiah School of Advanced Studies, Bengaluru

53

PEMP ESD2521

Filtering Example Signals are usually a mix of useful information and noise How do we extract the useful information? Filtering is one way

M.S. Ramaiah School of Advanced Studies, Bengaluru

54

PEMP ESD2521

Filtering Example

M.S. Ramaiah School of Advanced Studies, Bengaluru

55

PEMP ESD2521

Filtering Equations
Let x[n] denote current input value (ECG + noise) x[n-1] is previous input value, x[n-k] is k-th previous input Let y[n] be the current filtered output value y[n-1] is previous output value , y[n-k] is k-th previous output Filtering operations carried out for this example: y[n] = 2.4*y[n-1] -2.6*y[n-2] + 1.5 y[n-3] 0.4*y[n-4] + 0.6*x[n] 1.9*x[n-1] + 2.8*x[n-2] -1.9*x[n-3] + 0.6*x[n-4]

M.S. Ramaiah School of Advanced Studies, Bengaluru

56

PEMP ESD2521

Transform Example

ki
Can you say which is 1 / # by looking at them? If not, go to frequency domain Another way to look at signals Done using transforms
M.S. Ramaiah School of Advanced Studies, Bengaluru 57

PEMP ESD2521

Transform Example

M.S. Ramaiah School of Advanced Studies, Bengaluru

58

PEMP ESD2521

Transform Equations Discrete Fourier Transform x Time domain signal X Frequency domain representation of x

M.S. Ramaiah School of Advanced Studies, Bengaluru

59

PEMP ESD2521

Correlation Equation Correlation x Transmitted signal y Received signal rxy- Correlation coefficients

M.S. Ramaiah School of Advanced Studies, Bengaluru

60

PEMP

Amplification and Conditioning

ESD2521

The voltage from a signal sensor is very small in magnitude. A microphone may produce voltages of the order of 10 -6 volts. Similarly for ECG sensors, vibration sensors etc. Prior to recording the signal or reproducing with an actuator an amplifier should signal condition by linearly amplifying the signal by an appropriate factor.

The above amplifier adds 60dB of gain (20log101000 = 60)

M.S. Ramaiah School of Advanced Studies, Bengaluru

61

PEMP

Amplifier Distortion

ESD2521

An amplifier which introduces unwanted artifacts, is said to be nonlinear and is, of course, very undesirable as it may mask signal components of interest.

The above amplifier is non-linear and actually outputs the input signal plus a 3rd order harmonic:

Unlike noise it is essentially impossible to remove the effects of distortion. Therefore we try to minimize the possibility of distortion by using suitable components.
M.S. Ramaiah School of Advanced Studies, Bengaluru 62

PEMP

Signals and Noise

ESD2521

Most acquired signals are corrupted by some level of noise which can cause information to be lost. Signal processing techniques are often used in an attempt to remove or attenuate noise. Most noise can be considered as additive (linear superposition) which can be address by linear filtering techniques.

M.S. Ramaiah School of Advanced Studies, Bengaluru

63

PEMP

The Noise/Distortion Chain


Consider the various levels of noise and distortion added in a digital mobile communications link:

ESD2521

DSP must minimize the amount of noise/distortion input to the chain, and where possible attenuate other sources.
M.S. Ramaiah School of Advanced Studies, Bengaluru 64

PEMP

Signal to Noise Ratio

ESD2521

Taking the logarithm of the linear signal power to noise power ratio (SNR) and multiplying by 10 gives the measure of decibels or dBs.

Recalling that Power is

Very low quality telephone line

Audio Cassette Deck


M.S. Ramaiah School of Advanced Studies, Bengaluru 65

PEMP

Generic Analogue Signal Processing


In general an analogue signal processing system can be defined as a system that senses a signal to produce an analogue voltage, process this voltage, and reproduce the signal to its original analogue form. A public address system is an example of an analogue signal processing system:

ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

66

PEMP

A Generic Input/Output DSP System

ESD2521

A single input, single output DSP system has the following components:

M.S. Ramaiah School of Advanced Studies, Bengaluru

67

PEMP

Generic Analogue Communications


For most base band telecommunications a voltage signal is transmitted over a cable.

ESD2521

A simple example is a telephone. The acoustic signal is converted to a voltage which is then directly transmitted over a twisted pair of wires to be received at a remote location.
M.S. Ramaiah School of Advanced Studies, Bengaluru 68

PEMP

Digital Data Communication

ESD2521

Modern communications systems require that digital information is transmitted and received.

M.S. Ramaiah School of Advanced Studies, Bengaluru

69

PEMP

Analogue to Digital Converter (ADC)

ESD2521

An ADC is a device that can convert a voltage to a binary number, according to its specific input-output characteristic.

The number of digital samples converted per second is defined by the sampling rate of the converter, fs Hz.
M.S. Ramaiah School of Advanced Studies, Bengaluru 70

PEMP

Digital to Analogue Converter (DAC)

ESD2521

A DAC is a device that can convert binary numbers to voltages, according to its specific input-output characteristic.

M.S. Ramaiah School of Advanced Studies, Bengaluru

71

PEMP

Signal Conditioning

ESD2521

Note that prior to a signal being input to an ADC, an amplifier will be required to ensure that the full voltage range of the ADC is used this is referred to as signal conditioning. For the above ADC with a maximum input and output of 2 volts we would require that the input signal to the ADC has a similar range:

Depending on the output actuator, an amplifier, or at least a buffer amplifier will be required.
M.S. Ramaiah School of Advanced Studies, Bengaluru 72

PEMP

Sampling

ESD2521

The speed at which an ADC generates binary numbers is called the sampling rate or sampling frequency fs The time between samples is called the sampling period, ts:

Sampling frequency is quoted in samples per second, or simply as Hertz (Hz). The actual sampling rate will depend on parameters of the application. This may vary from: 10s of Hz for control systems, 100s of Hz for biomedical, 1000s of Hz for audio applications, 1,000,000s of Hz for digital radio front ends.
M.S. Ramaiah School of Advanced Studies, Bengaluru 73

PEMP

Sampling an Analogue Signal

ESD2521

After signal conditioning the ADC can produce binary number equivalents of the input voltage. If the ADC has finite precision due to a limited no. of discrete levels then there may be a small error associated with each sample.

The quantization step size is 0.0625 volts. If an 5 bit ADC is used, then the max/min voltage input is approx 0.0625 x 16 = 1 volt.
M.S. Ramaiah School of Advanced Studies, Bengaluru 74

PEMP

Reproducing an Analogue Signal

ESD2521

Using a DAC at an appropriate sampling rate, we can reproduce an analogue signal:

Note that the output is a little steppy caused by the zero order hold (step reconstruction); ....this artifact can however be removed with a reconstruction filter.
M.S. Ramaiah School of Advanced Studies, Bengaluru 75

PEMP

First Order Hold


Alternatively a first order hold could be attempted in the DAC. Here the voltage between two discrete samples is approximated by a straight line.

ESD2521

A first order apparently produces a more accurate reproduction of the analogue signal. However implementation of a circuit to perform interpolation is not trivial and turns out not to be necessary.
M.S. Ramaiah School of Advanced Studies, Bengaluru 76

PEMP

Binary Data Word Lengths


Data word lengths for DSP applications, typically: Fixed Point Word lengths: Dynamic Range 8 bits 128 to +127 20 log 28 48 dB 16 bits 32768 to +32767 20 log 216 96 dB 24 bits 8388608 to +8388607 20log224 154 dB Floating Point Word lengths (for arithmetic only): 32 bits (1038 to +1038) (24 bit mantissa, 8 bit exponent)

ESD2521

Note that data input from an ADC, or output to a DAC will always be fixed point, although the internal DSP computation may be floating point.

M.S. Ramaiah School of Advanced Studies, Bengaluru

77

PEMP

Sampling How Fast ?

ESD2521

To intuitively derive the sampling theorem, consider first a pure sine wave of frequency 100Hz:

In order to ensure that we retain all of the information in the signal what sampling rate should be used?

M.S. Ramaiah School of Advanced Studies, Bengaluru

78

PEMP

Sampling Too Fast ?


Sampling at fs = 800Hz, i.e. 8 samples per period:

ESD2521

Appears to be a reasonable sampling rate. Sampling at fs = 3000Hz, i.e. 30 samples per period:

Perhaps higher than necessary sampling rate


M.S. Ramaiah School of Advanced Studies, Bengaluru 79

PEMP ESD2521

Sampling Too Slow


Sampling at fs = 100Hz, i.e. 1 sample per period:

Signal interpreted as DC! Sampling at fs = 100Hz, i.e. 1 sample per period:

Most of the signal features are missed


M.S. Ramaiah School of Advanced Studies, Bengaluru 80

PEMP

Suitable Sampling Rate

ESD2521

From inspection of the above 100Hz digital waveforms at the four different sample rates: fs = 800Hz seems a reasonable sampling rate; fs = 3000Hz is perhaps higher than necessary; fs = 100Hz is too low and fails to correctly sample the waveform, and loses the signal parameter information; fs = 80Hz is too low and fails completely From mathematical theory the minimum sampling rate to retain all information is: greater than 2 x fmax where fmax is the maximum frequency component of a baseband, bandlimited signal.
M.S. Ramaiah School of Advanced Studies, Bengaluru 81

PEMP ESD2521

Signal Frequency Range Terminology


Nyquist frequency/rate: The Nyquist frequency, fn is identified as twice the maximum frequency component present in a signal. Baseband: The lowest signal frequency present is around 0 Hz:

fb = Bandwidth

Bandlimited: For all frequencies in the signal fh < f < fl fl = lowest freq fh = highest freq fb = fh fl
M.S. Ramaiah School of Advanced Studies, Bengaluru 82

PEMP

Nyquist Sampling Rate

ESD2521

If a baseband, band limited signal is composed of sine waves up to a frequency Hz, then
Nyquist frequency fn = 2fb

In we require to sample this signal and retain all information, then the sampling rate, must be chosen as: Fs > fn i.e. Fs > 2fb

This frequency is often referred to as the Nyquist sampling rate, (distinct from the Nyquist frequency).
M.S. Ramaiah School of Advanced Studies, Bengaluru 83

PEMP

Aliasing

ESD2521

When a (baseband) signal is sampled at a frequency below the Nyquist rate, then we lose the signal frequency information and aliasing is said to have occured. Aliasing can be illustrated by sampling a sine wave at below the Nyquist rate and then reconstructing. We note that it appears as a sine wave of a lower frequency (aliasing - cf. impersonating). Consider again sampling the 100Hz sine wave at 80Hz:

Reconstructed signal has a freq. of fs - fsignal = 20Hz


M.S. Ramaiah School of Advanced Studies, Bengaluru 84

PEMP ESD2521

Aliasing Example Consider the output from the following three systems:

M.S. Ramaiah School of Advanced Studies, Bengaluru

85

PEMP ESD2521

Aliased Spectra

M.S. Ramaiah School of Advanced Studies, Bengaluru

86

PEMP

Anti Alias Filter

ESD2521

Prior to the analogue to digital converter (ADC) all frequencies above fs/2 must be blocked or they will be interpreted as lower frequencies, i.e aliasing.

The anti-alias filter is analogue (ideally a brick wall filter), cutting off just before fs/2 Hz.
M.S. Ramaiah School of Advanced Studies, Bengaluru 87

PEMP

Reconstruction Filter

ESD2521

The analogue reconstruction filter at the output of a DAC removes the baseband image high frequencies present in the signal (in the form of the steps between the discrete levels).

M.S. Ramaiah School of Advanced Studies, Bengaluru

88

PEMP ESD2521

Zero Order Hold (ZOH)


Note that the operation of zero order hold can be interpreted as a simple reconstructing frequency filtering operation:

The step reconstruction therefore causes a droop near fs/2.


M.S. Ramaiah School of Advanced Studies, Bengaluru 89

PEMP

Anti-Alias and Reconstruction

ESD2521

Anti-alias and reconstructions filters are analogue, i.e. made from resistors, capacitors, amplifiers, even inductors. Ideally they are both very sharp cut off filters at frequency fs/2. In practice the roll off will be between 6dB/octave (a simple resistor and capacitor) to 96dB/octave (a 16th order filter).

Steeper roll-off is more expensive, but clearly for many applications, good analogue filters are essential. In a DSP system the accurately trimmed analogue filters could actually be more costly than the other DSP components: i.e. DSP processor, ADC, DAC, memory etc.
M.S. Ramaiah School of Advanced Studies, Bengaluru 90

PEMP

Perfect Nyquist Sampling

ESD2521

The Nyquist sampling theorem states that a (baseband) signal should sampled at greater than twice the maximum frequency component present in the signal: fs > 2 * fmax The sampled signal can then be perfectly reconstructed to the original analogue signal with no added noise or distortion.

M.S. Ramaiah School of Advanced Studies, Bengaluru

91

PEMP

ADC Sampling Error

ESD2521

Perfect signal reconstruction assumes that sampled data values are exact (i.e. infinite precision real numbers). In practice they are not, as an ADC will have a number of discrete levels. The ADC samples at the Nyquist rate, and the sampled data value is the closest (discrete) ADC level to the actual value:

Hence every sample has a small quantization error.


M.S. Ramaiah School of Advanced Studies, Bengaluru 92

PEMP

ADC Sampling Error


Assume an ADC or quantizer has 5 bits of resolution and maximum/minimum voltage swing of +1 and -1 volts. The input/output characteristic is shown below:

ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

93

PEMP

Quantization Error
If the smallest step size of a linear ADC is q volts, then the error of any one sample is at worst q/2 volts.

ESD2521

M.S. Ramaiah School of Advanced Studies, Bengaluru

94

PEMP

Quantization Error
The quantization error is straightforward to calculate from: q = Vmax / 2N 1 where N is the number of bits in the converter. The dynamic range of an bit converter is often quoted in dBs: Dynamic Range=20log102N=20Nlog102=6.02N Therefore an 8 bit converter has a range of

ESD2521

Binary 10000000 to 01111111, or in decimal -128 to 127 has a dynamic range of approximately 48 dB.

M.S. Ramaiah School of Advanced Studies, Bengaluru

95

PEMP

ADC Representation
The actual ADC can be represented by a sampler and a quantizer:

ESD2521

The quantization error of each sample is in the range and we can model the quantizer as a linear additive noise source.

M.S. Ramaiah School of Advanced Studies, Bengaluru

96

PEMP

Timing Jitter Error

ESD2521

Note that when a signal is sampled there may be some jitter on the sampling clock which will cause additional sample error.

With jitter each sampling instant may be slightly offset, and therefore the sample value obtained and sent to the DSP will be in error.
M.S. Ramaiah School of Advanced Studies, Bengaluru 97

PEMP ESD2521

Computation algorithms Fast algorithms


Computation-strength reduction of multiplications

Hardware-efficient algorithms
Arithmetic-strength reduction
Digit-level (bit-level) optimization Saving within processing units

Structure regularity

Finite precision problems


Truncation error propagation Limit cycle Overflow oscillation

M.S. Ramaiah School of Advanced Studies, Bengaluru

98

PEMP ESD2521

Computation Algorithm Examples


LMS Algorithms
y (n) = k =0 x(n k ) wk (n)
M 1

e( n ) = d ( n ) y ( n )

wk (n + 1) = wk (n) + e(n) x(n k )


Some simplified algorithms

wk (n + 1) = wk (n) + sign (e(n)) x(n k ) wk (n + 1) = wk (n) + sign (e(n)) sign ( x(n k ))

wk (n + 1) = wk (n) + 2

+ log 2 (e ( n ) )

sign (e(n)) x(n k )


99

M.S. Ramaiah School of Advanced Studies, Bengaluru

PEMP ESD2521

How is Signal Processed


Analog-Digital Conversion
waveform anti-alias LPF Bw = 1/(2Ts) sample & hold quantizer + coder digital data

latch
enable

pulse stream Ts : sampling period waveform analog LPF Amplitude mapper digital data

reg

Digital representation Digital signal processing

M.S. Ramaiah School of Advanced Studies, Bengaluru

100

PEMP ESD2521

Sampling and Quantization


Sample and hold

3Ts 4Ts 5Ts 6Ts 7Ts 8Ts -4Ts-3Ts -2Ts -Ts 0 Ts

Quantization
10 9 8 7 6 5 4 3 2 1 -1 -4Ts-3Ts -2Ts -2 -3 -4 -5

3Ts 4Ts 5Ts 6Ts 7Ts 8Ts -Ts 0 Ts

M.S. Ramaiah School of Advanced Studies, Bengaluru

101

PEMP ESD2521

Session Summary
Functional Architecture Hardware Architecture System-level algorithms vs Hardware computationefficient algorithms Trade-off and System performance and Hardware complexity (cost) Signal processing is focused on efficient implementation of integrated circuit. Signals can be classified as continuous-time and discrete time signals. A system is BIBO stable if its impulse response is absolutely summable. A response of an LTI system is the convolution of its impulse response and input
M.S. Ramaiah School of Advanced Studies, Bengaluru 102

Anda mungkin juga menyukai