Slide Xử Lý Số Tín Hiệu

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

CHAPTER 2:

DISCRETE-TIME SIGNALS & SYSTEMS

Lesson #4: DT signals


Lesson #5: DT systems
Lesson #6: DT convolution
Lesson #7: Difference equation models
Lesson #8: Block diagram for DT LTI systems
Duration: 9 hrs
Lecture #4
DT signals

1. Representations of DT signals
2. Some elementary DT signals
3. Simple manipulations of DT signals
4. Characteristics of DT signals
Sampled signals

Converting a CT signal into a DT signal by sampling: given xa(t) to


be a CT signal, xa(nT) is the value of xa(t) at t = nT  DT signal is
defined only for n an integer

-2T -T 0 T 2T 3T 4T 5T 6T 7T . . . nT

x a (t )  x a (nT)  x (n ),    n  
t  nT
Representations of DT signals

1. Functional representation
1, n  1,3

x[n ]  4, n  2
0, n 

2. Tabular representation

n … -1 0 1 2 3 4…
x[n] … 0 0 1 4 1 0…
Representations of DT signals

3. Sequence representation

 
x[n]  0 , 1 , 4 , 1

4. Graphical representation 4

1 1

-1 0 1 2 3 4 5 n
Lecture #4
DT signals

1. Representations of DT signals
2. Some elementary DT signals
3. Simple manipulations of DT signals
4. Classification of DT signals
Some elementary DT signals

1. Unit step sequence


2. Unit impulse signal
3. Sinusoidal signal
4. Exponential signal
Unit step

1 n  0
u[n]  
0 n  0

1 1 1

-1 0 1 2 3 4 5 6 n
Time-shifted unit step

1, n  n 0
u[ n  n 0 ]  
0, n  n 0
For n0 > 0

1 1 1

0 -n0-1 n0 n0+1 n
Time-shifted unit step

1, n  n 0
u[ n  n 0 ]  
0, n  n 0

For n0 < 0

1 1 1

-n0-1 n0 n0+1 0 n
Unit impulse

1 n  0
 [n]  
0 n  0

-2 -1 0 1 2 n
Time-shifted unit impulse

1, n  n 0
[ n  n 0 ]  
0, n  n 0
For n0 > 0

0 n0-1 n0 n0+1 n
Time-shifted unit impulse

1, n  n 0
[n  n 0 ]  
0, n  n 0

n0-1 n0 n0+1 0 n
Relation between unit step and
unit impulse

n
u[n ]   [k ]
k  

[ n ]  u[ n ]  u[n  1]
x[n ][ n  n 0 ]  x[n 0 ][n  n 0 ]

 x[n ][n  n
n  
0 ]  x[n 0 ]
Sinusoidal signal

x (n )  A cos( n  ),    n  
 A cos(2Fn  ),    n  

1.5

0.5

-0 . 5

-1

-1 . 5
-2 0 -1 5 -1 0 -5 0 5 10 15 20
Exponential signal

n
x[n ]  Ca
1. If C and a are real, then x[n] is a real exponential
a > 1  growing exponential
0 < a < 1  shrinking exponential
-1 < a < 0  alternate and decay
a < -1  alternate and grows
2. If C or a or both is complex, then x[n] is a complex
exponential
An example of real exponential signal

x[n]  (0.2)(1.2) n

120

100

80
Amplitude

60

40

20

0
0 5 10 15 20 25 30 35
Tim e index n
An example of complex
exponential signal
 1 
   j n
 12 6 
x[n]  2e
Re al part
2

-1

-2
0 5 10 15 20 25 30 35 40

Im aginary pa rt
2

-1
0 5 10 15 20 25 30 35 40
Periodic exponential signal

 Recall: A DT sinusoidal signal is periodic only if its


frequency is a rational number
 Consider complex exponential signal:

j 0 n
x[n ]  Ce  C cos( 0n )  j sin( 0n )

 It is also periodic only if its frequency is a rational number:

k 0 k
F0  or 
N 2 N
Fundamental period

 The fundamental period can be found as


k 2
N
0

Where k is the smallest integer such that N is an integer


0
 Step 1: Is rational?
2
 Step 2: If yes, then periodic; reduce to

0 k # cycles
 
2 N # po int s
Examples

Determine which of the signals below are periodic. For the


ones that are, find the fundamental period and
fundamental frequency 
j n
6
x1[n ]  e
0  1 k
    One cycle in 12 points
2 6(2 ) 12 N
N  12 : fundamental period
2 2  : fundamental frequency
0   
N 12 6
Examples
Determine which of the signals below are periodic. For the
ones that are, find the fundamental period and
fundamental frequency
 3 
x2 [n ]  sin  n  1
 5 
Examples

Determine which of the signals below are periodic. For the


ones that are, find the fundamental period and
fundamental frequency

x3[n ]  cos(2n   )
Examples

Determine which of the signals below are periodic. For the


ones that are, find the fundamental period and
fundamental frequency

x4 [n ]  cos(1.2n )
Lecture #4
DT signals

1. Representations of DT signals
2. Some elementary DT signals
3. Simple manipulations of DT signals
4. Classification of DT signals
Simple manipulations of DT signals

 Adding and subtracting signals


 Transformation of time:
- Time shifting
- Time scaling
- Time reversal
 Transformation of amplitude:
- Amplitude shifting
- Amplitude scaling
- Amplitude reversal
Adding and Subtracting signals

 Do it “point by point”
 Can do using a table, or graphically, or by
computer program
 Example: x[n] = u[n] – u[n-4]

n <=-1 0 1 2 3 >=4
x[n] 0 1 1 1 1 0
Time shifting a DT signal

x[n]  x[n - k]; k is an integer

 k > 0: right-shift x[n] by |k| samples


(delay of signal)
 k < 0: left-shift x[n] by |k| samples
(advance of signal)
Examples of time shifting

x[n] 4

1 1

-1 0 1 2 3 4 n

4
x[n-2]
1 1

-1 0 1 2 3 4 n
Examples of time shifting

x[n] 4

1 1

-1 0 1 2 3 4 n

x[n+1] 4

1 1

-1 0 1 2 3 4 n
Time scaling a DT signal

x[n]  y[n] = x[an]

 |a| > 1: speed up by a factor of a


a must be an integer
 |a| < 1: slow down by a factor of a
a = 1/K; K must be an integer
Examples of time scaling

x[n] 4

1 1

-1 0 1 2 3 4 n

x[2n+1] 4 x[2n]

-2 -1 0 1 2 n -1 0 1 2 n
Examples of time scaling

x[n] 4
n x[n] y[n]=x[n/2]
1 1 0 1 1
1 4 ??
?
-1 0 1 2 3 4 n
2 1 4
3 0 ??
?

How to find y[1] and y[3]??

One solution is linear interpolation used in a simple


compression scheme
Examples of time scaling
 Given x[n] 2

-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7

 w1[n] = x[2n]

 What does w1[n/2] look like? Just look like x[n]!


Examples of time scaling
 Given x[n] 2

-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7

 Find w2[n] = x[2n+1]

 What does w2[n/2] look like? Just look like w2[n]!


Time reversal a DT signal

x[n]  x[-n]

Flip a signal about the vertical axis


Examples of time reversal

x[n] 4

1 1

-1 0 1 2 3 4 n

x[-n] 4

-3 -2 -1 0 1 2 3 4 n
Combining time reversal and time shifting

x[n]  y[n] = x[-n-k]

Method 1: Flip first, then shift


Method 2: Shift first, then flip
Example – Method 1

x[n]  y[n] = x[-n-k]

Method 1: Flip first, then shift


Ex. Find y[n] = x[-n-2] = x[-(n+2)]
x[n]  x[-n] = w[n]  w[n+2] = x[-(n+2)]
Flip Advance by 2
(left shift)
4

Example 1
x[n]
Method 1
-1 0 1 2 3 4 5 n
Example – Method 2

x[n]  y[n] = x[-n-k]

Method 2: Shift first, then flip


Ex. Find y[n] = x[-n-2] =
x[n]  x[n-2] = w[n]  w[-n] = x[-n-2]
Delay by 2 Flip w[n]
(right shift)
4
x[n]
Example 1

Method 2
-1 0 1 2 3 4 5 n
Combining time shifting and time scaling

x[n]  y[n] = x[an-b]

Method 1: time scale then shift


Method 2: shift then time scale
Be careful!!! For some cases, method 1 or 2 doesn’t work.
To make sure, plug values into the table to check
Example – Method 1

x[n]  y[n] = x[an-b]

Method 1: time scale then shift


Ex. Find y[n] = x[2-2n]
y[n] = x[-2(n-1)]
x[n]  x[-2n] = w[n]  w[n-1] = x[-2(n-1)]
Time scale Delay
by -2 by 1
4

Example x[n] 1
Method 1
-1 0 1 2 3 4 5 n

x[-2n] = w[n]

-4 -3 -2 -1 0 1 2 3 4 5 n

w[n-1] = x[-2(n-1)] = x[-2n+2]

-4 -3 -2 -1 0 1 2 3 4 5 n
Example – Method 2

x[n]  y[n] = x[an-b]

Method 2: shift then time scale


Ex. Find y[n] = x[2-2n]
x[n]  x[n+2] = w[n]  w[-2n] = x[2-2n]
Time
advance by 2 scale
by -2
4
x[n]
1
Example
Method 2 -1 0 1 2 3 4 5 n
Example

y[n] = x[2n-3]??

n x[n] y[n]
-1 0 0
0 0 0
y[n] 1 1 1 0
2 4 1
-1 0 1 2 3 4 n 3 1 1
4 0 0
Exercise

 Find x[ n]  (u[ n  1]  u[ n  5])( nu[2  n])

x[n] 2
1
-1
0 1 2 3 4 5 n
-1
Lecture #4
DT signals

1. Representations of DT signals
2. Some elementary DT signals
3. Simple manipulations of DT signals
4. Characteristics of DT signals
Characteristics of DT signals

 Symmetric (even) and anti-symmetric (odd)


signals
 Energy and power signals
Even and odd signals
 A DT signal xe[n] is even if

Even  xe [n]  xe [ n]


And the signal xo[n] is odd if
Odd  xo [n]   xo [n]
 Any DT signal can be expressed as the sum of an even
signal and an odd signal:
xe [n]  12 ( x[n]  x[n])

xo [n]  12 ( x[n]  x[n])

x[n]  xe [n]  xo [n]


Even and odd signals

 How to find xe[n] and xo[n] from a given x[n]?


 Step 1: find x[-n]
 Step 2: find
xe [n]  12 ( x[n]  x[n])
 Step 3: find
xo [n]  12 ( x[ n]  x[n])
Example
 Given x[n] 2

-4 -3 -2 -1 0 1 2 3 4 5 6 7 8

 Find x[-n]
2

-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6
Example

 Find x[n] + x[-n]

-4 -3 -2 -1 0 1 2 3 4 5 6 7 8

 Find xe[n]
Example
 Find x[n] - x[-n]
2

-4 -3 -2 -1 0 1 2 3 4 5 6 7 8

 Find x0[n]
Energy and power signals


2
 Define the signal energy: E  x[n]
n  

N
Define the signal power: 1 2
 P  lim
N  2 N  1

n  N
x[ n ]

 E is finite  x[n] is called an energy signal


 E is finite  P = 0
 E is infinite  P maybe finite or infinite. If P is finite and
nonzero  x[n] is called power signal
Examples

 Determine which of the signals below are energy signals?


Which are power signals?

(a) Unit step 1 n  0


u[n]  
0 n  0
 
2
E  x[n ]  12  
n   n 0

N N
1 2 1 2 N 1
P  lim
N  2 N  1

