BSP-L4-Discrete Time and System
BSP-L4-Discrete Time and System
Signals and Biomedical Signal Processing 56 Biomedical Signal and Image Processing
105 105
104 104
103 103
Body temperature (°F)
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)
=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
§ 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) = 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
¥
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)
1 1 1
l l l
0 1 2 3 -1 0 -1 0 1 2 3
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
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
§ 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
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 ) |
¥ jw j ( w+ 2 mp )
H (e ) = H (e )
jw
H (e ) = å h ( k )e
k = -¥
- jkw
m = 0,±1,±2,!
| H (e jw ) |
¥ 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
Sampling Process
Spectrum of Sampled Signals
¥
= å X ( f - nf s )
n = -¥
Spectrum of Sampled Signals
|X(f)|
-fm fm f
|X(exp(2pf)|
M M
y(n) + å a(l ) y(n - l ) = å b(l )x(n - l ) (Infinite Impulse Response - IIR)
l =1 l=0