Chapter 1 Slides

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

Chapter 1: Discrete-time Signals &

Systems

Part 1: Discrete-time Signals and Systems

1
Discrete Time Signals and Systems

Outline

Introduction
Discrete-time signals
Common DT signals
Classification of signals
Discrete-time systems
Classification of systems
Linear time-invariant (LTI) systems
Convolution
Properties of LTI systems
Linear constant coefficient difference equations (LCCDEs)

2
Introduction

Definition
Digital signal processing (DSP) is the use of digital processor such as
computer to analyse and manipulate digital signal in order to perform a
wide variety of operations.
The signals are discrete and represented as a sequence of numbers that
represent samples of a continuous variable in a domain such as time,
space, or frequency.
Video https://youtu.be/R90ciUoxcJU

3
Introduction
Advantages of DSP over conventional analog methods:
Perfect reproducibility, i.e., digital signals can be copied repeatedly
without degrading signal quality
No drift in performance with temperature or age
Greater reliability and lower power consumption due to advances in
semiconductor technology
Greater reusability as digital systems can often be reprogrammed
without modifying the hardware

Disadvantages of DSP:
Higher fabrication cost especially in the case of broadband frequencies
(above 100MHz)
Finite wordlength problem, i.e., limited bits in number representation,
resulting in performance degradation

4
Introduction
A signal is a function or variable that represents information
A signal stores measurable, physical quantity that varies
Examples: heartbeat signal, stock price, speech and engine
vibration signal
Examples: Biomedical signals, radio waves, weather conditions
(e.g. temperature, rainfall, wind speed), stock exchange movement

Speech signal

voltage (V)

t, time (s)

5
Discrete-time Signals
As signals are generally continuous, these signals have to be
converted to the digital form before being introduced into DSP
systems
A preliminary step to this process is the sampling process in which
the original continuous-time signal is converted to the discrete-
time counterpart
This is performed through sampling the continuous-time signal at
regular intervals (or sampling period or sampling interval T)
T is the inverse of sampling frequency fs: T = 1/fs

Take note of the


change of the
continuous-time
variable t to the
integer index n

6
Example 1: CT to DT conversion
Convert the continuous-time signal x(t) to the discrete-time
signal x(n) using a sampling period of 125 µs.

Solution:

7
Discrete-time Signals
Discrete-time (DT) signal is a digital signal obtained from
sampling a continuous-time signal
DT signal is a function of time
E.g. speech, music, stock price
DT signal is not continuous and is defined only at discrete
times, thus the independent variable n has discrete values
Discrete-time signals are typically represented as sequences of numbers
Example:

Unlike continuous-time signals, one cannot tell the rate at which discrete-
time signals are changing unless the sampling period is also specified
8
Discrete-time Signals
Common DT signals
Unit impulse function

e. g. : 0 = 1, 2 =0

Unit step function

9
Discrete-time Signals
Common DT signals
Exponential function x(n) = an
Converges with increasing n if a < 1
Diverges with increasing n if a > 1

Sinusoidal function
x(n) = sin (Ωn + ϕ)

10
Discrete-time Signals
Shifted unit impulse

-2

11
Discrete-time Signals
Shifted unit step

-2

12
Discrete-time Signals
Simple relationships
u[n]

n
0

u[n − 1]

n
0 1

δ[n]

n
0

13
Discrete-time Signals
General equation for DT sequence:

...

14
Example 2: Sketching Signal

sketch x(n).

x(n)

15
Discrete-time Signals
Classification of signals

Finite-length
x[n] = 0, n < N1 and n > N2

16
Discrete-time Signals
Classification of signals

17
Discrete-time Signals
Classification of signals

Further reading: Solved Problems 1.1, 1.2, 1.3, 1.4, 1.7, 1.11 of Schaum’s
Outlines Digital Signal Processing.
18
Discrete-time Systems
A discrete-time system transforms an input discrete-
time signal and produces an output discrete-time
signal.