n N
x[ n ]  lim
N  2 N  1

n 0
1  lim
N  2 N  1
 1/ 2  0

Unit step is a power signal


Examples
 Determine which of the signals below are energy signals?
Which are power signals?

(1 / 2) n , n  0 
 a n0
(b) x[n ]   n n  if | a | 1
(2) , n  0  a  1  a
n  n0  if | a | 1

Examples

 Determine which of the signals below are energy signals?


Which are power signals?

 
(c) x[n ]  cos n (u[n ]  u[n  4])
4 
  
cos n  0  n  3 2 2
x[ n ]    4    [n ]   [n  1]   [n  3]
0 2 2
 otherwise
Lecture #5
DT systems

1. DT system
2. DT system properties
Input-output description of DT systems

Think of a DT system as an operator on DT signals:

• It processes DT input signals, to produce DT output signals

• Notation: y[n] = T{x[n]}  y[n] is the response of the


system T to the excitation x[n]

• Systems are assumed to be a “black box” to the user

x[n] DT system y[n]


T{}
DT system example
A digital low pass filter:

y[n] = 1/5{x[n]+x[n-1]+x[n-2]+x[n-3]+x[n-4]}
1

Before
0 .5
filtering

0
0 20 40 60 80 1 00 1 20

0 .8

0 .6
After
filtering 0 .4

0 .2

0
0 20 40 60 80 1 00 1 20
Interconnection of DT systems

System1
T1{ }
x[n] y[n]
System2
Parallel T2{ }
connection

y[n] = y1[n] + y2[n] = T1{x[n]} + T2{x[n]} = (T1 + T2){x[n]}

= T{x[n]}

y[n] = T{x[n]}: notation for the total system


Interconnection of DT systems

x[n] System1 System2 y[n]


T1{ } T2{ }

Cascade connection

y[n] = T2{y1[n]} = T2{T1{x[n]}} = T{x[n]}

y[n] = T{x[n]}: notation for the total system


Example
y4[n]
1 3
y3[n]
x[n] y[n]
y2[n]
2

y3[n] = T1{x[n]} + T2{x[n]}

y4[n] = T3{y3[n]} = T3{T1{x[n]} + T2{x[n]}}

y[n] = y2[n] + y4[n] = T2{x[n]} + T3{T1{x[n]} + T2{x[n]}}


Lecture #5
DT systems

1. DT system
2. DT system properties
DT system properties

• Memory

• Invertibility

• Causality

• Stability

• Linearity

• Time-invariance
Memory

 y[n0] = f(x[n0])  system is memoryless (static)


 Otherwise, system has memory (dynamic), meaning that its
output depends on inputs rather than just at the time of the
output

 Ex:
a) y[n] = x[n] + 5:
b) y[n]=(n+5)x[n]:
c) y[n]=x[n+5]:
Invertibility

A system is said to be invertible if distinct inputs


result in distinct outputs

Ex.: y[n] = |x[n]| is …


Invertibility

A system is said to be invertible if distinct inputs


result in distinct outputs

x[n] x[n]
T() Ti()

System Inverse system

Ti[T(x[n])] = x[n]
Examples for invertibility

Determine which of the systems below are invertible

a) Unit advance y[n] = x[n+1] is invertible

 y[n-1] = x[n] is inverse system


n
b) Accumulator y[n]   x[k ]
k  

c) Rectifier y[n] = |x[n]|


Causality

 The output of a causal system (at each time) does not


depend on future inputs
 All memoryless systems are causal
 All causal systems can have memory or not
Examples for causality

Determine which of the systems below are causal:

a) y[n] = x[-n]

b) y[n] = (n+1)x[n-1]

c) y[n] = x[(n-1)2]

d) y[n] = cos(w0n+x[n])

e) y[n] = 0.5y[n-1] + x[n-1]


Stability

 If a system “blow up” it is not stable


In particular, if a “well-behavior” signal (all values have
finite amplitude) results in infinite magnitude outputs,
the system is unstable
 BIBO stability: “bounded input – bounded output” –
if you put finite signals in, you will get finite signals out
Examples for stability

Determine which of the systems below are BIBO stable:

a) A unit delay system

b) An accumulator

c) y[n] = cos(x[n])

d) y[n] = ln(x[n])

e) y[n] =exp(x[n])
Linearity

Scaling signals and adding them, then processing through the system
same as
Processing signals through system, then scaling and adding them

If T(x1[n]) = y1[n] and T(x2[n]) = y2[n]


 T(ax1[n] + bx2[n]) = ay1[n] + by2[n]
Time-invariance

 If you time shift the input, get the same output, but with the
same time shift
 The behavior of the system doesn’t change with time

If T(x[n]) = y[n]
then T(x[n-n0]) = y[n-n0]
Examples for linearity and time-
invariance

Determine which of the systems below are linear, which


ones are time-invariant
a) y[ n]  nx[ n]

Linear
Not time-invariant
Examples for linearity and time-
invariance

Determine which of the systems below are linear, wich


ones are time-invariant
2
b) y[n ]  x [ n ]
Examples for linearity and time-
invariance

Determine which of the systems below are linear, wich


ones are time-invariant
M
c) y[ n]   br x[ n  r ]
r 0
Example for DT system properties
2
 n  2.5 
Given the system below: y[ n ]    x[ n ]
 n  1.5 

a) Memoryless ?

b) Invertible ?

c) Causal ?
Example for DT system properties
2
 n  2.5 
Given the system below: y[ n ]    x[ n ]
 n  1.5 

c) Stable ?
Example for DT system properties
2
 n  2.5 
Given the system below: y[ n ]    x[ n ]
 n  1.5 
d) time-invariant ?

e) Linear ?
Lecture #6
DT convolution

1. DT convolution formula
2. DT convolution properties
3. Computing the convolution sum
4. DT LTI properties from impulse response
Computing the response of DT LTI
systems to arbitrary inputs

Method 1: based on the direct solution of the input-output equation


for the system

Method 2:

• Decompose the input signal into a sum of elementary signals


• Find the response of system x[n]   ck xk [n]
to each elementary signal k

• Add those responses to obtain xk [ n ]  y k [ n]


the total response of the system x[n]  y[ n]   ck yk [n]
to the given input signal k
DT convolution formula

Convolution: an operation between the input signal to a


system and its impulse response, resulting in the output signal

CT systems: convolution of 2 signals involves integrating the


product of the 2 signals – where one of signals is flipped and
shifted

DT systems: convolution of 2 signals involves summing the


product of the 2 signals – where one of signals is flipped and
shifted
Impulse representation of DT signals


We can describe any DT signal x[n] as: x[n]   x[k ] [n  k ]
k 
Example: x[n]

-1 0 1 2 3 n

x[0]δ[n-0] + x[1]δ[n-1] + x[2]δ[n-2]

-1 0 1 2 n -1 0 1 2 n -1 0 1 2 n
Impulse response of DT systems

Impulse response: the output results, in response to a unit impulse


Denotation: hk[n]: impulse response of a system, to an impulse at
time k

δ[n] Time-invariant h[n]


DT system

δ[n-k] Time-invariant h[n-k]


DT system

Remember: the impulse response is a sequence of values that may


go on forever!!!
Response of LTI DT systems to
arbitrary inputs

δ[n-k] LTI DT system h[n-k]

 

x[n]   x[k ] [n  k ] y[ n]   x[k ]h[n  k ]


k  
k 
LTI DT system
Convolution sum

Notation: y[n] = x[n] * h[n]


Convolution sum in more details

y[0] = x[0] * h[0]


= … + x[-2]h[2] + x[-1]h[1] + x[0]h[0]
+ x[1]h[-1] + x[2]h[-2] + … +
The general output:
y[n] = … + x[-2]h[n+2] + x[-1]h[n+1] + x[0]h[n]
+ x[1]h[n-1] + x[2]h[n-2] + … + x[n-1]h[1]
+ x[n]h[0] + x[n+1]h[-1] + x[n+2]h[-2]

Note: the sum of the arguments in each term is always n


Lecture #6
DT convolution

1. DT convolution formula
2. DT convolution properties
3. Computing the convolution sum
4. DT LTI properties from impulse response
Convolution sum properties

 δ[n] * x[n] = x[n]


δ[n-m] * x[n] = x[n-m]
δ[n] * x[n-m] = x[n-m]
 Commutative law
 Associative law
 Distributive law
Commutative law

x[n] * h[n]  h[n] * x[n]

h[n]
x[n] y[n]

x[n]
h[n] y[n]
Associative law

( x[n] * h1[ n]) * h2 [n]  x[ n] * (h1[n] * h2 [ n])

h1[n] h2[n]
x[n] y[n]

h1[n]*h2[n]
x[n] y[n]

h2[n] h1[n]
x[n] y[n]
Distributive law

x[n] * (h1[ n]  h2 [n])  ( x[n] * h1[n])  ( x[n] * h2 [n])

h1[n] + h2[n]
x[n] y[n]

h1[n]

x[n] y[n]

h2[n]
Lecture #6
DT convolution

1. DT convolution formula
2. DT convolution properties
3. Computing the convolution sum
4. DT LTI properties from impulse response
Computing the convolution sum
 
y[ n ]   x[k ]h[n  k ]
k  
 y[n0 ]   x[k ]h[n
k  
0  k]

1. Fold h[k] about k = 0, to obtain h[-k]

2. Shift h[-k] by n0 to the right (left) if n0 is positive (negative), to


obtain h[n0-k]

3. Multiply x[k] and h[n0-k] for all k, to obtain the product


x[k].h[n0-k]

4. Sum up the product for all k, to obtain y[n0]

Repeat from 2-4 fof all of n


The length of the convolution sum result

y [ n ]  x[ n ]  h [ n ]  
k  
x [ k ] h[ n  k ]

Suppose:
Length of x[k] is Nx  N1 ≤ k ≤ N1 + Nx – 1
Length of h[n-k] is Nh  N2 ≤ n-k ≤ N2 + Nh – 1
 N1 + N2 ≤ n ≤ N1 + N2 + Nx + Nh – 2

Length of y[n]:

Ny = Nx + Nh – 1
Example 1

Find y[n] = x[n]*h[n] where

x[ n]  u[ n  1]  u[ n  3]   [n] h[n]  2  u[n]  u[n  3]

x[n]

-1 0 1 2 3
h[n]
n
-1 0 1 2 3
Ex1 (cont)
x[k]

-1 0 1 2 3 k

h[k]

-1 0 1 2 3 k

h[-k]

y[0] = 6;
-2 -1 0 1 k
Ex1 (cont)

x[k]

-1 0 1 2 3 k
h[-k]

-2 -1 0 1 k

h[-1-k]

y[-1] = 2;
-4 -3 -2 -1 0 k
Ex1 (cont)
x[k]

-1 0 1 2 3 k
h[-k]

-2 -1 0 1 k

y[1] = ?
Ex1 (cont)
x[k]

-1 0 1 2 3 k
h[-k]

-2 -1 0 1 k

y[2] = ?
Ex1 (cont)
x[k]

-1 0 1 2 3 k
h[-k]

-2 -1 0 1 k

y[3] = ?
Ex1 (cont)
x[k]

-1 0 1 2 3 k
h[-k]

-2 -1 0 1 k

y[4] = ?
Example 2
Find y[n] = x[n]*h[n] where x[ n]  a nu[ n] h[n]  u[n]

Try it both ways (first flip x[n] and do the convolution and then flip
h[n] and do the convolution). Which method do you prefer?
n0

 a
Remember! n  if | a | 1
 a  1  a
n  n0  if | a | 1

n1 ( n1  n0 1)
n 1 an0

