Beruflich Dokumente
Kultur Dokumente
x(t) y(t)
5
4 x1 [n] 4 4 y1 [n]
3 3
n n
x2 [n] y2 [n]
2
n n
-1 -1 -1 -1
ee120 - fall’15 - lecture 1 notes 2
n n
1 δ[n]
∞
y[n] = ∑ x [k ]h[n − k] ”convolution sum” (6)
k=−∞
1 δ[n] h[n]
1 1 1
3 3 3
n n
h[n − k]
1 1 1
3 3 3
n
n−1 n+1
k
ee120 - fall’15 - lecture 1 notes 3
∞
y[n] = ∑ x [k]h[n − k]
k =−∞
n +1
1 1
= ∑ 3
x [k] = ( x [n − 1] + x [n] + x [n + 1])
3
(9)
k = n −1
δ[n] h[n]
n n
Next, let h∆ (t) denote the response of the system to δ∆ (t) and note
from the LTI property that the response to each term in the sum
above is x (k∆)∆h∆ (t − k∆). Thus, the response to x (t) is
∞ Z ∞
y(t) = lim
∆ →0
∑ x (k∆)h∆ (t − k∆)∆ =
−∞
x (τ )h(t − τ )dτ. (13)
k =−∞
ee120 - fall’15 - lecture 1 notes 4
x (t)
t
∆ 2∆ ··· k∆
Proof.
∞ ∞
∑ x [k]h[n − k] = ∑ x [ n − r ] h [r ], (15)
k =−∞ r =−∞
2. Distributive Property:
h1 [n]
x[n] y[n] ≡ x[n] h1 [n] + h2 [n] y[n]
h2 [n]
3. Associative Property:
Proof.
Sufficiency: Suppose ∑∞ k =−∞ | h [ k ]| < ∞ and show that bounded
inputs give bounded outputs:
| x [n]| ≤ B for all n, for some B > 0.
|y[n]| = | ∑k x [n − k]h[k]| ≤ ∑k | x [n − k]| · |h[k]| ≤ B ∑k |h[k]| < ∞.
Necessity: To prove ”stable ⇒ ∑k |h[k ]| < ∞” prove the contraposi-
tive:
00
∑ |h[k]| = ∞ ⇒ unstable.00 (22)
k
Let x [n] = sgn{ h[−n]}. Then, since y[n] = ∑∞
k =−∞ h [ k ] x [ n − k ]:
∞
y [0] = ∑ h[k] x [−k] = ∑ h[k]sign{h[k]} = ∑ |h[k]| = ∞. (23)
k =−∞ k k
Examples:
1. Moving average system above:
1 1 1
∑ |h[k]| = 3 + 3 + 3 = 1 → stable. (24)
k
Rt 1
2. Integrator: y(t) = −∞ x (τ )dτ. h(t) is the unit step (see Figure 3),
and Z ∞ t
|h(τ )|dτ = ∞. (25) Figure 3: UnitStep
−∞
EE120 - Fall’15 - Lecture 2 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
31 August 2015
N M
dk y(t) dk x (t)
x (t)→ ∑ ak dtk
= ∑ b k
dtk
→ y(t) (1)
k =0 k =0
dy dy N −1
If the initial conditions are zero: y(0) = dt (0) = ... = dt N −1 (0) = 0,
then this is an LTI system. Nonzero initial conditions destroy linear-
ity: if y(0) 6= 0, then x (t) ≡ 0 does not imply y(t) ≡ 0.
Example:
+
+ dy −y + x
x(t)
− C y(t) C = (2)
− dt R
N M
x [n]→ ∑ a k y [ n − k ] = ∑ bk x [ n − k ] → y [ n ] (3)
k =0 k =0
b1 b2 bM
b0 ...
1 2 M n
finite duration
Note that a FIR system is always stable, because the sum ∑n |h[n]| is
over a finite duration and, thus, finite.
h[n] 1
...
n
infinite duration
ee120 - fall’15 - lecture 2 notes 3
N M
y[n] = − ∑ ak y[n − k ] + ∑ bk x [ n − k ] (8)
k =1 k =0
b0
x [n] + + y[n]
D D
b1 − a1
+ +
D D
b2 − a2
+ +
D D D
− a1 b1 =⇒ − a1 b1
+ + + +
D D D
− a2 b2 − a2 b2
+ + + +
Note that a FIR system can be implemented with the blue block only;
no feedback loops are required.
ee120 - fall’15 - lecture 2 notes 4
Complex Exponentials
Continuous-time:
s=σ + jω
x (t) = est , s ∈ C −−−−−→ x (t) = |{z}
eσt e jωt
|{z} (9)
envelope periodic
Discrete-time:
z=re jω
x [n] = zn , z ∈ C −−−−→ x [n] = r n e jωn (10)
Figures 1 and 2 on page 7 plot est and zn for various values of s and z
in the complex plane.
Z ∞ Z ∞
s(t−τ ) −sτ
x (t) → h(t) → y(t) = h(τ )e dτ = h(τ )e dτ est
−∞ −∞
| {z }
, H (s)
(11)
∞ ∞
!
x [n] → h[n] → y[n] = ∑ h[k]z n−k
= ∑ h[k]z −k
zn (12)
k =−∞ −∞
| {z }
, H (z)
H (s) and H (z) are called ”transfer functions” or ”system functions.”
Example: Find the transfer function H (s) for y(t) = x (t − 3).
If x (t) = est then
y(t) = x (t − 3) = es(t−3) = |{z}
e−3s est . (13)
= H (s)
R∞
H ( jω ) = −∞ h(τ )e− jωτ dτ
(16)
H (e jω ) = ∑ h[k]e− jωk
ee120 - fall’15 - lecture 2 notes 5
Filtering
Section 3.9 in Oppenheim & Willsky
LTI system designed such that H ( jω ) (H (e jω ) in DT) is zero or close
to zero for frequencies to be eliminated.
Example: Why is the moving average system a low-pass filter?
M
1
y[n] = ∑
2M + 1 k=− M
x [n − k] (17)
h[n]
1
2M+1
−M M
M
1 e jωM
H (e jω ) = ∑ 2M + 1
e− jωk =
2M + 1 |
1 + e− jω + ... + e− jω2M
k =− M {z }
1−e− jω (2M+1) if w6=02
1−e− jω
. 2
since this is a geometric series
− jω ( M+ 12 ) jω ( M+ 21 ) − jω ( M+ 21 )
1 e e −e
= e jωM −
2M + 1
| e
{z
jω/2
}| e jω/2 − e− jω/2
{z }
=1 sin(ω ( M+1/2))
sin(ω/2)
(
jω
1 if ω = 0
H (e ) = 1 sin(ω ( M+1/2)) (18)
2M +1 sin(ω/2)
ω 6= 0
2π π 2π
2M +1
h[n] 1/2
n
−1/2
∞
1 1 − jω 1 1
H (e jω ) = ∑ h[n]e− jωn = − e
2 2
= (1 − e− jω ) = e− jω/2 2jsin(ω/2)
2 2
n=−∞
(19)
|H(ejω )| = sin(ω/2)
1
π 2π ω
dy
R RC + y = x y (0) = 0
dt
+
x(t) + C y(t) x = e jωt → y = H ( jω )e jωt
−
−
d n o
RC H ( jω )e jωt + H ( jω )e jωt = e jωt
dt
jωRCH ( jω ) + H ( jω ) = 1
Therefore,
1
H ( jω ) = (20)
1 + jωRC
1 |H(jω)| = √ 1
1+(RCω)2
ω
ee120 - fall’15 - lecture 2 notes 7
2
values of s in the complex plane.
1.5
1
Note that est is oscillatory when s has
1
0.8
0.6
0.8
0.6
1
1
0
an imaginary component. It grows
0.5
0.2 0.2
0 0
0 -1
-0.4 -0.4
-0.5
-0.6 -0.6
-2
-0.8
1.5
1 2
1
1
0.8
0.8
0.6
0.6
1
0.4 0.5
0.4
0.2
0.2
0
0
0 0
-0.2
-0.2
-0.4
-0.4
-0.5
-1
-0.6
-0.6
-0.8 -0.8
-1 -1
-1
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 -2
-1.5
0 1 2 3 4 5 6 7 8 9 10
-3
0 1 2 3 4 5 6 7 8 9 10
2
2.8
1.8
2.6
1.6
2.4
1.4
2.2
1.2
2
1
1 1
0.9
0.9
1.8
0.8 0.8
0.8
0.7
1.6
0.6 0.7 0.6
0.5
0.6
0.4 1.4
0.4
0.5
0.3
0.2 1.2
0.4
0.2
0.1
0 1 2 3 4 5 6 7 8 9 10
0.3
0 1 2 3 4 5 6 7 8 9 10 0 1
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Re{s}
2
values of z in the complex plane. It
grows unbounded when |z| > 1, decays
0.8
0.6
1
0.4
0.2
0
0
to zero when |z| < 1, and has constant
-0.2
-0.4 -1
amplitude when z is on the unit circle
-0.6
-0.8
0 5 10 15 20 25
-2
(|z| = 1).
4 -3
0 5 10 15 20 25
3
Im{z} 3.5
2 3
2.5
1
2
0
1.5
-1
1
-2
0.5
-3
0
0 5 10 15 20 25
-4
0 5 10 15 20 25
Re{z}
2
1.5
1.5
1
0.5
0
0.5
-0.5
-1 0
-1.5
-0.5
0 5 10 15 20 25
-2
0 5 10 15 20 25
2
1
0.9
0.8
1.5 0.7
0.6
0.5
1 0.4
0.3
0.5
0.2
0.1
0
0 5 10 15 20 25
-0.5
-1
-1.5
-2
0 5 10 15 20 25
EE120 - Fall’15 - Lecture 3 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
2 September 2015
Multiply both sides of the synthesis equation (1) with e− jnω0 t and
integrate from 0 to T = 2π
ω0 :
Z T ∞ Z T
0
x (t)e− jnω0 t dt = ∑ ak
0
e j(k−n)ω0 t dt (3)
k =−∞ | {z }
T if k = n
=
0 if k 6 = n
| {z }
= Tan
ee120 - fall’15 - lecture 3 notes 2
Therefore:
Z T
1
an = x (t)e− jnω0 t dt (analysis equation) (4)
T 0
1
RT
In particular, a0 = T 0 x (t)dt (average of x (t) over one period).
x(t)
1
... ...
−T1 T1 T t
For k = 0, Z T
1 1 2T1
a0 = dt = (5)
T − T1 T
For k 6= 0,
Z T T1
1 1 1 −1
e− jkω0 t dt = e− jkω0 t
ak = (6)
T − T1 T jkω0 − T1
| {z }
=e jkω0 T1 −e− jkω0 T1
=−2jsin(kω0 T1 )
2 1
= sin(kω0 T1 ) = sin(2πk TT1 ) (7)
kω0 T kπ
ω0 N = 2πM (9)
Examples:
1. cos(n) is not periodic;
2. cos( 5π7 n ), N = 14;
3. cos( π5 n), N = 10;
4. cos( 5π7 n ) + cos ( 5 n ), N = s.c.m.{14, 10} = 70.
π
ee120 - fall’15 - lecture 3 notes 3
3π
Question: Which one is a higher frequency, ω0 = π or ω0 = 2 ?
Answer: ω0 = π
cos(πn) cos( 3π π
2 n) = cos( 2 n)
1 1
n n
N =2 N =4
1.5
0.5
-0.5
-1
-1.5
higher frequency -2
0 5 10 15 20 25
ω= π
2
1.5
1
1.5
1
0.5
0.5
0
ω=π ω=0 0
-0.5
-0.5
0 5 10 15 20 25
-1
-1.5
-2
0 5 10 15 20 25
3π
ω= 2
lower frequency 2
1.5
0.5
-0.5
-1
-1.5
-2
0 5 10 15 20 25
a linear combination of
and N independent functions Φk [n] (e.g., Φ0 [n], Φ1 [n], ..., Φ N −1 [n]) are
enough for the Fourier Series. We use the finite series
k=1 Im Im k=2
Φ1 [2] Φ1 [1] = Φ1 [7] Φ2 [1]
k=3 Im Im k=6
Φ6 [0] =
Φ3 [0] = Φ3 [2] = Φ6 [1] = ...
Φ3 [1] Re Re
(or Φ0 [n] ≡ 1)
Properties of Φk [n]:
1. Periodicity in n: Φk [n + N ] = Φk [n];
2. Periodicity in k: Φk+ N [n] = Φk [n];
3. (
N if k = 0, ∓ N, ∓2N, ...
∑ Φk [n] = 0 otherwise (15)
n=h N i
2π
4. Φk [n] · Φm [n] = Φk+m [n] (follows from definition Φk [n] = e jk N n)
ee120 - fall’15 - lecture 3 notes 5
= ∑ ak ∑ Φk−m [ n ] (17)
k=h N i n=h N i
| {z }
N if k = m(modN )
=
0 otherwise
= Nam (18)
Replace m → k:
1 2π
ak =
N ∑ x [n]e− j N kn (Analysis Equation) (19)
n=h N i
Summary:
CT DT
∞ 2π 2π
Synthesis x (t) = ∑ ak e jk T t x [n] = ∑ ak e jk Nn
k =−∞ k =h N i
1 2π 1 2π
Z
Analysis ak =
T T
x (t)e− jk T t ak =
N ∑ x [n]e− jk Nn
n=h N i
Example:
2π 4π π
x [n] = 1 + sin n + cos n+ N = 10
10 10 4
| {z } | {z }
2π π 4π
1 j 10 n
= 12 e 4 e 10
j j n
= 2j e
2π π 4π
+ 21 e 4 e 10
1 − j 10 n −j −j n
− 2j e
1 1 1 π 1 π
= 1+ Φ 1 [ n ] − Φ −1 [ n ] + e j 4 Φ 2 [ n ] + e − j 4 Φ −2 [ n ]
2j 2j 2 2
Note: As in CT, x [n] real implies that a−k = a∗k . Combined with the
periodicity of coefficients in DT (a N −k = a−k ): a N −k = a∗k .
ee120 - fall’15 - lecture 3 notes 6
1.2
Figure 1: The partial sum (23) with
1 Fourier coefficients (22), for N = 9
0.8 and N1 = 2. When M = 4, (23) is the
M=1
x[n]
0.6
0.4
0.2
0
-20 -15 -10 -5 0 5 10 15 20
n
1.2
1
0.8
M=3
x[n]
0.6
0.4
0.2
0
-20 -15 -10 -5 0 5 10 15 20
n
1.2
1
0.8
x[n]
M=4 0.6
0.4
0.2
0
-20 -15 -10 -5 0 5 10 15 20
n
ee120 - fall’15 - lecture 3 notes 7
x [ n ] = a0 Φ0 [ n ] + a1 Φ1 [ n ]
whose entries are the values x [n] takes at n = 0, 1 and the dimension
is two because the period is N = 2.
Then, " # " #
1 1
Φ0 = Φ1 =
1 −1
can be viewed as new basis vectors and the Fourier series can be
interpreted as a change of basis:
" # " # " #
5 1 1 1 2
x = a0 Φ0 + a1 Φ1 = − = .
2 1 2 −1 3
The advantage of the new basis is that, instead of the values in time,
the signal is represented with coefficients of its frequency compo-
nents. This allows, for example, compression algorithms that allocate
more bits to accurately store the coefficients of frequency components
that matter more to the quality of sound than other frequencies.
EE120 - Fall’15 - Lecture 4 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
9 September 2015
Recall from Lecture 3 that the periodic signal on the right has Fourier
series coefficients:
2sin(kω0 T1 ) 2π
ak = , ω0 = T . (1)
kω0 T
This expression is not defined for k = 0,
Then but we interpret a0 to be the limit as
k → 0, i.e., a0 = 2T1 /T.
2sin(ωT1 )
Tak = (2)
ω
ω =kω0
a0 T
a1 T
envelope for T ak
a2 T
ω0 ω
, X ( jω ) (Fourier Transform)
ee120 - fall’15 - lecture 4 notes 2
R∞
X ( jω ) = −∞ x (t)e− jωt dt (Analysis Equation)
R∞ (5)
1 jωt dω
x (t) = 2π −∞ X ( jω ) e (Synthesis Equation)
ω
ω −π/2
ee120 - fall’15 - lecture 4 notes 3
2) Dirac delta:
x (t) = δ(t)
Z ∞
X ( jω ) = δ(t)e− jωt dt = 1 for all ω
−∞
3) Rectangular pulse:
(
1 |t| < T1 x(t)
x (t) =
0 |t| ≥ T1
Z T
1
X ( jω ) = e− jωt dt −T1 T1 t
− T1
R T1
For ω = 0, X ( j0) = − T1 dt = 2T1 . For ω 6= 0,
e jωT1 − e− jωT1
Z T
1 1 − jωt T1 2sin(ωT1 )
e− jωt dt = − e = = .
− T1 jω T1 jω ω
sinπθ
Combining, θ 6= 0
sinc(θ ) , πθ
1 θ = 0.
(
ω=0
2T1 T1 1
X ( jω ) = 2sin(ωT1 ) = 2T1 sinc ω
ω ω 6= 0 π
−3 −2 −1 1 2 3
θ
4) (
1 |ω | < W
X ( jω ) =
0 |ω | ≥ W
FT
rectangular pulse ↔ sinc
FT
sinc ↔ rectangular pulse
5) X ( jω )= 2πδ(ω − ω0 )
Z ∞
1
x (t) = 2πδ(ω − ω0 )e jωt dω = e jω0 t
2π −∞
FT
If ω0 = 0, then 1 ↔ 2πδ(ω ). Note the duality with Example 2.
ee120 - fall’15 - lecture 4 notes 4
By linearity:
∞ ∞
FT
∑ ak e jkω0 t ↔ ∑ 2πak δ(ω − kω0 ) (9)
k =−∞ k =−∞
Example:
x (t) = cos(ω0 t) = 21 e jω0 t + 21 e− jω0 t
X ( jω ) = πδ(ω − ω0 ) + πδ(ω + ω0 )
X(jω)
π π
−ω0 ω0 ω
x(t) X(jω)
... ... FT
... ...
−T T 2T t ω0 2ω0 3ω0 ω
FT
ax (t) + by(t) ↔ aX ( jω ) + bY ( jω ), a, b ∈ R (10)
Time-Shift:
FT
x (t − t0 ) ↔ e− jωt0 X ( jω ) (11)
ee120 - fall’15 - lecture 4 notes 5
Proof:
Z ∞ Z ∞
x (t − t0 )e− jωt dt = x (τ )e− jω (t0 +τ ) dτ
−∞ | {z } −∞
,τ
Z ∞
= e− jωt0 x (τ )e− jωτ dτ
−∞
| {z }
= X ( jω )
FT
x ∗ (t) ↔ X ∗ (− jω ) (12)
Example 1 above:
ω
ω −π/2
dx (t) FT
↔ jωX ( jω ) (15)
dt
Z t
FT 1
x (τ )dτ ↔ X ( jω ) + πX (0)δ(ω ) (16)
−∞ jω
jω ∆ ( jω ) + π∆ (0) δ ( ω )
1 1
Thus, X ( jω ) = = jω + πδ(ω )
Proof:
Z ∞ Z ∞
dτ
at )e− jωt dt
x (|{z} = x (τ )e− jωτ/a , if a > 0
−∞ −∞ a
,τ
Z −∞
dτ
= x (τ )e− jωτ/a , if a < 0
∞ a
Z ∞
1 1 ω
= x (τ )e− jωτ/a dτ = X j
| a | −∞ | a| a
Example:
x(t)
sinWt FT
x (t) = ←→
πt
−T1 T1 t
We can interpret this as a scaling of:
X0 (jω)
sint FT
x0 ( t ) = ←→
πt
−1 1 ω
sinWt FT
x (t) = W = Wx0 (Wt) ←→ X0 ( jω/W ) = X ( jω )
πWt
Corollary (a=-1): x (−t) ↔ X (− jω ) (18)
)
If x (−t) = x (t) then X (− jω ) = X ( jω ) X ( jω ) = X ∗ ( jω ), i.e.,
If x (t) is also real: X (− jω ) = X ∗ ( jω ) X ( jω )is real.
Parseval’s Relation:
Z ∞ Z ∞
1
| x (t)|2 dt = | X ( jω )|2 dω (19)
−∞ 2π −∞
1
Example: x (t) = e− at u(t) a > 0 ↔ X ( jω ) =
a + jω
Z ∞ Z ∞
1 −2at 0 1
| x (t)|2 dt = e−2at dt = e =
−∞ 0 2a ∞ 2a
Z ∞ Z ∞ ω ∞
1 1 π 1
| X ( jω )|2 dω = dω = tan−1 = = 2π
−∞ −∞ 2
a +ω 2 a a −∞
a 2a
Initial Value:
Z ∞
1
x (0) = X ( jω )dω (synthesis eq’n with t = 0) (20)
2π −∞
DC Component:
Z ∞
X (0) = x (t)dt (analysis equation with ω = 0) (21)
−∞
EE120 - Fall’15 - Lecture 5 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
14 September 2015
where
Z ∞
H ( jω ) = h(t)e− jωt dt ”frequency response” (2)
−∞
1 H(jω)
−ωc ωc ω
sinωc t
h(t) = (4)
πt
not causal!
t
ee120 - fall’15 - lecture 5 notes 2
1
Y ( jω ) = H ( jω ) X ( jω ) = (6)
( a + jω )(b + jω )
Partial Fraction Expansion (if a 6= b):
=1 =0 3
z }| { z }| {
A B ( Ab + Ba) + j( A + B)ω
Y ( jω ) = + =
a + jω b + jω ( a + jω )(b + jω )
3
From here: B = − A and Ab − Aa = 1,
which implies that
1 1 1
Y ( jω ) = − 1
b − a a + jω b + jω A = −B =
b−a
1 − at
y(t) = e − e−bt u(t)
b−a
If a = b:
1 d 1
Y ( jω ) = =j
( a + jω )2 dω a + jω
FT dX ( jω ) dx (t)
Use the property4 : − jtx (t) ↔ 4
dual of dt ↔ jωX ( jω )
dω
Then y(t) = − j2 te−at u(t) = te− at u(t).
HW problem: Show that
tr−1 − at
e−at u(t) ∗ . . . ∗ e− at u(t) = e u(t)
| {z } (r − 1) !
r times
ee120 - fall’15 - lecture 5 notes 3
Proof:
Z ∞ Z ∞
e jω0 t x (t)e− jωt dt = x (t)e− j(ω −ω0 )t dt = X ( j(ω − ω0 ))
−∞ −∞
r(t)
s(t)
(signal to be
transmitted)
cosω0 t
(carrier signal)
1 jω0 t 1 − jω0 t 1 1
r (t) = s(t) e + e ←→ R( jω ) = S( j(ω − ω0 )) + S( j(ω + ω0 ))
2 2 2 2
S(jω) R(jω)
A
A/2 A/2
-ω1 ω1 ω -ω0 ω0 ω
(ω0 >> ω1 in practice)
Demodulation:
r(t)
s(t) LPF
cosω0 t cosω0 t
1 1
G ( jω ) = R( j(ω − ω0 )) + R( j(ω + ω0 ))
2 2
LPF
A/2
A/4 A/4
-2ω0 ω0 2ω0 ω
−T1 T1 t
Z ∞
FT 1
ĥ(t) , w(t) · h(t) ↔ H ( jθ )W ( j(ω − θ ))dθ
2π −∞
−T1 T1 t -ωc ω ωc θ
H(jω)
Ĥ(jω)
−ωc ωc ω
magnitude
ĥ(t − T1 )
T1 2T1 t ω
Same magnitude as Ĥ ( jω ):
− jωT1
Ĥ ( jω ) = | Ĥ ( jω )|
e
Then,
Y ( jω ) ∑ M b ( jω )k
H ( jω ) = = kN=0 k . (11)
X ( jω ) ∑k=0 ak ( jω )k
dy
τ + y(t) = x (t) (12)
dt
R
1
H ( jω ) = +
1 + jωτ x(t) +
− C y(t)
−
1
1 |H(jω)| = √1+ω2 τ 2 t
step resp=(1 − e− τ )u(t)
√1 1
2
1−e−1
1
ω τ
τ t
Example: Second-order system:
d2 y dy
2
+ 2ξωn + ωn2 y(t) = ωn2 x (t) (13)
dt dt
ωn2 1
H ( jω ) = =
( jω )2 + 2ξωn ( jω ) + ωn2 ( jω/ωn )2 + 2ξ ( jω/ωn ) + 1
The figure below shows the frequency, impulse, and step responses
for various values of ξ. Note that increasing ωn stretches the fre-
quency response along the ω axis and compresses the impulse and
step responses along the t axis. Therefore, a large natural frequency
means faster response.
ee120 - fall’15 - lecture 5 notes 6
-0.5
-1
0 5 10 15
ωn t ωn ωn
Step response
2
s(t)
1.5
0.5
0
0 5 10 15
ωn t ωn ωn
Example:
k
m x(t): force
b
y(t): displacement
d2 y dy
m 2
+ b + ky = x
dt dt
2
d y
b dy
k 1
+ + y= x
dt2 m dt m m
| {z } | {z }
2ξωn ωn2
q
√b k b2
with ξ = and ωn = m. Ressonance occurs if ξ 2 = 4km < 12 ,
2 km
i.e., if b2 < 2km.
EE120 - Fall’15 - Lecture 6 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
16 September 2015
... ...
n −N N n
1 2π
ak =
N ∑ x̃ [n]e− jk N n (1)
n=h N i
∞ ∞
!
− jk 2π
Nak = ∑ x [n]e N n = ∑ x [n]e − jωn
(2)
2π
n=−∞ n=−∞
ω=k
| {z N}
| {z }
,X (e jω )
(DTFT) more closely spaced
samples as N →∞
1 2π
ak = X (e jkω0 ), ω0 = (3)
N N
Furthermore,
2π 1
x̃ [n] = ∑ ak e jk N n = ∑ N
X (e jkω0 )e jkω0 n (4)
k =h N i k =h N i
1 2π
=
2π ∑ N
X (e jkω0 )e jkω0 n (5)
k =h N i |{z}
= ω0
| {z }
X(e )ejωn
jω
kω0
ω
(k+1)ω0
1
Z
As N → ∞ : → X (e jω )e jωn dω (6)
2π 2π
1
X (e jω )e jωn dω
R
x [n] = 2π 2π (Synthesis Equation)
(7)
X (e jω ) = ∑∞
n=−∞ x [n]e− jωn (Analysis Equation)
ee120 - fall’15 - lecture 6 notes 2
Examples:
1) x [n] = an u[n], | a| < 1
∞ ∞
1
X (e jω ) = ∑ an e− jωn = ∑ (ae− jω )n = 1 − ae− jω (10)
n =0 n =0
∞ −1
X (e jω ) = ∑ an e− jωn + ∑ a−n e− jωn (11)
n =0 n=−∞
| {z }
∑∞ n jωn = ∑∞ an e− j(−ω )n = ∑∞ an e− j(−ω )n −1
n =1 a e n =1 n =0
1 1
= − jω
+ −1 (12)
1 − ae 1 − ae jω
2 − a(e jω + e− jω )
= −1 (13)
1 − a(e jω + e− jω ) + a2
2 − 2acosω 1 − a2
= 2
−1 = (14)
1 − 2acosω + a 1 + a2 − 2acosω
3) (
1 |n| ≤ N1
x [n] = (15)
0 |n| > N1
sin(ω ( N1 +1/2))
(
N1
ω 6= 0,
X (e jω ) = ∑ e− jωn =
2N1 + 1
sin(ω/2)
ω = 0.
(16)
n=− N1
Derive this as an exercise.
jω
X(e )
x[n] 2N1 + 1
−N1 N1 n 2π 2π
2N1 +1
ee120 - fall’15 - lecture 6 notes 3
4) X (e jω ) = δ(ω ) − π ≤ ω ≤ π, (17)
or, equivalently:
∞
X (e jω ) = ∑ δ(ω − 2πl ) (18)
l =−∞
1 1
Z π
x [n] = δ(ω )e jωn dω = (19)
2π −π 2π
∞
x [n] = 1 ↔ X (e jω ) = 2π ∑ δ(ω − 2πl ) (20)
l =−∞
∞
x [n] = e jω0 n ↔ X (e jω ) = 2π ∑ δ(ω − ω0 − 2πl ) 2 (21)
l =−∞
2
from the frequency shift property
below
X(ejω )
2πa0 2πa0 = 2πaN
2πa1 2πa1 = 2πaN+1
2πa2
ω0 2ω0 2π ω
Properties of DTFT
Section 5.3 in Oppenheim & Willsky
Time Shift:
x [n − n0 ] ←→ e− jωn0 X (e jω ) (23)
Frequency Shift:
e jω0 n x [n] ←→ X (e j(ω −ω0 ) ) (24)
then
X2 (e jω ) = X1 (e j(ω −π ) ).
The figure below illustrates this with an example where x1 [n] and
X1 (e jω ) are shown at the top, and x2 [n] = (−1)n x1 [n] and X2 (e jω )
are at the bottom. Note that X1 (e jω ) is concentrated around ω =
0, ± 2π, · · · and X2 (e jω ) is concentrated around ω = ±π, ±3π, · · · .
ee120 - fall’15 - lecture 6 notes 4
x1 [ n ] X1 (e jω )
0.04 0.2
0.18
0.035
0.16
0.03
0.14
0.025
0.12
0.02 0.1
0.08
0.015
0.06
0.01
0.04
0.005
0.02
0 0
−2π
-20 -15 -10 -5 0 5 10 15 20
0 2π
n ω
x2 [n] = (−1)n x1 [n] X2 (e jω )
0.04 0.2
0.18
0.03
0.16
0.02
0.14
0.01
0.12
0 0.1
0.08
-0.01
0.06
-0.02
0.04
-0.03
0.02
-0.04 0
-20 -15 -10 -5
n
0 5 10 15 20
−3π −π π 3π
ω
Figure 1: (a) Discrete time signal x1 [n]. (b) Fourier transform of x1 [n]. Note
that X1 (ejω ) is concentrated around 0, ±2π, ±4π, . . . . (c) Discrete time signal
Example: Suppose a low-pass filter H (e jω ) has been designed with
x2 [n]. (d) Fourier transform of x2 [n]. Note LP
that X2 (ejω ) is concentrated around
±π,impulse
±3π, . . response
.. h LP [n]. To obtain a high-pass filter, let:
HHP (e jω ) = HLP (e j(ω −π ) )
h HP [n] = (−1)n h LP [n].
Time Reversal:
x [−n] ←→ X (e− jω ) (25)
Example:
1
an u[n] ←→
1 − ae− jω
1
a−n u[−n] ←→
1
1 − ae jω
Conjugation and Conjugate Symmetry:
π 2π ω
x [n] − x [n − 1] ←→ (1 − e− jω ) X (e jω ) (31)
dx (t)
Compare to CT: dt ↔ jωX ( jω )
Accummulation:
n ∞
1
∑ x [m] ←→
1 − e− jω
X ( e jω
) + πX ( e j0
) ∑ δ(ω − 2πk) (32)
m=−∞ k =−∞
Rt 1
Compare to CT: −∞ x (τ )dτ ←→ jω X ( jω ) + πX (0) δ ( ω )
Time Expansion:
Define
(
x [n/M ] if n = 0, ∓ M, ∓2M, ...
x( M) [n] = (34)
0 otherwise.
n n
ee120 - fall’15 - lecture 6 notes 6
Then
x( M) [n] ←→ X (e jωM ). (35)
Proof:
∞ ∞
∑ x( M) [n]e− jωn = ∑ x( M) [kM]e− jωkM
n=−∞ k =−∞ | {z }
= x [k]
∞
= ∑ x [k ]e− j(ωM)k = X (e jωM ).
k =−∞
x [n] X (e jω )
1
5
−2π −π
-10 -8 -6 -4 -2 0 2 4 6 8 10
n 0 π 2π
x (2) [ n ] X (e j2ω )
1
5
-10 -8 -6 -4 -2
n
0 2 4 6 8 10
−2π −π 0 π 2π
x (3) [ n ] X (e j3ω )
1
5
−2π −π
-10 -8 -6 -4 -2 0 2 4 6 8 10
n 0 π 2π
Figure 1: Inverse relationship between time and frequency domains: As k in-
The xtime
creases, expansion property derived above is analogous to the con-
k [n] spreads out while its transform is compressed.
tinuous time property x ( at) ←→ X ( jω/a) with M playing the role of
the scaling factor 1/a.
1
ee120 - fall’15 - lecture 6 notes 7
Differentiation in Frequency:
dX (e jω )
nx [n] ←→ j (36)
dω
Proof:
X (e jω ) = ∑ x[n]e− jωn
n
dX (e jω )
= − j ∑ nx [n]e− jωn
dω n
Parseval’s Relation:
∞
1
Z
∑ | x [n]|2 =
2π 2π
| X (e jω )|2 dω (37)
n=−∞
EE120 - Fall’15 - Lecture 7 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
21 September 2015
Take the Fourier Transform of both sides (recall that δ[n] ↔ 1):
!
N M
∑ ak e− jωk H (e jω ) = ∑ bk e− jωk (3)
k =0 k =0
∑kM=0 bk e− jωk
H (e jω ) = (4)
∑kN=0 ak e− jωk
We can find the impulse response h[n] from the inverse Fourier trans-
form of H (e jω ):
Example:
3 1
y[n] − y[n − 1] + y[n − 2] = 2x [n] (5)
4 8
Frequency response:
2 2
H (e jω ) = =
1 − 34 e− jω + 18 e−2jω (1 − 12 e− jω )(1 − 14 e− jω )
Partial fraction expansion:
4 2
H (e jω ) = 1 − jω
− 1 − jω
1− 2e 1− 4e
Thus, the impulse response is:
n n
1 1
h[n] = 4 u[n] − 2 u[n]
2 4
Example:
1
h[n] = αn u[n] |α| < 1 ↔ H (e jω ) =
1 − αe− jω
1
x [n] = βn u[n] | β| < 1 ↔ X (e jω ) =
1 − βe− jω
1
Y (e jω ) =
(1 − αe− jω )(1 − βe− jω )
A B
Y (e jω ) = −
+ ,
1 − αe jω 1 − βe− jω
−β
with A + B = 1 and Aβ + Bα = 0. Then, A = α
α− β and B = α− β .
Then,
α β 1 n +1
y[n] = αn u[n] − βn u[n] = α − β n +1 u [ n ]
α−β α−β α−β
If α = β, then:
time-shift
z}|{
e jω
1 d 1
Y (e jω ) = =
(1 − αe− jω )2 −αj dω 1 − αe− jω
| {z }
↔ 1j nαn u[n] 2
2
by the differentiation property:
dX (e jω )
nx [n] ↔ j dω
Then,
1
y[n] = ( n + 1 ) α n +1 u [ n + 1 ] = ( n + 1 ) α n u [ n + 1 ] = ( n + 1 ) α n u [ n ]
α
where we replaced u[n + 1] with u[n] since (n + 1)αn = 0 for n = −1.
ee120 - fall’15 - lecture 7 notes 3
(−1)n (−1)n
x HLP (e jω ) x
w1 [ n ] w2 [ n ] w3 [ n ]
x [n] + y[n]
w4 [ n ]
HLP (e jω )
W1 (e jω ) = X ( e j(ω −π ) )
W2 (e jω ) = HLP (e jω ) X (e j(ω −π ) )
W3 (e jω ) = HLP (e j(ω −π ) ) X (e jω )
W4 (e jω ) = HLP (e jω ) X (e jω )
Adding W3 (e jω ) and W4 (e jω ):
bandstop filter
−π ωc π
Multiplication Property
Section 5.5 in Oppenheim & Willsky
1
Z
jθ j(ω −θ )
x1 [n] x2 [n] ←→ X1 ( e ) X2 ( e )dθ 3 (9)
2π 2π
1 1
Z Z
X (e jθ ) X2 (e j(ω −θ ) )dθe jωn dω
2π 2π 2π 2π 1
1 1
Z Z
= X1 (e jθ ) X2 (e j(ω −θ ) )e jωn dω dθ
2π 2π 2π 2π
| {z }
=e jθn x2 [n] 4
1
Z
= x2 [ n ] X1 (e jθ )e jθn dθ = x1 [n] x2 [n].
2π 2π
| {z }
= x1 [ n ]
4
from the frequency shift property
ee120 - fall’15 - lecture 7 notes 4
Example: sin( 3π
4 n ) sin ( 2 n )
π
Interpret the value at n = 0 as
x [n] = ·
x [0] = x1 [0] x2 [0] = 34 12
| πn
{z } | πn {z }
, x1 [ n ] , x2 [ n ]
1 1 jωn ωc
1 1 1 jωc n
Z ωc
jωn
e dω = e = (e − e− jωc n )
2π −ωc 2π jn − ωc πn 2j
| {z }
=sinωc n
1
Z
X (e jω ) = X1 (e jθ ) X2 (e j(ω −θ ) )dθ (10)
2π 2π
X1 (e jω )
X2 (e jω )
−3π −π π 3π ω
4 2 2 4
ω=0
− X1 (e jθ )
π − X2 ( e j ( ω − θ ) )
θ
ω = π/4
π
θ
ω = π/2
3π/4
θ
ω = 3π/4
π/2
θ
ω=π
π π
4 4
−π π θ
integration interval
X (e jω )
1/2
1/4
π π 3π
0 4 2 4 π 2π ω
ee120 - fall’15 - lecture 7 notes 5
2π 2π
2N 1 + 1
1
Z
Thus, Ĥ (e jω ) = H (e jθ )W (e j(ω −θ ) )dθ
2π 2π
See the animation on the last page.
H (e jθ )
W (e j(ω −θ ))
%
Ĥ (e jω )
H (e jω ) %
ω
ee120 - fall’15 - lecture 7 notes 6
Note from the figure below that Ĥ (e jω ) exhibits oscillations near the
discontinuities of H (e jω ) and their amplitudes do not decrease as N1
is increased. This is known as the Gibbs Phenomenon.
N1 = 1 Ĥ (e jω ) N1 = 2
H (e jω )
ω ω
N1 = 3 N1 = 9
ω ω
These oscillations are caused by the sizable side lobes of W (e jω ) (high
frequency components) which are due to the abrupt change from 0 to
1 in w[n].
”Tapered” windows mitigate this problem, e.g., the triangular
(Bartlett) window:
|n|
(
1 − N if |n| ≤ N1
w[n] = 1
0 otherwise.
0.8
w[n]
0.6
0.4
0.2
0
-25 -20 -15 -10 -5 0 5 10 15 20 25
n
Summary
To obtain a FIR filter truncate the ideal filter’s impulse response h[n]
with one of the window functions w[n]:
ĥ[n] = h[n]w[n].
ĥ[n − N1 ] ←→ e− jωN1 Ĥ (e jω )
0
Figure 2: The magnitude of the Fourier
Transform W (e jω ) (in dB) for the rectan-
-10
20 log10 |W (e jω )|, rectangular gular, Bartlett, Hanning, Hamming, and
-20
-30
Blackman windows. Here each window
function in Figure 1 is scaled such that
-40
∑n w[n] = 1, so W (e j0 ) = 1 = 0 dB.
-50
dB Note that the tapered windows progres-
-60
sively reduce the side lobe amplitudes
-70
in the order they are presented. This
-80
has the desired effect of reducing rip-
-90
ples in the frequency response of the
-100
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
truncated filter. However, the main lobe
0
width increases which has a negative
-10
effect: the transition from passband to
Bartlett stopband will be slower for the filter
-20
truncated with the respective window.
-30
-40
dB -50
-60
-70
-80
-90
-100
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
-10
Hanning
-20
-30
-40
dB -50
-60
-70
-80
-90
-100
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
-10
Hamming
-20
-30
-40
dB -50
-60
-70
-80
-90
-100
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
-10
-20
Blackman
-30
-40
dB -50
-60
-70
-80
-90
-100
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.2
0.15
0.1
0.05
-0.05
0 5 10 15 20 25 30 35 40 45 50
-20
Magnitude (dB)
-40
-60
-80
-100
-120
-140
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency (#: rad/sample)
-200
Phase (degrees)
-400
-600
-800
-1000
-1200
-1400
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency (#: rad/sample)
ee120 - fall’15 - lecture 7 notes 10
Play/Pause
EE120 - Fall’15 - Lecture 8 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
23 September 2015
h[n] DTFT
←→
n ω
− N1 N1 2π
] H (e jω )
ω
2π
−π
slope= α = 0 except
at discontinuities
-20
Magnitude (dB)
-40
-60
-80
-100
-120
-140
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency (#: rad/sample)
-200
Phase (degrees)
-400
-600
-800
-1000
-1200
-1400
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency (#: rad/sample)
Group delay
200
150 d
− ] H (e jω )
grd[H(ejω)]
dω
100
50
-50
-π -0.8π -0.6π -0.4π -0.2π 0 0.2π 0.4π 0.6π 0.8π π
ω
Magnitude of frequency response
2.5
2
| H (e jω )|
|H(e jω)|
1.5
0.5
0
-π -0.8π -0.6π -0.4π -0.2π 0 0.2π 0.4π 0.6π 0.8π π
ω
Input in the time domain
1
0.5
x [n]
x[n]
-0.5
-1
0 50 100 150 200 250 300
sample number (n)
Magnitude of the DFT of input
20
15 | X (e jω )|
|
10
|X
0
-π -0.8π -0.6π -0.4π -0.2π 0 0.2π 0.4π 0.6π 0.8π π
ω
Output in the time domain
2
y[n]
1
-1
-2
0 50 100 150 200 250 300
sample number (n)
Figure 1: Phase distortion illustrated on a signal x [n] (middle plot) with three dominant frequency components (shown
in the plot of | X (e jω )| underneath). This signal is applied to a LTI system with highly nonlinear phase, as seen from
d
the plot for - dω ] H (e jω ) (top). In the output y[n] (bottom), the order of the the low and middle frequency components
are swapped because the low frequency component incurred a large delay. The high frequency component (ω = 0.8π)
is filtered out because H (e j0.8π ) = 0 (the plot second from the top). See Section 5.1.2 in Oppenheim & Schafer, Discrete-
Time Signal Processing, 3rd ed., Prentice Hall, for the construction of the LTI system in this example.
ee120 - fall’15 - lecture 8 notes 4
∞ ∞
X (e jω1 , e jω2 ) = ∑ ∑ x [n1 , n2 ]e− jω1 n1 e− jω2 n2 (7)
n1 =−∞ n2 =−∞
1
Z Z
x [ n1 , n2 ] = X (e jω1 , e jω2 )e jω1 n1 e jω2 n2 dω1 dω2 (8)
(2π )2 2π 2π
Example: x [ n1 , n2 ] = δ [ n1 , n2 ] : = δ [ n1 ] δ [ n2 ].
∞ ∞
X (e jω1 , e jω2 ) = ∑ ∑ δ[n1 , n2 ]e− jω1 n1 e− jω2 n2 = e− jω1 0 e− jω2 0 = 1
n1 =−∞ n2 =−∞
2D Systems
x [n1 , n2 ]→ → y [ n1 , n2 ]
When the input is δ[n1 , n2 ] the output is called the impulse response
and denoted h[n1 , n2 ] as in 1D systems.
Example: 2D moving average filter
1 1 1
y [ n1 , n2 ] = ∑ ∑
9 k =−1 k =−1
x [ n1 − k 1 , n2 − k 2 ]
1 2
(
1
9 −1 ≤ n1 ≤ 1 and − 1 ≤ n2 ≤ 1
h [ n1 , n2 ] =
0 otherwise.
2D Convolution:
If the system is linear shift-invariant, then:
y [ n1 , n2 ] = h [ n1 , n2 ] ∗ x [ n1 , n2 ]
∞ ∞
= ∑ ∑ h [ m1 , m2 ] x [ n1 − m1 , n2 − m2 ]
m1 =−∞ m2 =−∞
∞ ∞
= ∑ ∑ x [ m1 , m2 ] h [ n1 − m1 , n2 − m2 ].
m1 =−∞ m2 =−∞
ee120 - fall’15 - lecture 8 notes 6
(0,2π ) (2π,2π )
• •
ω c2
(2π,0)
• ω1
ω c1
where (
jωi 1 | ωi | ≤ ω ci
Hi (e )= i = 1, 2.
0 ω ci < | ωi | ≤ π
Then, from the separability property,
0.04
0.035
0.03 h [ n1 , n2 ]
0.025
0.02
0.015
0.01
0.005
0
-0.005
-0.01
30
20
30
10 20
0 10
-10 0
n2 -20
-10
-30 -30
-20
n1
ee120 - fall’15 - lecture 8 notes 7
(0,2π ) (2π,2π )
• •
ωc
ωc (2π,0)
• ω1
where J1 (·) is the Bessel function of the first kind and first order.2 2
See mathworld.wolfram.com for a
description of Bessel functions of the
Note that h[n1 , n2 ] is not separable. However, like the frequency first kind. The Matlab command to
response H (e jω1 , e jω2 ), it exhibits circular symmetry. See the figure evaluate J1 (·) is besselj(1,·) where the
first argument specifies the order.
below for a depiction of h[n1 , n2 ] for ωc = 0.2π.
0.035
0.03
h [ n1 , n2 ]
0.025
0.02
0.015
0.01
0.005
-0.005
30
20
30
10 20
0 10
-10 0
n2 -20
-10
n1
-20
-30 -30
ee120 - fall’15 - lecture 8 notes 8
Projection-Slice Theorem
Consider the following "projection" of the 2D function x (t1 , t2 ) along
the t2 axis:
Z ∞
x0 ( t1 ) , x (t1 , t2 )dt2 .
−∞
This is because:
Z ∞ Z ∞
X ( jω1 , jω2 )|ω2 =0 = x (t1 , t2 )e− jω1 t1 e− j0t2 dt1 dt2
−∞ −∞
Z ∞ Z ∞
= x (t1 , t2 )dt2 e− jω1 t1 dt1
−∞ −∞
Z ∞
= x0 (t1 )e− jω1 t1 dt1 = X0 ( jω1 ).
−∞
t2 ω2
t
jec
pro slic
e
θ t1 θ ω1
.
F.T
1D
N −1
2π
∑ x [n]e− j N kn k=0,1,. . . ,N-1
X [k] = n =0 (1)
0 for other k.
N −1
1 2π
∑ X [k ]e j N kn 0 ≤ n ≤ N−1
x [n] = N k =0 (4)
0 otherwise.
Example:
x [n]
1
n
0 1 2 3 4 5
To see why X [k] = 0 for, say k = 1, note that (5) is the sum of the
following complex numbers:
Im
n=1
n=2
Re
n=0
n=3
n=4
x̃ [n]
... 1 ... n
1 2 3 4 5 9 101112131415
Recall: ∞ N −1
X (e jω ) = ∑ x [n]e− jωn = ∑ x [n]e− jωn (9)
n=−∞ n =0
N −1 2π
X [k] = ∑ x [n]e− j N kn , k = 0, 1, . . . , N − 1 (10)
n =0
N samples of DTFT at ω = 2π Nk
X [k] = X (e jω ) (11)
w= 2π
N k k = 0, 1, . . . , N − 1.
ee120 - fall’15 - lecture 9 notes 3
4
sin (5ω/2)
X (e jω ) = ∑ e− jωn = e− j2ω sin(ω/2)
(12)
n =0
| X (e jω )| 10 point DFT
5 point DFT
5
ω
2π 4π 6π 8π 2π
5 5 5 5
MATLAB:
fft([1 1 1 1 1]) for 5-point,
DTFT
x [n] ←→ X (e jω ) (13)
DFT
? ←→ X (e jω ) (14)
ω = 2π
N k
(15)
N −1
1 2π
= ∑ X (e jω ) 2π e j N kn n = 0, 1, . . . , N − 1 (16)
N ω= k
k =0 | {z N }
∞
∑
2π
= x [m]e− j N km
m=∞
N −1 ∞
1 2π
=
N ∑ ∑ x [ m ] e j N k(n−m) (17)
k =0 m=−∞
∞ N −1
1 j 2π
= ∑ x [m]
N ∑ e N k(n−m) (18)
m=∞ k =0
| {z }
1
if m = n modN
=
0
otherwise
= . . . + x [n − N ] + x [n] + x [n + N ] + . . . (19)
(20)
∞
= ∑ x [n − rN ] 0 ≤ n ≤ N − 1. (21)
r =−∞
Example:
| X (e jω )|
x [n]
1 n ω
123456 π 2π
2
1
n
123456
2D DFT
Analysis Equation: For 0 ≤ k1 ≤ N1 − 1 and 0 ≤ k2 ≤ N2 − 1:
N1 −1 N2 −1 2π k n 2π
−j N 1 1 − j N k 2 n2
X [k1 , k2 ] = ∑ ∑ x [ n1 , n2 ] e 1 e 2 (24)
n1 =0 n2 =0
N1 −1 N2 −1
1 2π k n
jN 2π k 2 n2
x [ n1 , n2 ] =
N1 N2 ∑ ∑ X [k1 , k2 ]e 1
1 1
e N2 (25)
k 1 =0 k 2 =0
Sampling
Chapter 7 in Oppenheim & Willsky
Discrete-time sequence obtained from continuous-time signal x (t):
xd [n] = x (nT ), T : sampling period
x [4]
x [3]
x [0] x [1] x [2]
t
T 2T 3T 4T 5T · · ·
bandlimited by ws /2
bandwidth exceeds ws /2
p(t)
··· t
−T 0 T 2T 3T 4T 5T
x p (t)
How is X p ( jω ) related to X ( jω )?
1
Recall: Fourier series coefficients of the impulse train are ak = T for
all k.
∞ ∞
2π
P( jω ) = ∑ 2πak δ(ω − kωs ) =
T ∑ δ(ω − kωs ) (4)
k =−∞ k =−∞
Z ∞ ∞
1 1
X p ( jω ) =
2π −∞
X ( jθ ) P( j(ω − θ ))dθ =
T ∑ X ( j(ω − kωs )) (5)
k =−∞
∞
1
X p ( jω ) =
T ∑ X ( j(ω − kωs )) (6)
k =−∞
X ( jω ) X p ( jω )
1
1 T
ω ω
-ω M ωM ωM ωs
if ws > 2w M
X p ( jω )
1
T
ω
ω M ωs
if ws < 2w M “aliasing”
Thus, if (1) holds (no aliasing), then x (t) can be recovered from x p (t)
with a lowpass filter of gain T and cutoff frequency w2s :
T
X p ( jω ) Xr ( jω ) = X ( jω )
ωs
2
reconstruction
filter: Hr ( jω )
!
xr ( t ) = hr ( t ) ∗ x p ( t ) = hr ( t ) ∗ ∑ x(nT )δ(t − nT ) (7)
n
x[T ]
x [2T ]
x [0]
t
T 2T 3T
The sum of these sinc functions gives the reconstructed signal xr (t).
x (t)
x0 ( t )
x0 ( t ) = x p ( t ) ∗ h0 ( t ) (10)
h0 ( t )
1
t
T
sin(wT/2)
H0 ( jω ) = e− jωT/2 (11)
w/2
X0 ( jω ) = H0 ( jω ) X p ( jω ) (12)
T H0 ( jω )
Hr ( jω )
ω
ωs ωs
2
ee120 - fall’15 - lecture 10 notes 4
h1 ( t )
1
t
t −T T
2
1 sin(ωT/2)
H1 ( jω ) = (13)
T ω/2
T H0 ( jω )
H1 ( jω )
Hr ( jω )
ω
ωs ωs
2
Examples of Aliasing
Section 7.3 in Oppenheim & Willsky
Example 1: x (t) = cos(ω0 t), ωs = 3ω0
X ( jω )
π π
ω
− ω0 ω0
X p ( jω )
T π π reconstruction filter
T T
ω
− ω0 ω0 ω s ωs
2
T 2T t
2π
ω0 =
3T
ee120 - fall’15 - lecture 10 notes 5
3ω0
Example 2: x (t) = cos(ω0 t), ωs = 2
X p ( jω )
T
ω
− ω s ω0 ω s ω0
2
ωs
ω
0
xr (t) = cos t 6= x (t) (14)
2
xr ( t )
x (t)
t
2π 4π
w0 w0
1 jφ jω0 t 1 3ω0
x (t) = cos(ω0 t + φ) = e e + e− jφ e− jω0 t , ωs =
2 l 2 2
2πδ(ω −ω0 )
(15)
X p ( jω )
T
π − jφ π jφ π − jφ π jφ
Te Te Te Te
ω
ω0 ω0 ω s
2
ω0 ω
Xr ( jω ) = πe jφ δ ω + + πe− jφ δ ω − 0 (16)
2 2
l l
ω ω
1 − j 20 t 1 j 20 t
2π e 2π e
1 j ( ω0 t − φ ) ω0
xr ( t ) = e 2 + e− j( 2 t−φ) (17)
2
ω0
= cos t − φ → phase reversal (18)
2ω
= cos − 0 t + φ (19)
2
Wagon wheel effect in movies: Wheel appears to rotate more slowly
and in the opposite direction when actual speed exceeds half of the
sampling rate (18-24 frames/second).
ee120 - fall’15 - lecture 10 notes 6
X p ( jω ) π jφ
+ e− jφ )
T (e
= 2π
T cos( φ )
ω
ω0 ωs
Hr ( jω )
T
T
2 ω
ωs
2
Xr ( jω )
π cos(φ) π cos(φ)
ω
ω0
x (t) x (t)
xr ( t ) = x ( t ) xr ( t ) xr ( t )
T 2T ω0 4T t
X p ( jω ) H0 ( jω )
ω
− ω0 ω0 ω s ωs
2
EE120 - Fall’15 - Lecture 11 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
7 October 2015
Sampling Continued
Chapter 7 in Oppenheim & Willsky
x (t)
t
T 2T 3T · · ·
∞
Ω = ωT
X p ( jω ) = ∑ xd [n]e− jωTn
n=−∞ ω : radians/sec.
∞
Ω : radians
Xd (e jΩ ) = ∑ xd [n]e− jΩn
n=−∞
Xd (e jΩ ) = X p ( jω ) (2)
Ω=ωT
∞
1
Last lecture: X p ( jω ) =
T ∑ X ( j(ω − kωs )) (3)
k =−∞
ω
-ω M ωM
X p ( jω )
1
T
ω
ωM 2π
ωs = T
Xd (e jΩ )
1
T
Ω = ωT
↓π 2π
ωM T
ee120 - fall’15 - lecture 11 notes 2
DT Processing of CT Signals
Section 7.4 in Oppenheim & Willsky
xd [n] DT yd [n]
x (t) C/D D/C y(t)
System
T T
This is not a LTI system (why not?), therefore it does not possess a
well-defined frequency response H ( jω ).
However, if x (t) is bandlimited by ws /2 = π/T, an “effective” H ( jω )
can be calculated:
p(t) Hr ( jω )
Yd (e jΩ ) = Hd (e jΩ ) Xd (e jΩ ) = Hd (e jΩ ) X p ( jΩ/T ) (4)
jωT jωT
Yp ( jω ) = Yd (e ) = Hd (e ) X p ( jω ) (5)
TH (e jωT ) X ( jω ) |ω | < ω /2
d p s
Y ( jω ) = (6)
0 |ω | > ωs /2.
∞
1
X p ( jω ) =
T ∑ X ( j(ω − kωs )) (7)
k =−∞
H (e jωT ) X ( jω ) |ω | < ωs /2
d
Y ( jω ) = (10)
0 |ω | > ωs /2.
H (e jωT ) Effective freq. resp.
Y ( jω ) d |ω | < ωs /2
Heff ( jω ) = = valid for inputs with
X ( jω ) 0 |ω | > ωs /2 bandwidth < ω /2
s
(11)
ee120 - fall’15 - lecture 11 notes 3
| Hd (e jΩ )|
π
T
Ω
π 2π
= hd [−1] ( xd [n + 1] − xd [n − 1])
+ hd [−2] ( xd [n + 2] − xd [n − 2]) + . . . (15)
F
1
x d [ n ] − x d [ n − 1]
yd [n] = = hd [n] ∗ xd [n] (16)
T
where hd [0] = 1
h d [1] = −1 , hd [n] = 0 for n < 0 and n > 1.
T, T
1
Hd (e jΩ ) = ∑ hd [n]e− jΩn = T
(1 − e− jΩ ) (17)
n
1 (1 − e− jωT ) |ω | < ωs /2
T
Heff ( jω ) = (18)
0 |ω | > ωs /2
1
q
| Heff ( jω )| = (1 − cos ωT )2 + (sin ωT )2 |ω | < ωs /2 (19)
T
1
q
= 2(1 − cos ωT ) (20)
T
|ω |
2
T | Heff ( jω )|
ω
ωs π
2 = T
Example:
Digital implementation of a delay: y(t) = x (t − ∆)
How should we design the DT filter?
If ∆ is an integer multiple of T, then
hd [n]
yd [n] = xd [n − ∆T ] → 1
|{z} n
integer ∆
T
What if ∆T is not an integer?
We want y(t) = x (t − ∆), i.e. Y ( jω ) = e− jω∆ X ( jω ).
Therefore, the desired Heff ( jω ) is:
e− jω∆ |ω | < ω /2
s
Heff ( jω ) = (21)
0 |ω | > ωs /2
Ω
and Hd (e jΩ ) = e− j T ∆ |Ω| < π.
Then inverse Fourier Transform gives:
sin n − ∆T π
∆
hd [n] = = sinc n − (22)
n − ∆T π T
ee120 - fall’15 - lecture 11 notes 5
Examples:
1) ∆ = T
sin((n − 1)π ) 1 if n = 1
hd [n] = = (23)
( n − 1) π 0 otherwise
2) ∆ = T
2
1
sin n− 2 π
hd [n] = (24)
1
n− 2 π
∑k xd [k]sinc(n − k)
x d [1]
x d [2] x d [4]
x d [0] y d [2]
y d [1] x d [3]
y d [3]
n
∆ 1 2 3
T
ee120 - fall’15 - lecture 11 notes 6
2D Sampling
xd [n1 , n2 ] , x (n1 T1 , n2 T2 ).
x p ( t1 , t2 ) = x ( t1 , t2 ) p ( t1 , t2 )
where
p(t1 , t2 ) , ∑ ∑ δ(t1 − n1 T1 , t2 − n2 T2 ).
n1 n2
2D CTFT gives:
1
X p ( jω1 , jω2 ) =
T1 T2 ∑ ∑ X ( j (ω1 − k1 ωs1 ) , j (ω2 − k2 ωs2 ))
k1 k2
where
2π 2π
ω s1 = and ω s2 = .
T1 T2
Therefore, if x (t1 , t2 ) is bandlimited:
and
ωs1 > 2ωc1 , ωs2 > 2ωc2 ,
ω2
ω c2
(ωs1 ,0)
• ω1
ω c1
Thus, x (t1 , t2 ) can be reconstructed from its samples with a low pass
filter.
EE120 - Fall’15 - Lecture 12 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
12 October 2015
∞
p[n] = ∑ δ[n − kN ] (1)
k =−∞
∞
x p [n] = x [n] p[n] = ∑ x [kN ]δ[n − kN ] (2)
k=−∞
N=2 x [n]
× × ×
× ×
n
x p [n]
1
Fourier series coefficients of p[n] : ak = N for all k. Therefore,
∞ ∞
2π 2π
P(e jω ) = ∑ 2πa k δ ω − k
N
=
N ∑ δ(ω − kωs ).
k =−∞ |{z} k =−∞
= ωs
1
Z
X p (e jω ) = P(e jθ ) X (e j(ω −θ ) )dθ (3)
2π 2π
P(e jθ ) X (e j(ω −θ ) )
2π j(ω −kωs ) )
N X (e
··· ···
θ
k = N − 1 2π
k=0 k 2π
N
2π
ee120 - fall’15 - lecture 12 notes 2
Thus,
N −1
1 2π
X p (e jω ) =
N ∑ X (e j(ω −kωs ) ) ωs =
N
(4)
k =0
X (e jω )
1
ω
ωm 2π
1
X p (e jω )
N
ω
ωm 2π 2π
N
Hr (e jω )
N
ω
−2π ωs
2
2π
sin(πn/N )
Impulse response: hr [n] = when n 6= 0, and hr [0] = 1
πn/N
hr [kN ] = 0, k = 1, 2, 3, . . .
n
N 2N 3N
0
-5 0 5 10 15 20 25
2
1 x [0] hr [ n ]
0
-1
-5 0 5 10 15 20 25
2
1 x [ N ] hr [ n − N ]
0
-1
-5 0 5 10 15 20 25
2
1 x [2N ]hr [n − 2N ]
0
-1
-5 0 5 10 15 20 25
3
2 xr [n] = ∑k x [kN ]hr [n − kN ]
1
0
-5 0 5 10 15 20 25
x [n] × H0 (e jω ) x0 [ n ]
x p [n]
p[n]
h0 [ n ]
···
n
N−1N
Taking the DTFT of this impulse response we get the frequency re-
sponse:
N −1 sin(ωN/2)
H0 (e jω ) = e− jω 2 ω 6= 0, and H0 (e j0 ) = N (8)
sin(ω/2)
N | H0 (e jω )|
Hr (e jω )
ω
−2π −π 2π 2π
N N
ee120 - fall’15 - lecture 12 notes 4
Downsampling
Select every Nth sample, discard the rest:
xb [n] = x [ Nn] = x p [ Nn]. (9)
x p [n]
xb [n]
x[ N ]
x [0]
=⇒ Xb (e jω ) = X p (e jω/N ) (12)
X (e jω )
1
ω
ωm 2π
1
X p (e jω )
N
ω
ωm 2π 2π
N
1
Xb (e jω )
N
ω
ωm · N 2π
T NT
ee120 - fall’15 - lecture 12 notes 5
Upsampling
Inverse of downsampling:
xb [n] ↑N x [n]
x [n/N ]
b n = 0, ∓ N, ∓2N, . . .
• Expand signal by N: x p [n] =
0 otherwise
xb [n] Xb (e jω )
n ω
ωm π 2π
x p [n] X p (e jω )
jω
N Hr (e )
n ω
ωm
N
π 2π
N
x [n] X (e jω )
n ω
missing samples recovered by interpolation
ωm
N
2π 2π
N
xd [n]
xc (t) C/D ↑N ≡ xc (t) C/D
T T/N
If xc (t) is
bandlimited
by ω M < π/T
ee120 - fall’15 - lecture 12 notes 6
3
Example: xc (t) = cos ω0 t ωs = ω0
2
xc (t)
T 2T 3T t
2π 4π
w0 w0
Interpolated (red) sam-
↑ ples don’t match the
upsampling with N = 2 results of ×2 faster
sampling.
Sampling with T/2:
xc (t)
T 3T 5T
2 T 2 2T 2 3T t
X (e jω )
1
ω
2π π 2π
upsamping ×2 9
2
Xu (e jω )
ω
π
9
π 2π
downsampling ×9 Xub (e jω )
2/9
ω
π 2π
ee120 - fall’15 - lecture 12 notes 7
X (e jω )
1
ω
2π π 2π
downsampling ×9 9
Xb (e jω )
1
9
ω
upsamping ×2: π 2π
Hr (e jω ): gain= 2
cutoff: π2
2 Xbu (e jω )
9
6= Xub (e jω )
ω
π
2
π 2π
EE120 - Fall’15 - Lecture 13 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
14 October 2015
1
x (t) = e− at u(t) ↔ X ( jω ) = if a > 0 (Lecture 4)
jω + a
Find the Laplace transform:
Z ∞
X (s) = e−at e−st dt.
0
1
If Re{ a + s} < 0, then e(a+s)τ → 0 as τ → ∞: = if Re{s} < − a
s+a
ee120 - fall’15 - lecture 13 notes 2
Im Im
Ex. 1: Ex. 2:
−a Re −a Re
If the ROC includes the imaginary axis, then the Fourier transform
converges.
Example 3: x (t) = 3e−2t u(t) − 2e−t u(t)
3 2
X (s) = − ROC = {s| Re{s} > −2} ∩ {s| Re{s} > −1}
s+2 s+1
s−1 = {s| Re{s} > −1}
=
(s + 1)(s + 2)
Example 4: x (t) = e−at u(t), a: complex.
1
X (s) = if Re{s + a} > 0, i.e., if Re{s} > − Re{ a}.
s+a
1 1 1 1 1 2s s
+ = = 2
2 s − jω0 2 s + jω0 2 s2 + ω02 s + ω02
Re{s}>0 Re{s}>0
L s
cos(ω0 t)u(t) ←→ Re{s} > 0 (2)
s2 + ω02
L ω0
sin(ω0 t)u(t) ←→ Re{s} > 0 (3)
s2 + ω02
1 1 1 1 (s + a)
+ =
2 s + a − jω0 2 s + a + jω0 (s + a)2 + ω02
Re{s}>− a Re{s}>− a
L (s + a)
e− at cos(ω0 t)u(t) ←→ Re{s} > − a (4)
(s + a)2 + ω02
ee120 - fall’15 - lecture 13 notes 3
N (s)
X (s) = (5)
D (s)
Zeros: roots of N (s) (N (s) = 0), poles: roots of D (s) (D (s) = 0).
Im
Ex. 3: Ex. 5:
jω0
−2 −1 1 Re
ROC −jω0 ROC
Zeros marked with 00 o00 , and poles with 00 x00 .
Example 7:
4 1
x (t) = δ(t) − e−t u(t) + e2t u(t)
3 3
R∞
Laplace transform of δ(t): −∞ δ(t)e−st dt = 1 for all s ∈ C .
4 1 1 1
X (s) = 1− +
3s+1 3s−2
3(s + 1)(s − 2) − 4(s − 2) + (s + 1) 3s2 − 6s + 3
= =
3(s + 1)(s − 2) 3(s + 1)(s − 2)
s2 − 2s + 1 ( s − 1)2
= = if Re{s} > 2.
(s + 1)(s − 2) (s + 1)(s − 2)
Im
−1 1 2 Re
ROC
The properties below characterize the ROC for the Laplace transform
by examining the absolute integrability condition2 for the conver- 2
The other Dirichlet conditions (Lecture
gence of the Fourier transform: 4) are assumed to be satisfied.
Z ∞
| x (t)|e−σt dt < ∞. (6)
−∞
ee120 - fall’15 - lecture 13 notes 4
R T2
where e−σt is bounded in the bounded interval [ T1 , T2 ] and T1 | x (t)|dt
is bounded from the absolute integrability of x (t).
x(t)
T1 T2 t
x(t) x(t)
T1 t T2 t
1L
e−bt u(t) ←→ if Re{s} > −b (Example 1) (7)
s+b
L −1
ebt u(−t) ←→ if Re{s} < b (Example 2) (8)
s−b
Im
−b b Re
1 A B ( A + B)s + (2A + B)
X (s) = = + =
(s + 1)(s + 2) s+1 s+2 (s + 1)(s + 2)
ee120 - fall’15 - lecture 13 notes 6
)
A+B = 0 A=1
2A + B = 1 B = −1
Note that:
Possibilities:
1) x (t) = e−t u(t) − e−2t u(−t), if Re{s} > −1.
Im
−2 −1 Re
ROC
Im
−2 −1 Re
Im
−2 −1 Re
ROC
ee120 - fall’15 - lecture 13 notes 7
e− at sin(ω0 t)u(t) ω0
(s+ a)2 +ω02
Re{s} > − a
EE120 - Fall’15 - Lecture 14 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
19 October 2015
If the ROC contains the imaginary axis, then the Fourier transform is
obtained by setting s = jω in the Laplace transform:
Z ∞
X ( jω ) = x (t)e− jωt dt.
−∞
L
es0 t x (t) ←→ X (s − s0 ) ROC = R + Re{s0 } (3)
F
Compare to: e jω0 t x (t) ←→ X ( j(ω − ω0 )) in Fourier transforms.
Time-Scaling:
L 1 s
x ( at) ←→ X ROC = a · R (4)
| a| a
L
In particular, x (−t) ←→ X (−s), with ROC = − R.
ee120 - fall’15 - lecture 14 notes 2
Example:
s L
cos(ω0 t)u(t) ←→ Re{s} > 0
+ ω02 s2
L −s
cos(−ω0 t)u(−t) = cos(ω0 t)u(−t) ←→ 2 Re{s} < 0
s + ω02
Conjugation:
L
x ∗ (t) ←→ X ∗ (s∗ ) ROC unchanged (5)
L
x1 (t) ∗ x2 (t) ←→ X1 (s) X2 (s) ROC contains R1 ∩ R2 (6)
dx (t) L
←→ sX (s) ROC contains R but can be larger (7)
dt
Example:
L 1
x (t) = u(t) ←→ X (s) = R = {s : Re{s} > 0}
s
dx (t) L
= δ(t) ←→ 1 for all s ROC : entire complex plane
dt
Example:
L ω0
x (t) = sin(ω0 t)u(t) ←→ Re{s} > 0
s2 + ω02
dx (t) L ω s
= ω0 cos(ω0 t)u(t) ←→ 2 0 2 Re{s} > 0
dt s + ω0
L dX (s)
−tx (t) ←→ ROC unchanged for exponential signals (8)
ds
R∞ dX (s) R∞
Proof: X (s) = −∞ x (t)e−st dt then ds = −∞ −tx (t)e−st dt.
ee120 - fall’15 - lecture 14 notes 3
Example:
L 1
e− at u(t) ←→
s+a
L d 1 1
te− at u(t) ←→ − =
ds s + a ( s + a )2
L d 1 2
t2 e− at u(t) ←→ − 2
=
ds (s + a) ( s + a )3
..
.
L n!
tn e− at u(t) ←→
( s + a ) n +1
1 A1 A A22
X (s) = 2
= + 21 +
(s + 1)(s + 2) s + 1 s + 2 ( s + 2)2
A1 (s + 2)2 + A21 (s + 1)(s + 2) + A22 (s + 1)
=
(s + 1)(s + 2)2
Integration in Time:
Z t
L 1
x (τ )dτ ←→ X (s) ROC contains R ∩ {s : Re{s} > 0} (9)
−∞ s
Rt
Follows from the convolution property: −∞ x (τ )dτ = x (t) ∗ u(t).
Rt
Example: x (t) = δ(t) ↔ 1 ∀s, −∞ x (τ )dτ = u(t) ↔ 1s Re{s} > 0.
Example:
1
e− at u(t) ↔ 1 e−at
s+a
s
lim = 1 = e−at u(t)|t=0+
s→∞ s+a t
Final Value Theorem:
If x (t) = 0 for all t < 0 and x (t) has a finite limit as t → ∞, then
N M
dk y(t) dk x (t)
∑ ak dt k
= ∑ bk
dtk Figure 1: Oliver Heaviside (1850-1925),
k =0 k =0
a self-taught electrical engineer, in-
Take the Laplace transform of both sides and use differentiation vented the "operational calculus" where
d
property: the differential operator dt is treated as
N M a symbol (’s’ in our case) and a linear
∑ a k s k Y ( s ) = ∑ bk s k X ( s ) differential equation is manipulated
algebraically. Dynamic circuit elements
k =0 k =0
could now be represented with simple
algebraic expressions similar to Ohm’s
Y (s) ∑ M b sk b s M + b M−1 s M−1 + ... + b0 Law (e.g. Ls for inductance). Heavi-
H (s) = = kN=0 k = M N side’s method had found widespread
X (s) ∑ k =0 a k s k a N s + a N −1 s N −1 + ... + a0 use by the time others established the
full mathematical justification with the
help of a transform used by Laplace a
Poles of the system: roots of a N s N + a N −1 s N −1 + ... + a0 century earlier. Heaviside had many
other contributions, including condens-
ing Maxwell’s theory of electromag-
Zeros of the system: roots of b M s M + b M−1 s M−1 + ... + b0
netism into the four vector equations
known today. He further coined the
terms "inductance" and "impedance,"
and the unit step u(t) is sometimes
referred to as the Heaviside function.
ee120 - fall’15 - lecture 14 notes 5
Example:
R L
+
+ di
x(t)
− C y(t) y(t) + L + Ri = x (t)
− dt
dy
Substitute i = C dt :
d2 y dy
LC + RC + y(t) = x (t).
dt2 dt
Therefore,
1
H (s) = .
LCs2 + RCs + 1
√
Poles: − RC ∓ R2 C2 −4LC . No zeros.
2LC
R2 C2 < 4LC.
Example: Consider the RLC circuit above and redefine the output to
be the current instead of the capacitor voltage: y(t) , i (t). Then,
d dy
C x (t) − Ry(t) − L = y ( t ).
dt dt
| {z }
voltage across capacitor
Rearrange terms:
d2 y dy dx
LC 2
+ RC + y = C .
dt dt dt
Then, the transfer function is:
Cs
H (s) = .
LCs2 + RCs + 1
Zero at s = 0 blocks constant inputs: When x (t) = e0t ≡ 1, y(t) ≡ 0.
2
values of s in the complex plane.
1.5
1
Note that est is oscillatory when s has
1
0.8
0.6
1
0.8
0.6
1
0
an imaginary component. It grows
0.5
0.2 0.2
0 0
0 -1
-0.4 -0.4
-0.5
-0.6 -0.6
-2
-0.8
1.5
1 2
1
1
0.8
0.8
0.6
0.6
1
0.4 0.5
0.4
0.2
0.2
0
0
0 0
-0.2
-0.2
-0.4
-0.4
-0.5
-1
-0.6
-0.6
-0.8 -0.8
-1 -1
-1
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 -2
-1.5
0 1 2 3 4 5 6 7 8 9 10
-3
0 1 2 3 4 5 6 7 8 9 10
2
2.8
1.8
2.6
1.6
2.4
1.4
2.2
1.2
2
1
1 1
0.9
0.9
1.8
0.8 0.8
0.8
0.7
1.6
0.6 0.7 0.6
0.5
0.6
0.4 1.4
0.4
0.5
0.3
0.2 1.2
0.4
0.2
0.1
0 1 2 3 4 5 6 7 8 9 10
0.3
0 1 2 3 4 5 6 7 8 9 10 0 1
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Re{s}
EE120 - Fall’15 - Lecture 15 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
21 October 2015
1
H (s) = Re{s} > −1
s+1
A causal LTI system with rational H (s) is stable if and only if all
poles of H (s) are in the open left half-plane, i.e., all poles have
negative real parts.
Note: ”Open” left half-plane means that the imaginary axis is ex-
cluded.
Example (poles on the imaginary axis cause instability):
1
H (s) = (integrator)
s
If the input is x (t) = u(t), then X (s) = 1s and Y (s) = H (s) X (s) = s12 .
Then, y(t) = tu(t) which is unbounded although the input x (t) is
bounded.
Example (Butterworth filters):
1
| H ( jω )|2 = ωc : cutoff frequency, N : filter order
1 + (ω/ωc )2N
|H(jω)|
larger N :
1 sharper transition
√1
2
ωc ω
Derive the transfer function of a causal and stable LTI system with
real-valued h(t) that gives this frequency response.
ee120 - fall’15 - lecture 15 notes 3
1 1
| H ( jω )|2 = H ( jω ) H ∗ ( jω ) = 2N =⇒ H (s) H (−s) = 2N
| {z } jω s
H (− jω )
1+ jωc 1+ jωc
since h(t) is real
s 2N
Thus, the roots of 1 + = 0 are the poles of H (s) combined
jωc
| {z }
with the poles of H (−s).
s 2π
= e j( 2N +k 2N )
π
k = 0, 1, ..., 2N − 1
jωc
2π
e j 2 ωc e j( 2N +k 2N )
π π
s = |{z}
j
N =3
k=0 k=5
30o
k=1
k=4
k=2 k=3
| {z } | {z }
H(s) H(−s)
Since the filter is to be causal and stable, H (s) must contain the N
poles in the left-half plane (k = 0, 1, ..., N − 1) and H (−s) must
contain the rest k = N, ..., 2N − 1.
Denominator of H (s) for N = 3:
(s + ωc )(s + ωc e j 3 )(s + ωc e− j 3 )
π π
| {z }
π
s2 +2cos ( )ωc s+ωc2
| {z 3 }
=1
ωc3
Therefore, H (s) = s3 +2ωc s2 +2ωc2 s+ωc3
(so that H (0) = dc-gain = 1)
Normalized transfer function for the N = 3 example above:
0 1 0 s
H (s) = 3 H (s) = H for any desired ωc
s + 2s2 + 2s + 1 ωc
ee120 - fall’15 - lecture 15 notes 4
−1 Re ω
Im
∡H(jω)
jω
ω
1
+
jω
−90o
∡jω + 1
Re
s +1
Example: H (s) = s+10
|H(jω)|
Im 1
∡H(jω)
jω
1/10
10
ω
1
+
jω +
jω
∡H(jω)
−10 −1 Re
ω
1 1+ jω
compare to Bode plots: H ( jω ) = 10 1+ jω/10
20log10 |H(jω)|
1 10 100
0dB
ω
−20dB
∡|H(jω)|
π/2
π/4
1 10 100
ω
ee120 - fall’15 - lecture 15 notes 5
ωn2
H (s) = (1)
s2 + 2ζωn s + ωn2
ωn2
H ( jω ) =
( jω )2 + 2ζωn ( jω ) + ωn2
Im
jωn sinθ
ωn
θ
−jωn cosθ
Re
Im
|H(jω)|
jωn sinθ
q
= jωn 1 − ζ 2
1
ω
Re
√
peak at ω = ωn 1 − 2ζ 2
-0.5
-1
0 5 10 15
ωn t ωn ωn
Step response
2
s(t)
1.5
0.5
0
0 5 10 15
ωn t ωn ωn
EE120 - Fall’15 - Lecture 16 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
26 October 2015
All-Pass Systems
Section 9.4.3 in Oppenheim & Willsky
What is the frequency response of an LTI system with transfer func-
tion:
a−s
H (s) = , a > 0?
s+a
Im
|H(jω)|
jω
ϕ = −∡(a − jω) 1
ϕ
−a a Re ω
∡H(jω) = −2ϕ = −2tan−1 (ω/a)
ω
−π/2
−π
For a stable and causal all-pass system, all zeros are in the right half-
plane because they are mirror images of the poles.
where:
] Hap ( jω )
τ (ω ) , − > 0.
ω
Moreover, the system is not linear phase (i.e. τ (ω ) is not constant);
therefore it causes phase distortion. (Recall Lecture 8.)
A stable and causal LTI system is called minimum phase if all of its
zeros are in the open left half-plane.
ee120 - fall’15 - lecture 16 notes 2
but the all-pass component adds more delay. Therefore, H (s) and
Hmin (s) have identical frequency responses in magnitude, but Hmin (s)
has the minimum phase delay.
10 − s s + 10 10 − s
Example: H (s) = = ·
10(s + 1) 10(s + 1) s + 10
| {z } | {z }
Hmin (s) Hap (s)
Hmin (s) Im
−10
−1 10
Re
Hap (s)
∡|H(jω)|
0dB 1 10 100 ω
−45o
ω ∡Hmin (jω)
−90o
∡H(jω)
−20dB
−180o
Example:
Hd (s) Hc (s)
distorting system, compensating
e.g.,comm.channel system
1
If Hd (s) is minimum phase, we can simply choose Hc (s) = Hd (s)
.
If Hd (s) is nonminimum phase, Hc (s) = H 1(s) is unstable. To avoid
d
instability, decompose: Hd (s) = Hd,min (s) Hd,ap (s) and select:
1
Hc (s) = =⇒ Hd (s) Hc (s) = Hd,ap (s)
Hd,min (s) | {z }
magnitude distortion eliminated
ee120 - fall’15 - lecture 16 notes 3
h1 (t)
h ( t ) = h1 ( t ) + h2 ( t )
x(t) y(t)
h2 (t) H (s) = H1 (s) + H2 (s)
h ( t ) = h1 ( t ) ∗ h2 ( t )
x(t) h1 (t) h2 (t) y(t)
H (s) = H1 (s) H2 (s)
e(t) x(t)
r(t) Hc (s) Hp (s) y(t)
−
Hc (s) H p (s)
H (s) =
1 + Hc (s) H p (s)
Example:
r(t)
K
Ms 1 M y(t)
H (s) = K
= τ=
1+ Ms
τs + 1 K
y(t) for smaller τ t
(larger K)
ee120 - fall’15 - lecture 16 notes 4
1
Example: x ( t ) = e − a ( t +1) u ( t + 1 )
e−a
−1 t
es
X (s) = Re{s} > − a
s+a
e− a
X (s) = Re{s} > − a
s+a
Most properties of the bilateral Laplace transform also hold for the
unilateral Laplace transform.
Exceptions:
Convolution:
dx (t)
←→ sX (s) − x (0− )
dt
d2 x ( t ) d dx (t)
dx
2
= ←→ s sX (s) − x (0− ) − (0− )
dt dt dt dt
dx
= s2 X (s) − sx (0− ) − (0− )
dt
d3 x ( t ) d d2 x ( t ) d2 x −
2 − dx −
= ←→ s s X ( s ) − sx ( 0 ) − ( 0 ) − (0 )
dt3 dt dt2 dt dt2
dx − d2 x
= s 3 X ( s ) − s 2 x (0− ) − s (0 ) − 2 (0− )
dt dt
ee120 - fall’15 - lecture 16 notes 5
Example:
d2 y ( t ) dy
2
+ 3 + 2y(t) = et t ≥ 0 (4)
dt dt
dy −
Initial condition y(0− ) = a, dt (0 ) = b.
1
(s2 Y (s) − as − b) + 3(sY (s) − a) + 2Y (s) = s −1
1 as2 +(b+2a)s+(1−b−3a)
(s2 + 3s + 2)Y (s) = as + b + 3a + s −1 = s −1
as2 +(b+2a)s+(1−b−3a)
Y (s) = (s+1)(s+2)(s−1)
A1 A2 B
Y (s) = + +
s+1 s+2 s−1
( A1 + A2 + B)s2 + ( A1 + 3B)s + (2B − 2A1 − A2 )
=
(s + 1)(s + 2)(s − 1)
Match coefficients:
A1 + A2 + B = a
B = 1/6
A1 + 3B = b + 2a A1 = − 12 + 2a + b
= 31 − a − b
2B − 2A1 − A2 = 1 − b − 3b A
2
Then,
1 t 1 −t 1
y(t) = e + − + 2a + b e + − a − b e−2t t ≥ 0.
6 2 3
d2 y p ( t ) dy p
2
+3 + 2y p (t) = et .
dt dt
The second and third terms constitute the homogeneous solution. If
we substitute yh (t) = A1 e−t + A2 e−2t :
d2 y h ( t ) dy
+ 3 h + 2yh (t) = 0.
dt2 dt
Thus, y(t) = y p (t) + yh (t) and A1 and A2 are selected to satisfy the
initial conditions.
EE120 - Fall’15 - Lecture 17 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
28 October 2015
The z-Transform
Chapter 10 in Oppenheim & Willsky
∞
X (z) , ∑ x [ n ] z−n (1)
n=−∞
X (z) = X (e jω ) : DTFT (2)
z=e jω
The DTFT converges if the ROC for the z-transform includes the unit
circle z = e jω :
Im
ejω
∞ ∞
1
X (z) = ∑ an z−n = ∑ (az−1 )n = 1 − az−1 if | az−1 | < 1
n =0 n =0
| {z }
ROC: |z|>| a|
Yakov
Tsypkin
DTFT: John
Ragazzini
Eli
Jury
Lo�i
Zadeh
1
(Moscow)
X (e ) =
(1Columbia)
jω
− ae− jω
if | a| < 1
−1 ∞ Im
X (z) = ∑ − an z−n = ∑ − a−n zn
n=−∞ n =1
∞
= 1− ∑ ( a −1 z ) n
n =0
1
a Re
= 1− if | a−1 z| < 1
1 − a −1 z
− a −1 z 1 ROC
= = ROC : |z| < | a|
1 − a −1 z 1 − az−1
1
1 1 z z 2z(z − 12 )
X (z) = + = + =
1 − 12 z−1 1 + 13 z−1 z− 1
2 z− 1
2 (z − 1 1
2 )( z + 3 )
1 1
|z| < |z| >
| 2 {z 3}
ROC: 1 <| z |< 1
3 2
Im
− 31 1
2
Re
n n
Example 4: x [n] = 1
u[n] − −1 u[−n − 1]
2 3
Example 5: x [n] = an , a 6= 0.
x [n] = an u[n] + an u[−n − 1]
ROC = {z : |z| > a} ∩ {z : |z| < a} = ∅
Example 6:
a)
z2 + z + 1
1 X ( z ) = 1 + z −1 + z −2 =
z2
ROC excludes z = 0 because of the
n pole at z = 0.
If x [n] 6= 0 for some n > 0, ROC excludes z = 0.
b)
1 X ( z ) = z2 + z + 1
n ROC excludes z = ∞.
Example:
1 A1 A2
X (z) = = 1 −1
+
1 − 21 z−1
1− 1 −1
1− 1 −1 1 − 4z
4z 2z
1 −1
A1 = 1− z X (z)|z= 1 = −1
4 4
1 −1
A2 = 1− z X (z)|z= 1 = 2
2 2
1) 2) 3)
− 41 1
2
ROC
n n n n n n
1 1 1 1 1 1
x [n] = 2 − u[n] x [n] = − 2 − u[−n − 1] x [ n ] = −2 u[−n − 1] − u[n]
2 4 2 4 2 4
b0 + b1 z−1 + . . . + b M z− M
X (z) = , a0 6 = 0
a 0 + a 1 z −1 + . . . + a N z − N
Suppose unrepeated poles: d1 , d2 , ..., d N .
If M < N,
N
Ak
X (z) = ∑ 1 − d k z −1
k =1
If M ≥ N,
M− N N
Ak
X (z) = ∑ Br z−r + ∑ 1 − d k z −1
r =0 k =1
⇓
M− N N
x [n] = ∑ Br δ[n − r ] + ∑ Ak dnk u[n]
r =0 k =1
| {z }
if right-sided
Example:
1 + 2z−1 + z−2
X (z) = M=N=2
1 − 32 z−1 + 12 z−2
A1 A2
= B0 + +
1 − 12 z−1 1 − z −1
ee120 - fall’15 - lecture 17 notes 5
Example:
Z 1
an u[n] ←→
1 − az−1
az−2 az−1
Z d 1
nan u[n] ←→ −z −
=z −
=
dz 1 − az 1 (1 − az )1 2 (1 − az−1 )2
− 12 + z−1 M=1 1
Example: X (z) = |z| >
(1 − 21 z−1 )2 N=2 2
1 −1
1 2z
= A11 1 −1
+ A12 2
1− 2z 1 − 12 z−1
A11 + 21 ( A12 − A11 ) z−1
= 2
1 − 12 z−1
)
A11 = − 12 3
1 A12 =
2 ( A 12 − A 11 ) = 1 2
n
1 3 1
x [n] = − + n u[n]
2 2 2
ee120 - fall’15 - lecture 17 notes 6
x[n]
1 X ( z ) = z + 1 + z −1
↔
ROC excludes 0 and ∞.
−1 1 n
x[n − 1]
X ( z ) = 1 + z −1 + z −2 =
1
↔ z −1 X ( z )
ROC now includes |z| = ∞.
0 1 2 n
Example: Find the inverse z-Transform (right-sided) of
1 1
X (z) = =z
1 − 12 z−1
1 −1
z −1
1− 2z
n +1
1
x [n] = u [ n + 1]
2
4) Time Reversal:
Z 1
x [−n] ←→ X ROC = 1/R
z
ee120 - fall’15 - lecture 18 notes 2
Example:
n
1 1 1
x [n] = u[n] ↔ X (z) = |z| >
2 1 − 12 z−1 2
−2z−1
1 1
x [−n] = 2n u[−n] ↔ X = = |z| < 2
z 1
1 − 2z 1 − 2z−1
5) Convolution Property:
Z
x1 [n] ∗ x2 [n] ←→ X1 (z) X2 (z) ROC contains R1 ∩ R2
6) Differentiation in z-domain:
Z dX (z)
nx [n] ←→ −z ROC unchanged
dz
Example:
Z az−1
nan u[n] ←→ |z| > | a|
(1 − az−1 )2
DT LTI Systems
Section 10.7 in Oppenheim & Willsky
Recall: For a right-sided x [n] with rational X (z), ROC extends from
the outermost pole to infinity (infinity included if x [n] = 0 ∀n < 0).
Examples: z3 − 2z2 + z
H (z) =
z2 + 14 z + 81
ROC can’t include |z| = ∞ because the numerator has higher order
than the denominator: 3 > 2 =⇒ not causal
Stability
∞
∑ |h[n]| < ∞ means that the ROC includes the unit circle.
n=−∞
s-plane z-plane
Im Im
Re 1 Re
stability region
N M
∑ ak y[n − k ] = ∑ bk x [ n − k ]
k =0 k =0
N M
∑ ak z−k Y (z ) = ∑ bk z − k X ( z )
k =0 k =0
Y (z) ∑kM=0 bk z−k
H (z) = =
X (z) ∑kN=0 ak z−k
Example:
1 1 1 + 13 z−1
y[n] − y[n − 1] = x [n] + x [n − 1] =⇒ H (z) =
2 3 1 − 12 z−1
ee120 - fall’15 - lecture 18 notes 4
Im
ejω
b ∏k=1 |1 − ck e− jω |
M
| H (e )| = 0 N
jω
V1
a0 ∏k=1 |1 − dk e− jω |
dk Re
|1 − dk e− jω | = |e jω − dk | = |V1 |
Example:
Im
1 + z −1 ejω
H (z) = |{z}
0.05
1 − 0.9z−1 V2
s.t. H (1)=1 (dc gain) ω V1
|V2 | Re
| H (e jω )| = 0.05
|V1 |
|H(jω)|
1
π 2π ω
Simple Filters:
Low-Pass:
1 − α 1 + z −1
H (z) = , |α| < 1 for stability
2 1 − αz−1
High-Pass:
1 + α 1 − z −1
H (z) = , H (1) = 0 and H (−1) = H (e jπ ) = 1
2 1 − αz−1
|H(jω)|
11
√ 1 − sin(ωc )
2 α=
cos(ωc )
ωc π ω
Band-Stop (Notch):
Im
zeros on the unit circle: e∓ jω0
poles approach zeros as α → 1.
ω0
Re 1+α 2 ± 2β
H (∓1) = =1
2 (1 + α)(1 ± β)
|H(jω)| larger α
1
ω0 = π ω
= cos−1 (β)
Band-Pass:
1−α 1 − z −2
H (z) = , |α| < 1 | β| < 1
2 1 − β(1 + α)z−1 + αz−2
Im |H(jω)|
1
larger α
Re
ω0 = π ω
−1
= cos (β)
EE120 - Fall’15 - Lecture 19 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
4 November 2015
1
y[n] = ( x [n] + x [n − 1] + . . . + x [n − M])
M+1
h[n]
1
M +1
...
M n
1
H (z) = 1 + z −1 + . . . + z − M
M+1
1 z M + z M −1 + . . . + 1
=
M+1 zM
2π
(M = 7) Im M +1
|H(ejω )|
2π
1
M +1
M poles Re
2π π ω
M +1
ee120 - fall’15 - lecture 19 notes 2
ejω 1 − a 1 + z −1 1−az+1
H (z) = =
V2 2 1 − az−1 2 z−a
V1 jω
ϕ1 1−ae +1 1 − a V2
ϕ2 H (e jω ) = =
−1 a Re 2 e jω − a 2 V1
1 − a |V2 |
| H (e jω )| = ] H (e jω ) = φ2 − φ1
2 |V1 |
|H(ejω )|
1 ∡H(ejω )
Continuous-time: Discrete-time:
a−s z −1 − a z − 1/a
H (s) = H (z) = = −a , a real
s+a 1 − az − 1 z−a
Im
Im
jω
ejω
V1 V2
V1 V2
ω
Re a 1 Re
a
|V1 | = |V2 | ∀ω
|e jω − 1/a| |V |
| H (e jω )| = | a| = | a| 2 = 1 ∀ω
|e jω − a| |V1 |
ee120 - fall’15 - lecture 19 notes 3
N
z −1 − a k
H (z) = ∏ 1 − a k z −1
k =1
where Hmin (z) is minimum phase and Hap (z) is all pass.
Construct Hap (z) such that it encompasses all zeros of H (z) outside
the unit circle. Obtain Hmin (z) from H (z)/Hap (z).
Example:
1 − 3z−1
H (z) = zero @ 3 outside the unit circle
1 − 21 z−1
Im
Hmin
1/2 3
Re
Hap
Example:
1
If Hd (z) is minimum phase, we can design Hc (z) = Hd (z)
(stable).
Convolution:
UZ
x1 [n] ∗ x2 [n] ←→ X1 (z)X2 (z) if x1 [n] = x2 [n] = 0 ∀n < 0.
Time Delay:
UZ
x [n − 1] ←→ z−1 X (z) + x [−1]
Z
Contrast to: x [n − 1] ←→ z−1 X (z)
Proof:
∞
∑ x[n − 1]z−n = x[−1] + |x[0]z−1 + x[1]z−{z2 + x[2]z−3 + . .}.
n =0
−1
= z −1 ( x [ 0 ] + x [ 1 ] z + x [ 2 ] z −2 + . . . )
| {z }
=X (z)
ee120 - fall’15 - lecture 19 notes 5
Applying repeatedly:
UZ
x [ n − 2] ←→ z−1 (z−1 X (z) + x [−1]) + x [−2]
= z−2 X (z) + x [−1]z−1 + x [−2]
UZ
x [ n − 3] ←→ z−1 (z−2 X (z) + x [−1]z−1 + x [−2]) + x [−3]
= z−3 X (z) + x [−1]z−2 + x [−2]z−1 + x [−3]
1 1 + 0.6y[−1] − 0.3y[−1]z−1
(1 − 0.6z−1 )Y (z) = 0.6y[−1] + −
=
1 − 0.5z 1 1 − 0.5z−1
(1 + 0.6y[−1]) − 0.3y[−1]z−1 A B
Y (z) = − −
= −
+
1
(1 − 0.6z )(1 − 0.5z )1 1 − 0.6z 1 1 − 0.5z−1
)
A + B = 1 + 0.6y[−1] B = −5
0.5A + 0.6B = 0.3y[−1] A = 6 + 0.6y[−1]
y[n] = (6 + 0.6y[−1])(0.6)n u[n] − 5(0.5)n u[n]
H1 (z)
x[n] y[n] Y (z) = ( H1 (z) + H2 (z)) X (z)
H2 (z)
Example:
b0 b0
+ +
x [n] y[n] x [n] y[n]
z −1 z −1
b1 b1
+ ⇒ +
= b1 + b2 z−1
z −1 z −1
b2 b2
Example:
x [n]
+ y[n] x [n]
+ y[n]
z −1 z −1
− a1 − a1
+ ⇒ +
z −1 = − a 1 − a 2 z −1
z −1
(parallel)
− a2 − a2
b0 + b1 z−1 + . . . + b M z− M
H (z) =
1 + a 1 z −1 + . . . + a N z − N
b0
x [n] + + y[n]
D D
b1 − a1
+ +
D D
b2 − a2
+ +
H1 (z) = b0 + b1 z−1 + . . . + b M z− M
Changing the order of H1 (z) and H2 (z) does not change the product
and allows us to use fewer delay elements, as was done in Lecture 2.
(See figure on next page.)
b0
x [n] + I
w1 [ n + 1 ]
+ y[n]
− a1 w1 [n] b1
+ +
D
− a2 w2 [n] b2
Step 2: Note that the input signal to the ith delay element is wi [n + 1]
so that its output is wi [n]. By inspecting the interconnection, ex-
press these inputs in terms of the input x [n] and state variables
w1 [n], w2 [n], ... In the block diagram above:
w1 [ n + 1 ] = − a 1 w1 [ n ] − a 2 w2 [ n ] + x [ n ]
w2 [ n + 1 ] = w1 [ n ]
Step 3: Take the z transform of these equations and solve for W1 (z),
W2 (z), ... in terms of X (z).
Step 4: Express Y (z) in terms of X (z) and W1 (z), W2 (z), ..., again
using the interconnection. Then substitute W1 (z), W2 (z),... from the
previous step so Y (z) depends on X (z) only.
b0 z2 + b1 z + b2
Y (z) = b0 zW1 (z) + b1 W1 (z) + b2 W2 (z) = X (z)
z2 + a1 z + a2
b0 z2 + b1 z + b2 b0 + b1 z−1 + b2 z−2
H (z) = = .
z2 + a1 z + a2 1 + a 1 z −1 + a 2 z −2
ee120 - fall’15 - lecture 19 notes 9
Exercise: Show that the block diagram below yields the same trans-
fer function
b0 + b1 z−1 + b2 z−2
H (z) = .
1 + a 1 z −1 + a 2 z −2
b0
x [n] + y[n]
b1 − a1
+
b2 − a2
+
EE120 - Fall’15 - Lecture 20 Notes1 1
Licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike
Murat Arcak 4.0 International License.
9 November 2015
Feedback Control
Chapter 11 in Oppenheim & Willsky
e(t) x(t)
r(t) Hc (s) Hp (s) y(t)
−
KH p (s)
H (s) =
1 + KH p (s)
1
H p (s) = −→ open-loop pole: s = 0
Ms
1 K
Closed-loop pole: 1 + K Ms = 0 =⇒ s = − M
step response:
Im
r(t)
K→∞ Re
K=0
larger K t
ee120 - fall’15 - lecture 20 notes 2
d2 y dy 1 1
M 2
+b = x (t) H p (s) = =
dt dt Ms2 + bs s( Ms + b)
K
1+ = 0 =⇒ Ms2 + bs + K = 0
s( Ms + b)
√
−b ∓ b2 − 4KM
s=
2M
step response:
Im
b2
K> 4M
b2
K= 4M
b
−M Re
b2
K< 4M
Root-Locus Analysis
Section 11.3 in Oppenheim & Willsky
How do the roots of
1 + KH (s) = 0
1
H (s) = − →∞
K
Since there are n poles, the root locus has n branches, each starting at
a pole of H (s).
ee120 - fall’15 - lecture 20 notes 3
∑nk=1 αk − ∑m
k =1 β k
n−m
with angles:
180o + (i − 1)360o
i = 1, 2, ..., n − m.
n−m
Proof of Property 3:
m n
] H ( s0 ) = ∑ ](s0 − β k ) − ∑ ](s0 − αk )
k =1 k =1
4) Branches between two real poles must break away into the com-
plex plane for some K > 0. The break-away and break-in points can
be determined by solving for the roots of
dH (s)
=0
ds
that lie on the real line.
Example 2 above:
1
H (s) =
Ms2 + bs
ee120 - fall’15 - lecture 20 notes 4
dH −2Ms − b −b
= =0 ⇒ s=
ds ( Ms2 + bs)2 2M
Example 3:
s−1
H (s) =
(s + 1)(s + 2)
n = 2, m = 1, zeros: s = 1, poles: s = 1, −2.
| {z }
one asymptote
with angle 180o
Im
Re
Example 4:
s+2
H (s) = n − m = 1 asymptote with angle 180o
s ( s + 1)
Im
break-away/ break-in points:
dH s2 + s − (2s + 1)(s + 2)
= =0
ds s2 ( s + 1)2
−2 −1 Re
s2 + s − (2s2 + 5s + 2) = 0
√
2 −4 ∓ 8 √
√ s + 4s + 2 = 0 ⇒ s = = −2 ∓ 2
2
circle w/ radius 2
centered at −2
Example 5:
s+2
H (s) = a>2
s(s + 1)(s + a)
(pole at − a added to the previous example)
n − m = 2, therefore two asymptotes with angles ∓90o
(0−1− a)−(−2) 1− a
center of the asymptotes: 2 = 2
ee120 - fall’15 - lecture 20 notes 5
a=4
Im
1−a
2
−a −2 −1 Re
dH(s)
determined from ds =0
dH
For large enough a, ds = 0 has three real, negative roots:
Im
−a Re
60o
center
ωn2
H (s) =
s2 + 2ζωn s + ωn2 Im
ωd
ζ: damping ratio, ωn : natural frequency
ωn
σ ωd
z }| { z }| {
Poles: s1,2 = −ωn cosθ ∓ jωn sinθ where cos θ = ζ θ
−σ Re
Below are the step responses for various values of ζ. Note that ωn
changes only the time scale, not the shape of the response.
2
1 = 0.1
1 = 0.2
1.5 1 = 0.4
1 = 0.7
1 = 1.0
s(t)
0.5
0
0 5 10 15
ωn t ωn ωn
Mp
∓1%
1
0.9
0.1
tr tp ts t
ee120 - fall’15 - lecture 21 notes 2
L 1
u(t) : unit step ←→
s
Step response:
1 ωn2
Y (s) = H (s) = (1)
s s(s2 + 2ζωn s + ωn2 )
A B B∗
= + +
s s + σ + jωd s + σ − jωd
1 σ
A=1 B=− 1+j
2 ωd
y(t) = 1 + Be−σt e− jωd t + B∗ e−σt e jωd t u(t)
= 1 + Be− jωd t + B∗ e jωd t e−σt u(t)
| {z }
= 2Re{|Be− jωd t
{z } }
=− 21 1+ j ωσ (cosωd t− jsinωd t)
d
= − cosωd t + ωσd sinωd t
σ −σt
y(t) = 1 − cosωd t + sinωd t e u(t)
ωd
Peaking time:
d −σt σ
y(t) = σe dt +
cosω sinωd t − e−σt (−ωd sinωd t +
σcosω d t)
dt
ωd
2
σ
= e−σt + ωd sinωd t
ωd
d π
y(t) = 0 =⇒ sinωd t = 0 tp =
dt ωd
4.6
ts ≈ (obtained from e−σts = 0.01)
σ
1.8
tr ≈ for ζ = 0.5 (changes little with ζ)
ωn
ee120 - fall’15 - lecture 21 notes 3
y(t) y(αt)
ωn
−→
Re
t t
Im
Re
1) 2) 3)
Im Im
Im
r2
Re r r1 Re Re
√
r= r1 r2
Example:
x(t): force y(t): position
M
d2 y dy 1
M 2
+b = x (t) → H p (s) = 2
dt dt Ms + bs
Suppose a damping ratio of ζ = 0.7 is desired:
Im
select the gain K that corresponds
ζ = 0.7 to this point on the root locus
(θ = 45o )
Re
Re
desired region
for closed-loop
poles (shaded)
The root locus doesn’t go through the desired region, therefore con-
stant gain control won’t work. Try the controller:
s−β
Hc (s) = K α < β < 0 (pole to the left of zero)
s−α
ee120 - fall’15 - lecture 21 notes 5
Closed-loop poles:
Hc (s) H p (s)
z }| {z }| {
s− β
1 + K s−α s( Ms1+b) = 0
| {z }
H (s)
Select α, β such that the root locus passes through the desired region
Im
α β Re
select gain K
from this segment
s−β
Hc (s) = K α<β<0
s−α
|Hc (jω)|
0dB 1 10 100
ω
−20dB
”phase-lead”
o
90
1 10
100 ω
−90o
ee120 - fall’15 - lecture 21 notes 6
β µ −1
is applied, the relationship between the new input x̃ and the output y
is again a saturation nonlinearity (show this), but the new gain is
µ
≈ β −1
1 + βµ
1
x
x̃ y
µ −1
−
⇒ x̃ 1+ βµ
y
µ
≈ β µ −1
ee120 - fall’15 - lecture 21 notes 7
e(t)
r(t) Hc (s) Hp (s) y(t)
−
1 1 1
R(s) = =⇒ E(s) = ·
s 1 + Hc (s) H p (s) s
1
H p (s) = Hc (s) = K x(t) y(t): position
Ms2 + bs M
K
Hc (s) H p (s) = → ess = 0
s ( Ms + b)
y(t) large K
1
small K
t
ee120 - fall’15 - lecture 22 notes 2
1 1
ess = = 6= 0
1 + Hc (0) H p (0) 1 + K/b
1 K/b
yss = 1 − ess = 1 − =
1 + K/b 1 + K/b
small K
t
Integral Control
R L
ω
+ +
x(t) − kω
−
J
dω (t)
J = ki (t)
dt
di (t)
L = −kω (t) − Ri (t) + x (t)
dt
ee120 - fall’15 - lecture 22 notes 3
X (s) − kY (s)
JsY (s) = k
Ls + R
Im
[ Js( Ls + R) + k2 ]Y (s) = kX (s)
Y (s) k
H p (s) = =
X (s) JLs2 + JRs + k2
Re
1 1
ess = = K
6= 0
1 + KH p (0) 1+ k
Increasing the gain reduces ess , but leads to a poorly damped system:
y(t)
larger K
1
smaller K
t
K
Integral Control: Hc (s) = s
Im
ωn smaller than
cst. gain control
Re
y(t)
1
t
ee120 - fall’15 - lecture 22 notes 4
Ks−β
Hc (s) = α < β < 0.
s s−α
The main features of this controller are similar to PID (proportional-
integral-derivative) control which is very popular in industry.
d(t) y(t)
t t
δ(t)
H p (s) 1
∆(s) =
1 + Hc (s) H p (s) s
H p (s)
lim δ(t) = lim s∆(s) = lim
t→∞ s →0 s→0 1 + Hc ( s ) H p ( s )
To remove the offset the control Hc (s) itself must have a pole at s = 0.
x 1
e s−λ s−λ y
In the time domain the first and second blocks satisfy, respectively
de(t) dy(t)
x (t) = − λe(t) and = λy(t) + x (t).
dt dt
Combining the two, we get:
d
(y(t) − e(t)) = λ(y(t) − e(t)) ⇒ y(t) − e(t) = (y(0) − e(0))eλt .
dt
Thus, instead of y(t) = e(t), we have
e
y ↓i
+
r L1 x L2 R2
−
x (t)
d
L2 e(t) − = x (t)
dt R2
| {z }
= i (t)
X (s) X (s)
L2 s
⇒ L2 s E ( s ) − = X (s) ⇒ = L2
.
R2 E(s)
R2 s + 1
e L2 s x 1
r L2 y
R2 s +1 L1 s
−
+
L1 L2 0 R2
−