The system output y[n] is a function of the system input x[n], i.e.,
y[n] = F(x[n]) where F represents the transform function.
19
Discrete-time Systems
Classification of systems
Memoryless
A system is memoryless if the output at time n depends only on the
input at the same time n
Examples:
Memoryless
Not memoryless

Causality
A system is causal if the output depends only on the present and past
inputs
Examples:
Causal
Non-causal

20
Discrete-time Systems
Classification of systems
Stability
A system is stable in the bounded-input and bounded-output (BIBO)
sense if every bounded input produces a bounded output
Systems that are unstable can produce unbounded output even if the
input is bounded
Showing BIBO stability requires us to show that every bounded input
produces a bounded output
To show the opposite (instability), it is sufficient to only find one
bounded input that produces an unbounded output
Example:

Stable

21
Discrete-time Systems
Classification of systems
Linearity
A linear system exhibits the additive and scaling properties
Additive property:

22
Discrete-time Systems
Classification of systems
Linearity
A linear system exhibits the additive and scaling properties
Scaling property:

The combination of the additive and scaling properties is called


superposition:

23
.
Example 3: Linearity
y[n] = 3e− x[ n]

y[n] = 5n3 x[n]

24
Discrete-time Systems
Classification of systems
Time or Shift Invariance:
A system is time-invariant (or shift-invariant) if, for any delay, the
output of the system for the shifted input is the same output shifted by
the same delay

x[n − n0]
x[n] z−mn0 F(·) F(x[n − n0]) These outputs
are the same if
the system is
y[n]
x[n] F(·) z−mn0 y[n − n0] time-invariant

25
Discrete-time Systems
Time or Shift invariance:
If input sequence x1(n) is shifted by n0, then the corresponding output
y1(n) will also be shifted by n0

Further reading: Solved Problems 1.12, 1.14, 1.15, 1.16, 1.17, 1.18,1.19,
1.20, 1.21, 1.23 of Schaum’s Outlines Digital Signal Processing.
26
Example 4: Time Invariance
y[n] = 3e − x[ n]

y[n] = 5n3 x[n]

27
Linear Time-invariant Systems
Definition
The linear time-invariant (LTI) system is both linear and
time-invariant
To facilitate the discussion of LTI systems, it is useful to
define the system impulse response
The impulse response h[n] is the system output given the
impulse input δ[n]

δ[n] h[n]
F(·)
n n
0 0
The impulse response h[n]
plays an important role in
defining LTI systems
28
Linear Time-invariant Systems
The impulse response h[n] is the system output given the impulse input δ[n]

h[n] =[1 2 1 1 2 1.3]

012

[ −δ[n]
1] ℎ[ −h[n]
1] h[n] =[0 1 2 1 1 2 1.3]
F(·)
n n
0 0120
01
Example:

0ℎ + 1 ℎ −1 +
2ℎ −2 + 3 ℎ −3
29
Convolution
Convolution and LTI Systems
The output of an LTI system is the convolution of the input and the
impulse response

The LTI system is said to be


completely characterized by the
impulse response h[n] in the
sense that given any input x[n] In the proof, the
the output y[n] is readily linearity property is
determined used in the 3rd step and
the time-invariant
property in the 4th

30
Convolution
Properties of convolution

31
Convolution
Convolution using table method
y(n) = x(n) * h(n),

32
Convolution
Using MATLAB function conv( )
% code
h=[3 2 1]
x=[3 1 2]
y = conv(h,x)

% Result
y=
9 9 11 5 2

Further reading: Solved Problems 1.24, 1.25, 1.26 of Schaum’s Outlines


Digital Signal Processing.

33
Example 5: Convolution
h[−k] x[k] x[k]h[−k] h[n]=[… 0 1 2 -1 1 1 -1 0 …]
2 x[n]=[… 0 1 -1 2 1 0 …]
1
k × k = k 1×1 = 1 = y[0]
−1
y[n]
h[1 − k] x[k] x[k]h[1 − k]

