3 Time Domain Analysis

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

3.

Time-Domain Analysis (1)


ICE3018: Digital Signal Processing & Design

School of Information & Communication Engineering


Inha University

Image credit: SINTEF


Goal

Learn time-domain analysis of discrete-time systems

2
3.1 Discrete-Time Systems
• Discrete-time systems = digital systems = digital filters
• Systems that process discrete-time signals
Analog signal

Analog-to-Digital Converter
(ADC)

Discrete-time signal

Discrete-time system

Discrete-time signal

Digital-to-Analog Converter
(ADC)

3
Analog signal
3.1 Discrete-Time Systems
• System representation
• Analog system: differential equation

𝑑𝑑 2 𝑥𝑥(𝑡𝑡) 𝑑𝑑𝑑𝑑(𝑡𝑡) 𝑑𝑑 2 𝑦𝑦(𝑡𝑡) 𝑑𝑑𝑦𝑦(𝑡𝑡)


𝑦𝑦 𝑡𝑡 = 𝐴𝐴 2
+ 𝐵𝐵 + 𝐶𝐶𝐶𝐶 𝑡𝑡 + 𝐷𝐷 2
+ 𝐸𝐸
𝑑𝑑𝑡𝑡 𝑑𝑑𝑑𝑑 𝑑𝑑𝑡𝑡 𝑑𝑑𝑑𝑑
𝑥𝑥 𝑡𝑡 : input, 𝑦𝑦 𝑡𝑡 : output, 𝐴𝐴~𝐸𝐸: coefficients

• Digital system: difference equation

𝐴𝐴0 𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁

= 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀


𝑥𝑥 𝑛𝑛 : input, 𝑦𝑦 𝑛𝑛 : output, 𝐴𝐴𝑛𝑛 , 𝐵𝐵𝑚𝑚 : coefficients

4
3.1 Discrete-Time Systems
• Why derivative in the analog domain becomes
difference in the digital domain?

5
3.1 Discrete-Time Systems
• Integration in the analog domain becomes
summation in the digital domain. Why?

6
3.1 Discrete-Time Systems
• Linearity and superposition
• Let 𝒪𝒪 represent the system operator

𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑦𝑦 𝑛𝑛
input output

Examples:
𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑎𝑎 𝑥𝑥 𝑛𝑛

𝒪𝒪 𝑥𝑥 𝑛𝑛 = cos 𝑥𝑥 𝑛𝑛

7
3.1 Discrete-Time Systems
• Linearity and superposition
• Additivity
𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝑥𝑥2 𝑛𝑛 = 𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝒪𝒪 𝑥𝑥2 𝑛𝑛 = 𝑦𝑦1 𝑛𝑛 + 𝑦𝑦2 𝑛𝑛

Examples:

When 𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑎𝑎 𝑥𝑥 𝑛𝑛 ,

𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝑥𝑥2 𝑛𝑛 = 𝑎𝑎 𝑥𝑥1 𝑛𝑛 + 𝑥𝑥2 𝑛𝑛

𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝒪𝒪 𝑥𝑥2 𝑛𝑛 = 𝑎𝑎 𝑥𝑥1 𝑛𝑛 + 𝑎𝑎 𝑥𝑥2 𝑛𝑛

𝑎𝑎 𝑥𝑥1 𝑛𝑛 + 𝑥𝑥2 𝑛𝑛 = 𝑎𝑎 𝑥𝑥1 𝑛𝑛 + 𝑎𝑎 𝑥𝑥2 𝑛𝑛

Additive
8
3.1 Discrete-Time Systems
• Linearity and superposition
• Additivity
𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝑥𝑥2 𝑛𝑛 = 𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝒪𝒪 𝑥𝑥2 𝑛𝑛 = 𝑦𝑦1 𝑛𝑛 + 𝑦𝑦2 𝑛𝑛

Examples:

When 𝒪𝒪 𝑥𝑥 𝑛𝑛 = cos 𝑥𝑥 𝑛𝑛 ,

𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝑥𝑥2 𝑛𝑛 = cos 𝑥𝑥1 𝑛𝑛 + 𝑥𝑥2 𝑛𝑛

𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝒪𝒪 𝑥𝑥2 𝑛𝑛 = cos 𝑥𝑥1 𝑛𝑛 + cos 𝑥𝑥2 𝑛𝑛

cos 𝑥𝑥1 𝑛𝑛 + 𝑥𝑥2 𝑛𝑛 ≠ cos 𝑥𝑥1 𝑛𝑛 + cos 𝑥𝑥2 𝑛𝑛

Non-additive
9
3.1 Discrete-Time Systems
• Linearity and Superposition
• Homogeneity (scalability)
𝒪𝒪 𝑘𝑘𝑥𝑥 𝑛𝑛 = 𝑘𝑘𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑘𝑘𝑘𝑘 𝑛𝑛

Examples:

When 𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑎𝑎 𝑥𝑥 𝑛𝑛 , When 𝒪𝒪 𝑥𝑥 𝑛𝑛 = cos 𝑥𝑥 𝑛𝑛 ,

𝒪𝒪 𝑘𝑘𝑥𝑥 𝑛𝑛 = 𝑎𝑎 𝑘𝑘𝑥𝑥 𝑛𝑛 𝒪𝒪 𝑘𝑘𝑥𝑥 𝑛𝑛 = cos 𝑘𝑘𝑥𝑥 𝑛𝑛

𝑘𝑘𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑘𝑘𝑘𝑘 𝑥𝑥 𝑛𝑛 𝑘𝑘𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑘𝑘 cos 𝑥𝑥 𝑛𝑛

𝑎𝑎 𝑘𝑘𝑥𝑥 𝑛𝑛 = 𝑘𝑘𝑘𝑘 𝑥𝑥 𝑛𝑛 cos 𝑘𝑘𝑥𝑥 𝑛𝑛 ≠ 𝑘𝑘 cos 𝑥𝑥 𝑛𝑛

Homogeneous Non-homogeneous
10
3.1 Discrete-Time Systems
• Linearity and Superposition
• Linearity = additivity + homogeneity

𝒪𝒪 𝑘𝑘1 𝑥𝑥1 𝑛𝑛 + 𝑘𝑘2 𝑥𝑥2 𝑛𝑛 = 𝑘𝑘1 𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝑘𝑘2 𝒪𝒪 𝑥𝑥2 𝑛𝑛 = 𝑘𝑘1 𝑦𝑦1 𝑛𝑛 + 𝑘𝑘2 𝑦𝑦2 𝑛𝑛
Superposition of 𝑦𝑦1 𝑛𝑛 and 𝑦𝑦2 𝑛𝑛

𝒪𝒪 is termed a linear operator if it obeys superposition

11
3.1 Discrete-Time Systems
• Linear or non-linear?

𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = 𝑐𝑐 𝑥𝑥 𝑛𝑛 + 𝑑𝑑 ?
(Non-linear)

𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = x[n] 2
?
(Non-linear)

𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = log x[n] ?


(Non-linear)

𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = 𝑎𝑎𝑛𝑛 x[n] ?


(Linear)

Check if 𝒪𝒪 𝑘𝑘1 𝑥𝑥1 𝑛𝑛 + 𝑘𝑘2 𝑥𝑥2 𝑛𝑛 = 𝑘𝑘1 𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝑘𝑘2 𝒪𝒪 𝑥𝑥2 𝑛𝑛 !


12
3.1 Discrete-Time Systems
• Linear or non-linear?

𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = 𝑐𝑐 𝑥𝑥 𝑛𝑛 + 𝑑𝑑 (Non-linear)

𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = x[n] 2
(Non-linear)

𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = log x[n] (Non-linear)

𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = 𝑎𝑎𝑛𝑛 x[n] (Linear)

Check if 𝒪𝒪 𝑘𝑘1 𝑥𝑥1 𝑛𝑛 + 𝑘𝑘2 𝑥𝑥2 𝑛𝑛 = 𝑘𝑘1 𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝑘𝑘2 𝒪𝒪 𝑥𝑥2 𝑛𝑛 !


13
3.1 Discrete-Time Systems
• Time-invariance
• The system does not change with time

When 𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑦𝑦 𝑛𝑛 ,
𝒪𝒪 𝑥𝑥 𝑛𝑛 − 𝑛𝑛0 = 𝑦𝑦 𝑛𝑛 − 𝑛𝑛0

