0% found this document useful (0 votes)
13 views

EEE504-Discrete-Time Systems and Sampling

Uploaded by

Okewunmi Paul
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

EEE504-Discrete-Time Systems and Sampling

Uploaded by

Okewunmi Paul
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

EEE504:

DIGITAL SIGNAL PROCESSING (DSP)


LECTURE NOTES
DISCRETE-TIME SYSTEM AND SAMPLING

By:
Olorunniwo O.
Dept. of Electronic & Electrical Engineering
Obafemi Awolowo University
Ile-Ife

Page | 1
1. Introduction : The DSP Overview
2. Discrete-Time Systems and Sampling
• Sampling of Signals;
• Quantization;
• Reconstruction of Sampled Data;
• Aliasing;
• Anti-aliasing;
• Reconstruction Filters

1. INTRODUCTION
Signal processing is a concept involved with the representation, transformation and manipulation of
signals and the information contained therein. Then, what is digital signal processing?
Digital Signal Processing (DSP) is, therefore, considered simply to be the capture and manipulation of
an analog signals using a digital computer. Further, a fundamental aspect of DSP is based on processing
sequences of data samples. Thus, in most cases , real world sensory signals are represented by finite–
precision numbers using the data acquisition (DAQ) system, and the signal processing implemented by
digital computation. In Figure 1, the DAQ elements outlined employ the various basic concepts of DSP
which include: sampling, analog-to-digital (A/D) conversion, digital-to-analog (D/A) conversion,
convolution, digital filtering, discrete Fourier transform (DFT), fast Fourier transform (FFT), correlation
techniques, data compression, to mention a few.

Figure 1: The General Data Acquisition System

Historically, the integration of DPS software and hardware into consumer products has revolutionized a
wide range of industries and fields: Communication, radar and sonar, high fidelity music reproduction,
medical imaging, space exploration, seismic imaging and oil prospecting, to name a few. Each of these
areas has developed its own mathematics, algorithms, DSP technology and specialized techniques.
Moreover, Figure 2 illustrates the broad interdisciplinary developments, while Figure 3 summarizes the
diverse applications of DSP.

Figure 2: DSP interdisciplinary developments Page | 2


Figure 2: The DSP Revolution

Why is DSP of major interest? Because of the flexibility of digital computers, its is often useful to
simulate a signal processing system before implementing it in analog hardware. In this way, the
development of a new signal processing algorithm or system could be studied in a flexible environment,
before committing economic and engineering resources to the construction.

2. Discrete Time Systems and Sampling


What are discrete-time signals? Discrete-time signals are represented mathematically as sequences of
numbers. Consider this: A sequence of numbers x , such that the nth number in the sequence is
represented as x[n ] is given by:
x = {x[n ]}, − ∞ < n < ∞ , where n is an integer.
Note: A sequence is simply a function whose domain is the set of integers. For example, a unit step
sequence is defined as,

{1(n )} = {K ,1(− 2 ),1(− 1),1(0 ),1(1),1(2 ),K} or 1(n ) = 


1 n≥0
0 n<0
And a discrete-time impulse or unit impulse sequence is defined as,
0 n≠0
{δ (n )} = {K ,0,0,1,0,0,K} , or δ (n ) =  where 1 appears at the location
1 n=0
corresponding to n = 0 .
Table 1 illustrates some basic sequences used in the representation and analysis of discrete-time systems.
Moreover, the unit step is related to the impulse sequences, such that
n ∞
u[n] = ∑δ [k ] or u[n] = ∑δ [n − k ] .
k = −∞ k =0
Generally, any sequence can be expressed as,
n
x[n] = ∑ x[k ]δ [n − k ] .
k = −∞

Page | 3
Table1
Basic Graphical representation
Mathematical Expression
Sequences
Impulse
or 0 n≠0
δ (n ) = 
Unit sample 1 n=0
Unit step
1 n≥0
1(n ) = 
0 n<0