2×1 + 1×(−1) 1 1
k × k = k = 1 = y[1]
n
−1 −1
h[2 − k] x[k] x[k]h[2 − k]

(−1)×1 + 2×(−1)
k × k = k + 1×2 = −1 = y[2]
...

h[8 − k] x[k] x[k]h[8 − k]

k × k = k (−1)×1 = −1 = y[8]

34
h[n]=[… 0 1 2 -1 1 1 -1 0 …]
x[n]=[… 0 1 -1 2 1 0 …]

n -3 -2 -1 0 1 2 3 4 5 6 7 8
h[n] 1 2 -1 1 1 -1
x[-n] 1 2 -1 1 y[0] = 1
x[1-n] 1 2 -1 1 y[1] = 1
x[2-n] 1 2 -1 1 y[2] = -1
x[3-n] 1 2 -1 1 y[3] = 7
x[4-n] 1 2 -1 1 y[4] = 0
x[5-n] 1 2 -1 1 y[5] = -1
x[6-n] 1 2 -1 1 y[6] = 4
x[7-n] 1 2 -1 1 y[7] = -1
x[8-n] 1 2 -1 1 y[8] = -1

35
Convolution
Analytical convolution, with examples

36
Convolution

37
Convolution

38
Convolution

Further reading: Solved Problems 1.27, 1.29, 1.30, 1.31, 1.33, 1.34, 1.35
of Schaum’s Outlines Digital Signal Processing.
39
Properties of LTI Systems
Causality
The LTI system is causal if the impulse response obeys the
following relation

40
Properties of LTI Systems
Stability
The LTI system is stable if the following relation holds

41
Properties of LTI Systems

Causality and stability

Causal
& unstable
Causal
& stable

Non-causal
& stable
42
Linear Constant Coefficient Difference Equations

An important subclass of LTI systems is those in which the


input x[n] and the output y[n] satisfy the linear constant
coefficient difference equation (or LCCDE), i.e.,

The order of the LCCDE above is given by max(p, q)

43
Linear Constant Coefficient Difference Equations
The accumulator system
The accumulator, for instance, is a system of this class

In this form, it is possible to compute the output y[n] for any arbitrary
input x[n]; computation-wise, however, this is not the most efficient
representation
In some cases, the output can be expressed in terms of the past
outputs in addition to the current and past inputs

The accumulator system in the above expression assumes the LCCDE


form

44
Linear Constant Coefficient Difference Equations
This LCCDE form allows us to implement the accumulator system
in a more efficient manner

The system is said to be recursive since the output y[n] is


computed using previously computed output y[n – 1]
More generally, a system is said to be recursive if one or more of the
ak coefficients (except the first) is nonzero
Conversely, if all the ak coefficients are zero (but the first), then the
system is said to be non-recursive

45
Example 6: LCCDE
Example of LCCDE for a filter
x[n] is the input sequence and y[n] is the resulting output sequence
y (n) = 0.5 x(n) + 0.4 x(n − 1)

Question: Given x[n] = [1 2 3], find y[1]

Answer
n=1;
y(n) = y(1)
= 0.5 x(1) + 0.4 x(1-1)
= 0.5 (2) + 0.4 (1)
= 1.4

46
Linear Constant Coefficient Difference Equations
The LCCDE has the form

For Finite Impulse Response (FIR) systems


All coefficients ak (k from 1 to p) are zero
Output depends on current and previous input only
FIR system is a type of digital filter (non-recursive system)
Example: Filter coefficients
y (n) = 0.5 x(n) + 0.4 x(n − 1) b0=0.5, b1=0.4
The impulse response of this system is simple to obtain, i.e.,
substituting x[n] with δ[n]

Evidently, the impulse response of the non-recursive system is finite-


length (or q+1)

47
Linear Constant Coefficient Difference Equations
For Infinite Impulse Response (IIR) systems
Non-zero coefficients ak and bk exist
Output depends on current input, and previous input and output
IIR system is a form of digital filter (recursive system)
Example:
Filter coefficients
b0=1, a1= -1

