You are on page 1of 30

EE 361 


INTRODUCTION TO SIGNAL PROCESSING


FALL 2021
Spring 2021
LECTURE OBJECTIVES

• D-to-C CONVERSION
• Mathematical Model of D-to-C

DISCRETE-TO-CONTINUOUS CONVERSION
DISCRETE-TO-CONTINUOUS CONVERSION

• Interpolate a smooth continuous-time function through a sequence of samples (“connect


the dots”
• If f0 < ½ fs , , then 


 y[n ] = A cos(2 π f 0 Ts n + φ )

 3 4 5 6 7
n
would be converted int 1 2
y (t ) = A cos(2 π f 0 t + φ )

• Otherwise, aliasing has occurred, and the converter would reconstruct a cosine wave whose
frequency is equal to the aliased positive frequency that is less than ½ fs. .
)

D-TO-C RECONSTRUCTION
x(t) x[n] y[n] y(t)
A-to-D COMPUTER D-to-A

Aim: Interpolate a smooth continuous-time function y(t) through the given discrete-time
samples y[n]
y[n] = Acos(2πf0nTs + ϕ). If f0 < fs /2

y(t) = Acos(2πf0t + ϕ) n = fst


Replace n by fst in the cosine formula
If f0 > fs /2 aliasing or folding occurred, and the ideal D-to-C converter construct a cosine
wave with frequency equal to the principle alias frequency which is less than fs /2.
.

D-TO-C RECONSTRUCTION
x(t) x[n] y[n] y(t)
A-to-D COMPUTER D-to-A

Create continuous y(t) from y[n


IDEAL D-to-C:
If you have formula for y[n]
Invert sampling (t=nTs) by n=fst
Example: y[n] = Acos(0.2πn+φ) with fs = 8000 H
y(t) = Acos(0.2π(8000t)+φ) = Acos(2π(800)t+φ)

D-TO-C IS AMBIGUOUS !

ALIASIN
Given y[n], which y(t) do we pick ? ?
INFINITE NUMBER of y(t)
D-to-C RECONSTRUCTION MUST CHOOSE ONE OUTPU
RECONSTRUCT THE SMOOTHEST ON
THE LOWEST FREQ, if y[n] = sinusoid
G

FREQUENCY DOMAINS

x(t) x[n] y[n] y(t)


A-to-D COMPUTER D-to-A

fˆ f
f
ω ω̂
ωˆ
(± f ) f = fs
ωˆ = 2π
fs
+2πl 2π

SPECTRUM (ALIASING CASE)
Plot the spectrum of the x[n] and compare principal alias and normalized random frequency ω̂
x[n ] = A cos(2π (100)( n / 80) + ϕ ) f s = 80Hz

f
1) ˆ
ω = 2π ω̂ 0 = 200π/80 ω̂ 0 = 2.5π
fs

2)
1
2 X* 1
2 X 1
2 X * 1
2 X 1
2 X * 1
2 X Aliases

–2.5π –1.5π –0.5π 0.5π 1.5π 2.5π


ωˆ
3) ω̂ 0 = 2.5π > π
No Aliasing Case: Normalize radian
Aliasing!!! frequency ω̂ 0 be the principle alias!!!
Principal alias is always between − π ≤ ωˆ ≤ π

INTERPOLATION WITH PULSES


MATH MODEL FOR D-TO-A

The D-to-C places the y [n] values on the time axis and then must interpolate signal waveform
values in between the sequence (sample) values

p(t) : pulse function

• Sequence y[n] converted into continuous-time signal that is an approximation of y(t)


• Pulse function p(t) could be rectangular, triangular, parabolic, sinc, truncated sinc, etc.

• Pulses overlap in time domain when pulse duration is greater than or equal to sampling period Ts

• Pulses generally have unit amplitude and/or unit area


• Above formula is discrete-time convolution for each value of t

EXPAND THE SUMMATION


∑ y[n] p(t − nT ) =
n = −∞
s

!+ y[0] p (t ) + y[1] p (t − Ts ) + y[2] p (t − 2Ts ) + !

SUM of SHIFTED PULSES p(t-nTs


“WEIGHTED” by y[n
CENTERED at t=nTs
SPACED by Ts
RESTORES “REAL TIME”
]

FOUR DIFFERENT PULSES FOR D-TO-C

p(t)
RECONSTRUCTION (D-TO-C)
CONVERT STREAM of NUMBERS to x(t
“CONNECT THE DOTS
INTERPOLATION through the given discrete-time samples y[n]
INTUITIVE,
conveys the idea
y[k]

y(t)

t
kTs (k+1)Ts

ZERO-ORDER HOLD INTERPOLATION


ZERO-ORDER HOLD INTERPOLATION
CONVERT y[n] to y(t
y[k] should be the value of y(t) at t = kTs SQUARE PULSE:
Make y(t) equal to y[k] fo
kTs -0.5Ts < t < kTs +0.5Ts

y[k] STAIR-STEP
y(t) APPROXIMATION

t
kTs (k+1)Ts

SQUARE PULSE CASE


• With zero-order hold each sample value is


represented as a rectangular pulse of
width Ts and height y[n]

• Real world digital-to-analog converters


(DACs) perform this type of interpolation


LINEAR INTERPOLATION
LINEAR INTERPOLATION
LINEAR INTERPOLATION
Example: D-to-C conversion using a triangular pulse.
(a) Shifted triangular pulses (dashed orange)
(b) (solid orange)The result is reconstruction by linear interpolation.


• Triangular pulses are zero at ± Ts
• With linear interpolation the continuous waveform
values between each sample value are formed by
connecting a line between the y[n] values

IDEAL BAND LIMITED INTERPOLATION


OPTIMAL PULSE ?

CALLED
“BANDLIMITED
INTERPOLATION”

πt
sin Ts
p (t ) = πt
for − ∞ < t < ∞
Ts
p(t ) = 0 for t = ±Ts , ± 2Ts ,!

OVER-SAMPLING AIDS INTERPOLATION


OVER-SAMPLING CASE EASIER TO
RECONSTRUCT

Over-smapling: Using a sampling rate, fs,


that is much greater than the frequency of
the cosine wave f0
fs > > f0

• The signal changes much less over the


duration of a single pulse, so the
waveform appears “smoother ” and easier
to reconstruct accurately using only a few
sample

Problem: Discontinuous regions!!!


s

EASIER TO
OVER-SAMPLING CASE RECONSTRUCT

Over-smapling: Using a sampling rate, fs,


that is much greater than the frequency of
the cosine wave f0
fs > > f0
• The signal changes much less over the
duration of a single pulse, so the
waveform appears “smoother ” and easier
to reconstruct accurately using only a few
samples

Better approximation compared to Zero-hold interpo

Figure. D-to-C conversion using a triangular pulse at fs = 500 samples/


EASIER TO
OVER-SAMPLING CASE RECONSTRUCT

Over-smapling (fs > > f0):The signal changes much less over the duration of a single pulse, so
the waveform appears “smoother ” and easier to reconstruct accurately using only a few samples

LINEAR INTERPOLATION VS. ZERO-HOLD INTERPOLATION


Linear interpolation achieves better approximation compared to Zero-hold interpolation!!!
Linear Interpolation Zero-hold Interpolation
SAMPLING GUI (CON2DIS)

Aug 2016 © 2003-2016, JH McClellan & RW Schafer


SAMPLING GUI (CON2DIS)

© 2003-2016, JH McClellan & RW Schafer


Next Lectur
TEŞEKKÜRLER

Next Lecture

Fouri
:

You might also like