n  n0
a a
1 a
Example 2
Factor out an to
First flip x[n] and do the convolution get form you know

Therefore  a n 1  1 
y[n ]   u[n ]
 a 1 
Example 2

First flip h[n] and do the convolution


you know this
form

Therefore  a n 1  1 
y[n ]   u[n ]
 a 1 

Tip: first flip the simpler signal!!!


Example 3

Find y[n] = x[n]*h[n] where x[n] = bnu[n] and h[n] = anu[n+2]


|a| < 1, |b| < 1, a ≠ b
Example 4
Compute output of a system with impulse response
h[n] = anu[n-2], |a| < 1 when the input is x[n] = u[-n]

Flipping x[n] because it is simpler


Lecture #6
DT convolution

1. DT convolution formula
2. DT convolution properties
3. Computing the convolution sum
4. DT LTI properties from impulse response
Recall impulse response

 System output, in response to the unit impulse input:


h[n] = T{δ[n]}
 May go on forever  there are 2 kinds of LTI systems:
1. Finite Impulse Response (FIR) system
2. Infinite Impulse Response (IIR) system
 Be one of system representations
 Be convolved with the input to result in the output
Calculation of the impulse response
 Applying the unit impulse function to the input-output equation
 Ex.: 1 1 1
y[n ]  y[ n  1]  x[ n ]  x[n  1]
4 2 2
1 1 1 1
Suppose this h[0]  h[1]   [0]   [1] 
4 2 2 2
system is causal 0
1 1 1 1 1 1 5 51
h[1]  h[0]   [1]   [0]  x     
4 2 2 4 2 2 8 84
1
1 1 1 51
h[2]  h[1]   [2]   [1]   
4 2 2 84
2
1 1 1 1 1 5 51
h[3]  h[2]   [3]   [2]  x x   
4 2 2 4 4 8 84

y[n]  (1 / 2) [n]  (1 / 4) n 1 (5 / 8)u[n  1]


DT LTI properties from impulse response

 Memoryless system: impulse response must have the form


below
h[n] = Kδ[n]

 Invertible system: system with h[n] is invertible if there


exists another impulse response hi[n] such that

h[n]*hi[n] = δ[n]
DT LTI properties from impulse response

 Causal system: h[n] is zero for all time n<0

The system is causal  output does not depend on future


inputs 

  1
y[n0 ]   h[k ]x[n
k  
0  k ]   h[k ]x[n0  k ] 
k 0
 h[k ]x[n
k  
0  k]

 {h[0]x[n0 ]  h[1]x[n0  1]  ...}  {h[1] x[n0  1]  h[2]x[n0  2]  ...}

Present and past inputs Future inputs

Thus, the second term should be zero  h[n] = 0 n < 0


DT LTI properties from impulse response

 Causal system: h[n] is zero for all time n<0


DT LTI properties from impulse response

 BIBO stable system: finite input, finite output

 If x[n] is bounded then:

| x[n ] | M x  
 
Take the
absolute:
| y[n ] |  h[k ]x[n  k ] | y[n] |  h[k ]x[n  k ]
k   k  

| y[n ] | M x  h[k ]
k  
The output is bounded if the impulse response satisfies:


 h[n]
n  
 
Examples

1. Is h[n] = 0.5nu[n] BIBO stable? Causal?

Stable Causal

2. Is h[n] = 3nu[n] BIBO stable? Causal?

3. Is h[n] = 3nu[-n] BIBO stable? Causal?


Lecture #7
Difference equation model

1. LTI systems characterized by linear constant


coefficient difference equations
2. Recursive solution of difference equations
3. Closed form solution of difference equations
Linear constant coefficient difference equations

General form:

y[n]  a1 y[ n  1]  ...  a N y[ n  N ]  b0 x[ n]  b1 x[n  1]  ...  bM x[n  M ]

N M
  a k y[n  k ]   b r x[n  r ], a 0  1
k 0 r 0

N, M: non-negative integers
N: order of equation
ak, br: real constant coefficients
Linear constant coefficient difference equations

Two common ways to write:


N M

a
k 0
k y[n  k ]   br x[n  r ], a0  1
r 0
N M
y[n ]   ak y[n  k ]   br x[n  r ]
k 1 r 0

Solving the equation in 2 ways:

1. Solving the equation recursively, one value at a time. Need to start


the iteration with initial conditions

2. Finding a formula for y[n] (a closed form)


Recursive solution of difference equations

1) Put y[n] on the left hand side by itself

y[n] = -a1y[n-1] - … - aNy[n-N] + b0x[n] + … + bMx[n-M]

2) To calculate a given output at time n = n0, that is y[n0], we add


the weighted M+1 inputs b0x[n0] + … + bMx[n0-M] to the
weighted N past outputs –a1y[n0-1] - … - aNy[n0-N]

3) Increase the time index to n = n0+1 and recursively calculate the


next output. This can continue forever.

To start this recursion somewhere, for example at n0 = 0, we need to


know the N initial conditions y[n0-1], y[n0-2], …, y[n0-N]
Example 1

Solve iteratively to find the 1st 3 terms of

y[n] – 2y[n-1] = x[n-1]

with initial condition y[-1] = 10, and with the input x[n] = 2u[n]

n x[n] y[n]
-1 0 10 (initial condition)
0 2 y[0] = x[-1]+2y[-1] = 20
1 2 y[1] = x[0]+2y[0] = 2+2(20) = 42
2 2 y[2] = x[1]+2y[1] = 2+2(42) = 86
Example 2
Find the 1st 3 terms of y[n+2] – y[n+1] +0.24y[n] = x[n+2] -2x[n+1]

with initial condition y[-1] = 2, y[-2] = 1, and input x[n] = nu[n]

This system is time invariant, so it is equivalent to

y[n] – y[n-1] +0.24y[n-2] = x[n] -2x[n-1]

n x[n] y[n]
-2 0 1 (initial condition)
-1 0 2 (initial condition)
0 0 y[n] = x[n]-2x[n-1]+y[n-1]-0.24y[n-2]
y[0] = 1.76
1 1 y[1] = 2.28
2 2 y[2] = 1.8576
Closed form solutions of difference equations

Total response = zero-input component + zero-state component


= natural response + forced response
= complementary response + particular response

1. Find the complementary response, assume input = 0.


2. Find the particular response, assume all initial conditions = 0.
Choose the form of the particular response same as the form of
input
3. Total response = complementary + particular. Use initial conditions
to find N constants from the complementary response
Example

Given y[n] – 0.3y[n-1] = x[n] with y[-1] = 0 and x[n] = (0.6)n


Example (cont)

Combining particular and complementary solutions:


Lecture #8
Block diagram for DT LTI systems

1. Components for block diagram


2. Direct form I realization of a system
3. Direct form II realization of a system
Components for block diagram

Components: branch points, summation, delays, gains,


LTI systems
• Signals travel along lines, arrows point direction of inputs
and outputs
• Each component acts the same way, no matter how
many components are connected to it
• For linear system, the order of operation does not matter
responses to obtain
Components for block diagram

EX: an averaging system y[n] = 0.5(x[n] + x[n-1])


Lecture #8
Block diagram for DT LTI systems

1. Components for block diagram


2. Direct form I realization of a system
3. Direct form II realization of a system
Direct form I realization of a system
y[n]  a1 y[n  1]  ...  aN y[n  N ]  b0 x[n]  b1 x[n  1]  ...  bM x[n  M ]
 y[n]  b0 x[n]  b1 x[n  1]  ...  bM x[n  M ]  (a1 ) y[n  1]  ...  (a N ) y[n  N ]

b0
x[n] y[n]
Z-1 Z-1

b1 -a1

Z-1 Z-1

b2 -a2

bM -aN
Lecture #8
Block diagram for DT LTI systems

1. Components for block diagram


2. Direct form I realization of a system
3. Direct form II realization of a system
Direct form II realization of a system

To get another realization, we reverse the order of these two systems


“violet” and “yellow” without altering the input-output relation

b0
x[n] y[n]
Z-1 Z-1
b1 -a1

Z-1 Z-1

b2 -a2

bM -aN
Direct form II realization of a system
We observe that: these two delays contain the same input and hence
the same output  these two delays can be merged into one delay

x[n] b0 y[n]
Z-1 Z-1
-a1 b1

Z-1 Z-1

-a2 b2

-aN bM
Direct form II realization of a system

x[n] b0 y[n]
Z-1
-a1 b1

Z-1

-a2 b2

Suppose
-aN bN M=N
Example of realization LTI system
CHAPTER 3:
THE Z-TRANSFORM & ITS APPLICATION TO
THE ANALYSIS OF LTI SYSTEMS

Lesson #9: The Z-transform


Lesson #10: Z-transform properties
Lesson #11: Inversion of Z-transform
Lesson #12: Analysis of LTI systems in the z-domain
Lecture #9
The Z-transform

1. Definition of the Z-transform


2. Region of convergence
3. Examples of Z-transform
Introduction to Z-Transform (ZT)
Recall the Laplace Transform:

 f (t )e
 st
F ( s)  dt


Z-Transform is the discrete-time counterpart of the Laplace


Transform: 
F ( z)   f [
n  
n ] z n
From Laplace Transform to Z-Transform
Take a CT signal f(t) and sample it:

f (t )  

sampling
f s (t )
 
f s (t )   f (t ) (t  nT )   f (nT ) (t  nT )
n   n  
From Laplace Transform to Z-Transform

Take the Laplace Transform of the sampled signal:

     st  
L[ f s (t )]     f (nT ) (t  nT )  e dt    f (nT ) (t  nT )e  st dt

 n   n 


  
 
n 
f (nT )   (t  nT )e  st dt 


n 
f (nT )e  snT

Let f(nT) = f[n] and esT = z then:


Definition of the Z-transform

For a DT signal x[n] = …, x[-2], x[-1], x[0], x[1], x[2], …


The bilateral Z-transform of x[n] is defined to be

 Sum goes
X ( z )  ZT x[n]   x[ n ] z n over all
integer
n  
values

Assume that values of z exist such that the summation


converges. z takes values in the complex plane
Poles and Zeros of Z-transform


X ( z )  ZT x[n]   x[ n ] z n

n  

Poles pk  X(pk) = ∞
Zeros zk  X(zk) = 0

Poles are roots of denominator polynomial


Zeros are roots of numerator polynomial
Note: find these after canceling any common factors – and do this
for polynomial in z (not in z-1)
Lecture #9
The Z-transform

1. Definition of the Z-transform


2. Region of convergence
3. Examples of Z-transform
Region of convergence (ROC)

ROC: set of all values of z, for which X(z) converges


We will find the ROC for these cases:
1. Right-sided signal (x[n] = 0, n<n0)
2. Left-sided signal (x[n] = 0, n>n0)
3. Two-sided signal (-∞<n<+∞)
4. Finite-duration signal
Right-sided signal

Sum goes
from n0 to
infinity
Right-sided signal

Infinite Egg White!!!


Right-sided signal

If x[n] is not causal then X(z) will not converge at z = ∞


 we can’t include ∞ in the ROC
Ex: x[n] = u[n+1]

ROC: rmax < |z| < ∞


Left-sided signal
Left-sided signal

Egg Yolk!!!
Left-sided signal

If x[n] has values at some times > 0, then X(z) does not
converge at z = 0  we can’t include 0 in the ROC
Ex: x[n] = u[-n+1]

ROC: 0 < |z| < rmin


Two-sided signal

Two-sided signal = Left-sided signal + right-sided signal

Donut!!!

Note: if |a| ≥ |b| then X(z) does not exist


Finite-duration signal

For x(n)  (n  m) X( z )   ( n
n  
 m ) z n
 z m