Consider, for simplicity’s sake, the simple model

As before, the impulse response of this system (replacing x[n] with δ[n])

In this case, the impulse response is infinite-length


48
Chapter 1: Discrete-time Signals &
Systems

Part 2: Frequency-domain Analysis

49
Frequency-domain Analysis

Outline

Introduction
Discrete-time Fourier Transform (DTFT)
Frequency response of LTI systems

50
Introduction
To understand how frequency arises in signal analysis,
consider the following continuous-time sinusoids

= sin(2 ) = sin(ω )
x1(t)

t
0 0.02

x2(t)

t
0

x3(t)

t
0

Noticeably, the higher the frequency, the higher is the pitch/tone;


for the music savvy, the frequencies here are specially chosen to
correspond to the musical notes A, E and high-A

51
Introduction
The previous 3 signals can be combined to produce a
new signal

It is not immediately obvious though, whether via visual (or


audio!) inspection, that this signal consists of the three sinusoids
It is not possible to predict the frequency content from the signal
waveform in time domain
The spectrum of the signal (signal distribution in
frequency-domain) however, offers a clue…
52
Introduction
The spectrum of the tone-rich signal
10 10
The peaks associated
10 8 with the three
frequencies present in
10 6 the tone-rich signal is
easily distinguished
10 4
in the power
Amplitude

spectrum; the size of


10 2
the peaks, in addition,
is an indication of the
10 0
strength (or
amplitude) of these
10 -2
component sinusoids

10 -4
0 1000 2000 3000 4000 5000 6000 7000 8000
Frequency

53
Discrete-time Fourier Transform (DTFT)

Signal transformation
A signal in the time domain can be transformed to the frequency
domain and then transformed back to the time domain
Forward Fourier transform is used to convert a signal representation
from the time domain to the frequency domain
Inverse Fourier transform is used to convert a signal representation
from the frequency domain to the time domain

54
Discrete-time Fourier Transform (DTFT)
Fourier transform for discrete-time (DT) signals is
known as the discrete-time Fourier transform (DTFT)

2πf
ω = 2πf ; Ω = = ωT
fs
f s = Sampling frequency
1
T = = Sampling period
fs
55
Discrete-time Fourier Transform (DTFT)
The periodicity of the Fourier spectrum
Example: Rectangular Pulse

!"
X(X(Ω))

Ωn Ω
X( )

Note that the DTFT obtained is periodic with a period of 2π.

56
Discrete-time Fourier Transform (DTFT)
The periodicity of the Fourier spectrum
Since the spectrum is periodic with period 2π hence the spectrum
is completely specified over an interval of the period, e.g., [0, 2π]
or [–π, π]
Loosely speaking, the region where the radian frequency Ω is near
0 is the low frequency region and the region near π (or –π) is the
high frequency region
|X( )|2
(.wav)

A signal whose |X( )|2 Ω


power spectrum is (.wav)
homogenously
distributed is Ω |X( )|2
called white noise (.wav)