Example:

14
3.1 Discrete-Time Systems
• Linear time-invariant systems (LTI systems)
• The systems that are both linear and time-invariant
• We can check linearity and time-invariance as follows:

• Linearity
𝒪𝒪 𝑘𝑘1 𝑥𝑥1 𝑛𝑛 + 𝑘𝑘2 𝑥𝑥2 𝑛𝑛 = 𝑘𝑘1 𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝑘𝑘2 𝒪𝒪 𝑥𝑥2 𝑛𝑛 = 𝑘𝑘1 𝑦𝑦1 𝑛𝑛 + 𝑘𝑘2 𝑦𝑦2 𝑛𝑛

• Time-invariance
𝒪𝒪 𝑥𝑥 𝑛𝑛 − 𝑛𝑛0 = 𝑦𝑦 𝑛𝑛 − 𝑛𝑛0

15
3.1 Discrete-Time Systems
• Linear? time-invariant?
Let 𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑦𝑦 𝑛𝑛
𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 𝑥𝑥 𝑛𝑛 − 1 ?
(Non-linear, time-invariant)

𝑦𝑦 𝑛𝑛 = 2𝑥𝑥 𝑛𝑛 𝑥𝑥 𝑛𝑛 ?
(Non-linear, time-invariant)

𝑦𝑦 𝑛𝑛 = cos 𝑥𝑥 𝑛𝑛 ?
(Non-linear, time-invariant)

𝑦𝑦 𝑛𝑛 = 𝑛𝑛 𝑥𝑥 𝑛𝑛 ?
(Linear, time-variant)

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 2𝑛𝑛 ?
(Linear, time-variant)

𝑦𝑦 𝑛𝑛 = 𝑎𝑎𝑛𝑛 𝑥𝑥 𝑛𝑛 ?
(Linear, time-variant)

𝑦𝑦 𝑛𝑛 = 𝑎𝑎 𝑥𝑥 𝑛𝑛 ?
(Linear, time-invariant)

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 3 ?
(Linear, time-invariant)
Linearity: check if 𝒪𝒪 𝑘𝑘1 𝑥𝑥1 𝑛𝑛 + 𝑘𝑘2 𝑥𝑥2 𝑛𝑛 = 𝑘𝑘1 𝑦𝑦1 𝑛𝑛 + 𝑘𝑘2 𝑦𝑦2 𝑛𝑛
Time-invariance: check if 𝒪𝒪 𝑥𝑥 𝑛𝑛 − 𝑛𝑛0 = 𝑦𝑦 𝑛𝑛 − 𝑛𝑛0 16
3.1 Discrete-Time Systems
• Linear? time-invariant?
Let 𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑦𝑦 𝑛𝑛
𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 𝑥𝑥 𝑛𝑛 − 1 (Non-linear, time-invariant)

𝑦𝑦 𝑛𝑛 = 2𝑥𝑥 𝑛𝑛 𝑥𝑥 𝑛𝑛 (Non-linear, time-invariant)

𝑦𝑦 𝑛𝑛 = cos 𝑥𝑥 𝑛𝑛 (Non-linear, time-invariant)

𝑦𝑦 𝑛𝑛 = 𝑛𝑛 𝑥𝑥 𝑛𝑛 (Linear, time-variant)

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 2𝑛𝑛 (Linear, time-variant)

𝑦𝑦 𝑛𝑛 = 𝑎𝑎𝑛𝑛 𝑥𝑥 𝑛𝑛 (Linear, time-variant)

𝑦𝑦 𝑛𝑛 = 𝑎𝑎 𝑥𝑥 𝑛𝑛 (Linear, time-invariant)

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 3 (Linear, time-invariant)
Linearity: check if 𝒪𝒪 𝑘𝑘1 𝑥𝑥1 𝑛𝑛 + 𝑘𝑘2 𝑥𝑥2 𝑛𝑛 = 𝑘𝑘1 𝑦𝑦1 𝑛𝑛 + 𝑘𝑘2 𝑦𝑦2 𝑛𝑛
Time-invariance: check if 𝒪𝒪 𝑥𝑥 𝑛𝑛 − 𝑛𝑛0 = 𝑦𝑦 𝑛𝑛 − 𝑛𝑛0 17
3.1 Discrete-Time Systems
• Causality
• Causal system: the present response 𝑦𝑦[𝑛𝑛] cannot
depend on future values of the input such as 𝑥𝑥[𝑛𝑛 + 2]