Exponential

x[n ] = Aα n

Sinusoidal
x[n] = A cos(ω 0 n + φ ),
for all n

In the analysis of discrete-time systems, sequences are manipulated in several basic ways to obtain the
desired results. Additionally, such sequences are derived from periodic sampling of analog signals.

What is a discrete-time system?


A discrete time system is defined mathematically as a transformation which maps an input sequence
x[n] into a unique output sequence y[n ] such that:
y[n] = T {x[n]}

Review: A system is any process that generates an output signal in response to an input signal. What is
more, continuous-time systems are that defined signals along a continuum of times, and is represented
by a continuous independent variable, while discrete-time systems represent signals as sequences of
numbers. And digital signals are those for which both time and amplitude are discrete. Figure 3
compares and contrasts a discrete and continuous system.

Figure 3: Representation of a discrete and a continuous


system

The following are some useful discrete-time systems:

a. The ideal delay system: This system is defined by the equation


y [n ] = x[n − n d ]

Page | 4
Where n d is a fixed positive integer referred to as the delay of the system. The ideal delay system
shifts the input sequence positively to the right by n d samples or negatively to the left by n d
samples, corresponding to a time advance.

b. Moving Average system: The general moving average system is defined by


M2
1
y[n ] = ∑ x[n − k ]
M 1 + M 2 + 1 k =− M1
1
= {x[n + M 1 ] + x[n + M − 1] + K + x[n] + x[n − 1] + K + x[n − M 2 ]}
M1 + M 2 +1
c. Memoryless systems: A system is memoryless if the output is y[n ] at every value depends only on
the input x[n] at the same value of n. An example of memoryless system relates x[n] to y[n ] by
y[n] = (x[n]) , for each value of n.
2

d. Linear systems: A system is called linear if it has two mathematical homogeneity and additivity.
That is, it must support the laws of superposition. Consider: If y1 [n] and y 2 [n] are the responses
of a system when x1 [n ] and x 2 [n] are the inputs respectively, the system would be linear if and only
if,
1. T {x1 [n] + x2 [n]} = T {x1 [n]} + T {x2 [n]} = y1 [n] + y 2 [n] (Additivity)
(See Figure 4)

Figure 4: The property of additivity

2. T {ax[n]} = aTx[n] = ay[n] (Homogeneity or Scaling)


(See Figure 5)

Figure 5: The property of homogeneity or scaling

Page | 5
3. If T {x[n]} = T {y[n]} ,
then a system is said to be shift-invariant if a shift in the input signal causes an identical shift in
the output signal such that::
T {x[n − s ]} = T {y[n − s ]} , where s is any constant ( Shift-invariance).

Figure 6: The property of shift-invariance

These two properties are combined to express the laws of super position given by:
T {ax1 [n] + bx2 [n]} = aT {x1 [n]} + bT {x2 [n]} for arbitrary constant a and b.

e. Non-linear discrete-time system: These are system which do not obey the stipulated properties of
linear system: homogeneity, additivity and shift invariance. Examples of a non-linear systems include:
I. ( )
system that do not have static linearity: voltage-power in a resistor P = V 2 R , emission
( 4
)
of radiant energy R = kT , light intensity I = e ( −α T
)
II. systems without sinusoidal fidelity: electronic circuits for peak detection, squaring, sine
wave to square wave conversion, frequency doubling, and so on.
III. common electronic distortion: clipping, crossover distortion, and slewing circuits
IV. multiplication: amplitude modulation and automatic gain control circuits
V. hysteresis phenomena
VI. saturation of electronic amplifier and transformer circuits
VII. systems with threshold: digital logic gates and seismic sensing circuits

