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

BSP-L4-Discrete Time and System

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

BSP-L4-Discrete Time and System

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

Lecture 4:

Discrete-Time Signal and


System
SMBE 4023 Biomedical Signal Processing
Arief R. Harris
Review
Continuous vs Discrete time

Signals and Biomedical Signal Processing 56 Biomedical Signal and Image Processing

105 105

104 104

103 103
Body temperature (°F)

Body temperature (°F)


102 102

101 101

100 100

99 99

98 98

97 97
500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000
Time (s) Time (s)
FIGURE 1.1 Analog signal that describes the body temperature measured by an analog FIGURE 1.2 Discrete signal that describes the body temperature measured at every
mercury thermometer. 300 s (5 min).

is sampled are often multiples of a certain sampling period “TS.” It is important to 1.3.3 DIGITAL SIGNALS
• A discrete-time signal, also referred as
sequence, is only defined at discrete time
instances
• A function of discrete time instants is usually
defined by integer n.
x(t) x(n)

Continuous time signal Discrete time signal


Periodic vs Non-Periodic signal
• Periodic signal
x(n) = x(n+N) -¥<n< ¥

• Non-periodic (aperiodic) signal


x(n) defined within -N/2 ≤ n ≤ N/2, and N < ¥
Examples Of Aperiodic Signals
x(n)=1 n=0
§ Impulse function =0 elsewhere

§ Step function x(n) = 1 n³ 0


=0 n<0

§ Ramp Function x(n) = a n³ 0


=0 n<0

§ Pulse function x(n) = 1 n0 £ n £ n1


=0 elsewhere

§ Pulse sinusoid x(n) = cos(2pnf1 - f ) n0 £ n £ n1

=0 elsewhere
Energy and Power

§ Energy
N -1 N -1
2
x = å x ( n ) x( n ) = å x(n)
*
E
n = 0 n =0

§ Power

1 N-1 1 N-1 2 1
Px =
N
å x(n)x (n) = N å x(n) = E x
*

n=0 n=0 N

where N is the duration of the signal


Systems
§ A system operates on a signal to produce an
output.
Characteristics of systems
• time invariant
• shift invariant
• Causal
• Stability
• Linearity

§ Time and shift invariant means that the system


characteristics and shift do not change with
time.
Characteristics of systems
§ Causality
h(n)¹0 n³0
=0 n<0

§ Stability ¥

å h (n ) < ¥
n = -¥

§ Linearity
T[x 0 (n)] + T[x 1 (n)] = T[x 0 (n) + x1 (n)] x0(n) & x1(n) are 2 different inputs

y(n) = S[T [ x(n)]] = T[S[ x(n)]] S[ ] and T[ ] are linear transformations


Convolution
§If h(n) is the system impulse response, then the
input-output relationship is a convolution.
§It is used for designing filter or a system.
§Definition of convolution:

¥
y(n) = h(n) * x(n) = å h(l )x(n - l )
l =-¥

¥
y(n) = x(n) * h(n) = å x(l )h(n - l )
l =-¥
Example
Consider a system with an impulse response
of
h(n) = [ 1 1 1 1 ]
If the input to the signal is
x(n) = [ 1 1 ]
§ Thus, the output of the system
is
¥

y(n) = å h(l ) x(n - l )


l =-¥
h(n) x(n)

1 1

n n
0 1 2 3 0 1

i) The definition of the system impulse response h(n) and the input signal x(n)

h(l) x(0-l) h(l) x(0-l)

1 1 1

l l l
0 1 2 3 -1 0 -1 0 1 2 3

y (0) = å h(l ) x(0


- l) = 1
ii) The result at n=1.
h(l) x(1-l) h(l) x(1-l)
¥

y(1) =å h(l)x(1 - l ) = 2
l=-¥
1 1 1

l l l
0 1 2 3 0 1 0 1 2 3

iii) The result at n=2.


h(l) x(2-l) h(l) x(2-l) ¥

y(2) = å h(l ) x(2 - l ) = 2


l =-¥
1 1 1

l l l
0 1 2 3 1 2 0 1 2 3
x(3-l) h(l) x(3-l)
iv) At n=3 ¥
h(l)
y(3) =å h(l ) x(3 - l ) = 2
l =-¥
1 1 1

l l l
0 1 2 3 2 3 0 1 2 3

v) At n=4
h(l) x(4-l) h(l) x(4-l)

1 . 1 1

l l l
0 1 2 3 3 4 0 1 2 3 4
¥
h(n)
y(4) =å h(l ) x(4 - l ) = 1
Finally 2 l =-¥

