Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

Digital Signal Processing (ECN-312)

Lecture 3 (Sampling of continuous-time signals)

Dheeraj Kumar

dheeraj.kumar@ece.iitr.ac.in

January 12, 2023


Table of Contents

1 Periodic sampling

2 Frequency domain representation of sampling

3 Reconstruction of band-limited signal from its samples

4 Discrete-time processing of Continuous-time signals


Example: Ideal continuous-time lowpass filter
Example: Ideal continuous-time bandlimited differentiator

5 Impulse invariance

2 / 59
Introduction

❑ Discrete-time signals can arise in many ways


❑ They most commonly occur as representations of sampled
continuous-time signals
❑ Under reasonable constraints, a continuous-time signal can be
accurately represented by samples taken at discrete points in time
❑ Continuous-time signal processing can be implemented through a
series of steps
❑ Sampling
❑ Discrete-time processing
❑ Subsequent reconstruction of a continuous-time signal

3 / 59
Table of Contents

1 Periodic sampling

2 Frequency domain representation of sampling

3 Reconstruction of band-limited signal from its samples

4 Discrete-time processing of Continuous-time signals


Example: Ideal continuous-time lowpass filter
Example: Ideal continuous-time bandlimited differentiator

5 Impulse invariance

4 / 59
Mathematical representation of sampling

❑ Typical method of obtaining a discrete-time representation of a


continuous-time signal is through periodic sampling
❑ A sequence of samples, x[n] is obtained from a continuous-time
signal xc (t) according to the relation
❑ x[n] = xc (nT ), −∞ < n < ∞
❑ T is the sampling period
❑ fs = T1 is the sampling frequency (in per second)
❑ Sampling frequency in radian per second Ωs = 2π T

5 / 59
Ambiguity in sampling

❑ The sampling operation is generally not invertible


❑ Given the output x[n], it is not always possible to reconstruct xc (t),
the input to the sampler
❑ Since many continuous-time signals can produce the same output
sequence of samples

6 / 59
Ambiguity in sampling

❑ The inherent ambiguity in sampling is a fundamental issue in


signal processing
❑ Fortunately, it is possible to remove the ambiguity by restricting
the input signals that go into the sampler

7 / 59
The sampling process

❑ It is convenient to represent the sampling process mathematically


in the two stages
❑ Stage 1: Impulse train modulator
❑ Multiply continuous-time signal with a continuous-time impulse train
of unit amplitude
❑ Stage 2: Conversion of the impulse train to a discrete-time
sequence

8 / 59
The sampling process

❑ xc (t) → Continuous-time signal


❑ xs (t) → Continuous-time impulse train scaled per xc (t) for
t ∈ {..., −2T , −T , 0, T , 2T , ...}
❑ x[n] → Discrete-time sequence corresponding to the samples of
xc (t) for t ∈ {..., −2T , −T , 0, T , 2T , ...}
❑ Notice the difference between sampled sequence for T = T1 and
T = 2T1
9 / 59
Table of Contents

1 Periodic sampling

2 Frequency domain representation of sampling

3 Reconstruction of band-limited signal from its samples

4 Discrete-time processing of Continuous-time signals


Example: Ideal continuous-time lowpass filter
Example: Ideal continuous-time bandlimited differentiator

5 Impulse invariance

10 / 59
Time-domain representation of modulation

❑ The unit impulse train signal


P∞
❑ s(t) = n=−∞ δ(t − nT )
❑ Modulation process:

xs (t) = xc (t) × s(t)



X
= xc (t) δ(t − nT )
n=−∞

X
= xc (nT )δ(t − nT )
n=−∞

❑ Using the “sifting property” of the impulse function

11 / 59
Frequency-domain representation of modulation

❑ Using the multiplication property of Fourier transform


1
❑ Xs (jΩ) = 2π Xc (jΩ) ∗ S(jΩ)
❑ The Fourier transform of a periodic impulse train is also a periodic
impulse train

P∞
❑ S(jΩ) = T k =−∞ δ(Ω − k Ωs )

1
Xs (jΩ) = Xc (jΩ) ∗ S(jΩ)


1 2π X
= Xc (jΩ) ∗ δ(Ω − k Ωs )
2π T
k =−∞