n2 n2
x[n]   x[k ] [n  k ]  X ( z )   x[ k ] z k

k n1 k n1

ROC: all of z, except:


z = 0 if k > 0
z = ∞ if k < 0
Lecture #9
The Z-transform

1. Definition of the Z-transform


2. Region of convergence
3. Examples of Z-transform
Examples of Z-transform

Find the ZT of the right-sided and the left-sided sequences

x1[n]  a nu[n] and x2 [n]  (a n )u[n 1]


 1 1
 
 | az | 1
X1 (z)   a z n n
  (az )  1  az 1
1 n

n 0 n 0  1
| az | 1

z
 , |z||a|
za
Examples of Z-transform
Find the ZT of the right-sided and the left-sided sequences

x1[n]  a nu[n] and x2 [n]  (a n )u[n 1]

 a 1
z 1
 
  | a z | 1
X 2 (z)    a n z  n    (a z )   1  a z
1 n 1

n  1 n 1   1
z | 1
 | a
z
 , |z||a|
za

The ROC must be specified for the bilateral Z-Transform to be unique


Examples of Z-transform

Find the ZT of the left-sided signal

x[n]  3n u[n  1]  4n u[n  1]


Examples of Z-transform

n
Find the ZT of the two-sided signal x[n]  a
Examples of Z-transform

Find the ZT of the two-sided signal

h[n]  (5) u[n  1]  3 u[n  1]


n n
Examples of Z-transform

Find the ZT of the signal

x[n] =
Examples of Z-transform
Find the ZT of the right-sided-sided signal

x[n]  r n sin(bn)u[n]
1 n jbn 1 n  jbn
x (n )  r e u (n )  r e u (n )
2j 2j
1 1
 (r e ) u (n )  (re  jb ) n u (n )
jb n

2j 2j
1 z z 
 X(z)     jb 
2j z  r e jb
zr e 
Z rz sin b
r sin(bn )u (n ) 
n
, |z||r|
z  2rz cos b  r
2 2
Lecture #9
Z-transform properties

1. Linearity
2. Time shifting
3. Frequency scaling
4. Multiplication by n
5. Convolution in time
6. Initial value
7. Final value
Linearity

Z
ax[n]  by[n]  aX ( z )  bY ( z )

The new ROC is the intersection of ROC{X(z)} and ROC{Y(z)}

If aX(z) + bY(z) cancels pole then the new ROC is bigger


Lecture #9
Z-transform properties

1. Linearity
2. Time shifting
3. Frequency scaling
4. Multiplication by n
5. Convolution in time
8. Initial value
9. Final value
Time shifting
Z
x[n  n0 ]  z  n0 X ( z )

The new ROC is the same as ROC{X(z)} except for z = 0 if


n0>0 and z = ∞ if n0<0
Proof:

Delay of k means that the Z-transform is multiplied by z-k


Example of applying the time-
shifting property

Determine the ZT of the signal:

1
 
w[n]  (1) n  (3) n 5 u[n  5]
4
Lecture #9
Z-transform properties

1. Linearity
2. Time shifting
3. Frequency scaling
4. Multiplication by n
5. Convolution in time
6. Initial value
7. Final value
Frequency scaling
Z
z
a x[n] 
n
X 
a
The new ROC is the scaled ROC{X(z)} with factor |a|
(bigger or smaller)
Proof: 
ZT {a n x[n ]}   a n

n  
x[ n ] z n

 n
z z
  x[n ]   X 
n   a a
Multiplication by an results in a complex scaling in the z-domain
Example of applying the
frequency-scaling property

Determine the ZT of the signal:

x[n]  a u[n]
n
Lecture #9
Z-transform properties

1. Linearity
2. Time shifting
3. Frequency scaling
4. Multiplication by n
5. Convolution in time
6. Initial value
7. Final value
Multiplication by n
Z dX ( z )
nx[n]   z
dz
The new ROC is the same ROC{X(z)}
Proof:

 
dX ( z ) 1 
X ( z)   x[n]z
n  
n

dz
   nx[n ]z
n  
 n 1
   nx[n ]z n
z n 

dX ( z )
 ZT {nx[n ]}   nx[n]z
n  
n
 z
dz
Example of applying the
multiplication-by-n property

Determine the ZT of the signal:

x[n]  na nu[n]
Lecture #9
Z-transform properties

1. Linearity
2. Time shifting
3. Frequency scaling
4. Multiplication by n
5. Convolution in time
6. Initial value
7. Final value
Convolution in time

Z
y[n]  x[n]  h[n]  X ( z ) H ( z )

The new ROC is the intersection of ROC{X(z)} and ROC{Y(z)}


If poles cancel zeros then the new ROC is bigger

Proof: Z  
y[n]  x[n]  h[n]   [  x[k ]h[n  k ]]z  n
n  k 

 
Switching the order of
the summation:
Y ( z)   
x[ k
k  
] h[ n  k ]
n  
z n

 
  x[k ]z
k  
k
 h[ n
n  k  
 k ] z ( n  k )

 X ( z ).H ( z )
Application of the convolution property

ZT
x[n] X(z)
ZT-1
x[n]*h[n]
ZT
h[n] H(z)
Example

Compute the convolution of the signals:


x1[n] = δ[n] - 2δ[n-1] + δ[n-2]
x2[n] = δ[n] + δ[n-1] + δ[n-2] + δ[n-3] + δ[n-4] + δ[n-5]
Lecture #9
Z-transform properties

1. Linearity
2. Time shifting
3. Frequency scaling
4. Multiplication by n
5. Convolution in time
6. Initial value
7. Final value
Initial value theorem

If x[n] is causal then x[0] is the initial value of the function x[n]

x[0]  lim X ( z )
z 

Proof:


X ( z )   x[n]z n  x[0]  x[1]z 1  x[2]z 2  ...
n 0

Obviously, as z  , z n  0
Initial value theorem

If x[n] = 0 with n < n0 then x[n0] is the initial value, and

x[n0 ]  lim[ z X ( z )]
n0
z 
Proof:

X ( z)   x[ n
n  n0
] z n
 x[ n0 ] z  n0
 x[ n0  1] z ( n0 1)
 x[ n0  2 ] z ( n0  2 )
 ...

z n0 X ( z )  x[n0 ]  x[n0  1]z 1  x[n0  2]z 2  ...


As z  , z n0 X ( z )  x[n0 ]
Initial value theorem

Ex 1: Find the initial value of x[n] where X(z) = z/(z-0.6)

Ex 2: Find the initial value of x[n] where X(z) = (z^3)/(z-0.6)


Lecture #9
Z-transform properties

1. Linearity
2. Time shifting
3. Frequency scaling
4. Multiplication by n
5. Convolution in time
6. Initial value
7. Final value
Final value theorem

If this limit exists then x[n] has a final value (steady-state


value)

lim x[n]  x[]  lim[ ( z  1) X ( z )]


n z 1

Proof: Exercise
Examples
Ex1: unit step u[n]
𝑧
𝑍𝑇 𝑢 𝑛 =
𝑧−1
𝒛
⇒ lim 𝒛 − 𝟏 . = 1=> Ok !
𝒛→𝟏 𝒛−𝟏

Ex2: sinusoidal signal


𝜋𝑛
𝑍𝑇 𝑠𝑖𝑛 𝑢𝑛 =⋯
2
Examples
Ex3: the impulse response of an LTI system is h[n] = anu[n], |a|<1.
Determine the value of the step response of the system as n∞

The step response of the system is:


y[n] = h[n]*u[n]  Y(z) = X(z).H(z)
Lecture #10
Inversion of Z-transform

1. Inverse Z-transform formula


2. Using partial fraction expansion to invert the ZT
3. Using power series expansion to invert ZT
FT formula building

Using the Cauchy theorem:

1 1 if z  0

n 1
I z dz  
2j C 0 if z  0

Z: complex variable

Counterclockwise contour integral is along a closed path in


the z plane
FT formula building
1
Multiplying two sides of ZT definition formula by z l 1
2 j

1 1
2 j
X ( z ) z l 1   x[
2 j n 
n ] z n l 1
z

Taking the integral:


1 1 
 n l 1 

l 1
X ( z ) z dz     x[n ] z z dz Applying the
2 j C 2 j C  n    Cauchy theorem


1
  x[n ]  z ( l  n ) 1
dz
n   2 j C
 x[l ]
Inverse ZT formula

The inverse ZT is defined by

1

n 1
x[n ]  X(z)z dz
2j C

Counterclockwise contour integral is along a closed path in


the z plane.

LTI case: can avoid integration – use easier methods


Lecture #10
Inversion of Z-transform

1. Inverse Z-transform formula


2. Using partial fraction expansion to invert the ZT
3. Using power series expansion to invert ZT
Partial fraction expansion

Similar to what you saw for Laplace transforms

Y ( z)
Distinct poles: rk  ( z  pk )
z z  pk
Partial fraction expansion

Repeated poles:
Z-Transform table

1 (n )  1
2 (n  m)  z  m
z
3 a u[n ] 
n

za
az
4 na u[n ] 
n

(z  a ) 2
az (z  a )
5 n a u[n ] 
2 n

(z  a ) 3
z ( z  a cos )
6 a cos(n)u[n]  2
n

z  2az cos   a 2
az sin 
7 a sin(n)u[n]  2
n

z  2az cos   a 2
Examples of partial fraction expansion

2 z  5z
2
Distinct poles X ( z)   z  3
( z  2)( z  3)
Divide X(z) by z, to “save” z for later
X(z) 2z  5 (z  2)  (z  3)
 
z (z  2)(z  3) (z  2)(z  3)
1 1
  , | z | 3
z 3 z 2
 x (n )  (3n  2 n )u (n )
Examples (cont)
2z
Repeated poles X( z )  , z 2
(z  2)(z  1) 2

X( z ) 1 A B C
    , | z | 2
2z (z  2)(z  1) 2
z  2 z  1 (z  1) 2

A(z  1) 2  B(z  1)(z  2)  C(z  2)  1


A  1; B  1; C  1;
 z z z 
X( z)  2    2
, | z | 2
 z  2 z  1 (z  1) 
x(n)  2(2  1  n)u(n)
n
Examples (cont)
z
Complex poles X( z )  2 |z| > 0.5
z  0.5z  0.25
az sin 
a sin(n)u[n]  2
n

z  2az cos   a 2


(0.5)z sin
4 3
X(z)  x | z | 0.5
3 z 2  2(0.5)z cos   (0.5) 2
3
4  
x (n )  (0.5) sin n u (n )
n

3 3 
Examples (cont)

z 4
Time-shift W ( z)  2  z  3
property z  2z  3

Divide W(z) by z, to “save” z for later

W(z) z 5 z 5   14 1
 5
 2    4
z
z z  2z  3 (z  1)(z  3)  z  1 z  3 

1 n 5 1 n 5
w[n ]   (1) u[n  5]  (3) u[n  5]
4 4
Examples (cont)

Given h(n) = anu(n) (|a|<1) and x(n) = u(n).


Find y(n) = x(n)*h(n)

1  a n 1
y[n ]  u[n ]
1 a
Examples (cont)
Find the output y(n) to an input x(n) = u(n) and an LTI
system with impulse response h(n) = -3nu(-n-1)

1 3 n
y[n]   u[n]  (3) u[n  1]
2 2
Lecture #10
Inversion of Z-transform

1. Inverse Z-transform formula


2. Using partial fraction expansion to invert the ZT
3. Using power series expansion to invert ZT
Power series expansion

If you can expand X(z) as a series in z-1



X ( z)   x[ n
n  
] z n
 ...  x[ 2] z 2
 x[ 1] z 1
 x[ 0] z 0
 x[1] z 1
 x[ 2] z 2
 ...