Further reading: Solved Problems 2.6, 2.7, 2.8, 2.9, 2.10, 2.20 of
Schaum’s Outlines Digital Signal Processing.
57
Discrete-time Fourier Transform (DTFT)
Properties of DTFT
X( ), Y( )
aX( ) + bY( )
& '( X( )
' x[n] ( & )
( X( ( )
X( & )

X( )
#Ω*%

X( )Y( )

Y( ))

58
Discrete-time Fourier Transform (DTFT)
Properties of DTFT

X( )

59
Discrete-time Fourier Transform (DTFT)
Common DTFT pairs
X( )

& '(

Ω+

(
' Ω − Ω0

& -jΩ
Ω+
1 − e

&
1 − ,

(1 − , &
)2
sinΩ- n |Ω| Ω-
+( )
Ω- |Ω|
sinΩ & //0
sinΩ/2
60
Discrete-time Fourier Transform (DTFT)
Example: DTFT

61
Example 7: DTFT

62
63
Frequency Response of LTI Systems
The impulse response h[n] describes DT system
behavior in time domain
The DTFT of the system impulse response gives the
frequency response of the system

2(Ω) = 3454(ℎ )

DTFT
H(Ω)
h[n]

π/2

64
Frequency Response of LTI Systems
The frequency response of LTI systems is simply the
DTFT of the impulse response h[n]
& '
H( ) =
H(e jω)) exists only if h[n] is absolute summable and,
As before, H(
H( jω)) is also periodic with period 2π
since this is a DTFT, H(e
Like the impulse response, the frequency response H( H(e jω))
completely characterizes the LTI system
Conversely, the impulse response can be obtained
from the frequency response by the IDTFT

H( ) ' dΩ

65
Frequency Response of LTI Systems
Time-domain convolution, which is central in all LTI
systems, has a particularly appealing and elegant
counterpart in the frequency-domain
Y( ) = X( ) H( )

Y( ) = X( ) H( )

[*] & % ℎ[6] & 7

[*]ℎ[6] & (%87)

66
Frequency Response of LTI Systems

& '
9 = [*]ℎ[ − *]

[*]ℎ[ − *] & '

& '
Hence, if time-
domain convolution
proves a tad too
difficult to perform,
& ' you can always turn
9 =
to using spectral
multiplication as an
alternative

Further reading: Solved Problems 2.21, 2.22, 2.23, 2.26, 2.27, 2.28, 2.32 of
Schaum’s Outlines Digital Signal Processing.
67
Chapter 1: Discrete-time Signals &
Systems

Part 3: DSP for Continuous-time Signals

68
DSP for Continuous-time Signals

Outline

DSP system overview


C/D conversion
Sampling
Spectrum of sampled signal
Shannon sampling theorem
D/C conversion

69
DSP System Overview
The discrete-time processing of continuous-time signals,
for the most part, involves the continuous-to-discrete
(C/D) conversion at the system input and discrete-to-
continuous (D/C) conversion at the output

The C/D converter obtains the discrete-time representation xd[n] of


the input continuous-time signal xc(t) through the sampling
process
At the output, a D/C converter reconstructs the continuous-time
signal yc(t) from the digitally-processed discrete-time signal yd[n]

70
C/D Conversion
The C/D conversion consists of the following steps
The sampling process in which the input signal xc(t) is modulated
by the impulse train s(t); the modulated signal xm(t) is made up of
impulses at regular intervals T in time
The zero-order-hold (ZOH) and analog-to-digital (A/D) units then
convert the modulated signal xm(t) to the desired xd[n]
Recall that the discrete-time signal xd[n] contains
no information about the sampling period T

71
C/D Conversion
Sampling process in time-domain
The sampling process is parameterized by the sampling period T
or the sampling frequency fs
Not surprisingly, with different values of T, different sets of
samples are obtained from the same CT signal

72
C/D Conversion
Sampling process in time-domain

73
C/D Conversion
Sampling process in frequency-domain
The Fourier spectrum of the modulated signal Xm(ω) consists of
periodically repeated copies of Xc(ω) at integer multiples of the
sampling frequency ωs

(ω) Xc(ω - kωs)

(ω) (Xc(ω)∗ S(ω))


(ω -

74
C/D Conversion
S(jω)

-2ωs -ωs 0 ωs 2ωs 3ωs ω

S(ω) = δ (ω - kωs)

Xm(ω) = δ (ω - ξ - kωs) dξ

Xc(ξ)δ (ω - ξ - kωs) dξ

Xc(ω - kωs)

Thus the frequency spectrum of modulated (sampled) signal Xm(ω)


is periodic with period ωs (sampling frequency)
75
C/D Conversion
Sampling process in frequency-domain
Xc(ω)
This denotes the bandwidth
of the (original) continuous-
time signal
ω
-ωN ωN
S(ω)

ω
-ωs ωs
Xm(ω) = Xc(ω)∗S(ω)
ω
Ω
0 ωΩNN Ωs
ωs
ω ωss −- ω
((Ω ΩNN)
-ωs -ωN ωN ωs
(ωs - ωN)
ωs - ωN ≥ ωN
76
C/D Conversion
Sampling process in frequency-domain
Xcc((Ω)
ω)

ω
Ω
-−Ω
ωNN 0 Ω
ωNN
ω)
S(Ω)
S(

ω
Ω
ωs s
-−Ω 0 ωss
Ω
ω
ω)
XXmm((Ω) ωN ωs
(ωs - ωN)
The spectrum overlaps
if the sampling rate is
ω
Ω chosen too small!
ωs s
-−Ω 0 ωs
Ω

77
Spectrum of Sampled Signal

78
Example 8: Spectrum of Sampled Signal

79
a.

The two-side spectrum:

80
b.

81
C/D Conversion
The Nyquist (or Shannon) Sampling Theorem
Choosing the sampling frequency ωs too small results in the copies
of Xc(ω) overlapping and one can no longer retrieve the original
spectrum; signal distortion arising from this phenomenon is called
aliasing
The Nyquist sampling theorem states that if xc(t) is strictly
bandlimited or
(ω) |ω| ωN
then xc(t) can be uniquely recovered from the samples xd[n] = xc(nT) if

ωs ωN
For a uniformly sampled DSP system, an analog signal can be
perfectly recovered as long as the sampling rate ωs is at least twice as
large as the highest-frequency component ω(max) of the analog signal to
be sampled
ωs ≥ 2ω(max)
82
C/D Conversion
Aliasing Problem

In this case the sampling


frequency does not satisfy the
Shannon sampling theorem.
What is the sampling
frequency used?

83
Example 9: Shannon Sampling Theorem

Question 1
Suppose you need to digitize an analog speech signal containing
frequencies up to 4 kHz, what is the minimum sampling rate ?

f s = 2 f(max) = 2 × 4000 = 8000 samples / sec

Question 2
Suppose you have decided to use a sampling frequency of 5000
Hz or 5000 samples/sec. What is the maximum analog signal
frequency that is allowed in order to ensure the analog signal can
be reconstructed back exactly? Aliasing noise must be avoided.

f (max) = f s / 2 = 2500 Hz

84
C/D Conversion
The A/D process, in the frequency-domain
The spectrum of the discrete-time signal xd[n] resembles that of
(continuous-time) signal xm(t) except for the change of the
frequency variable
2πf
ω)
XXmm((Ω) ω = 2πf ; Ω = = ωT
fs
f s = Sampling frequency
1
ω
Ω T = = Sampling period
ωs
-−Ωs 0 ωΩs
s
fs
XXd(e jΩjω
d (e ) )

jΩ)
ωsΩ
Xd (e

ω
−2π 0 2π

Note the 2π periodicity of the spectrum of


discrete-time signals
Further reading: Solved Problems 3.1, 3.2, 3.7, 3.8, 3.12, 3.13, 3.14, 3.15,
3.18, 3.19, 3.20 of Schaum’s Outlines Digital Signal Processing.
85
D/C Conversion
The D/C conversion reconstructs the continuous-time
signal from the discrete-time signal
The digital-to-analog (D/A) unit converts the discrete-time signal
yd[n] to the (continuous-time) impulse train ys(t) (with the
sampling period T incorporated)
A reconstruction filter (which is a realization of the lowpass filter)
bandlimits the spectrum of ys(t) to produce the desired continuous-
time signal yc(t)

86
D/C Conversion
The low pass reconstruction filter smoothen the signal
from DAC

87
D/C Conversion
The reconstruction process, in the frequency-domain
Ys(ω)

-ωs -ωN ωN ωs
ω
(ωs - ωN)
Hr(ω) This denotes the cutoff
frequency of the
reconstruction filter
ω
-ωr ωr
Yc(ω) = Ys(ω)Hr(ω)

-ωN ωN
ω ωN ≤ ωr ≤ ωs - ωN
88

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy