Chapter 3 - Matlab
Chapter 3 - Matlab
then
=
DTFT:
IDTFT (Inverse Discrete-Time Fourier Transform):
1
=
1
2
Example1: Determine the DTFT of = 0.5
()
Solution:
= =
=
= 0.5
0
= 0.5
=
1
1 0.5
0.5
0
Example2: Determine the DTFT of = 1,2,3,4,5
Solution:
= =
=
= 1
(1)
+ 0
0
+ (1)
1
+ x 2
2
+(3)
3
=
+ 2 +3
+4
2
+ 5
3
Properties of DTFT:
1. Periodicity
=
+2
2. Symmetry
Even symmetry:
odd symmetry:
even symmetry:
odd symmetry:
<
=<
Some Common DTFT Pairs:
Signal Type Sequence x(n)
DTFT
,
Unit Impulse () 1
Constant 1 2
Unit Step u(n)
1
1
+
Causal Exponential
()
1
1
Complex exponential
Cosine
+ +
Sine
Double exponential
() 1
2
1 2 +
2
The Properties of the DTFT:
1. Linearity
1
+
2
() =
1
+
2
3. Frequency Shifting
( ) =
4. Conjugation
() =
5. Folding
() =
2. Time Shifting
()
=
0
6. Symmetries in real sequences
=
()
if
then
() =
0
() =
7. Convolution
1
2
=
1
2
=
1
8. Multiplication
1
2
=
1
2
1
2
1
Periodic convolution
9. Energy
= ()
2
=
1
2
0
- PARSEVALS THEOREM
ENERGY DENSITY SPECTRUM
ENERGY OF x(n) in the band
1
,
2
The Frequency Domain Representation of LTI System
1. Response to a Complex Exponential
Let =
()
Then =
= ()
0
()
= ()
= ()
0
Frequency Response
- The discrete-time Fourier transform of an impulse response is called frequency
response (or transfer function) of an LTI system and is denoted by
()
H(
) =
h(n)
Magnitude or gain response function
<
0
0
+
0
+ <
0
Steady state response,
H(
0
+
0
+ <
3. Response to Arbitrary Sequences
Let
= ()
and
= ()
Then using the convolution property
H(
=
1
=
1
2
Example: Determine the frequency response
of a system characterized by
= 0.9
(). Plot the magnitude and the phase responses.
Solution:
= ()
= 0.9
0
= 0.9
=
1
1 0.9
=
1
1 0.9
2
+ 0.9
2
=
1
1.81 1.8
<
=
0.9
1 0.9
Example : Causal Exponential Pulse
<
>
=
0 t 0
0 t
) (
bt
Ae
t v
From:
f j2 b
A
e A
) (
) ( ) (
0
)t j2 (b -
0
2
0
2
t
t
t
t
+
=
}
=
}
=
}
=
dt
dt e Ae f V
dt e t v f V
f
ft j bt
ft j
AN EXAMPLE ON HOW TO COMPUTE FOR AMPLITUDE
( )
A
f b
f j b
f j b
f j b
f j b
A
f V
2
2
2
2
2
2
2
) (
t
t
t
t
t
+
=
|
.
|
\
|
+
=
( ) | |
| |
2 2
2 2
) 2 (
2
) ( Im ) (
) 2 (
Re ) (
f b
fA
f V f V
f b
bA
f V f V
o
e
t
t
t
+
= =
+
= =
Convert to polar form to get and amplitude and phase spectrum:
( ) ( )
( ) ( )
( ) ( )
( )
( )
( )
( )
2
2
2
2
2
2
2
2
2
2 2
2
2
2
2 2
2
2 2
2
2 2
2 2
2
A
2
2
2
2
2
2 bA
) 2 (
2
) 2 (
) ( ) ( ) (
f b
f b
f b A
f b
f b A
f b
fA
f b
f
f b
bA
f V f V f V
c e
t
t
t
t
t
t
t
t
t
t
+
=
+
+
=
+
+
=
+
+
=
|
.
|
\
|
+
+ |
.
|
\
|
+
= + =
Amplitude Spectrum:
Phase Spectrum:
( )
( )
b
f 2
-arctan
bA
fA 2
- arctan
2
2
2
arctan
) (
) (
arctan ) ( arg
2
2
2
2
t
t
t
t
t
=
=
+
+
=
=
f b
bA
f b
fA
f V
f V
f V
e
o
4. Frequency Response Function from Difference Equations
+
( )
=0
+1
then
()
=
=1
()
=0
=0
1 +
=1
Example: An LTI system is specified by the difference equation
= 0.8 1 + ()
a. Determine
b. Calculate and plot the steady-state response
() to
Solution:
0.8 1 = ()
a.
=0
1 +
=1
=
1
1 0.8
= cos 0.05 ()
b. In the steady state the input is = cos 0.05 with frequency
0
= 0.05 and
0
= 0
0
therefore
=
t
Frequency Analysis of Continuous Time Periodic Signals
Synthesis Equation
Analysis Equation
=
=
k
t kF j
k
e c t x
0
2
) (
t
}
=
p
T
t kF j
p
k
dt e t x
T
c
0
2
) (
1
t
If the periodic signal is real
k
k
j
k k
j
k k
e c c
then
e c c
u
u
=
=
and
( )
( ) ( ) | |
k k k
k k k
k
k k k
k
k k
c b
c a
c a
where
t kF b t kF a c c t x
t kF c c t x
u
u
t t
u t
sin 2
cos 2
2 sin 2 cos 2 ) (
real is when x(t) valued real is c where 2 cos 2 ) (
0 0
1
0 0 0
0
1
0 0
=
=
=
+ =
+ + =
=
Power Density Spectrum of Periodic
Signals
Periodic signals have:
Energy infinite
Average Power finite
signals power for relation ' ) (
1 2 2
s Parseval c dt t x
T
P
k
k
T
p
x
p
= =
}
=
Example: Find the power of the following signal
t kF j
k
e c t x
0
2
) (
t
=
Solution:
} }
=
= = =
k
k
T
k
p
T
p
x
c dt c
T
dt t x
T
P
p p
2 2 2 1
) (
1
Also called line spectrum because
the power of the periodic signal is
only at discrete values of frequencies
For real periodic signal, the total average power is
( )
=
=
+ + = + =
1
2 2 2
0
1
2
2
0
2
1
2
k
k k
k
k x
b a a c c P
k k k
k k k
c b
c a
c a
where
u
u
sin 2
cos 2
0 0
=
=
=
Example: Determine the Fourier series and the power density
spectrum of the rectangular pulse train signal as
illustrated below
2,... 1, k ,
sin A
2 F
A
2
1
) (
1
c
0 k
1
) (
1
c
x(t) signal the of component dc 0 k for
period T where
2
to
2
0
0
0
2 /
2 /
2 /
2 /
2
2
0
2
2
k
2 /
2 /
2 /
2 /
0
p
0 0
0
0
= =
=
(
=
=
=
=
= = =
=
}
}
} }
t t
t t t
t
t
t
t t t t
t
t
t
t
t
t
t
t
kF
kF
T
j
e e
kT
kF j
e
T
A
dt Ae
T
dt t x
T
for
T
A
Adt
T
dt t x
T
l fundamenta
T T
p
kF j kF j
p
T
T
kt F j
p
t kF j
p
p
T
T
p p p
p p
p
p
p
p
Solution:
since the signal is even, then integration interval is from
t t | |
t t
t t
0
0
0
kF where c sin
kF
kF sin
= =
| c sin =
varied with if t fixed T
p
t t >
p p
T T fixed when varied with if
Fourier Transform for Continuous-Time
Aperiodic Signals
If the periodic signal with
p
T
Then we can consider the signal as aperiodic/nonperiodic signal
}
}
=
=
s s =
=
= =
=
2 /
2 /
2
k
p p
p
2 /
2 /
2
k
o
2
p
0
0
) (
1
c
2
T
2
T -
for ) ( ) ( x sin
) (
1
c
1
F , ) ( x
) ( lim ) (
p
p
p
p
o
p
T
T
t kF j
p
T
T
t kF j
p
p
p
k
t kF j
k
p
T
dt e t x
T
then
t t x t ce
dt e t x
T
where
T
e c t from
t x t x
t
t
t
}
-
Ft j2 -
x(t)e X(F)
x(t) of Transform Fourier X(F)
dt
let
t
T
1
F
1
) ( x
) ( T
) (
1
c
) (
1
c from
p
2 2
p
0 p
0 k
2 /
2 /
2
k
0 0
0
= A
|
|
.
|
\
|
= =
|
|
.
|
\
|
= =
=
=
}
k
t kF j
p p
k
t kF j
k
p
k
p
T
T
t kF j
p
e
T
k
X
T
e c t from
T
k
X kF X c
or
kF X
T
dt e t x
T
p
p
t t
t
( )
( )
}
=
A
=
=
A A = =
A A
A A
=
-
2
2
T
p p
2
p
) ( ) x(t
lim ) ( ) ( lim
and
F F k and dF F ) ( ) ( x , T
) ( x
0
p
0
dF e F X
F e F k X t x t x so
t x t as
F e F k X
t
Ft j
k
t kF j
F
p
k
t kF j
t
t
t
FREQUENCY ANALYSIS OF CONTINUOUS TIME
APERIODIC SIGNALS
Synthesis Equation (inverse transform
Analysis equation (direct transform)
}
=
-
Ft j2 -
x(t)e X(F) dt
t
}
=
-
2
) ( x(t) dF e F X
Ft j t
IN RADIAN FORM
( )
( )
}
}
O
= O
O O =
dt e t x X
d e X t x
t j
t j
) (
2
1
) (
t
The Fourier Transform exists if it follows the Dirichlet Conditions:
1. The signal x(t) has a finite number of finite discontinuities.
2. The signal x(t) has a finite number of maxima and minima.
3. The signal x(t) is absolutely integrable, that is
}
< dt t x ) (
ENERGY DENSITY SPECTRUM OF APERIODIC SIGNALS
} }
}
} }
} } }
}
= =
=
(
- =
(
- = - =
=
-
2 2
x
-
2
- -
2
2
x
2
x
RELATION ' X(F) ) ( E
X(F)
) ( (F)dF X
) ( ) ( ) ( ) ( E
) ( E
signal energy finite - x(t)
S PARSEVAL dF dt t x
therefore
dF
dt e t x
dF e F X dt t x dt t x t x
dt t x
Let
Ft j
Ft j
t
t
( )
spectrum density energy symmetry even has signal real ) ( ) ( S
signal the of Energy ) (
x(t) of SPECTRUM DENSITY ENERGY
frequency of function a as
signal in the energy of ) ( ) ( S and
spectrum phase X(F) (F)
spectrum X(F)
X(F) X(F)
form polar in
xx
F
2
xx
1
1
=
=
Z = O
=
}
A +
O
F S F
and
Total dF F S
on distributi F X F
magnitude where
e
xx
F F
xx
F j
>
s
=
2
t , 0
2
t A,
x(t)
: following the of
spectrum density energy the and Transform Fourier the Determine :
t
t
Example
Ft
Ft
A F X
dt Ae dt e t x F X
Ft j Ft j
t
t
t
t
t t
sin
) (
) ( ) (
2
2
2 2
=
= =
} }
p
p p p
k
T
k
T
k
X
T
kF X
T
c
=
|
|
.
|
\
|
= =
o
0
kF
s frequencie at X(f) of samples
1
) (
1
The zero-crossings occur at
multiples of
t
1
Main lobes width contains
most of the signal
=
t
2
( )
2
2
xx
sin
) ( S
Spectrum Density
|
.
|
\
|
=
t t
t t
t
F
F
A F
Energy
Assignment
1. Find the Fourier Transform and energy density spectrum
of
) (
0
t t x
Sampling and Reconstruction of Analog Signals
Sampling
Let
()
()
Where analog frequency (rad/sec)
=
1
2
()
=
1
ALIASING FORMULA
Digital And Analog frequencies are related through
=
with
, /
With =
Definition:
A signal is bandlimited if there exists a finite radian frequency
0
such that
= 0 for >
0
. The frequency
0
=
0
2
is called the signal bandwidth in Hz.
Sampling Principle Theorem:
A bandlimited signal
() with a bandwidth
0
can be reconstructed from its sample
Values =
=
1
0
of
()
> 2
Otherwise aliasing would result in x(n). The sampling rate of 2
0
for an analog bandlimited
Signal is called the Nyquist rate.
Example: The analog signal
= 4 +2 150 +
3
+4 350 is sampled
at
.
Solution:
Highest frequency of
=175
= 200/
The sampled signal is then
=
= 4 +2
150
200
+
3
+4
350
200
=
= 4 + 2 0.75 +
3
+4 1.75
Since 1.75 Is outside the primary interval
Then aliasing occurs
The alias of the frequency 1.75 is
=
= 4 + 2 0.75 +
3
+4 1.75 2
=
= 4 + 2 0.75 +
3
4 0.25
Using Eulers identity
= 4 +
/3
0.75
+
/3
0.75
+ 2
0.25
2
0.25
From the DTFT table, the DTFT of x(n) is
= 8 + 2
/3
0.75 +2
/3
+ 0.75
+4 0.25 4 + 0.25
Reconstruction
Condition for reconstruction:
1. Signal is bandlimited
2. Sampling above Nyquist sampling rate
To reconstruct:
1. Samples are converted into a weighted impulse train
= + 1 +
+ 0 + 1
=
2. Impulse train is filtered through an ideal analog LPF (low pass filter)
bandlimited to the
band
x(n)
Impulse train
conversion
Ideal LPF
()
Can be described mathematically as
=
where
=
Example: Consider =
= 4 + 2 0.75 +
3
+4 1.75
With
= 200/
Obtain the reconstructed signal
and
Solution:
With
=
= 4 + 2 0.75 +
3
+4 1.75
= |
=
= |
=200
= 4 + 2 0.75200 +
3
4 0.25200
() = 4 + 2 150 +
3
4 50
Using Eulers identity, the CTFT
is given by
= 8 +2
/3
150 + 2
/3
+ 150
+4 350 4 +350
With = 2
2 = 8 2 + 2
/3
2 150 + 2
/3
2 + 150
+4 2 350 4 2 +350
2 = 4 +
/3
75 +
/3
+75
+2 175 2 + 175
Using = 2 =
1
2
and
2 = 4 +
/3
75 +
/3
+75
+2 25 2 + 25
from
() = 4 + 2 150 +
3
4 50
() = 4 + 2 150 +
3
4 50
From the DTFT table, the DTFT of x(n) is
= 8 + 2
/3
0.75 +2
/3
+ 0.75
+4 0.25 4 + 0.25
Practical D/A Converters
1. Zero-order-Hold (ZOH) interpolation:
= ,
< +1
The interpolating filter is
=
1, 0
0,
A rectangular pulse
x(n) ZOH
Postfilter
()
Postfilter used for accurate reconstruction
2. 1
st
-order-hold (FOH) interpolation:
1
=
1 +
, 0
0,
3. Cubic spline interpolation - does not need an analog postfilter
=
0
+
1
+
2
2
+
3
3
,
+1