1 2
X ( z)  ...  a2 z  a1 z  a0 z  a1 z  a2 z  ...
2 1 0

you can pick off x(n) as the coefficients of the series

an  x[n]
Examples of power series expansion

Find the inverse Z-transform of

1 2
X ( z )  1  2 z  3z ROC : | z | 0

x (0)  1
x (1)  2
x (2)  3
x (n )(n  0,1,2)  0
Examples (cont)

1
X( z)  1
, ROC : z  a
1  az
1 2 2 3 3
Long division X(z)  1  az  a z  a z  ...
x (0)  1
x (1)  a
x ( 2)  a 2
x (3)  a 3

...
x (n )(n  0)  0
Lecture #11
Analysis of LTI systems in the Z-domain

1. Transfer function
2. LTI system properties from transfer function
3. Unilateral Z-transform
4. Using unilateral Z-Transform to solve the difference
equations
Transfer function

For system impulse response h(n), its ZT is often called


Transfer Function H(z)

Consider H(z) = N(z)/D(z)

The roots of N(z): system zeros

The roots of D(z): system poles

D(z) = 0: characteristic equation


Determination of transfer function
1. From impulse response h(n): Just take Z-Transform

2. From difference equation:

- Take Z-Transform for both side

- Put the Y(z) on left side

- Divide both side by X(z)

3. From block diagram:

(1) Find the difference equation, then find H(z) from equation

(2) Put X(z) as input, then directly find Y(z) from block diagram
Transfer function from difference equation

N M

a
k 0
k y[n  k ]  b r x[n  r ]
r 0
ZT
N M

-Linear
a
k 0
k z Y( z )  b r z X( z )
k

r 0
r

-Time-shift M

Y(z)  r
b z r

Y(z) = X(z) . H(z) H(z)   r 0


N

a
X(z) k
k z
k 0
Transfer function from difference equation

Suppose M = N

Multiply num. and den. by zN:

M N

Y ( z) b z r
r
b z r
r

H ( z)   r 0
N
 r 0
N

 k k
X ( z) k k
a z a z
k 0 k 0
Example
For the α-filter:
y(n)  (1   ) y(n  1)   x(n)
M
Its transfer function: r
b z r

H ( z)  r 0

N
1  (1   ) z 1
 k
a
k 0
z k

For example: y[n] – 0.9y[n-1] = 0.1x[n]  α = 0.1

0.1z
H ( z) 
z  0.9
Transfer function from block diagram

Find the transfer function of the delay unit

D
x[n] y[n]

y[n] = x[n-1]  Y(z) = z -1X(z)  H(z) = z -1

Z-1
X(z) Y(z)
Transfer function from block diagram
Find the transfer function of this feedback system
w[n]
x[n] H1(z) y[n]

H2(z)

y[n] =( x[n]+y[n]*h2[n] ) * h1[n]


Y (z) = [X(z)+Y(z).H2(z)].H1(z)

Y ( z) H1 ( z )
H ( z)  
X ( z ) 1  H1 ( z ).H 2 ( z )
Lecture #11
Analysis of LTI systems in the Z-domain

1. Transfer function
2. LTI system properties from transfer function
3. Unilateral Z-transform
4. Using unilateral Z-Transform to solve the difference
equations
Causality

 Recall:
Causal system  h[n]  0 n  0
 h(n) is right-sided signal  ROC of transfer function is

| z | rmax
 An LTI system is causal if and only if the ROC of the transfer
function is the exterior of a circle of radius rmax < ∞
including the point z = ∞
Causality (cont)

 Consider the system:

z 2  0.4 z  0.9 z  0.9


H ( z)   z
z  0.6 z  0.6

Unit advance y[n]=x[n+1]


 noncausal

 For the causal system, the numerator of H(z) can not be of


higher order than the denominator
 If the numerator order is less equal to the denominator
order then the system is causal??? NOT SURE!!!
Example

 Consider this system:

h[n ]  u[n  1]
z
H ( z)  ROC :| z | 1
z 1

 Numerator order is 1; denominator order is 1; but it is non-


causal!!!
Stability

 Recall:

Stable system   h[n]
n  
 

 Its transfer function:


  
H( z )   h[
n 
n ]z n
| H(z) |  | h
n 
[ n ]z n
|   | h
n 
[ n ] | | z n
|

Unit circle |z| = 1  | H(z) | | h[n] |
n  
The ROC includes |z| = 1

 An LTI system is BIBO stable if and only if the ROC of the


transfer function includes the unit circle.
Causality and Stability

 The conditions for causality and stability are different and


one does not imply the other
 4 cases:
- Causal and stable system
- Non-causal and stable system
- Causal and unstable system
- Non-causal and unstable system
 A causal system is BIBO stable, provided that all poles of
H(z) lie inside the unit circle.
Examples

Ex1: Given an LTI system:


2 z 2  1.6 z  0.9
H ( z)  3
z  2.5 z  1.96 z  0.48
2

The poles of H(z):


den = [1 -2.5 1.96 -0.48];  p = 1.2 0.8 0.5

p = roots(den)
1. |z|>1.2: causal, unstable
2. 0.8<|z|<1.2: non-causal, stable
3. 0.5≠|z|<0.8: non-causal, unstable
Examples
Ex2: A LTI system is characterized by:

3  4 z 1 z ( 3 z  4) z 2z
H ( z)  1 2
 2  
1  3.5z  1.5z z  3.5z  1.5 z  0.5 z  3

Specify the ROC of H(z) and find h[n] for the following conditions:
1. The system is stable
2. The system is causal
3. The system is anticausal
Examples
Ex2: A LTI system is characterized by:

3  4 z 1 z ( 3 z  4) z 2z
H ( z)  1 2
 2  
1  3.5z  1.5z z  3.5z  1.5 z  0.5 z  3
Invertibility

The inverse of a system H(z) is a second system Hi(z) that,


when cascaded with H(z), yields the identity system

H(z).Hi(z) = 1
Hi(z) = 1/H(z)

X(z) X(z)
H(z) Hi(z)
Invertibility

H(z) = N(z)/D(z)  Hi(z) = D(z)/N(z)

H(z) is causal  M≤N and if Hi(z) is causal  N≤M.


Hence, for both systems to be causal  M = N

H(z) is stable: all poles lie inside the unit circle.

Hi(z) is stable: all poles (zeros of H(z)) lie inside the unit circle.

Hence, for both systems to be stable, both the poles and


zeros of H(z) must lie inside the unit circle
Lecture #11
Analysis of LTI systems in the Z-domain

1. Transfer function
2. LTI system properties from transfer function
3. Unilateral Z-transform
4. Using unilateral Z-Transform to solve the difference
equations
Unilateral Z-Transform

 In control applications, causal systems are interested in:


h[n] = 0 with all n < 0
 When considering CT causal systems, the Unilateral
Laplace Transform is used
Similarly, when considering DT causal systems, the
Unilateral Z-transform is used

 In difference equations, the initial conditions are non-zero


 the Unilateral Z-Transform is used
Unilateral ZT

X  ( z )   x[n ]z n
n 0
Z

Notation : x[n ]  X ( z)

1. It does not contain information about the signal x[n] for n<0

2. Unilateral X+(z) is identical to the bilateral X(z) of the signal


x[n].u[n]

3. ROC of X+(z) is always outside a circle  no need to refer to


ROC
Time shifting property of unilateral ZT
Z

If x[n ]  X ( z)
Z 1
then k 
x(n  k )  z X ( z )  z k
 x[i ]z
i  k
i
,k  0

Ex.: x(n-1)  x(-1) + z-1X+(z)


x(n-2)  x(-2) + z-1x(-1) + z-2X+(z)
Lecture #11
Analysis of LTI systems in the Z-domain

1. Transfer function
2. LTI system properties from transfer function
3. Unilateral Z-transform
4. Using unilateral Z-Transform to solve the
difference equations
Using Z-transform to solve the
difference equation

N M

a
k 0
k
y[n  k ]   br x[n  r ]
r 0

1. Take the unilateral ZT of equation


2. Find the output in the Z-domain, Y(z)
3. Use inverse ZT to get the output y(n) from Y(z)
Example

Find the output, y[n], n  0


of the system

y[n]  3y[n  1]  2y[n  2]  x[n]


in two cases:
a) n 2
x[n]  3 u[n], y[2]  0, y[1]  0
b)
n 2 4 1
x[n ]  3 u[n ], y[2]   , y[1]  
9 3
Example

a) Take the bilateral ZT of the equation:

y[n ]  3y[n  1]  2 y[n  2]  x[n ]


 Y(z)  3z 1Y(z)  2z  2 Y(z)  X(z)
1 z
 Y(z)(1  3z  2z ) 
1 2

9 z3
1 z 1
 Y(z) 
9 z  3 1  3z  2z
1 2

1 z z2
 Y(z) 
9 z  3 z 2  3z  2
Example

b) Take the unilateral ZT of the equation:

y[n ]  3y[n  1]  2 y[n  2]  x[n ]


 Y(z)  3[z 1Y(z)  y(1)]  2[z 2 Y(z)  z 1y(1)  y(2)]  X(z)
1 z
 Y(z)(1  3z  2z ) 
1 2
 3y(1)  2z 1y(1)  2 y(2)
9 z3
1 z 2 1 8  1 
 Y(z)    1  z   2 
9 z 3 9  1  3z  2z 
1
3
z2 z2
 Y(z) 
z(z  3) (z  3z  2)
2
Homework 3

E1. Find x(n)*h(n) using the Z-transform

a) x[n ]   4 u[n  1] ,
1 n
h[n ]  [1  ( ) ]u[n ]
1 n
2

b) x[n ]  u[n ] , h[n ]   [n ]  ( 12 )n u[n ]

c) x[n ]  nu[n ] , h[n ]  2n u[n  1]


Homework 3
E2
We want to design a causal LTI system with the property that if
the input is x[n] = (0.5)nu[n] -0.25(0.5)n-1u[n-1]
then the output is y[n] = (1/3)nu[n]
a) Find H(z) and then h(n) of a system that satisfies the
foregoing conditions
b) Find the difference equation that characterizes this system
c) Determine a realization of the system that requires the
minimum possible amount of memory
d) Determine if the system is stable
Homework 3

E3. Use the Z-transform to evaluate the following


series:
∞ 𝑛
a) 𝑥 = 𝑛=0 0.2

∞ 𝑛
b) 𝑥 = 𝑛=4 0.2

∞ 𝑛 cos(0.2n)
c) 𝑥 = 𝑛=0 0.2
Homework 3

E4. A causal linear, time-invariant system is


described by this difference equation:
𝑦 𝑛 =𝑥 𝑛 +𝑦 𝑛−1
a) Find the system impulse response
1 𝑛
b) Find y[n] for an input 𝑥 𝑛 = 𝑢 𝑛 . Label
2

the natural and forced responses in y[n]


c) Is the system BIBO stable ?
Homework 3

E5. Find the inverse of the bilateral Z-transform:


1.5𝑧 2 − 1.3
𝐹 𝑧 =
(𝑧 − 1)(𝑧 − 9)
for the following regions of convergence.
a) 𝑧 < 0.9
b) 𝑧 > 1
c) 0.9 < 𝑧 < 1
d) Find the final values of the functions of parts (a)
through (c)
CHAPTER 4:
FREQUENCY ANALYSIS OF
SIGNALS AND SYSTEMS

Lesson #13: Review of CTFT and Sampling


Lesson #14: Discrete-Time Fourier Transform (DTFT) & Inverse
DTFT
Lesson #15: DTFT properties
Lesson #16: Frequency spectrum of DT signals
Lesson #17: Frequency-domain characteristics of LTI systems
Lesson #18: Digital filters
Lecture #13
Review of CTFT and Sampling

1. The Fourier series for CT periodic signals


2. The Fourier Transform for CT aperiodic signals (CTFT)
3. Sampling of CT signals
4. Aliasing
The Fourier series of CT periodic signal

x(t) is periodic and satisfies the Dirichlet conditions

T
x(t)

 2

a e
j nt
Fourier series: x (t )  n
T
t
n  
T /2 2
1 j nt
Fourier coefficients: an 
T 
T / 2
x (t )e T
dt
Power density spectrum of periodic signal
A periodic signal has infinite energy and finite average power, which is
T /2 T /2
1 1
Px   | x (t ) | dt   x(t ). x * (t )dt
2

T T / 2
T T / 2
2
1
T /2
   nt 
x (t )  an e
j
  dt
* T
T T / 2  n   
 
* 1
T /2
j
2
 
  an  dt    | an |2
nt

n   T

T / 2
x (t )e T

 n  
T /2 
1
Parseval’s relation: Px 
T  | x ( t ) |2
dt   n
| a
n  
|2

T / 2
Lecture #13
Review of CTFT and Sampling

1. The Fourier series for CT periodic signals


2. The Fourier Transform for CT aperiodic signals
(CTFT)
3. Sampling of CT signals
4. Aliasing
The Fourier transform of CT aperiodic signal

x(t) is aperiodic and satisfies the Dirichlet conditions

Fourier transform pair:


X( )   x (t )e
 jt
dt  FT x (t )


x (t ) 
1
 X ( )e
jt
d  FT 1
X ( )
2 
Fourier transform properties

F
Linearity: ax(t)  by(t)  aX ( )  bY ( )
F
- j 
Time shift: x (t   )  e X ( )
F
Time reverse: x ( t )  X (  )
F
Convolution in
time domain:
x (t ) * y (t )  X ( ).Y ( )
F 1
Multiplication in x (t ). y (t )  X ( ) * Y ( )
time domain: 2
Energy density spectrum of aperiodic signal
Let x(t) be finite energy signal, which is
 
Ex   dt   x(t ). x * (t )dt
2
| x ( t ) |
 

 1 

  x (t )  X * ( )e
 jt
d dt
  2  
1

 
 1

 X * ( )  x (t )e dt d   | X ( ) |
 jt
 2
d
2     2 

 
1
Parseval’s relation: E x   | x(t ) | dt 
2
 | X ( ) |2
d

2 
Lecture #13
Review of CTFT and Sampling

1. The Fourier series for CT periodic signals


2. The Fourier Transform for CT aperiodic signals (CTFT)
3. Sampling of CT signals
4. Aliasing
Sampling of CT signals
Define the CT impulse train as:

x(t) is CT signal we want to sample:

To sample x(t), we will multiply x(t) by p(t)


Sampling of CT signals

Let xs(t) be the sampled signal. Then,

x(t )  
 xs (t )
sampling

 
xs (t )   x(t ) (t  nT )   x(nT ) (t  nT )
n   n  

Signal xs(t) consists


of a train of CT
impulses – take off
the arrow heads to
get x(n) – a DT
signal
Spectrum of sampled signals

Consider y(t) = xs(t) = x(t).p(t) in the frequency domain


Take Fourier transform of x(t)

X(ω) = FT{x(t)} and P(ω) = FT{p(t)}


Spectrum of sampled signals

Finding FT{p(t)}, using the continuous-time FT of periodic signals

 
p(t )    (t
n  
 nT ) 
FT
P( )   2an (  ns )
n  

1 T /2 1
an    (t )e dt 
T T / 2
 jt

T
 P( )     (  n )
n  
s s

A CT impulse train has a FT that is an impulse train in frequency


Spacing between pulses in time is T
Spacing between pulses in frequency is 2π/T
Increasing period in time domain decreases it in frequency domain
Spectrum of sampled signals
Back to Xs(ω); with ωs: the sampling frequency

1   
X s ( )  X ( ) *   s (  ns )
2 n   
s 
1 

2

n  
X (  ns )   X (  ns )
T n  
The effect of sampling is an infinite sum of scaled, shifted
copies of the continuous time signal's Fourier Transform
Lecture #13
Review of CTFT and Sampling

1. The Fourier series for CT periodic signals


2. The Fourier Transform for CT aperiodic signals (CTFT)
3. Sampling of CT signals
4. Aliasing
Aliasing

Note that the triangles don’t overlap – so with an ideal


low pass filter with cut-off frequency ω=π/T, we could
filter xs(t) to perfectly recover x(t)
Aliasing (cont)

- The triangles overlap  can’t recover x(t)


- Happens when ωs = 2π/T < 2ωb

0 ωb ωs
Aliasing (cont)

Avoid
aliasing:
sampling faster
than twice the
highest
frequency
component –
The Nyquist-
Shannon
sampling
theorem
Examples
Examples
Examples
Examples
Lecture #14
Discrete-Time Fourier Transform (DTFT)

1. From CTFT to DTFT


2. Convergence of the DTFT
3. The relation between DTFT and ZT
4. DTFT of signals with poles on the unit circle
5. Inverse DTFT
From CTFT to DTFT

Take a CT signal x(t) and sample it:



x(t ) sampling
  xs (t )   x(nT ) (t  nT )
n  
The CTFT of the sampled signal is:

FTx s ( t )   x(nT)FT(t  nT)
n  
 
 
n  
x (nT)  ( t  nT)e  jt dt

 T 1 
  x (
n  
nT ) e  jnT

T  
 x (
n  
n ) e  jn
 X ()
DTFT formula


X()  DTFTx[n ]   x[n] e  j n

n  

• Discrete in time, but continuous in frequency and periodic


with period of 2
• Gives the complex frequency spectrum of DT signal
• Not all DTFT is converge
Lecture #14
Discrete-Time Fourier Transform (DTFT)

1. From CTFT to DTFT


2. Convergence of the DTFT
3. The relation between DTFT and ZT
4. DTFT of signals with poles on the unit circle
5. Inverse DTFT
Convergence of the DTFT
We always have:  

 x[n ]e
n  
 jn
  x[n ]e
n  
 jn


  x[n ] e
n  
 jn

 DTFT exists when:


  x[n ]
n  

 x[n ]  
absolutely
summable
n  
Examples

1) Find DTFT of x(n) where x[n]  a u[n]


n

  j
1 e
X()   a e n  jn
  (ae ) 
 j n
 j
 DTFT nexists
0 when: n 0 1  ae  j
e a
if |a| < 1
Examples

2) Find DTFT of x(n) where y[n]  a u[n]


n

0 
1 a
Y()  a e
n  
n  jn
  (a e ) 
n 0
1 j n

1 a e
1 j
 j
e a
if |a| > 1
Examples

3) Find DTFT of p(n) where p[n]  u[n]  u[n  N ]


Show that this DTFT has a linear phase term
N 1
1 e  jN

P()  1.e  jn



n 0 1 e  j

Phase: -Ω(N-1)/2  linear in phase


Examples

4) Find DTFT of h(n) where h[n]   [n]  2 [n 1]  2 [n  2]   [n  3]


Show that this DTFT has a linear phase term
3
H()   h[n ]e  jn
 1  2e  j
 2e  j2 
e  j3 

n 0

Phase: -3Ω/2  linear in phase


Lecture #14
Discrete-Time Fourier Transform (DTFT)

1. From CTFT to DTFT


2. Convergence of the DTFT
3. The relation between DTFT and ZT
4. DTFT of signals with poles on the unit circle
5. Inverse DTFT
From ZT to DTFT

Recall ZT of x(t):

X( z)   x[n]z
n  
n

Evaluating X(z) on the unit circle, if the unit circle is in the


ROC of X(z)


X( z )
z e j 
  x[n]e
n  
 j n
 X()
From ZT to DTFT

DTFT is the Z-transform of x(n) evaluated on the unit circle

X ()  X ( z )
z e j 

If the ROC of the ZT contains the unit circle, we can get the
DTFT from the ZT by substitution z = ejΩ
Example

Find DTFT of x(n) where x[n]  a u[n] n

z
X ( z)  ROC :| z || a |
za
 DTFT exists when ROC includes the unit circle, which
means |a| < 1:
e j
X ( )  X ( z )  j
z  e j e a
Lecture #14
Discrete-Time Fourier Transform (DTFT)

1. From CTFT to DTFT


2. Convergence of the DTFT
3. The relation between DTFT and ZT
4. DTFT of signals with poles on the unit circle
5. Inverse DTFT
DTFT of signal with poles on the unit circle

DTFT of x[n] can be determined by evaluating its ZT


X(z) on the unit circle, provided that the unit circle lies
within the ROC, or none of poles is on the unit circle

Rescue: just extend the DTFT!!!


Allowing the DTFT to contain impulses at certain
frequencies corresponding to the location of the poles
Examples
Ex1: Consider this signal x[n] = u[n]
z
X ( z)  ROC :| z | 1  DTFT does not exist
z 1
Evaluate X(z) on the unit circle, except at z = 1 = ejk2π:
j j / 2 j / 2 j / 2
e e .e e
X ()  j  j / 2 j / 2  j / 2    k 2
e  1 e (e e ) 2 j sin( / 2)

1
X ( )    k 2
2 | sin( / 2) |

At Ω = k2π, X(Ω) contains impulses


Examples
Ex2: Consider this signal x[n] = (-1)nu[n]
z
X ( z)  ROC :| z | 1  DTFT does not exist
z 1
Evaluate X(z) on the unit circle, except at z = -1 = ej(2k+1)π

e j e j / 2 .e j / 2 e j / 2
X ()  j  j / 2 j / 2  j / 2    (2k  1)
e  1 e (e e ) 2 cos( / 2)

1
X ( )    (2k  1)
2 | cos( / 2) |

At Ω = (2k+1)π, X(Ω) contains impulses


Examples
Ex3: Consider this signal x[n] = (cosΩ0n)u[n]
z  cos 0
X ( z)  2 ROC :| z | 1  DTFT does not exist
z  2 z cos 0  1

Evaluate X(z) on the unit circle, except at


Lecture #14
Discrete-Time Fourier Transform (DTFT)

1. From CTFT to DTFT


2. Convergence of the DTFT
3. The relation between DTFT and ZT
4. DTFT of signals with poles on the unit circle
5. Inverse DTFT
The inverse of DTFT

X()   x[ n
n  
] e  j n

 
1 1  
 j n  j l

2  
j l
X()e d    
2   n  
x[n ]e 

e d

  1  j ( l n ) 
  x[n ]  e d  x[l]
n    2   

1

j n
x[n ]  X() e d
2  
Examples

1,    c
Ex1. Find x(n) from its DTFT X(Ω): X ( )  
0,  c    

1 c
1 jn c sin c n
x[n ]   1.e d  
jn c
.e c
2   c
2jn  c n
0.7

0.6

0.5

0.4

0.3

0.2

0.1

-0.1
-π -Ωc 0 Ωc π Ω -0.2
-20 -15 -10 -5 0 5 10 15 20
Examples

Ex2. Find x(n) from its DTFT X(Ω): X()  cos 2 


2
 e  e  1 j2  1 1  j2 
j  j

X ()     e   e
 2  4 2 4
1 1 1
 x[n ]  [n  2]  [n ]  [n  2]
4 2 4
1 0.5

0.9 0.45

0.8 0.4

0.7 0.35

0.6 0.3

0.5 0.25

0.4 0.2

0.3 0.15

0.2 0.1

0.1 0.05

0 0
-2 0 2 -5 0 5
Examples