f. Accumulator system:
The system defined by the input-output equation
n
y[n] = ∑ x[k ]
k = −∞
is called the accumulator system. Additionally, the accumulator system is a linear system.
g. Time-invariant systems
Often, these are systems that are also shift-invariant. A time-shift or delay of the input sequence, in
a time-invariant system, is characterized with a corresponding shift in the output sequence. Consider:
If a system maps an input sequence x[n] into the output sequence y[n ] . Then, the system is said to
be time-invariant, if for all n 0 , the input sequence with values x1 [n ] = x[n − n 0 ] produces the
output sequence with values y1 [n ] = y [n − n 0 ] .

h. The compressor system:


This system is defined mathematically as,
y[n] = x[Mn], −∞ < n < ∞

Page | 6
Where, M is a positive integer referred to as the compressor. The compressor system creates the
output sequence by selecting the Mth sample. Moreover, the system is not time-invariant.

2.1
Sampling of Signals
Most commonly encountered discrete-time signals arise as representations of sampled continuous-time
signals such as specch, audio signals, radar and sonar data, seismic and biological signals. Additionally, the
process of converting these signals is digital form is called ADC. And, the reverse proces of
reconstructing the anlog signal from its samples is referred to as DAC. Therefore, what is sampling?

The sampling process is simply a typical method of obtaining a periodic discrete-time


representation of continuous-time, wherein a sequence of samples, x[n] , is obtained from a
continuous-time signal, x c (t ) such that:
x[n ] = x c (nT ) ,−∞ < n < ∞
where, T is the sampling period and 1 T is the sampling frequency in sample per second.
Conversely, the sampling frequency could be expressed as 2π T in radians per second. Clearly, the
numeric value of the nth number in the sequence is equal to the value of the analog signal, xc (t ) at time
nT . Furthermore, Figure 3 illustrates a typical discrete-time signal of sequence x[n] .

Figure 3: Graphical representation of a discrete-time signal

Pictorially, a periodic sampling is illustrated in Figure 4, whereby a continuous signal is multiplied by a


periodic sequence of impulses,

∑ δ (t − nT )
n = −∞
s

to form a sampled signal,


∑ x (t )δ (t − nT ) = x (nT ) = x[n]
n=−∞
c s c s

Figure 4: The Sampling Process

Page | 7
Note: Practically, the sampling process is implemented by an A/D converter. In addition, considerations
in the implementation and choice of converter include: Quantization of output samples, linearity of
quantization steps, sample-and-hold circuits, and the limitation of sampling rate.

2.1.1 Frequency-Domain Representation of Sampling


The effects of the sampling process by the ideal converter could be analyzed in the frequency domain
as follows:
1. Let the conversion of xc (t ) to xs (t ) be the modulation of the periodic impulse train

s(t ) = ∑δ (t − nT ) , such that
n = −∞
s

x s (t ) = x c (t ) × s (t ) and

x s (t ) = xc (t ) ∑ δ (t − nTs )
n = −∞
The above equation is expressed as periodic impulse function,

xs (t ) = ∑ x (nT )δ (t − nT ) (See Figure 4)
n=−∞
c

2. Further, let the frequency-domain representation (spectrum) of xc (t ) be X c ( jΩ ) ; and the periodic


impulse train s(t ) be S ( jΩ ) . Therefore, the output signal, X s ( jΩ ) is a convolution (addition) of
both X c ( jΩ ) and S ( jΩ ) . This is illustrated in Figure 5. Significantly, X s ( jΩ ) is seen as a band
limited transform consisting of copies of X c ( jΩ ) shifted along the periodic impulses train
spectrum, S ( jΩ ) .

Figure5: The Sampling process in frequency-domain


3. Note: (a) if the highest non-zero frequency component in X c ( jΩ ) is at Ω N , and
(b) if Ω s − Ω N > Ω N or Ω s > 2Ω N the replicas of X c ( jΩ ) do not overlap. Then, the
summation could expressed as,
1 ∞
X s ( jΩ) = ∑ X c [ j (Ω − kΩ s )] .
T k = −∞
As a result, xc (t ) could be recovered from xs (t ) with an ideal low-pass filter.
4. However, the spectrum illustrated in Figure6 results when Ω s ≤ 2Ω N .