n
0 11 2 3 4
Frequency Domain Representation

§ An alternative representation and characterization of signals.


§ Much more information can be extracted from a signal.
§ Many operations that are complicated in time domain become
rather simple.

§ Fourier Transforms:
F
Ø Fourier series – for periodic continuous time signals x(t) « X(W)
Ø Fourier Transform – for aperiodic continuous time signals
Ø Discrete Time Fourier Transform (DTFT) – for aperiodic discrete time signals
(frequency domain is still continuous however) F

x(n) « X(w)
Ø Discrete Fourier Transform (DFT) – DTFT sampled in the frequency domain
Ø Fast Fourier Transform (FFT) – Same as DFT, except calculated very efficiently
Fourier
Sinusoidal and Complex
Exponential Sequences

• Play an important role in DSP


¥
y ( n) = å h( k ) x ( n - k )
k = -¥

x(n) = e jwn LTI = å


¥
h ( k ) e j ( n-k )w

k = -¥

æ ¥ - jkw ö jnw
= ç å h ( k ) e ÷e
h(n) è k = -¥ ø

jw jnw
= H (e )e
Frequency Response

jw jw jnw
e jwn H (e ) H (e )e
eigenvalue
eigenfunction

¥
H ( e jw ) = å h (
k = -¥
k ) e - jkw
Frequency Response

¥
H ( e jw ) = å h (
k = -¥
k ) e - jkw

H (e jw ) = H R (e jw ) + jH (e jw )

jw jw ÐH ( e jw )
H (e ) =| H (e ) | e
phase

magnitude
Periodic Nature of
Frequency Response

¥ jw j ( w+ 2 mp )
H (e ) = H (e )
jw
H (e ) = å h ( k )e
k = -¥
- jkw

m = 0,±1,±2,!
¥
H ( e j ( w+ 2 p ) ) = å h (
k = -¥
k ) e - jk ( w+ 2 p )

¥
= å h (
k = -¥
k ) e - jkw

= H (e jw )
Periodic Nature of
Frequency Response

¥ jw j ( w+ 2 mp )
H (e ) = H (e )
jw
H (e ) = å h ( k )e
k = -¥
- jkw

m = 0,±1,±2,!

| H (e jw ) |

-4p -3p -2p -p p 2p 3p 4p w


Periodic Nature of
Frequency Response
Generally, we choose
-p<w£p
To represent one period in
frequency domain.

¥ jw j ( w+ 2 mp )
H (e ) = H (e )
jw
H (e ) = å h ( k )e
k = -¥
- jkw

m = 0,±1,±2,!

| H (e jw ) |

-4p -3p -2p -p p 2p 3p 4p w


Periodic Nature of
Frequency Response

¥ jw j ( w+ 2 mp )
H (e ) = H (e )
jw
H (e ) = å h ( k )e
k = -¥
- jkw

m = 0,±1,±2,!
| H (e jw ) |

-p p w
High Low High
Frequency Frequency Frequency
DTFT & its inverse
§ Since the sum of x[n], weighted with
continuous exponentials, is
continuous, the DTFT X(w) is
continuous (non- discrete)
§ Since X(w) is continuous, x[n] is
obtained as a continuous integral of
X(w), weighed by the same complex
exponentials.
§ x[n] is obtained as an integral of
X(w), where the integral is over an
interval of 2pi.
§ X(w) is sometimes denoted as
X(ejw) in some books.
Example: DTFT of Impulse Function
Example: DTFT of constant function
Linearity
jw jw
ax(n) + by (n) ¬¾® aX (e ) + bY (e )
F

¥ ¥ ¥

å [ ax
n = -¥
( n ) + by ( n ) ]e - jwn
= a å x
n =1
( n ) e - jwn
+ b å y
n =1
( n ) e - jwn

jw jw
= aX (e ) + bY (e )
Time Shifting ® Phase Change

- j wn d jw
x(n - nd ) ¬¾® e F
X (e )
¥
F [ x(n - nd )] = å x (
n = -¥
n - nd )e - jwn

¥
= å x (
n = -¥
n )e - jw ( n + n d )

¥
= e - jw n d å x (
n = -¥
n )e - j wn

= e- jwnd X (e jw )
Frequency Shifting ®Signal Modulation

jw0 n j ( w-w0 )
e x(n) ¬¾® X (e
F
)
¥
F [e jw0 n x(n)] = å e j w0 n

n = -¥
x ( n ) e - jwn

¥
= å x (
n = -¥
n ) e - j ( w - w0 ) n

= X (e j ( w-w0 ) )
Time Reversal

- jw
x(-n) ¬
¾® X (e F
)
¥
F [ x(-n)] = å x (
n = -¥
- n ) e - jwn

¥
= å x (
n = -¥
n ) e - j ( - w) n

- jw
= X (e )
Differentiation in Frequency

d jw
nx (n) ¬¾® j F
X (e )
dw
¥
F [nx (n)] = å nx (
n = -¥
n ) e - jwn

1 ¥ de - jwn
= å
- j n=-¥
x(n)
dw
d ¥ d
= j å
dw n = -¥
x ( n )e - jw n
= j
dw
jwn
X (e )
The Convolution Theorem

¥
y ( n) = å x
k = -¥
( k )h ( n - k ) ¬¾®
F
Y ( e jw
) = X ( e jw
) H ( e jw
)

¥ ¥
æ ¥ ö
F [ y (n)] = å y ( n )e - jwn
= å x(k )ç å h(n)e - jw( n+ k ) ÷
n = -¥ k = -¥ è n =-¥ ø
¥
æ ¥ ö - jwn
¥
æ ¥ - jwn ö
= å ç å x(k )h(n - k ) ÷e = å x ( k )e - jwk
ç å h ( n )e
è n = -¥
÷
ø
n = -¥ è k = -¥ ø k = -¥

¥
æ ¥ - jwn ö = X (e jw ) H (e jw )
= å x(k )ç å h(n - k )e ÷
k = -¥ è n =-¥ ø
Discrete Fourier Transform
§ DTFT does not involve any sampling- it’s a
continuous function
§ Not possible to determine DTFT using
computer
§ So explore another way to represent
discrete-time signals in frequency domain
§ The exploration lead to DFT
DFT
Energy and Power Spectrum

§ Energy
2
E xx (k )= X (k)

§ Power Spectrum
1 2
S xx (k) = X (k)
N
Fast Fourier Transform

§ The computation complexity of the N length DFT is N2.

§ The FFT (Fast Fourier Transform) is developed to reduce


the computation complexity to N ln (N).

§ Now can implement frequency domain processing in real-


time.
FFT in Matlab
Convolution in Frequency Domain

§ Convolution in time domain = multiplication in frequency


domain

§ Multiplication in time domain = convolution in frequency


domain
Sampling

§ Sampling: Process of conversion from continuous-time to


discrete- time representation.

§ This is necessary if it is desired to process the signal using


digital computers.

§ The discrete-time signal x(n) is obtained as a result of the product


of the continuous-time signal with a set of impulse xd (t) with
period Ts
¥
x (n ) = x (t ) xd (t ) = å x (t)d (t - nT s )
n=-¥
Sampling

Sampling Process
Spectrum of Sampled Signals

§ If x(t) has a spectrum X(f), then the spectrum of a sampled


signal x(n) is
é ¥ ù
X (exp( j2pf )) = FT [x(n)] = FT [x(t)xd (t)] = FT ê å x(t )d (t - nTs )ú
ë n=-¥ û
¥ ¥ ¥
= å ò x(t)d (t - nTs ) exp(- j2pft)dt =å x(n) exp(- j2pfnTs )
n=-¥ -¥ n=-¥

¥
= å X ( f - nf s )
n = -¥
Spectrum of Sampled Signals

|X(f)|

-fm fm f

|X(exp(2pf)|

-2fs -fs -fm fm fs 2fs f

Amplitude spectra of a signal before and after sampling.


Nyquist Sampling Theorem
§ Increasing the sampling frequency will increase the storage space
and processing time.

§ Reducing the sampling frequency will result in aliasing due to the


overlapping between the desired and replicate spectrum
components.

§ The aliasing effect is minimized by using the Nyquist


sampling theorem
f s ³ 2 f max
Difference Equations
§ A continuous-time system can be described by differential
equations.
§ Discrete-time systems are described by difference equations that
can be expressed in general form as

Ø Constant coefficients ai and bi are called filter coefficients.


Ø Integers M and N represent the maximum delay in the input and output,
respectively. The larger of the two numbers is known as the order of the
filter.
Difference Equations

M M
y(n) + å a(l ) y(n - l ) = å b(l )x(n - l ) (Infinite Impulse Response - IIR)
l =1 l=0

y ( n ) =å b ( l ) x ( n - l ) (Finite Impulse Response - FIR)


l= 0

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