e j
Ex3. Find x(n) from its DTFT X(Ω): X() 
e j  2

z
X(z)  | z | 2
z2
 x[n ]  2 u[n  1]
n
SUMMARY
Lecture #15
DTFT properties

1. Linearity
2. Time shifting
3. Frequency shifting and modulation
4. Differentiation in the frequency domain
5. Convolution in time domain
6. Convolution in frequency domain
7. Symmetry
Linearity

DTFT
ax[n ]  by[n]  aX()  bY()

The DTFT of a linear combination of two or more signals is


equal to the same linear combination of the DTFT of the
individual signals.
Example
n
Determine the DTFT of the signal x[n]  a if |a| < 1

a n  0
n
 1 
n

x[n ]   n  a u[n ]     u[n  1]


n

a n0   a  
z z 1
X ( z)   ROC :| a || z |
z  a z  1/ a |a |
j j j j
e e e ae
 X ()  j  j  j  j
e  a e  1 / a e  a ae  1
1  a2 1  a2
 j  j

1  ae  ae  a 2
1  2a cos   a 2
Example (cont)
1 For a = 0.8

0.5

0
-20 -15 -10 -5 0 5 10 15 20

10

0
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Lecture #15
DTFT properties

1. Linearity
2. Time shifting
3. Frequency shifting and modulation
4. Differentiation in the frequency domain
5. Convolution in time domain
6. Convolution in frequency domain
7. Symmetry
Time shifting

DTFT
x[n  n 0 ]  e  j n 0
X()
Proof: infer from the shifting property of ZT, then
evaluate ZT on the unit circle
ZT
x[n  n 0 ]  z X(z) n 0

 A shift in time causes a linear phase shift in


frequency – no change in DTFT magnitude
Lecture #15
DTFT properties

1. Linearity
2. Time shifting
3. Frequency shifting and modulation
4. Differentiation in the frequency domain
5. Convolution in time domain
6. Convolution in frequency domain
7. Symmetry
Frequency shifting and modulation
DTFT
e j 0 n
x[n ]  X (   0 )
DTFT
1 1
cos(0 n ) x[n ]  X (   0 )  X (   0 )
2 2
Proof:
DTFT  
e j 0 n
x[n]   (e
n  
j 0 n
x[n])e  jn
  x[ n
n  
]e  j (   0 ) n
 X (   0 )

1 j 0 n 1  j  0 n
cos( 0 n)  e  e  ...
2 2

Modulation causes a shift in frequency


Example

y1[n]  x[n] cos 0.5n and y2 [n]  x[n] cos n


X(Ω)

-2π -π -π/2 0 π/2 π 2π Ω


Lecture #15
DTFT properties

1. Linearity
2. Time shifting
3. Frequency shifting and modulation
4. Differentiation in the frequency domain
5. Convolution in time domain
6. Convolution in frequency domain
7. Symmetry
Differentiation in the frequency domain
DTFT dX ()
nx[n]  j
d

Proof: infer from the differentiation-in-the-z-domain property


of ZT, then evaluate ZT on the unit circle

Z dX ( z )
nx[n ]   z
dz
j dX () j dX () dX ()
DTFT
nx[n ]   e j
 e j
 j
d (e ) je d d
Lecture #15
DTFT properties

1. Linearity
2. Time shifting
3. Frequency shifting and modulation
4. Differentiation in the frequency domain
5. Convolution in time domain
6. Convolution in frequency domain
7. Symmetry
Convolution in time domain

DTFT
x1[n ]  x 2 [n]  X1 ().X2 ()

Proof:

Infer from the convolution-in-time-domain property


of ZT, then evaluate ZT on the unit circle

Convolution in time  Multiplication in frequency


Example
Given h[n] = anu[n], |a| < 1

Find its inverse system hi[n] but don’t use ZT

j
e
H ()  j
e a
j
e a  j
 H i()  j
 1  ae
e
 hi [n ]   [n ]  a [n  1]
Lecture #15
DTFT properties

1. Linearity
2. Time shifting
3. Frequency shifting and modulation
4. Differentiation in the frequency domain
5. Convolution in time domain
6. Convolution in frequency domain
7. Symmetry
Convolution in frequency domain
DTFT
1 1
x1[n ].x 2 [n ]  
2 2 
X1 ()X 2 (  )d  X1 ()  X 2 ()
2
DTFT 
x1[n ].x 2 [n ]   1
( x
n  
[ n ].x 2
[ n ])e  jn

Multiplication 
 1 
in time    X (  ) e j n
d  2
x [ n ]e  jn

n    2 2  
1

1  x [n ] e  j(  ) n d

  X (  ) 2 
2 2   n  
1

1

2 2 
 X1
(  ) X 2
(    ) d Convolution in
frequency
Lecture #15
DTFT properties

1. Linearity
2. Time shifting
3. Frequency shifting and modulation
4. Differentiation in the frequency domain
5. Convolution in time domain
6. Convolution in frequency domain
7. Symmetry
Symmetry properties
Consider x[n] and X(Ω) are complex-valued functions

X ()   x[
n  
n ]e  jn


 (x
n  
R [n ]  jx I [n ])(cos n  j sin n )

 X R ()  jX I ()

 X R()  (x
n  
R [n ] cos n  xI [n ] sin n )

 X I()    ( xR [n ] sin n  x I [n ] cos n )
n  
Symmetry properties
Consider x[n] and X(Ω) are complex-valued functions

1

jn
x[n ]  X (  ) e d
2 

1

2 
[ X R ()  jX I ()](cos n  j sin n )d

 xR [n ]  jx I [n ]

1
 xR [n ] 
2 [ X

R () cos n  X I () sin n ]d


1
 x I [n ] 
2 [ X

R () sin n  X I () cos n ]d
Real signal
x[n ]  xR [n ] and x I [n ]  0

 X R()   x[n] cos n  X
n  
( ) : even
R


 X I()    x[n ] sin n   X I( ) : odd
n  

 X * ()  X ( )
| X () | X 2 ()  X 2 () | X ( ) |: even
 R i
 X I ()
X ()  arctg  X ( ) : odd
 X R ()
Real signal (cont)

x[n ] even :

X R ()  x[0]  2 x[n ] cos n; X I ()  0
n 1

1
x[n ] 
  X
0
R () cos n d

x[n ] odd :

X I ()  2 x[n ] sin n; X R ()  0
n 1

1
x[n ]  
  X
0
I () sin n d
x[ n ] X ()
Symmetry x * [n ] X * ( )
properties x * [  n ]
X * ()
x R [n ] X e ()
jx I [n ] X o ()
xe [ n ] X R ()
xo [n ] jX I ()
X ()  X * ( )
any real signal | X () || X ( ) |
X ()  X ( )
real and even real and even
real and odd imaginary and odd
Lecture #16
Frequency spectrum of DT signals

1. Frequency spectrum
2. Amplitude spectrum and phase spectrum
3. Energy spectral density (ESD)
4. Bandwidth
Frequency spectrum

 Representation of the signal in the frequency domain


 Being generated via frequency analysis tools:
- CTFT for aperiodic CT signal
- CT Fourier series for periodic CT signal
- DTFT for aperiodic DT signal
- DT Fourier series for periodic DT signal
Frequency spectrum analysis

 The technical process of decomposing a complex signal into


simpler parts.
 The process of quantifying the various amounts (e.g. amplitudes,
powers, intensities, or phases), versus frequency.
 Summary:
- Aperiodic CT signals have aperiodic continuous-frequency spectra
- Periodic CT signals have aperiodic discrete-frequency spectra
- Aperiodic DT signals have periodic continuous-frequency spectra
- Periodic DT signals have periodic discrete-frequency spectra
Frequency range of some biological signals
Type of signal Frequency range (Hz)
Electroretinogram 0-20
Pneumogram 0-40
Electrocardiogram (ECG) 0-100
Electroencephalogram (EEG) 0-100
Electromyogram 10-200
Sphygmomanogram 0-200
100-4000
Frequency range of some biological signals

Type of signal Frequency range (Hz)


Wind noise 100-1000
Seismic exploration signals 10-100
Earthquake and nuclear explosion signals 0.01-10
Seismic signals 0.1-1
Frequency range of some EM signals
Type of signal Frequency range (Hz)
Radio broadcast 3x10-4 – 3x106
Shortwave radio signals 3x106 – 3x1010
Radar, satellite communications… 3x108 – 3x1010
Infrared 3x1011 – 3x1014
Visible light 3.7x1014 – 7.7x1014
Ultraviolet 3x1015 – 3x1016
X-rays 3x1017 – 3x1018
Frequency spectrum representation

 Real and imaginary parts:


X ()  X R ()  jX I ()

 Absolute and argument:


 X () 
jarctg I 

X () | X () | e j (  )  [ X R ()]2  [ X I ()]2 e  R 
X ( )

 Magnitude and phase:


X ()  A()e j (  )
A() can be positive, negative or zero
 ()  2k if A()  0
 ()  
 ()  ( 2k  1) if A()  0
Example

 Consider this even signal:


1,  2  n  2
x[n ]  
0, elsewhere
 Its frequency spectrum:
2
X ()  X R ()  1  2 cos n
n 1

 1  2 cos n  2 cos 2n


 Magnitude and phase:  A()  1  2 cos n  2 cos 2n
 ()  0
 Absolute and argument:| X () || 1  2 cos n  2 cos 2n |
0 if X ()  0
 ()  
 if X ()  0
Lecture #16
Frequency spectrum of DT signals

1. Frequency spectrum
2. Amplitude spectrum and phase spectrum
3. Energy spectral density (ESD)
4. Bandwidth
Amplitude spectrum and phase spectrum

j (  )
X ()  X () e
Amplitude spectrum Phase spectrum
 
X ( )   x[n]e
n  
 jn
; X (  )   x[n]e
n  
jn

 X ( )  X (  )
*

 | X() || X() | and X()  X()


Example

Find and plot amplitude spectrum and phase spectrum:

x[n] = u[n] - u[n - 4]


Using Matlab to plot amplitude
spectrum and phase spectrum

w = -2*pi:pi/255:2*pi; % freq. -2π  2π, resolution of π/255


X =4*sinc(2*w/pi)./sinc(w/(2*pi)).*exp(-j*1.5*w);
subplot(2,1,1);
plot(w/pi,abs(X)); % plot amplitude spectrum
subplot(2,1,2);
plot(w/pi,phase(X)); % plot phase spectrum
Amplitude spectrum
6

0
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

-2

-4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

Phase spectrum
Lecture #16
Frequency spectrum of DT signals

1. Frequency spectrum
2. Amplitude spectrum and phase spectrum
3. Energy spectral density (ESD)
4. Bandwidth
Energy spectral density (ESD)


    1 
E   | x[n] |   x[n]x [n]   x[n]
2 *
 X
*
()e  jn
d
n   n   n    2  

Changing the order of summation & intergral:

 
1  
 jn  1
E  X ()   x[n ]e d   X() d
* 2

2    2  
n  
Energy spectral density
Example

Given x[n] = anu[n], -1<a<1


1
X ( ) 
1  ae  j
Example
3

2.5
mat do pho nang luong

E
S 1.5

D
1

0.5

0
-3 -2 -1 0 1 2 3
tan so omega
Lecture #16
Frequency spectrum of DT signals

1. Frequency spectrum
2. Amplitude spectrum and phase spectrum
3. Energy spectral density (ESD)
4. Bandwidth
Bandwidth of a signal

 Bandwidth: the range of frequencies over which


the power or energy density spectrum is
concentrated.
 Ex: a signal has 95% of its ESD or PSD concentrated
in the range from F1 to F2 then the 95% bandwidth
of the signal is (F2-F1).
 Similarly, we may define 75% or 90% or 99%
