# PEMP ESD2521

Session 2 : Review On Signals

Session delivered by: Chandan N.

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

1

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

2

PEMP ESD2521

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

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

3

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

–4

–3

–2

–1

0

1

2

3

4

5

6

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

0

10

20 Time index n

30

40

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

5

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 + jωo ) n Ae e

( σo + jωo )

= 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

6

5 -1 0 10 20 Time index n 30 40 x[n] = exp(− + j 6 )n 1 12  M.5 0 -0.5 xre [n] Amplitude 0 -0.S.5 -1 and xim [n] of a complex exponential (σo = 0) sequence are real sinusoidal sequences with(σo > 0) constant (σo < 0).PEMP ESD2521 Basic Sequences • 1 0. Bengaluru 7 π . Ramaiah School of Advanced Studies. growing and decaying Imaginary part amplitudes for n > 0 1 Real part 10 0 Amplitude 20 Time index n 30 40 0.

PEMP ESD2521 Basic Sequences • Real exponential sequence where A and a are real numbers x[ n] = Aα n . Ramaiah School of Advanced Studies.9 20 15 Amplitude 20 10 0 0 5 10 20 15 Time index n 25 30 Amplitude 30 10 5 0 0 5 10 15 20 Time index n 25 30  M. Bengaluru 8 .S. −∞ < n <∞ α = 1.2 50 40 α = 0.

Bengaluru 9 . Ramaiah School of Advanced Studies.PEMP ESD2521 Basic Sequences • Sinusoidal sequence A cos(ωo n + φ) and complex exponential sequence B exp( jωo n) are periodic sequences of period N if ωo N = 2πr where N and r are positive integers • Smallest value of N satisfying ωo N = 2πr 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.

Bengaluru . Ramaiah School of Advanced Studies.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 11 .PEMP ESD2521 Basic Sequences • If 2π /ωo is a noninteger rational number.S. then the period will be a multiple of 2π /ωo • Otherwise.x[n] = sin( 3n + φ) is an aperiodic sequence  M. the sequence is aperiodic • Example .

Bengaluru .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.PEMP Basic Sequences ω =0 0 ESD2521 2 1. Ramaiah School of Advanced Studies.5 Amplitude 1 0.S.

S. Bengaluru 13 .1π -2 0 10 20 Time index n 30 40 • Here N = 2π r = 20 • Hence for r = 1  M.1π 0. Ramaiah School of Advanced Studies.1π 0 ESD2521 2 1 Amplitude 0 -1 ωo = 0.PEMP Basic Sequences ω = 0.

5δ[n+2] + 1.S. Bengaluru 14 .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. Ramaiah School of Advanced Studies.5δ[n-1] – δ[n-2] + δ[n-4] + 0.75 δ[n-6]  M.

Ramaiah School of Advanced Studies. Bengaluru 15 . the discrete-time system is a single-input.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. single-output system: Discrete − time System x[n] Input sequence y[n] Output sequence  M.S.

S. unit delay. Bengaluru 16 . 1-output discrete-time systems Multiplier. 1-output discrete-time systems Modulator. Ramaiah School of Advanced Studies.PEMP Discrete-Time Systems: Examples ESD2521 • 2-input. unit advance  M. adder • 1-input.

Ramaiah School of Advanced Studies.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]. Bengaluru 17 . where s[n] is the signal corrupted by a noise d[n]  M.S.

Bengaluru 18 .9) n ]. Ramaiah School of Advanced Studies.PEMP ESD2521 Discrete-Time Systems s[n] = 2[n(0.S.random signal 8 6 Amplitude 4 2 0 -2 d[n] s[n] x[n] 0 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. d[n] .

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 n  M.PEMP ESD2521 Discrete-Time Systems • Linear interpolation .S. Ramaiah School of Advanced Studies. Bengaluru 19 .

Bengaluru 20 .S.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. Ramaiah School of Advanced Studies.

the impulse response. Bengaluru 21 . the step response. Ramaiah School of Advanced Studies. and is denoted by {s[n]}  M. 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.S.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.

PEMP ESD2521 Impulse Response • Example . α 3 .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 . Ramaiah School of Advanced Studies.S. Bengaluru 22 . α 4} ↑  M.

PEMP Impulse Response ESD2521 • Example . Bengaluru .The impulse response of the discrete-time accumulator y[n] =  = −∞ ∑ x[] n is obtained by setting x[n] = δ[n] resulting in h[n] =  = −∞ ∑ δ [] = µ[n] 23 n  M.S. Ramaiah School of Advanced Studies.

5.5} ↑  M. 1 0.PEMP ESD2521 Impulse Response • Example .S.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. Bengaluru 24 . Ramaiah School of Advanced Studies.

S. Bengaluru 25 .Time-Domain Characterization of LTI Discrete-Time System • Input-Output Relationship . 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.A consequence of the linear. Ramaiah School of Advanced Studies.

Bengaluru 26 .S. Ramaiah School of Advanced Studies.5δ[n + 2] + 1.5δ[n − 1] − δ[n − 2] + 0. we can compute its outputs for each member of the input separately and add the individual outputs to determine y[n]  M.75δ[n − 5] PEMP ESD2521 • As the system is linear.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.

Ramaiah School of Advanced Studies.S.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. Bengaluru 27 .

Bengaluru 28 . Ramaiah School of Advanced Studies.S.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.

Bengaluru 29 .S. Ramaiah School of Advanced Studies.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.

and delays x[k ]  M. multiplications. Bengaluru 30 . Ramaiah School of Advanced Studies.S.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.

Bengaluru 31 . Ramaiah School of Advanced Studies.S.Time-Domain Characterization of LTI Discrete-Time System • In practice. 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. if either the input or the impulse response is of finite length. the output sequence is also of finite length PEMP ESD2521  M.

Ramaiah School of Advanced Studies. an alternate time-domain description involving a finite sum of products will be considered PEMP ESD2521  M. Bengaluru 32 .S.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.

S.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 n 3 0 1 2 n –1 –1 –2  M. Bengaluru 33 .PEMP Convolution Example • Example . Ramaiah School of Advanced Studies.

Ramaiah School of Advanced Studies. Bengaluru 34 .S.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 1 4 5 1 7 6 8 9 n –2 –3 –4  M.

S. Bengaluru 35 .PEMP ESD2521 Simple Interconnection Schemes • Two simple interconnection schemes are: – Cascade Connection – Parallel Connection  M. Ramaiah School of Advanced Studies.

Ramaiah School of Advanced Studies.S. Bengaluru 36 .PEMP ESD2521 Cascade Connection h1[n] h2[n] ≡ 1 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.

Ramaiah School of Advanced Studies. Bengaluru 37 .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.

S. Ramaiah School of Advanced Studies.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. Bengaluru 38 .

Ramaiah School of Advanced Studies.S. Bengaluru 39 .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.

Ramaiah School of Advanced Studies.PEMP ESD2521 Simple Interconnection Schemes • Consider the discrete-time system where h1[n] = δ[n] + 0.5δ[n] − 0.S. h3[n] = 2δ[n]. h1[n] n + + h4[n] = −2(0.5) µ[n] h2[n] h3[n] h4[n]  M. Bengaluru 40 .25δ[n − 1]. h2[n] = 0.5δ[n − 1].

Ramaiah School of Advanced Studies.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. Bengaluru 41 .S.

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. Bengaluru 42 . Ramaiah School of Advanced Studies.S. h2 [n] * h3[n] = ( 1 δ[n] − 1 δ[n − 1]) * 2δ[n] = δ[n] − 1 δ[n − 1] 2 2 4 • Finally 1 δ[ n − 1] − δ[ n] = δ[ n] h[n] = δ[n] + 1 δ [ n − 1 ] + δ [ n ] − 2 2  M.

. ESD2521 h[n] = 0 for n < N1 and n > N 2 .PEMP Classification of LTI Discrete-Time Systems Based on Impulse Response Length • If the impulse response h[n] is of finite length. Bengaluru 43 .S. 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. Ramaiah School of Advanced Studies. i.e.

Ramaiah School of Advanced Studies.S.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. Bengaluru 44 .

Ramaiah School of Advanced Studies. 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. Bengaluru 45 .PEMP Classification of LTI Discrete-Time Systems • If the impulse response is of infinite length.S.

Ramaiah School of Advanced Studies.PEMP Classification of LTI Discrete-Time Systems • Example . Bengaluru 46 .The discrete-time accumulator defined by y[n] = y[n − 1] + x[n] is an IIR system ESD2521  M.S.

S.Here the output computation involves past output samples in addition to the present and past input samples ESD2521  M. Ramaiah School of Advanced Studies.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 . Bengaluru 47 .

The impulse response samples are real valued • Complex Discrete-Time System .S. Bengaluru 48 .The impulse response samples are complex valued ESD2521  M.PEMP Classification of LTI Discrete-Time Systems Based on the Coefficients • Real Discrete-Time System . Ramaiah School of Advanced Studies.

Bengaluru 49 . ± 2.S. . Ramaiah School of Advanced Studies. indicates the time-shift between the pair of signals  M. x[n] and y[n].PEMP ESD2521 Correlation of Signals Definitions • A measure of similarity between a pair of energy signals... is given by the cross-correlation sequence rxy [] defined by ∞ rxy [] = n = −∞ ∑ x[n] y[n − ]. • The parameter  called lag. ± 1.  = 0.

one can determine the location of the target The detection problem gets more complicated in practice.S.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. Bengaluru 50 . in digital communications. the received signal reflected from the target is a delayed version of the transmitted signal and by measuring the delay. 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. as often the received signal is corrupted by additive ransom noise • • • •  M. in radar and sonar applications. a set of data symbols are represented by a set of unique discrete-time sequences If one of these sequences has been transmitted. Ramaiah School of Advanced Studies.

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 λ . Ramaiah School of Advanced Studies.S. Bengaluru 51 . 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.

Ramaiah School of Advanced Studies. Bengaluru 52 .PEMP Correlation of Signals • If y[n] is made the reference signal and shift x[n] with respect to y[n]. ryx [] is obtained by time-reversing rxy [] = ∞ m = −∞ y[m + ]x[m] = rxy [−] ∑  M. then the corresponding cross-correlation sequence is given by ∞ ryx [] = n = −∞ y[n]x[n − ] ESD2521 ∑ • Thus.S.

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. Bengaluru 53 . Ramaiah School of Advanced Studies.

Bengaluru 54 .S. Ramaiah School of Advanced Studies.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.

PEMP ESD2521 Filtering Example  M. Bengaluru 55 .S. Ramaiah School of Advanced Studies.

y[n-k] is k-th previous output Filtering operations carried out for this example: y[n] = 2. Ramaiah School of Advanced Studies.6*y[n-2] + 1.9*x[n-3] + 0. x[n-k] is k-th previous input Let y[n] be the current filtered output value y[n-1] is previous output value .6*x[n] –1. Bengaluru 56 .4*y[n-4] + 0.S.5 y[n-3] –0.PEMP ESD2521 Filtering Equations • • • • • • Let x[n] denote current input value (ECG + noise) x[n-1] is previous input value.8*x[n-2] -1.6*x[n-4]  M.4*y[n-1] -2.9*x[n-1] + 2.

S.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. Ramaiah School of Advanced Studies. Bengaluru 57 .

PEMP ESD2521 Transform Example  M. Ramaiah School of Advanced Studies. Bengaluru 58 .S.

Ramaiah School of Advanced Studies. Bengaluru 59 .PEMP ESD2521 Transform Equations • Discrete Fourier Transform • x –Time domain signal • X –Frequency domain representation of x  M.S.

Ramaiah School of Advanced Studies.S.Correlation coefficients  M.PEMP ESD2521 Correlation Equation • • • • Correlation x –Transmitted signal y –Received signal rxy. Bengaluru 60 .

PEMP Amplification and Conditioning • ESD2521 The voltage from a signal sensor is very small in magnitude. Bengaluru 61 .S. Prior to recording the signal or reproducing with an actuator an amplifier should signal condition by linearly amplifying the signal by an appropriate factor. Ramaiah School of Advanced Studies. • The above amplifier adds 60dB of gain (20log101000 = 60)  M. A microphone may produce voltages of the order of 10 -6 volts. vibration sensors etc. Similarly for ECG sensors.

 M. Bengaluru 62 . • 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.PEMP Amplifier Distortion • ESD2521 An amplifier which introduces unwanted artifacts. Ramaiah School of Advanced Studies.S. very undesirable as it may mask signal components of interest. of course. is said to be nonlinear and is. Therefore we try to minimize the possibility of distortion by using suitable components.

S.  M. • Most noise can be considered as additive (linear superposition) which can be address by linear filtering techniques. Bengaluru 63 . • Signal processing techniques are often used in an attempt to remove or attenuate noise. Ramaiah School of Advanced Studies.PEMP Signals and Noise ESD2521 • Most acquired signals are corrupted by some level of noise which can cause information to be lost.

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.S. Bengaluru 64 . Ramaiah School of Advanced Studies.  M. and where possible attenuate other sources.

Bengaluru 65 . • Recalling that Power is Very low quality telephone line Audio Cassette Deck  M.S. Ramaiah School of Advanced Studies.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.

and reproduce the signal to its original analogue form. “process” this voltage. Ramaiah School of Advanced Studies. Bengaluru 66 . A public address system is an example of an analogue signal processing system: ESD2521 •  M.S.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.

Ramaiah School of Advanced Studies.S. Bengaluru 67 .PEMP A Generic Input/Output DSP System ESD2521 • A single input. single output DSP system has the following components:  M.

S. 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. Ramaiah School of Advanced Studies. ESD2521 • A simple example is a telephone.  M.PEMP Generic Analogue Communications • For most base band telecommunications a voltage signal is transmitted over a cable. Bengaluru 68 .

S.PEMP Digital Data Communication • ESD2521 Modern communications systems require that digital information is transmitted and received.  M. Bengaluru 69 . Ramaiah School of Advanced Studies.

according to its specific input-output characteristic. Ramaiah School of Advanced Studies. • The number of digital samples converted per second is defined by the sampling rate of the converter.S.  M. fs Hz. Bengaluru 70 .PEMP Analogue to Digital Converter (ADC) ESD2521 • An ADC is a device that can convert a voltage to a binary number.

Bengaluru 71 .  M. according to its specific input-output characteristic. Ramaiah School of Advanced Studies.S.PEMP Digital to Analogue Converter (DAC) ESD2521 • A DAC is a device that can convert binary numbers to voltages.

or at least a buffer amplifier will be required.PEMP Signal Conditioning ESD2521 • Note that prior to a signal being input to an ADC. an amplifier. • 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.  M. an amplifier will be required to ensure that the full voltage range of the ADC is used – this is referred to as signal conditioning. Bengaluru 72 .S. Ramaiah School of Advanced Studies.

 M. or simply as Hertz (Hz).000. • This may vary from: 10’s of Hz for control systems.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. 1.000’s of Hz for digital radio front ends. • The actual sampling rate will depend on parameters of the application. ts: • Sampling frequency is quoted in samples per second. Ramaiah School of Advanced Studies. 100’s of Hz for biomedical.S. 1000’s of Hz for audio applications. Bengaluru 73 .

0625 x 16 = 1 volt. of discrete levels then there may be a “small” error associated with each sample.0625 volts.  M. • The quantization step size is 0.S. Bengaluru 74 . • If the ADC has finite precision due to a limited no. then the max/min voltage input is approx 0. Ramaiah School of Advanced Studies. If an 5 bit ADC is used.PEMP Sampling an Analogue Signal ESD2521 • After signal conditioning the ADC can produce binary number equivalents of the input voltage.

we can reproduce an analogue signal: • Note that the output is a little “steppy” caused by the zero order hold (step reconstruction). Ramaiah School of Advanced Studies. Bengaluru 75 .this artifact can however be removed with a reconstruction filter...S.. .PEMP Reproducing an Analogue Signal ESD2521 • Using a DAC at an appropriate sampling rate.  M.

S. However implementation of a circuit to perform interpolation is not trivial and turns out not to be necessary. ESD2521 • A first order apparently produces a “more accurate” reproduction of the analogue signal. Here the voltage between two discrete samples is approximated by a straight line.  M.PEMP First Order Hold • Alternatively a first order hold could be attempted in the DAC. Ramaiah School of Advanced Studies. Bengaluru 76 .

 M. Ramaiah School of Advanced Studies. or output to a DAC will always be fixed point. although the internal DSP computation may be floating point. 8 bit exponent) • ESD2521 Note that data input from an ADC.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.S. Bengaluru 77 .

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. Bengaluru 78 . Ramaiah School of Advanced Studies.PEMP Sampling How Fast ? ESD2521 • To intuitively derive the sampling theorem.

e. Ramaiah School of Advanced Studies. 8 samples per period: ESD2521 Appears to be a “reasonable” sampling rate.S. 30 samples per period: Perhaps higher than necessary sampling rate  M. i. i. Bengaluru 79 . • Sampling at fs = 3000Hz.e.PEMP Sampling Too Fast ? • Sampling at fs = 800Hz.

Ramaiah School of Advanced Studies. Bengaluru 80 . 1 sample per period: Most of the signal features are missed  M. i.PEMP ESD2521 Sampling Too Slow • Sampling at fs = 100Hz.e. 1 sample per period: Signal interpreted as DC! • Sampling at fs = 100Hz.e.S. i.

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.S.  fs = 100Hz is too low and fails to correctly sample the waveform. bandlimited signal.  M. Bengaluru 81 .  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. Ramaiah School of Advanced Studies. and loses the signal parameter information.  fs = 3000Hz is perhaps higher than necessary.

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

Bengaluru 85 .S.PEMP ESD2521 Aliasing Example • Consider the output from the following three systems:  M. Ramaiah School of Advanced Studies.

Bengaluru 86 .S.PEMP ESD2521 Aliased Spectra  M. Ramaiah School of Advanced Studies.

Ramaiah School of Advanced Studies. Bengaluru 87 .e aliasing.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.  M.S. • The anti-alias filter is analogue (ideally a brick wall filter). cutting off just before fs/2 Hz.

Ramaiah School of Advanced Studies.  M.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).S. Bengaluru 88 .

Ramaiah School of Advanced Studies.  M.S.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. Bengaluru 89 .

 M. but clearly for many applications.PEMP Anti-Alias and Reconstruction ESD2521 • Anti-alias and reconstructions filters are analogue. Bengaluru 90 . i.e. • Steeper roll-off is more expensive. amplifiers. memory etc. good analogue filters are essential. • Ideally they are both very sharp cut off filters at frequency fs/2. • In a DSP system the accurately trimmed analogue filters could actually be more costly than the other DSP components: i. In practice the roll off will be between 6dB/octave (a simple resistor and capacitor) to 96dB/octave (a 16th order filter). ADC. Ramaiah School of Advanced Studies. capacitors.S.e. DAC. made from resistors. DSP processor. even inductors.

Ramaiah School of Advanced Studies.  M. Bengaluru 91 .S.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.

e.  M. as an ADC will have a number of discrete levels.PEMP ADC Sampling Error ESD2521 • Perfect signal reconstruction assumes that sampled data values are exact (i. Ramaiah School of Advanced Studies. Bengaluru 92 . • 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. infinite precision real numbers). In practice they are not.S.

Bengaluru 93 .S.PEMP ADC Sampling Error • Assume an ADC or quantizer has 5 bits of resolution and maximum/minimum voltage swing of +1 and -1 volts. Ramaiah School of Advanced Studies. The input/output characteristic is shown below: ESD2521  M.

Bengaluru 94 . then the error of any one sample is at worst q/2 volts.PEMP Quantization Error • If the smallest step size of a linear ADC is q volts.S. Ramaiah School of Advanced Studies. ESD2521  M.

Ramaiah School of Advanced Studies. Bengaluru 95 .  M.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.S. or in decimal -128 to 127 has a dynamic range of approximately 48 dB.02N Therefore an 8 bit converter has a range of ESD2521 Binary 10000000 to 01111111.

 M.S. Bengaluru 96 . Ramaiah School of Advanced Studies.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.

• With jitter each sampling instant may be slightly offset.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. Bengaluru 97 .  M.S. Ramaiah School of Advanced Studies. and therefore the sample value obtained and sent to the DSP will be in error.

S. Bengaluru 98 . Ramaiah School of Advanced Studies.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.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. Bengaluru . Ramaiah School of Advanced Studies.

Bengaluru 100 .S. Ramaiah School of Advanced Studies.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.

Ramaiah School of Advanced Studies.S. Bengaluru 101 .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. • A system is BIBO stable if its impulse response is absolutely summable. • Signals can be classified as continuous-time and discrete time signals.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. Bengaluru 102 . • A response of an LTI system is the convolution of its impulse response and input  M. Ramaiah School of Advanced Studies.