1 X
= Xc (j(Ω − k Ωs ))
T
k =−∞

12 / 59
Frequency-domain representation of modulation

❑ Fourier transform of xs (t) consists of periodically repeated copies


of the Fourier transform of xc (t)
❑ The copies of Xc (jΩ) are shifted by integer multiples of the
sampling frequency (T )
❑ Superimposed to produce the periodic Fourier transform of the
impulse train of samples

13 / 59
Frequency-domain representation of modulation

❑ Let xc (t) be a bandlimited Fourier transform whose highest


nonzero frequency component in Xc (jΩ) is at ΩN
❑ S(jΩ) is a periodic impulse train repeating every Ωs

14 / 59
Frequency-domain representation of modulation

❑ Two possible scenarios for Xs (jΩ)


❑ Ωs − ΩN > ΩN → Ωs > 2ΩN : Replicas of Xc (jΩ) do NOT overlap
❑ xc (t) can be exactly recovered from xs (t) with an ideal lowpass filter
(by selecting only one copy of the Fourier transform)
❑ Ωs − ΩN < ΩN → Ωs < 2ΩN : Replicas of Xc (jΩ) DO overlap
❑ xc (t) can NOT be exactly recovered from xs (t)
❑ Aliasing distortion

15 / 59
How to recover xc (t) from xs (t)

❑ By multiplying Xs (jΩ) by an ideal lowpass filter


❑ Xr (jΩ) = Hr (jΩ) × Xs (jΩ)

16 / 59
Exact recovery of xc (t) from xs (t)

❑ Assuming Ωs > 2ΩN


❑ Hr (jΩ) is an ideal lowpass filter with gain T and cutoff frequency
Ωc such that
❑ ΩN < Ωc < Ωs − ΩN
❑ Then Xr (jΩ) = Xc (jΩ)

17 / 59
Imperfect recovery of xc (t) from xs (t)

❑ If Ωs < 2ΩN
❑ Copies of Xc (jΩ) overlap
❑ When added together, Xc (jΩ) is no longer recoverable by lowpass
filtering
❑ Input signal: xc (t) = cos(Ω0 t)
Ω0
❑ Sampling frequency Ωs < 2
Ωs
❑ Low pass filter cutoff frequency Ωc = 2

18 / 59
Imperfect recovery of xc (t) from xs (t)

❑ Reconstructed signal: xr (t) = cos((Ωs − Ω0 )t)


❑ The higher frequency signal cos(Ω0 t) has taken on the identity
(alias) of the lower frequency signal cos((Ωs − Ω0 )t)
❑ As a consequence of the sampling and subsequent reconstruction

19 / 59
Nyquist Sampling Theorem

❑ Let xc (t) be a band limited signal


❑ Xc (jΩ) = 0 for |Ω| > ΩN
❑ Then xc (t) is uniquely determined by its samples x[n] = xc (nT ),
n = {0, ±1, ±2, ...} if
❑ Ωs = 2πT ≥ 2ΩN
❑ ΩN is commonly referred to as the Nyquist frequency
❑ Frequency 2ΩN that must be exceeded by the sampling frequency
is called the Nyquist rate

20 / 59
Relationship between F{x[n]} and Xc (jΩ)

❑ Thus far, we have considered the relationship between Fourier


transforms of xc (t) and xs (t) (another continuous-time signal)
❑ The scaled impulse train xs (t) is used to obtain discrete-time
sequence x[n]
❑ Let discrete-time Fourier transform of x[n] be X (ejω )
❑ By the definition of Fourier transform for continuous-time and
discrete-time case
P∞
❑ Xs (jΩ) = n=−∞ xc (nT )e−jΩnT
P∞
❑ X (ejω ) = n=−∞ x[n]e−jωn

21 / 59
Relationship between F{x[n]} and Xc (jΩ)

❑ Since x[n] = xc (nT ) → Xs (jΩ) = X (ejω )|ω=ΩT = X (ejΩT )