• Causal or non-causal?

Let 𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑦𝑦 𝑛𝑛

𝑦𝑦 𝑛𝑛 = 2𝑛𝑛+1 𝑥𝑥 𝑛𝑛 ?
(causal)

𝑦𝑦 𝑛𝑛 = 2𝑛𝑛 𝑥𝑥 𝑛𝑛 + 1 ?
(non-causal)

𝑦𝑦 𝑛𝑛 − 2𝑦𝑦 𝑛𝑛 − 1 = 𝑥𝑥 𝑛𝑛 + 1 ?
(non-causal)

𝑦𝑦 𝑛𝑛 + 1 − 2𝑦𝑦 𝑛𝑛 − 2 = 𝑥𝑥 𝑛𝑛 + 1 ?
(causal)
18
3.1 Discrete-Time Systems
• Causality
• Causal system: the present response 𝑦𝑦[𝑛𝑛] cannot
depend on future values of the input such as 𝑥𝑥[𝑛𝑛 + 2]

• Causal or non-causal?

Let 𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑦𝑦 𝑛𝑛

𝑦𝑦 𝑛𝑛 = 2𝑛𝑛+1 𝑥𝑥 𝑛𝑛 (causal)

𝑦𝑦 𝑛𝑛 = 2𝑛𝑛 𝑥𝑥 𝑛𝑛 + 1 (non-causal)

𝑦𝑦 𝑛𝑛 − 2𝑦𝑦 𝑛𝑛 − 1 = 𝑥𝑥 𝑛𝑛 + 1 (non-causal)

𝑦𝑦 𝑛𝑛 + 1 − 2𝑦𝑦 𝑛𝑛 − 2 = 𝑥𝑥 𝑛𝑛 + 1 (causal)
19
3.1 Discrete-Time Systems
• Static (memoryless) vs. dynamic (memory)
• The system is static if 𝑦𝑦 𝑛𝑛 + 𝛼𝛼 depends only on 𝑥𝑥 𝑛𝑛 + 𝛼𝛼
• Otherwise, the system is dynamic

20
3.1 Discrete-Time Systems

System Linear? Time-invariant? Static? Causal? Stable?


𝑦𝑦 𝑛𝑛 = 𝑥𝑥[−𝑛𝑛]
𝑦𝑦 𝑛𝑛 = 𝑥𝑥[2𝑛𝑛]
𝑦𝑦 𝑛𝑛 = 𝑥𝑥[𝑛𝑛/2]
𝑦𝑦 𝑛𝑛 = 𝑥𝑥[𝑛𝑛 − 𝑛𝑛0 ]
𝑦𝑦 𝑛𝑛 = 𝑥𝑥[𝑛𝑛]
𝑛𝑛0 > 0

21
3.1 Discrete-Time Systems

System Linear? Time-invariant? Static? Causal? Stable?


𝑦𝑦 𝑛𝑛 = 𝑥𝑥[−𝑛𝑛] Y N N N Y
𝑦𝑦 𝑛𝑛 = 𝑥𝑥[2𝑛𝑛] Y N N N Y
𝑦𝑦 𝑛𝑛 = 𝑥𝑥[𝑛𝑛/2] Y N N N Y
𝑦𝑦 𝑛𝑛 = 𝑥𝑥[𝑛𝑛 − 𝑛𝑛0 ] Y Y N Y Y
𝑦𝑦 𝑛𝑛 = 𝑥𝑥[𝑛𝑛] N Y Y Y Y
𝑛𝑛0 > 0

22
3.2 Digital Filters
• Many digital filters can be represented by difference eq.

• General form of an 𝑵𝑵-th order difference eq.:

𝐴𝐴0 𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁

= 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀

𝑥𝑥 𝑛𝑛 : input
𝑦𝑦 𝑛𝑛 :output
𝑥𝑥 𝑛𝑛 − 𝑘𝑘 , 𝑦𝑦 𝑛𝑛 − 𝑘𝑘 : time-shifted versions of 𝑥𝑥 𝑛𝑛 and 𝑦𝑦 𝑛𝑛