Page | 8
Figure6: Spectrum of the sampled signal with Ω s ≤ 2Ω N
The copies of X c ( jΩ ) overlap, and the original signal is no longer recoverable by low-pass filtering.

2.1.2 Sampling Theorem


This is sometimes referred to as Shannon or Nyquist sampling theorem. The sampling theorem states: A
continuous signal can be properly sampled, if only it does not contain frequency components above
one-half (½) of the sample rate. What does this imply? A continuous signal is sampled properly if the
samples contain all the needed information. How?
Mathematically, if a continuous signal xc (t ) is band limited, such that
X c ( jΩ ) = 0 for Ω > Ω 0 .
Then the continuous signal xc (t ) could be uniquely recovered from its samples of xc (nT ) if

Ωs = ≥ 2Ω 0
Ts
Moreover, Ω 0 is the Nyquist frequency, and the minimum sampling frequency, Ω s = 2Ω 0 , is the
Nyquist rate.
To that end, a sampling rate of 2000 samples/second requires that the analog signal be composed of
frequencies below 1000 samples/second. If frequencies above this limit are present, distortions would be
observed along with the information contained therein, during reconstruction of sampled data.

2.2 Quantization
What is quantization? This is a process whereby a nonlinear, noninvertible system transforms the
input sequence xc (nT ) ,with a continuous range of amplitudes, into an output sequence x̂[n] , for
which each value assume one of a finite set of prescribed values. This operation is represented as
xˆ[n] = Q[x(nT )]
and x̂[n] is referred to as the quantized samples.
The quantizer has L + 1 decision levels x1 , x2 ,..., x L+1 that divide the amplitude range for xc (nT ) into
L intervals, such that:
I k = [xk , xk +1 ] k = 1,2,..., L
and the quantizer assigns a value , for an input xc (nT ) that falls within interval I k , a value x̂[n] within
this interval. Therefore, an analog signal such as a voltage can be expressed as a binary number, suitable
for computer processing, by assigning weights to each bit position. When the quantizers are uniformly
spaced,
∆ k +1 = xk +1 − xk
Where, ∆ is the quantization step size or the resolution of the quantizer, and the quantization level
L = 2 B +1 for a (B + 1) -bit binary code word.

What is quantization error? This is simply the difference between the quantized sample value and the
true sample value. For the above conversion, the associated quantization error is,
e(n ) = xˆ[n] − x[n]
bounded by,
∆ ∆
− < e(n ) <
2 2

Page | 9
A useful model for the quantization process is given in Figure 7. The quantization is assumed be an
additive noise. Hence quantization error, e(n) is sequence of random variable where:
a. The statistics of e(n) does not change with time (random stationary process);
b. The quantization noise e(n) is a sequence of uncorrelated random noise variables;
c. The quantization noise e(n) is uncorrelated with the quantizer input x(n ) ;
d. The probability density function of e(n) is uniformly distributed over the range of values of the
quantization error.

Figure7: Conceptual representation of the quantization process

Table 2 gives a 4-bit coding of an analog signal that ranges from 0 to 10 V. Each binary increment
−4
represents 2 = 161 . Besides, each binary represents a range of analog voltage, with the maximum
quantization error of 6.25% . Further, Figure 7 illustrates the quantization process culminating into binary
codes of an analog voltage.

Table 2
Analog Binary
Voltage Representation
0 to 0.625 0000
0.625 to 1.25 0001
1.25 to 1.875 0010
1.875 to 2.5 0011
2.5 to 3.125 0100
3.125 to 3.75 0101
Figure7: Binary coding of an analog voltage using
3.75 to 4.375 0110
4.375 to 5.0 0111 quantization process
5.0 to 5.625 1000 Number of Maximum
5.625 to 6.25 1001 Bits Percentage
6.25 to 6.875 1010 Error
6.875 to 7.5 1011 1 50
7.5 to 8.125 1100 2 25
8.125 to 8.75 1101 4 6.25
8.75 to 9.375 1110 6 1.56
9.375 to 10.0 1111 8 0.391