❑ X (ejω ) is simply a frequency-scaled version of Xs (jΩ) with the
frequency scaling specified by ω = ΩT
❑ Normalization of the frequency axis so that the frequency Ω = Ωs in
Xs (jΩ) is normalized to ω = 2π for X (ejω )
❑ Directly associated with time normalization in the transformation from
xs (t) to x[n]
❑ From slide on
P “Frequency-domain representation of modulation”:
Xs (jΩ) = T1 ∞k =−∞ Xc (j(Ω − k Ωs ))
P∞
❑ → X (ejΩT ) = T1 k =−∞ Xc (j(Ω − k Ωs ))
P∞
❑ → X (ejω ) = T1 k =−∞ Xc (j( ω 2πk
T − T ))
❑ xs (t) retains a spacing between samples equal to the sampling
period T , however, the “spacing” of sequence values x[n] is
always unity
❑ The time axis is normalized by a factor of T
❑ Correspondingly, in the frequency domain the frequency axis is
normalized by a factor of fs = T1
22 / 59
Aliasing example

❑ Consider two continuous-time signals


❑ xc1 (t) = cos(4000πt)
❑ xc2 (t) = cos(16000πt)
1
❑ Let we sample them with sampling period T = 6000 ,
Ωs = 2πT = 12000π
❑ For signal xc1 (t)
❑ The highest frequency of the signal is Ω0 = 4000π
❑ Ωs > 2Ω0 → No aliasing
1
❑ x1 [n] = xc1 (nT ) = cos(4000πn × 6000 ) = cos( 2π
3 n)
❑ For signal xc2 (t)
❑ The highest frequency of the signal is Ω0 = 16000π
❑ Ωs < 2Ω0 → Aliasing
1
❑ x2 [n] = xc2 (nT ) = cos(16000πn × 6000 ) = cos( 8π
3 n) =
2π 2π
cos(2πn + 3 n) = cos( 3 n)
❑ x1 [n] = x2 [n] (let’s denote them as x[n])
❑ Impossible to distinguish xc1 (t) and xc2 (t) from their samples
23 / 59
Aliasing example

24 / 59
Aliasing example

− 4000π) + πδ(Ω + 4000π)