23
3.2 Digital Filters
• General form of an 𝑵𝑵-th order difference eq.:

𝐴𝐴0 𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁

= 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀

• 𝐴𝐴0 = 1 by convention
• Order 𝑁𝑁: the largest delay in output
• 𝐴𝐴𝑘𝑘 , 𝐵𝐵𝑘𝑘 : constant coefficients for an LTI system
• If 𝐴𝐴𝑘𝑘 and 𝐵𝐵𝑘𝑘 are constant, it is called LCCDE (linear
constant coefficient difference equation)

24
3.2 Digital Filters
• General form of an 𝑵𝑵-th order difference eq.:

𝐴𝐴0 𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁

= 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀

• The output depends on the input and initial conditions


• Initial conditions: 𝑦𝑦 −1 , 𝑦𝑦 −2 , ⋯, 𝑦𝑦 −𝑁𝑁
• If initial conditions are zero, the systems are said to be
relaxed
• LCCDE with zero initial conditions → LTI system

25
3.2 Digital Filters
• Impulse response, 𝒉𝒉[𝒏𝒏]
• 𝑦𝑦 𝑛𝑛 when 𝑥𝑥 𝑛𝑛 = 𝛿𝛿[𝑛𝑛]

ℎ[𝑛𝑛]

𝐴𝐴0 𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁

= 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀

𝛿𝛿[𝑛𝑛]

26
3.2 Digital Filters
• Impulse response, 𝒉𝒉[𝒏𝒏]

Input 𝑥𝑥[𝑛𝑛] 𝐴𝐴0 𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁


Output 𝑦𝑦[𝑛𝑛]
= 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀
𝑥𝑥[𝑛𝑛] 𝑦𝑦[𝑛𝑛]

𝛿𝛿[𝑛𝑛] System ℎ[𝑛𝑛]


𝑛𝑛 𝑛𝑛
0 0

27
3.2 Digital Filters
• Impulse response, 𝒉𝒉[𝒏𝒏]

Input 𝑥𝑥[𝑛𝑛] 𝐴𝐴0 𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁


Output 𝑦𝑦[𝑛𝑛]
= 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀
𝑥𝑥[𝑛𝑛] 𝑦𝑦[𝑛𝑛]
LTI
𝛿𝛿[𝑛𝑛] ℎ[𝑛𝑛]
System
𝑛𝑛 𝑛𝑛
0 0

If the system is LTI (linear time-invariant), the system


can be completely described by ℎ[𝑛𝑛]

28
3.2 Digital Filters
• Impulse response, 𝒉𝒉[𝒏𝒏]
• An important filter classification is based on the length
of ℎ[𝑛𝑛]
• Finite impulse response (FIR) filter
• Infinite impulse response (IIR) filter

FIR filter IIR filter


ℎ[𝑛𝑛] ℎ[𝑛𝑛]

5 6 7

𝑛𝑛 𝑛𝑛
0 1 2 3 0 1 2 3 4

Finite length Infinite length

29
3.2 Digital Filters
• FIR (finite impulse response) filter

𝑦𝑦 𝑛𝑛 = 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀

• No dependence on past values of the response


• Response depends only on the input
• Non-recursive filter
• Impulse response ℎ 𝑛𝑛 :


ℎ 𝑛𝑛 = 𝐵𝐵0 , 𝐵𝐵1 , ⋯ , 𝐵𝐵𝑀𝑀 (why?)

Finite length

30
3.2 Digital Filters
• IIR (infinite impulse response) filter

𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁

= 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀

• Response depends on not only input but also its past


values 𝑦𝑦 𝑛𝑛 − 𝑘𝑘
• Recursive filter
• Impulse response ℎ 𝑛𝑛 is usually of infinite duration

31
3.3 Response of Digital Filters
• Digital filter response depends on
• Input
• Initial conditions
• States prior to the application of the input
• Systems with zero initial conditions are said to be relaxed

Response or output Initial conditions

𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁
[Digital filter
= 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀 representation]

Input