3. Reconstruction of Sampled Data


Many applications require the construction of analogue waveforms or signals from the sample (digital)
signals. Intuitively, this involves “filling in the gaps” or interpolating the sampled values to achieve a
continuous time signal. Thus, the analog signal reconstruction is carried out by an analog reconstructor.
It is also referred to as the ideal discrete-to-continuous-time (D/C) converter. Figure 8 illustrates a
block diagram of the analog signal reconstruction. Where x s (t ) is an impulse train and xr (t ) is the
output from a filter.

Page | 10
Figure 8: The ideal reconstructor and D/C converter

According to the sample theorem, if a continuous signal xc (t ) is strictly band limited such that
X c ( jΩ ) = 0 for Ω > Ω 0 .
π
If Ts < then the continuous signal xc (t ) could be uniquely reconstructed from its samples of
Ω0
x c (nT s ) .
Practically, the reconstruction process involves two steps:
(1) The samples x[n] are converted into a sequence of impulses x s (t ) ; and
(2) x s (t ) is filtered by an ideal low-pass reconstruction filter.

3.1 Ideal Reconstructor


Consider this: An analog signal xc (t ) with a frequency spectrum X c ( jΩ ) that has been sampled at the
rate of 1 Ts samples per second. In addition to this, the sampled signal x[n] will have a spectrum which
consist of replica of X c ( jΩ ) shifted by integer multiples of Ω s . Given that X c ( jΩ ) is band-limited,
and the sampling rate is sufficiently high to avoid overlap, then a low-pass filter can recover xc (t ) with an
ideal reconstruction filter with a cut-off frequency of Ω s 2 .
Ideally, the low-pass filter is characterized with a frequency response given by:
 π
Ts Ω≤
 Ts
H r ( jΩ ) = 
0 π
Ω >
 Ts
Graphically, the frequency response of an ideal reconstruction filter and its impulse response

Figure9: (a) The frequency response of an ideal reconstruction filter, and (b) its impulse
response

Page | 11
The time-domain characteristic corresponding to H r ( jΩ ) is given by,
sin (πt T )
hr (t ) =
πt T
 πt 
= sin c 
T 
This is known as the sine function. And, the system is the ideal discrete-to-continuous (D/C)
converter. Moreover, the output of the filter for an input sequence xc (nT ) is,

xc (t ) = ∑ x(n)h (t − nT )
n = −∞
r s


sin π (t − nTs ) Ts
= ∑ x(n )
n = −∞ π (t − nTs ) Ts

Note: hr (t ) is not physical realizable. Why? This is because it is non-causal. A causal system is one that
if excited at t=0 will produce a response starting from t=0. However, hr (t ) is non-zero in the negative
frequency. Hence, if the low-pass filter is excited by a single impulse at t=0 , the response of would have
started even before the excitation reaches the input.

3.2 The Staircase Reconstructor


In practice, the implementation of analog signal reconstruction is made by the staircase reconstructor or
zero-order hold (ZOH). This reconstructor holds the value, for T seconds, of the most recent sample
until the next samples arrives (See Figure 10).

Figure10: Analog reconstruction using zero order holds

The ZOH’s impulse response is given by:


1 0≤t ≤T
hr (t ) = 
0 otherwise

If the reconstructor is excited by an impulse at t=0, the output of the staircase reconstructor will be a
rectangular waveform with amplitude equal to that of the impulse with duration of T seconds.
Moreover, the staircase output would contain some high frequency components because of abrupt
changes in signal levels. The spectrum of hZOH (t ) is a sine function with decaying exponential
amplitude, such that:
sin (ΩTs 2) − jΩTs / 2 π
H ZOH ( jΩ ) = e Ω<
Ω2 Ts
Figure 12 illustrates the spectra at the input and output of the ZOH. It is obvious that parts of the
replicas of the baseband spectrum are included in the output of the ZOH.