❑ Xc1 (jΩ) = πδ(Ω P
1 ∞
❑ Xs1 (jΩ) = T k =−∞ Xc1 (j(Ω − k Ωs ))
− 16000π) + πδ(Ω + 16000π)
❑ Xc2 (jΩ) = πδ(Ω P
1 ∞
❑ Xs2 (jΩ) = T k =−∞ Xc2 (j(Ω − k Ωs ))
❑ Since x1 [n] = x2 [n], Xs1 (jΩ) and Xs2 (jΩ) are also the same (let’s
call them Xs (jΩ))

25 / 59
Aliasing example

❑ Xc1 (jΩ) is a pair of impulses at Ω = ±4000


❑ Xs1 (jΩ) will have shifted copies of this Fourier transform centered
on ±Ωs , ±2Ωs , ...
❑ Xc2 (jΩ) is a pair of impulses at Ω = ±16000
❑ Xs2 (jΩ) will have shifted copies of this Fourier transform centered
on ±Ωs , ±2Ωs , ...
❑ The impulse located at Ω = −4000π is from Xc(j(Ω − Ωs )) rather
than from Xc(jΩ)
❑ The impulse located at Ω = 4000π is from Xc(j(Ω + Ωs )) rather
than from Xc(jΩ)

26 / 59
Table of Contents

1 Periodic sampling

2 Frequency domain representation of sampling

3 Reconstruction of band-limited signal from its samples

4 Discrete-time processing of Continuous-time signals


Example: Ideal continuous-time lowpass filter
Example: Ideal continuous-time bandlimited differentiator

5 Impulse invariance

27 / 59
Time-domain representation of reconstruction

❑ Given a sequence of samples x[n] and the sampling period T ,


form the continuous-time impulse train
P∞
❑ xs (t) = n=−∞ x[n]δ[t − nT ]
❑ The nth sample is associated with the impulse at t = nT
❑ Let this impulse train is the input to an ideal lowpass
continuous-time filter with frequency response Hr (jΩ) and impulse
response hr (t)

❑ The output
P of this filter will be:
xr (t) = ∞
n=−∞ x[n]hr (t − nT )

28 / 59
Time-domain representation of reconstruction

❑ An ideal reconstruction filter has a gain of T and a cutoff


frequency Ωc between ΩN and ΩS − ΩN
❑ A convenient and commonly used choice of the cutoff frequency is
Ωc = Ω2s = Tπ
sin( πt )
❑ Corresponding impulse response: hr (t) = T
πt
T
❑ hr (0) = 1 and hr (nT ) = 0 for n = ±1, ±2, ...

29 / 59
Time-domain representation of reconstruction

❑ The reconstructed signal


π(t−nT )
P∞ sin( )
❑ xr (t) = n=−∞ x[n] T
π(t−nT )
T

❑ xr (mt) = xc (mt), for all integer values of m


❑ The reconstructed signal has the same values as the original
continuous-time signal at the sampling times
❑ Independently of the sampling period T

30 / 59
Ideal discrete-to-continuous-time (D/C) converter

P∞ −jΩTn
❑ Xr (jΩ) = n=−∞ x[n]Hr (jΩ)e = Hr (jΩ)X (ejΩt )
❑ Output of ideal D/C converter is always bandlimited
❑ Maximum frequency = cutoff frequency of the lowpass filter (Ωc ),
typically taken to be Ω2s
31 / 59
Table of Contents

1 Periodic sampling

2 Frequency domain representation of sampling

3 Reconstruction of band-limited signal from its samples

4 Discrete-time processing of Continuous-time signals


Example: Ideal continuous-time lowpass filter
Example: Ideal continuous-time bandlimited differentiator

5 Impulse invariance

32 / 59
Introduction

❑ A major application of discrete-time systems is in the processing


of continuous-time signals
❑ Using a cascade of:
❑ C/D converter
❑ Equivalent discrete-time system
❑ D/C converter

❑ Properties of the overall system depends on the discrete-time


system and the sampling rate
33 / 59
Review of C/D and D/C converters

❑ The C/D converter produces a discrete-time signal


❑ x[n] = xc (nT )  
1
P∞ 2πk
❑ X (ejω ) = T k =−∞ Xc j ω
T − T

❑ The D/C converter creates a continuous-time output signal


π(t−nT )

P∞ sin T
❑ yr (t) = n=−∞ y [n] π(t−nT )
T (
TY (ejΩT ), |Ω| ≤ Tπ
❑ Yr (jΩ) = Hr (jΩ)Y (ejΩT ) =
0, Otherwise

34 / 59
The overall system

❑ The relation between y [n] and x[n] (or equivalently, Y (ejω ) and
X (ejω )) is given by the properties of the discrete time system
❑ A very simple example: identity system (y [n] = x[n])
❑ if xc (t) has a bandlimited Fourier transform
π
❑ Xc (jΩ) = 0 for |Ω| ≥ T
❑ y [n] = x[n] = xc (nT )
❑ Output: yr (t) = xc (t)

35 / 59
Linear time-invariant discrete-time system

❑ If the discrete-time system is linear and time invariant


❑ Y (ejω ) = H(ejω )X (ejω )
❑ H(ejω ) is the frequency response of the system

Yr (jΩ) = Hr (jΩ)Y (ejΩT )


= Hr (jΩ)H(ejΩT )X (ejΩT )

1 X  2πk 
= Hr (jΩ)H(ejΩT ) Xc j Ω −
T T
k =−∞

36 / 59
Linear time-invariant discrete-time system

π
❑ If Xc (jΩ) = 0 for |Ω| ≥ T (Band-limited signal, no aliasing)
1
❑ The ideal lowpass reconstruction filter Hr (jΩ) cancels the factor T
and selects only the term for k = 0

(
π
H(ejΩT )Xc (jΩ), |Ω| < T
Yr (jΩ) = π
0, |Ω| ≥ T
= Heff (jΩ)Xc (jΩ)
(
π
H(ejΩT ), |Ω| < T
❑ Heff (jΩ) = π
0, |Ω| ≥ T

37 / 59
Overall linear time-invariant continuous-time
system

❑ The overall continuous-time system is equivalent to a linear


time-invariant system whose effective frequency response is
Heff (jΩ)
❑ Linear and time-invariant behavior of the overall continuous-time
system depends on two factors
❑ The discrete-time system must be linear and time invariant
❑ The input signal must be bandlimited, and the sampling rate must
be high enough so that there is no aliasing

38 / 59
Table of Contents

1 Periodic sampling

2 Frequency domain representation of sampling

3 Reconstruction of band-limited signal from its samples

4 Discrete-time processing of Continuous-time signals


Example: Ideal continuous-time lowpass filter
Example: Ideal continuous-time bandlimited differentiator

5 Impulse invariance

39 / 59
Problem formulation

❑ Let the linear time-invariant discrete-time


( system have the
1, |ω| < ωc
frequency response: H(ejω ) =
0, ωc < |ω| ≤ π
❑ Periodic with period 2π
❑ For band-limited inputs sampled above the Nyquist rate
❑ Overall system will behave as a linear time-invariant
continuous-time
( system
1, |ΩT | < ωc , or |Ω| < ωTc
❑ Heff (jΩ) =
0, |ΩT | > ωc , or |Ω| > ωTc

40 / 59
Problem formulation

41 / 59
Steps 1 and 2

❑ Fourier transform of a bandlimited signal

❑ Fourier transform of the intermediate modulated impulse train


❑ Identical to X (ejΩT ), discrete-time Fourier transform of the
sequence of samples evaluated at ω = ΩT

42 / 59
Step 3

❑ Discrete-time Fourier transform of the sequence of samples


(X (ejω ))
❑ Frequency response of the discrete-time system (H(ejω ))
❑ Both plotted as a function of the normalized discrete-time frequency
variable ω

43 / 59
Step 4

❑ Fourier transform of the output of the discrete-time system


Y (ejω ) = H(ejω )X (ejω )

44 / 59
Step 5

❑ Fourier transform of the output of the discrete-time system, Y (ejω )


as a function of the continuous-time frequency Ω
❑ Frequency response of the ideal reconstruction filter Hr (jΩ) of the
D/C converter

45 / 59
Step 6

❑ Fourier transform of the output of the D/C converter Yr (jΩ)

46 / 59
Discussion

❑ Ideal discrete-time lowpass filter with cutoff frequency ωc has the


effect of an ideal continuous-time lowpass filter with cutoff
frequency Ωc = ωTc
❑ By using a fixed discrete-time lowpass filter and varying the
sampling period T , a continuous-time lowpass filter with variable
cutoff frequency can be implemented

47 / 59
Table of Contents

1 Periodic sampling

2 Frequency domain representation of sampling

3 Reconstruction of band-limited signal from its samples

4 Discrete-time processing of Continuous-time signals


Example: Ideal continuous-time lowpass filter
Example: Ideal continuous-time bandlimited differentiator

5 Impulse invariance

48 / 59
Problem formulation

❑ Ideal continuous-time differentiator system is defined by


d
yc (t) = dt xc (t)
❑ Frequency response: Hc (jΩ) = jΩ
❑ Since inputs( are restricted to be bandlimited, it is sufficient that
jΩ, |Ω| < Tπ
Heff (jΩ) =
0, |Ω| > Tπ

49 / 59
Discrete-time implementation

❑ The corresponding discrete-time system has frequency response


H(ejω ) = jω
T for |ω| < π
❑ Periodic with period 2π

❑ Corresponding impulse response:


Z ∞
1 πncos(πn) − sin(πn)
h[n] = H(ejω )ejωn dω = , −∞ < n < ∞
2π −∞ πn2 T
(
0, n=0
= cos(πn)
nT , n ̸= 0

50 / 59
Sinusoidal input

❑ Let the input to the differentiator system is xc (t) = cos(Ω0 t)


π
❑ Ω0 < T
❑ Sampled input, x[n] = cos(ω0 n), ω0 = Ω0 T < π
❑ Discrete-time Fourier transform of x[n]:
1
P∞
❑ X (ejΩT ) = T k =−∞ πδ(Ω − Ω0 − k Ωs ) + πδ(Ω + Ω0 − k Ωs )
−π π
❑ Focusing on the base band of frequencies T <Ω< T
π
❑ X (ejΩT ) = T δ(Ω − Ω0 ) + Tπ δ(Ω + Ω0 ) for |Ω| ≤ π
T
❑ To express the discrete-time Fourier transform in terms of ω, we
substitute Ω = Tω
❑ X (ejω ) = πδ(ω − ω0 ) + πδ(ω + ω0 ), |ω| ≤ π
❑ Using the relation δ( ω
T ) = T δ(ω)

❑ X (e ) repeats periodically with period 2π in the variable ω, and
X (ejΩT ) repeats periodically with period 2π
T

51 / 59
Output for sinusoidal input

❑ Discrete-time Fourier transform of the output is:


Y (ejω ) = H(ejω )X (ejω )
jω 
= πδ(ω − ω0 ) + πδ(ω + ω0 )
T
jω0 π jω0 π
= δ(ω − ω0 ) − δ(ω + ω0 ), |ω| ≤ π
T T
❑ Continuous-time Fourier transform of the output of the D/C
converter is:
Yr (jΩ) = Hr (jΩ)Y (ejΩT ) = TY (ejΩT )
jω0 π jω0 π 
=T δ(ΩT − Ω0 T ) − δ(ΩT + Ω0 T )
T T
jω0 π 1 jω0 π 1 
=T δ(Ω − Ω0 ) − δ(Ω + Ω0 )
T T T T
π
= jΩ0 πδ(Ω − Ω0 ) − jΩ0 πδ(Ω + Ω0 ), |Ω| ≤
T
52 / 59
Output for sinusoidal input

❑ Output of the reconstruction filter


❑ yr (t) = jΩ0 12 ejΩ0 t − jΩ0 12 e−jΩ0 t = −Ω0 sin(Ω0 t)
❑ yr (t) = dtd xc (t)

53 / 59
Table of Contents

1 Periodic sampling

2 Frequency domain representation of sampling

3 Reconstruction of band-limited signal from its samples

4 Discrete-time processing of Continuous-time signals


Example: Ideal continuous-time lowpass filter
Example: Ideal continuous-time bandlimited differentiator

5 Impulse invariance

54 / 59
Impulse response of equivalent system

❑ A cascade system is equivalent to a linear time invariant system


for bandlimited input signals

55 / 59
Impulse response of equivalent system

❑ Let Hc (jΩ) be bandlimited


❑ For Heff (jΩ) to be equal to Hc (jΩ):
❑ H(ejω ) = Hc ( jω
T ), |ω| < π
π
❑ Sampling period, T be chosen such that Hc (jΩ) = 0 for |Ω| ≥ T
❑ Under these constraints, there is a straightforward relationship
between the impulse response of the continuous-time and the
discrete-time systems
❑ Using the sampling relation x[n] = xc (nT ) and replacing x[n] by
h[n] and xc (nT ) by hc (nT )
❑ h[n] = hc (nT )

56 / 59
Impulse response of equivalent system

❑ From the slide on “Relationship between F{x[n]} and Xc (jΩ)” for


the above equation
P∞
❑ H(ejω ) = T1 k =−∞ Hc (j( ω 2πk
T − T ))
π
❑ Using the bandlimited constraint (Hc (jΩ) = 0 for |Ω| ≥ T)
❑ H(ejω ) = T1 Hc (j ωT ), |ω| ≤ π
❑ An addition factor of T1 compared to the relation in previous slide
❑ Need to make scaling factor adjustment
❑ h[n] = Thc (nT ) → H(ejω ) = Hc (j Tω ), |ω| ≤ π

57 / 59
Discrete-time lowpass filter obtained by impulse
invariance

❑ We aim to obtain an ideal lowpass discrete-time filter with cutoff


frequency ωc < π
❑ We can do this by sampling a continuous-time ideal lowpass filter
with cutoff frequency Ωc = ωTc < Tπ
(
1, |Ω| < Ωc
❑ Hc (jΩ) = → hc (t) = sin(Ω
πt
c t)

0, |Ω| ≥ Ωc
❑ We can define the impulse response of the discrete-time system
to be:
❑ h[n] = Thc (nT ) = T sin(Ωc nT )
πnT = sin(ωc n)
πn
❑ Where, ωc = Ωc T
❑ This sequence
( corresponds to discrete-time Fourier transform
1, |ω| < ωc
H(ejω ) = = Hc (j Tω )
0, ωc < |ω| ≤ π
58 / 59
Thanks.

You might also like