bandwidth of the signal
Frequency-domain classification of signals

 Low-frequency signal: PSD or ESD concentrates about zero


frequency
 High-frequency signal: PSD or ESD concentrates at high
frequencies
 Bandpass signal: PSD or ESD concentrates somewhere in the
broad frequency range between low frequency and high frequency
- Narrowband signal: the bandwidth (F2-F1) is much smaller (by a
factor of 10+) than (F1+F2)/2
- Wideband signal
Frequency-domain classification of signals

Low-frequency High-frequency
signal signal

Ω Ω

Narrowband signal Wideband signal

Ω Ω
Lecture #17
Frequency-domain characteristics of LTI systems

1. Frequency response function


2. Response to complex exponential and sinusoidal
signals
3. Steady-state and transient response
4. Response to aperiodic input signals
Frequency response

 For impulse response, h(n), its DTFT is often called frequency


response H(Ω)
 H(Ω) completely characterizes a LTI system in the frequency
domain
 H(Ω) allows us to determine the steady-state response of the
system to any arbitrary weighted linear combination of sinusoids or
complex exponential
 H(Ω) exists if the system is BIBO stable

H ()  H () e j ()

Amplitude response Phase response


Determination of frequency response
1. From impulse response: Just take DTFT of h[n]

2. From difference equation:


- Take DTFT for both side
- Put the Y(Ω) on left side
- Divide both side by X(Ω)

3. From block diagram:


(1) Find the difference equation, then find H(Ω) from equation
(2) Put X(Ω)=1 as input, then directly find Y(Ω)=H(Ω)

4. From transfer function:


Evaluate H(z) on the unit circle
Example of frequency response

 A LTI causal system is described by the following equation:

y[n]  0.1y[n 1]  0.85 y[n  2]  x[n]  0.3x[n 1]


 First, checking the stability of the system (by using Matlab):
b = [1 -0.3];
a = [1 0.1 0.85];
zplane(b,a) % plot zeros and poles to check if all poles are
inside the unit circle

 Second, take DTFT for two sides:

1  0.3e  j
H () 
1  0.1e  j  0.85e  j 2
Example of amplitude and phase responses
1
H() 
1  0.4e  j
Example of amplitude and phase responses
1
H() 
1  0.4e  j
2

1.5

0.5
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

0.5

-0.5
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Example of moving average filter
1
y[n ]  ( x[n  1}  x[n ]  x[n  1])
3
1 j  j 1
H ()  ( e  1  e )  (1  2 cos )
3 3
Hence
1
| H () | | 1  2 cos  |
3
0, 0    2 / 3
H ()  
 , 2 / 3    
Example of moving average filter
1

0.5

0
0 0.2 0.4 0.6 0.8 1

0
0 0.2 0.4 0.6 0.8 1
Lecture #17
Frequency-domain characteristics of LTI systems

1. Frequency response function


2. Response to complex exponential and
sinusoidal signals
3. Steady-state and transient response
4. Response to aperiodic input signals
Response to complex exponential signals

x[n]  Ae j0 n
,   n   y[n ]   h[k] x[n  k]
k  

 

y[n]   h[ k
k  
] Ae j 0 ( n  k )

 
 A  h[k ] e  
 j 0 k  j  0 n
e
k   
j 0 n
 ( Ae ) H ( 0 )  x[n]H ( 0 )

y[n]  x[n]H (0 )  Ae j0n H (0 )


eigenfunction eigenvalue
Example
Determine the output signal of system h[n]  (1 / 2) n u[n]

j n
to this input signal x[n ]  Ae 2
,   n  

1
H ()   h[n ]e  jn

1  j
n   1 e
2
   1 2  j 26.60
At n  : H     e
2  2  1 j 2
1
5

    
2  j26.6 2A
j n j n  26.60 
y[n ]  x[n ]H   Ae . e 
0
2 
2
e
2 5 5
Response to sinusoidal signals
A j n A  j n
x[n ]  A cos(0 n )  e  e 0
, n  0

2 2
A j0n A  j0n
y[ n ]  e H (  0 )  e H (  0 )
2 2
A j0n jH ( 0 ) A  j0n
 e | H (0 ) | e  e | H (0 ) | e  jH ( 0 )
2 2
A
 | H (0 ) | e e
2

j0n jH ( 0 )
e  j0n  jH ( 0 )
e 
y[n]  A | H (0 ) | cos0n  H (0 )
Example

Determine the response of the system h[n]  (1 / 2) n u[n]


to the input signal

x[n ]  10  5 sin n  20 cos n,    n  
2
One more example

 A LTI causal system is described by the following equation:


y[n] = ay[n-1] + bx[n], a real and 0<a<1
a) Determine the amplitude and phase responses
b) Choose b so that the maximum value of |H(Ω)| is unity,
and sketch |H(Ω)| and <H(Ω) for a = 0.9
c) Determine the output of the system to the input:

  
x[n]  5  12 sin n  20 cos  n  ,    n  
2  4
One more example

a) The frequency response is:

b
H ( ) 
1  ae  j
The amplitude response and phase response are:
One more example

Choose a = 0.9 and b = 1-a :

1 a 0.1
| H () | 
1  a 2  2a cos  1.81  1.8 cos 
0.9 sin 
H ()  0  arctg
1  0.9 cos 
One more example
b) 1

0.5

0
0 0.2 0.4 0.6 0.8 1

-0.5

-1

-1.5
0 0.2 0.4 0.6 0.8 1
One more example
c) The amplitude and phase response at Ω=0, π/2, and π
respectively:

The output:
Lecture #17
Frequency-domain characteristics of LTI systems

1. Frequency response function


2. Response to complex exponential and sinusoidal
signals
3. Steady-state and transient response
4. Response to aperiodic input signals
Steady-state and transient response

The system response can be considered as a sum of 2 terms:

y[n]  yss[n]  ytr [n]


yss[n]: steady-state response
.

ytr[n]: transient response, decays toward zero as n  ∞


In many practical applications, the transient response is
unimportant and therefore, it is usually ignored
Example

The LTI system described by first-order equation:

y[n]  ay[n  1]  x[n] |a| < 1


jn
Its response to the input: x[n]  Ae ,n0
is determined as
.

n 1  j ( n 1)
Aa e A
y[n ]  a y[1] 
n 1
e jn
 e jn
, n0
1  ae  j 1  ae  j

where y[-1] is the initial condition


Example

n 1  j ( n 1)
Aa e A
y[n ]  a y[1] 
n 1
e jn
 e jn

1  ae  j
1  ae  j

Transient response Steady-state response

yss[n]  AH ()e jn


 AH (e )e j jn

M M
x[n ]   A k z n
k  yss[n ]   A k H(z k )z n
k
k 1 k 1
Lecture #17
Frequency-domain characteristics of LTI systems

1. Frequency response function


2. Response to complex exponential and sinusoidal
signals
3. Steady-state and transient response
4. Response to aperiodic input signals
Response to aperiodic input signals
x[n] y[n]
LTI
X(Ω) Y(Ω)

 From the convolution property, we have:

Y ( )  X ( ) H ( ) For   0 :
| Y () || X (
. ) || H ( ) | | Y (0 ) || X (0 ) || H (0 ) |
Y ()  X ()  H () Y (0 )  X (0 )  H (0 )

 The LTI system attenuates some frequency components and


amplifies other frequency components of the input
 The output can’t contain frequency components that are not
contained in the input
Example
 A LTI causal system is described by the following equation:
y[n] – 0.5y[n-1] = x[n]
Determine the spectrum and the ESD of the output when the
n
input signal is: 1
x[n ]    u[n ]
4
 The frequency response: H ()  1
1  12 e  j
The input spectrum: 1
 X () 
1  14 e  j
The output spectrum: 1
Y ()  X (). H () 
1  14 e j 1  12 e j 

1
ESD | Y () |  2

 45  cos  1716  12 cos  


Example

1.6 2

1.4
X(Ω) 1.5 H(Ω)
1.2
1
1

0.8 0.5
0 0.5 1 0 0.5 1

3 80
Y(Ω) 60 ESD
2
40
1
20

0 0
0 0.5 1 0 0.5 1
Lecture #18
Digital filters

1. Digital filters
2. Ideal filters
Filters

 Provide a convenient means to change the nature of a signal.


 Change the frequency characteristics of a signal in a specific way,
letting some frequencies in the signal pass while blocking others
 4 basic types:
.
- Low pass filter (LPF): lets low frequencies pass while blocking
high frequencies
- High pass filter (HPF): does the opposite
- Band pass filter (BPF): allows a band of frequencies to pass
- Band stop filter (BSF): block all frequencies inside a band
Digital filters

 DT systems that perform mathematical operations on


a DT signal to reduce or enhance certain aspects of that
signal.
 Digital filters are difference equations defined by a list
of filter coefficients
.

 Ex: Moving average filter:


y[n] = 1/3{x[n+1]+x[n]+x[n-1]}
Typical applications of digital filters

 Noise suppression: radio signal, biomedical signal, analog


media signal...
 Enhancement of selected frequency range: treble/bass
control, equalizers in audio, image edge enhancement…
 Bandwidth limiting:
.
aliasing prevention, interference
avoidance…
 Removal of specific frequencies: DC removal, 60 Hz signal
removal, notch filter…
 Special operations: differentiation, integration, phase shift…
Example of signal after lowpass filtering

.
Example of signal after highpass filtering

.
Lecture #18
Digital filters

1. Digital filters
2. Ideal filters
Ideal digital filters

Cx[n  n 0 ], 1    2
y[n ]  
0 , 

Y()  CX()e  j n 0
 X()H(), 1    2

Ce  j n , 1    2
0

H ( )  
0,  
| H() | C, 1    2 - Constant gain
()   n 0 , 1    2 - Linear phase
Amplitude responses for some
ideal digital filters
| H() | | H() |

 
c c

| H() | | H() |

 
a b a b
Ideal digital lowpass filters

1,   c
Frequency response: H L ( )  
0, c    

c
1 c sin c n
 1.e
jn
hL [n]  d 
2 c
 c n
0.7

0.6

0.5

0.4

0.3

0.2

0.1

-0.1
-π -Ωc 0 Ωc π Ω -0.2
-20 -15 -10 -5 0 5 10 15 20
Ideal digital highpass filters
Frequency response: 1, c    

H H ( )  
0,   c

sin  n c sin c n
H H ()  H L 2 ()  H L1 ()  h[n]  
n  c n
0.4

HL1
HL2
0.3

0.2

0.1

-0.1

-π -Ωc 0 Ωc π Ω -0.2

-0.3
-20 -15 -10 -5 0 5 10 15 20
Ideal digital bandpass filters
Frequency response: 1, c1    c 2  
H B ( )  
0, elsewhere

c 2 sin c 2n c1 sin c1n


H H ()  H L 2 ()  H L1 ()  h[n]  
 c 2 n  c1n
0.1

HL1 0.08

HL2 0.06

0.04

0.02

-0.02

-0.04

-π -Ωc2 0 Ωc1 π Ω -0.06

-0.08
-20 -15 -10 -5 0 5 10 15 20
Ideal digital bandstop filters
1,   c1
Frequency response: 
H B ()  0, c1    c 2

1, c 2    
c1 sin c1n c 2 sin c 2n
H H ()  H L ()  H H ()  h[n]    [n ] 
 c1n  c 2 n
0.6

HH HL 0.5

0.4

0.3

0.2

0.1

-π -Ωc2 0 Ωc1 π Ω 0

-0.1
-20 -15 -10 -5 0 5 10 15 20
Amplitude responses for some actual digital filters

You might also like