Page | 12
Figure11: Analog reconstruction using ZOH

Figure12: Spectra at the input ad the output of the ZOH

3.3 Aliasing and Anti-aliasing


What is aliasing? This is the effect from the overlapping of the spectral components in the frequency
domain. If the inequality Ω s ≤ 2Ω N does not hold, the replicas of X c ( jΩ ) overlap and are added
together. This makes X c ( jΩ ) no longer recoverable by low-pass filtering.
However, the signals that are found in the real world are not strictly band-limited, an analog anti-aliasing
filter—always analog—is typically employed to filter the signal prior to sampling. Therefore, what is
anti-aliasing? This is a process of (1) minimizes the amount of energy above the Nyquist frequency, and
(2) reduces the amount of aliasing in A/D conversion.

3.3.1 Anti-aliasing filters


Anti-aliasing filters are analog filters which process the signal before it is sampled. Often it is
implemented as a low-pass filter. The ideal filter has a flat pass-band and the cut-off very sharp.
Moreover, the cut-off frequency of this filter is half of that of the sampling frequency and the
resulting spectrum do not overlap each other. Figure 13 illustrates the sampling process that
incorporates an ideal low-pass filter as the anti-aliasing filter.

Page | 13
Figure 13: The sampling process with anti-aliasing low-pass filter

Practical limits on sampling rates


The practical choice of sampling rates is determined on the following factors:
(1) The sampling theorem imposes a lower bound on the allowed values of the sampling frequency;
(2) The economics of the hardware imposes an upper bound. These economics includes the cost of
the ADC and the cost of implementing the analog anti-aliasing filters.

Review Questions
1. Determine the output sequence for 10 sample-time of a discrete-time system described by the
input-output relationship,
y[n ] = x[n ] + 2 x[n − 1] + x[n − 2]
2. Given the sequence x(n ) = (6 − n )[u (n ) − u (n − 6 )] , make a sketch of
a. y1 (n ) = x(4 − n ) , c. y 2 (n ) = x(2n − 3)
b. y 3 (n ) = x(8 − 3n ) ( )
d. y 4 (n ) = x n 2 − 2n + 1
3. Describe mathematically the following discrete-time systems:
a. The ideal delay;
b. Memoryless;
c. Linear;
d. Time-invariant.
4. For each of the systems below, x(n ) is the input and y (n ) is the output. Determine which
systems are
i. Homogenous;
ii. Additive;
iii. Linear
from the following:
a. y(n ) = log[x(n )]
b. y(n ) = 6 x(n + 2) + 4 x(n + 1) + 2 x(n ) + 1
c. y(n ) = 6 x(n ) + [x(n + 1)x(n − 1)] x(n )
d. y(n ) = x(n ) sin (nπ 2 )

Page | 14
e. y(n ) = Re{x(n )}
f. y (n ) = 1
2
[x(n ) + x ∗
(− n )]
5. A discrete-time signal x[n] is shown in the Figure P1 below:

Figure P1
Sketch and label carefully each of the following signals:
(a) x[n − 2] ; (b) x[4 − n] ; (c) x[2n] ;
(d) x[n]u[2 − n] ; (f) x[n − 1]δ [n − 3]

6. The system T in Figure P2 is known to be time invariant. When the inputs to the system are
x1 [n] , x1 [n] , and x1 [n] , the responses of the system are y1 [n] , y 2 [n] , and y 3 [n] as shown.
Determine if the system T could be linear.

Figure P2

7. Discuss the following concepts:


a. Digital Signal Processing;
b. Discrete-time systems;
c. Sampling ;
d. Quantization;
e. Aliasing; and
f. Anti-aliasing.

Page | 15

You might also like