3 Time Domain Analysis
3 Time Domain Analysis
3 Time Domain Analysis
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
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 𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑎𝑎 𝑥𝑥 𝑛𝑛 ,
Additive
8
3.1 Discrete-Time Systems
• Linearity and superposition
• Additivity
𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝑥𝑥2 𝑛𝑛 = 𝒪𝒪 𝑥𝑥1 𝑛𝑛 + 𝒪𝒪 𝑥𝑥2 𝑛𝑛 = 𝑦𝑦1 𝑛𝑛 + 𝑦𝑦2 𝑛𝑛
Examples:
When 𝒪𝒪 𝑥𝑥 𝑛𝑛 = cos 𝑥𝑥 𝑛𝑛 ,
Non-additive
9
3.1 Discrete-Time Systems
• Linearity and Superposition
• Homogeneity (scalability)
𝒪𝒪 𝑘𝑘𝑥𝑥 𝑛𝑛 = 𝑘𝑘𝒪𝒪 𝑥𝑥 𝑛𝑛 = 𝑘𝑘𝑘𝑘 𝑛𝑛
Examples:
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 𝑛𝑛
11
3.1 Discrete-Time Systems
• Linear or non-linear?
𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = 𝑐𝑐 𝑥𝑥 𝑛𝑛 + 𝑑𝑑 ?
(Non-linear)
𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = x[n] 2
?
(Non-linear)
𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = 𝑐𝑐 𝑥𝑥 𝑛𝑛 + 𝑑𝑑 (Non-linear)
𝒪𝒪 𝑥𝑥[𝑛𝑛] = 𝑦𝑦 𝑛𝑛 = x[n] 2
(Non-linear)
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)
𝑦𝑦 𝑛𝑛 = 𝑛𝑛 𝑥𝑥 𝑛𝑛 (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
21
3.1 Discrete-Time Systems
22
3.2 Digital Filters
• Many digital filters can be represented by difference eq.
𝑥𝑥 𝑛𝑛 : input
𝑦𝑦 𝑛𝑛 :output
𝑥𝑥 𝑛𝑛 − 𝑘𝑘 , 𝑦𝑦 𝑛𝑛 − 𝑘𝑘 : time-shifted versions of 𝑥𝑥 𝑛𝑛 and 𝑦𝑦 𝑛𝑛
23
3.2 Digital Filters
• General form of an 𝑵𝑵-th order difference eq.:
• 𝐴𝐴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.:
25
3.2 Digital Filters
• Impulse response, 𝒉𝒉[𝒏𝒏]
• 𝑦𝑦 𝑛𝑛 when 𝑥𝑥 𝑛𝑛 = 𝛿𝛿[𝑛𝑛]
ℎ[𝑛𝑛]
𝛿𝛿[𝑛𝑛]
26
3.2 Digital Filters
• Impulse response, 𝒉𝒉[𝒏𝒏]
27
3.2 Digital Filters
• Impulse response, 𝒉𝒉[𝒏𝒏]
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
5 6 7
⋯
𝑛𝑛 𝑛𝑛
0 1 2 3 0 1 2 3 4
29
3.2 Digital Filters
• FIR (finite impulse response) filter
⇓
ℎ 𝑛𝑛 = 𝐵𝐵0 , 𝐵𝐵1 , ⋯ , 𝐵𝐵𝑀𝑀 (why?)
Finite length
30
3.2 Digital Filters
• IIR (infinite impulse response) filter
𝑦𝑦 𝑛𝑛 + 𝐴𝐴1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁
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
𝑦𝑦 𝑛𝑛 + 𝐴𝐴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
33
3.3 Response of Digital Filters
• Response of non-recursive filters (FIR filters)
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 + ⋯ + 𝐴𝐴𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁
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