32
3.3 Response of Digital Filters
• Digital filters can be analyzed in the time-domain using
• Difference equation
• Applies to all kinds of systems (even non-linear, time-
varying systems)
• Impulse response
• Describes a relaxed LTI system

• More analysis methods available in the frequency-


domain (learn later)

33
3.3 Response of Digital Filters
• Response of non-recursive filters (FIR filters)

𝑦𝑦 𝑛𝑛 = 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀

• Output 𝑦𝑦 𝑛𝑛 depends only on input 𝑥𝑥 𝑛𝑛 (and its shifted


versions 𝑥𝑥 𝑛𝑛 − 𝑘𝑘 )
• Output is simply weighted sum of the input terms

34
3.3 Response of Digital Filters
• Response of non-recursive filters (FIR filters)

Example:
Q:
𝑦𝑦 𝑛𝑛 = 2𝑥𝑥 𝑛𝑛 − 3𝑥𝑥 𝑛𝑛 − 2 . When 𝑥𝑥 𝑛𝑛 = 0.5 𝑛𝑛 𝑢𝑢(𝑛𝑛), what are 𝑦𝑦 1 and 𝑦𝑦 2 ?

A:
𝑛𝑛 𝑛𝑛−2
𝑦𝑦 𝑛𝑛 = 2 0.5 𝑢𝑢 𝑛𝑛 − 3 0.5 𝑢𝑢(𝑛𝑛 − 2).
𝑦𝑦 1 = 2 0.5 1 = 1 and
𝑦𝑦 2 = 2 0.5 2 − 3 0.5 0 = 0.5 − 3 = −2.5

35
3.3 Response of Digital Filters
• Response of recursive filters

𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁

= 𝐵𝐵0 𝑥𝑥 𝑛𝑛 + 𝐵𝐵1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝐵𝐵𝑀𝑀 𝑥𝑥 𝑛𝑛 − 𝑀𝑀

• Output 𝑦𝑦 𝑛𝑛 depends on its past values 𝑦𝑦 𝑛𝑛 − 𝑘𝑘 and


input 𝑥𝑥 𝑛𝑛 (and its shifted versions 𝑥𝑥 𝑛𝑛 − 𝑘𝑘 )
• Past values 𝑦𝑦 𝑛𝑛 − 𝑘𝑘 are called initial conditions
• Response 𝑦𝑦 𝑛𝑛 can be computed by recursion

36
3.3 Response of Digital Filters
• Response of recursive filters

Example:
Q:
𝑦𝑦 𝑛𝑛 = 𝑎𝑎1 𝑦𝑦 𝑛𝑛 − 1 + 𝑏𝑏0 𝑥𝑥 𝑛𝑛 . When 𝑥𝑥 𝑛𝑛 = 𝑢𝑢(𝑛𝑛), what is 𝑦𝑦 𝑛𝑛 ?

A:
𝑦𝑦 0 = 𝑎𝑎1 𝑦𝑦 −1 + 𝑏𝑏0 𝑢𝑢 0 = 𝑏𝑏0
𝑦𝑦 1 = 𝑎𝑎1 𝑦𝑦 0 + 𝑏𝑏0 𝑢𝑢 1 = 𝑎𝑎1 𝑏𝑏0 + 𝑏𝑏0 = 𝑏𝑏0 1 + 𝑎𝑎1
𝑦𝑦 2 = 𝑎𝑎1 𝑦𝑦 1 + 𝑏𝑏0 𝑢𝑢 2 = 𝑎𝑎1 𝑎𝑎1 𝑏𝑏0 + 𝑏𝑏0 + 𝑏𝑏0 = 𝑏𝑏0 1 + 𝑎𝑎1 + 𝑎𝑎12
𝑦𝑦 𝑛𝑛 = 𝑏𝑏0 1 + 𝑎𝑎1 + 𝑎𝑎12 + ⋯ + 𝑎𝑎1𝑛𝑛−1 + 𝑎𝑎1𝑛𝑛 (geometric sequence)

𝑏𝑏0 1 − 𝑎𝑎1𝑛𝑛+1
𝑦𝑦 𝑛𝑛 =
1 − 𝑎𝑎1 37

You might also like