You are on page 1of 178

1.

s to Z-Domain Transfer Function


1. s to Z-Domain Transfer Function
Discrete
ZOH
Signals
1. s to Z-Domain Transfer Function
Discrete
ZOH
Signals
1. Get step response
of continuous trans-
fer function y
s
(t).
1. s to Z-Domain Transfer Function
Discrete
ZOH
Signals
1. Get step response
of continuous trans-
fer function y
s
(t).
2. Discretize step re-
sponse: y
s
(nT
s
).
1. s to Z-Domain Transfer Function
Discrete
ZOH
Signals
1. Get step response
of continuous trans-
fer function y
s
(t).
2. Discretize step re-
sponse: y
s
(nT
s
).
1. Z-transform the step re-
sponse to obtain Y
s
(z).
1. s to Z-Domain Transfer Function
Discrete
ZOH
Signals
1. Get step response
of continuous trans-
fer function y
s
(t).
2. Discretize step re-
sponse: y
s
(nT
s
).
1. Z-transform the step re-
sponse to obtain Y
s
(z).
2. Divide the result from
above by Z-transform of a
step, namely, z/(z 1).
1. s to Z-Domain Transfer Function
Discrete
ZOH
Signals
1. Get step response
of continuous trans-
fer function y
s
(t).
2. Discretize step re-
sponse: y
s
(nT
s
).
1. Z-transform the step re-
sponse to obtain Y
s
(z).
2. Divide the result from
above by Z-transform of a
step, namely, z/(z 1).
G
a
(s): Laplace transfer
function
1. s to Z-Domain Transfer Function
Discrete
ZOH
Signals
1. Get step response
of continuous trans-
fer function y
s
(t).
2. Discretize step re-
sponse: y
s
(nT
s
).
1. Z-transform the step re-
sponse to obtain Y
s
(z).
2. Divide the result from
above by Z-transform of a
step, namely, z/(z 1).
G
a
(s): Laplace transfer
function
G(z): Z-transfer function
1. s to Z-Domain Transfer Function
Discrete
ZOH
Signals
1. Get step response
of continuous trans-
fer function y
s
(t).
2. Discretize step re-
sponse: y
s
(nT
s
).
1. Z-transform the step re-
sponse to obtain Y
s
(z).
2. Divide the result from
above by Z-transform of a
step, namely, z/(z 1).
G
a
(s): Laplace transfer
function
G(z): Z-transfer function
G(z) =
z 1
z
Z
_
L
1
G
a
(s)
s
_
1. s to Z-Domain Transfer Function
Discrete
ZOH
Signals
1. Get step response
of continuous trans-
fer function y
s
(t).
2. Discretize step re-
sponse: y
s
(nT
s
).
1. Z-transform the step re-
sponse to obtain Y
s
(z).
2. Divide the result from
above by Z-transform of a
step, namely, z/(z 1).
G
a
(s): Laplace transfer
function
G(z): Z-transfer function
G(z) =
z 1
z
Z
_
L
1
G
a
(s)
s
_
Step Response Equivalence
1. s to Z-Domain Transfer Function
Discrete
ZOH
Signals
1. Get step response
of continuous trans-
fer function y
s
(t).
2. Discretize step re-
sponse: y
s
(nT
s
).
1. Z-transform the step re-
sponse to obtain Y
s
(z).
2. Divide the result from
above by Z-transform of a
step, namely, z/(z 1).
G
a
(s): Laplace transfer
function
G(z): Z-transfer function
G(z) =
z 1
z
Z
_
L
1
G
a
(s)
s
_
Step Response Equivalence = ZOH Equivalence
Digital Control 1 Kannan M. Moudgalya, Autumn 2007
2. Important Result from Dierentiation
2. Important Result from Dierentiation
Recall
1(n)a
n

z
z a
=

n=0
a
n
z
n
,
Dierentiating w.r.t. a,
2. Important Result from Dierentiation
Recall
1(n)a
n

z
z a
=

n=0
a
n
z
n
,
Dierentiating w.r.t. a,
z
(z a)
2
=

n=0
na
n1
z
n
2. Important Result from Dierentiation
Recall
1(n)a
n

z
z a
=

n=0
a
n
z
n
,
Dierentiating w.r.t. a,
z
(z a)
2
=

n=0
na
n1
z
n
na
n1
1(n)
z
(z a)
2
2. Important Result from Dierentiation
Recall
1(n)a
n

z
z a
=

n=0
a
n
z
n
,
Dierentiating w.r.t. a,
z
(z a)
2
=

n=0
na
n1
z
n
na
n1
1(n)
z
(z a)
2
n(n 1)a
n2
1(n)
2z
(z a)
3
Digital Control 2 Kannan M. Moudgalya, Autumn 2007
3. ZOH Equivalence of 1/s
3. ZOH Equivalence of 1/s
The step response of
1/s is
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
.
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
y
s
(t) = L
1
1
s
2
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
y
s
(t) = L
1
1
s
2
= t
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
y
s
(t) = L
1
1
s
2
= t
Sampling it with a pe-
riod of T
s
,
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
y
s
(t) = L
1
1
s
2
= t
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) =
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
y
s
(t) = L
1
1
s
2
= t
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) = nT
s
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
y
s
(t) = L
1
1
s
2
= t
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) = nT
s
Taking Z-transforms
Y
s
(z) =
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
y
s
(t) = L
1
1
s
2
= t
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) = nT
s
Taking Z-transforms
Y
s
(z) =
T
s
z
(z 1)
2
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
y
s
(t) = L
1
1
s
2
= t
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) = nT
s
Taking Z-transforms
Y
s
(z) =
T
s
z
(z 1)
2
Divide by z/(z1),
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
y
s
(t) = L
1
1
s
2
= t
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) = nT
s
Taking Z-transforms
Y
s
(z) =
T
s
z
(z 1)
2
Divide by z/(z1), to
get the ZOH equivalent
discrete domain transfer
function
3. ZOH Equivalence of 1/s
The step response of
1/s is 1/s
2
. In time
domain, it is,
y
s
(t) = L
1
1
s
2
= t
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) = nT
s
Taking Z-transforms
Y
s
(z) =
T
s
z
(z 1)
2
Divide by z/(z1), to
get the ZOH equivalent
discrete domain transfer
function
G(z) =
T
s
z 1
Digital Control 3 Kannan M. Moudgalya, Autumn 2007
4. ZOH Equivalence of 1/s
2
4. ZOH Equivalence of 1/s
2
The step response of
1/s
2
is
4. ZOH Equivalence of 1/s
2
The step response of
1/s
2
is 1/s
3
.
4. ZOH Equivalence of 1/s
2
The step response of
1/s
2
is 1/s
3
. In time
domain, it is,
4. ZOH Equivalence of 1/s
2
The step response of
1/s
2
is 1/s
3
. In time
domain, it is,
y
s
(t) = L
1
1
s
3
=
4. ZOH Equivalence of 1/s
2
The step response of
1/s
2
is 1/s
3
. In time
domain, it is,
y
s
(t) = L
1
1
s
3
=
1
2
t
2
.
4. ZOH Equivalence of 1/s
2
The step response of
1/s
2
is 1/s
3
. In time
domain, it is,
y
s
(t) = L
1
1
s
3
=
1
2
t
2
.
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) =
1
2
n
2
T
2
s
4. ZOH Equivalence of 1/s
2
The step response of
1/s
2
is 1/s
3
. In time
domain, it is,
y
s
(t) = L
1
1
s
3
=
1
2
t
2
.
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) =
1
2
n
2
T
2
s
Take Z-transform
4. ZOH Equivalence of 1/s
2
The step response of
1/s
2
is 1/s
3
. In time
domain, it is,
y
s
(t) = L
1
1
s
3
=
1
2
t
2
.
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) =
1
2
n
2
T
2
s
Take Z-transform
Y
s
(z) =
T
2
s
z(z + 1)
2(z 1)
3
4. ZOH Equivalence of 1/s
2
The step response of
1/s
2
is 1/s
3
. In time
domain, it is,
y
s
(t) = L
1
1
s
3
=
1
2
t
2
.
Sampling it with a pe-
riod of T
s
,
y
s
(nT
s
) =
1
2
n
2
T
2
s
Take Z-transform
Y
s
(z) =
T
2
s
z(z + 1)
2(z 1)
3
Dividing by z/(z 1),
we get
G(z) =
T
2
s
(z + 1)
2(z 1)
2
Digital Control 4 Kannan M. Moudgalya, Autumn 2007
5. ZOH Equivalent First Order Transfer Function
5. ZOH Equivalent First Order Transfer Function
Find the ZOH equivalent of K/(s + 1).
5. ZOH Equivalent First Order Transfer Function
Find the ZOH equivalent of K/(s + 1).
Y
s
(s) =
1
s
K
s + 1
= K
_
1
s

1
s +
1

_
5. ZOH Equivalent First Order Transfer Function
Find the ZOH equivalent of K/(s + 1).
Y
s
(s) =
1
s
K
s + 1
= K
_
1
s

1
s +
1

_
y
s
(t) = K
_
1 e
t/
_
, t 0
5. ZOH Equivalent First Order Transfer Function
Find the ZOH equivalent of K/(s + 1).
Y
s
(s) =
1
s
K
s + 1
= K
_
1
s

1
s +
1

_
y
s
(t) = K
_
1 e
t/
_
, t 0
y
s
(nT
s
) = K
_
1 e
nT
s
/
_
, n 0
5. ZOH Equivalent First Order Transfer Function
Find the ZOH equivalent of K/(s + 1).
Y
s
(s) =
1
s
K
s + 1
= K
_
1
s

1
s +
1

_
y
s
(t) = K
_
1 e
t/
_
, t 0
y
s
(nT
s
) = K
_
1 e
nT
s
/
_
, n 0
Y
s
(z) = K
_
z
z 1

z
z e
T
s
/
_
5. ZOH Equivalent First Order Transfer Function
Find the ZOH equivalent of K/(s + 1).
Y
s
(s) =
1
s
K
s + 1
= K
_
1
s

1
s +
1

_
y
s
(t) = K
_
1 e
t/
_
, t 0
y
s
(nT
s
) = K
_
1 e
nT
s
/
_
, n 0
Y
s
(z) = K
_
z
z 1

z
z e
T
s
/
_
=
Kz(1 e
T
s
/
)
(z 1)(z e
T
s
/
)
5. ZOH Equivalent First Order Transfer Function
Find the ZOH equivalent of K/(s + 1).
Y
s
(s) =
1
s
K
s + 1
= K
_
1
s

1
s +
1

_
y
s
(t) = K
_
1 e
t/
_
, t 0
y
s
(nT
s
) = K
_
1 e
nT
s
/
_
, n 0
Y
s
(z) = K
_
z
z 1

z
z e
T
s
/
_
=
Kz(1 e
T
s
/
)
(z 1)(z e
T
s
/
)
Dividing by z/(z 1), we get
G(z) =
K(1 e
T
s
/
)
z e
T
s
/
Digital Control 5 Kannan M. Moudgalya, Autumn 2007
6. ZOH Equivalent First Order Transfer Function
- Example
6. ZOH Equivalent First Order Transfer Function
- Example
Sample at T
s
= 0.5
and nd ZOH equivalent
trans. function of
G
a
(s) =
10
5s + 1
6. ZOH Equivalent First Order Transfer Function
- Example
Sample at T
s
= 0.5
and nd ZOH equivalent
trans. function of
G
a
(s) =
10
5s + 1
Scilab Code:
6. ZOH Equivalent First Order Transfer Function
- Example
Sample at T
s
= 0.5
and nd ZOH equivalent
trans. function of
G
a
(s) =
10
5s + 1
Scilab Code:
Ga = tf(10,[5 1]);
6. ZOH Equivalent First Order Transfer Function
- Example
Sample at T
s
= 0.5
and nd ZOH equivalent
trans. function of
G
a
(s) =
10
5s + 1
Scilab Code:
Ga = tf(10,[5 1]);
G = ss2tf(dscr(Ga,0.5));
6. ZOH Equivalent First Order Transfer Function
- Example
Sample at T
s
= 0.5
and nd ZOH equivalent
trans. function of
G
a
(s) =
10
5s + 1
Scilab Code:
Ga = tf(10,[5 1]);
G = ss2tf(dscr(Ga,0.5));
Scilab output is,
6. ZOH Equivalent First Order Transfer Function
- Example
Sample at T
s
= 0.5
and nd ZOH equivalent
trans. function of
G
a
(s) =
10
5s + 1
Scilab Code:
Ga = tf(10,[5 1]);
G = ss2tf(dscr(Ga,0.5));
Scilab output is,
G(z) =
0.9546
z 0.9048
6. ZOH Equivalent First Order Transfer Function
- Example
Sample at T
s
= 0.5
and nd ZOH equivalent
trans. function of
G
a
(s) =
10
5s + 1
Scilab Code:
Ga = tf(10,[5 1]);
G = ss2tf(dscr(Ga,0.5));
Scilab output is,
G(z) =
0.9546
z 0.9048
=
10(1 e
0.1
)
z e
0.1
6. ZOH Equivalent First Order Transfer Function
- Example
Sample at T
s
= 0.5
and nd ZOH equivalent
trans. function of
G
a
(s) =
10
5s + 1
Scilab Code:
Ga = tf(10,[5 1]);
G = ss2tf(dscr(Ga,0.5));
Scilab output is,
G(z) =
0.9546
z 0.9048
=
10(1 e
0.1
)
z e
0.1
In agreement with the
formula in the previous
slide
Digital Control 6 Kannan M. Moudgalya, Autumn 2007
7. Discrete Integration
7. Discrete Integration
u(k)
n
u(n)
u(k 1)
7. Discrete Integration
u(k)
n
u(n)
u(k 1)
y(k) = blue shaded area
7. Discrete Integration
u(k)
n
u(n)
u(k 1)
y(k) = blue shaded area
+ red shaded area
7. Discrete Integration
u(k)
n
u(n)
u(k 1)
y(k) = blue shaded area
+ red shaded area
y(k) = y(k 1)
7. Discrete Integration
u(k)
n
u(n)
u(k 1)
y(k) = blue shaded area
+ red shaded area
y(k) = y(k 1) + red shaded area
7. Discrete Integration
u(k)
n
u(n)
u(k 1)
y(k) = blue shaded area
+ red shaded area
y(k) = y(k 1) + red shaded area
y(k) = y(k 1) +
T
s
2
[u(k) + u(k 1)]
7. Discrete Integration
u(k)
n
u(n)
u(k 1)
y(k) = blue shaded area
+ red shaded area
y(k) = y(k 1) + red shaded area
y(k) = y(k 1) +
T
s
2
[u(k) + u(k 1)]
Take Z-transform:
7. Discrete Integration
u(k)
n
u(n)
u(k 1)
y(k) = blue shaded area
+ red shaded area
y(k) = y(k 1) + red shaded area
y(k) = y(k 1) +
T
s
2
[u(k) + u(k 1)]
Take Z-transform:
Y (z) = z
1
Y (z) +
T
s
2
_
U(z) + z
1
U(z)

7. Discrete Integration
u(k)
n
u(n)
u(k 1)
y(k) = blue shaded area
+ red shaded area
y(k) = y(k 1) + red shaded area
y(k) = y(k 1) +
T
s
2
[u(k) + u(k 1)]
Take Z-transform:
Y (z) = z
1
Y (z) +
T
s
2
_
U(z) + z
1
U(z)

Bring all Y to left side:


7. Discrete Integration
u(k)
n
u(n)
u(k 1)
y(k) = blue shaded area
+ red shaded area
y(k) = y(k 1) + red shaded area
y(k) = y(k 1) +
T
s
2
[u(k) + u(k 1)]
Take Z-transform:
Y (z) = z
1
Y (z) +
T
s
2
_
U(z) + z
1
U(z)

Bring all Y to left side:


Y (z) z
1
Y (z) =
T
s
2
_
U(z) + z
1
U(z)

7. Discrete Integration
u(k)
n
u(n)
u(k 1)
y(k) = blue shaded area
+ red shaded area
y(k) = y(k 1) + red shaded area
y(k) = y(k 1) +
T
s
2
[u(k) + u(k 1)]
Take Z-transform:
Y (z) = z
1
Y (z) +
T
s
2
_
U(z) + z
1
U(z)

Bring all Y to left side:


Y (z) z
1
Y (z) =
T
s
2
_
U(z) + z
1
U(z)

(1 z
1
)Y (z) =
T
s
2
(1 + z
1
)U(z)
Digital Control 7 Kannan M. Moudgalya, Autumn 2007
8. Transfer Function for Discrete Integration
8. Transfer Function for Discrete Integration
Recall from previous slide
(1 z
1
)Y (z) =
T
s
2
(1 + z
1
)U(z)
8. Transfer Function for Discrete Integration
Recall from previous slide
(1 z
1
)Y (z) =
T
s
2
(1 + z
1
)U(z)
Y (z) =
T
s
2
1 + z
1
1 z
1
U(z)
8. Transfer Function for Discrete Integration
Recall from previous slide
(1 z
1
)Y (z) =
T
s
2
(1 + z
1
)U(z)
Y (z) =
T
s
2
1 + z
1
1 z
1
U(z)
=
T
s
2
z + 1
z 1
U(z)
8. Transfer Function for Discrete Integration
Recall from previous slide
(1 z
1
)Y (z) =
T
s
2
(1 + z
1
)U(z)
Y (z) =
T
s
2
1 + z
1
1 z
1
U(z)
=
T
s
2
z + 1
z 1
U(z)
Integrator has a transfer function,
8. Transfer Function for Discrete Integration
Recall from previous slide
(1 z
1
)Y (z) =
T
s
2
(1 + z
1
)U(z)
Y (z) =
T
s
2
1 + z
1
1 z
1
U(z)
=
T
s
2
z + 1
z 1
U(z)
Integrator has a transfer function,
G
I
(z) =
T
s
2
z + 1
z 1
8. Transfer Function for Discrete Integration
Recall from previous slide
(1 z
1
)Y (z) =
T
s
2
(1 + z
1
)U(z)
Y (z) =
T
s
2
1 + z
1
1 z
1
U(z)
=
T
s
2
z + 1
z 1
U(z)
Integrator has a transfer function,
G
I
(z) =
T
s
2
z + 1
z 1
A low pass lter!
8. Transfer Function for Discrete Integration
Recall from previous slide
(1 z
1
)Y (z) =
T
s
2
(1 + z
1
)U(z)
Y (z) =
T
s
2
1 + z
1
1 z
1
U(z)
=
T
s
2
z + 1
z 1
U(z)
Integrator has a transfer function,
G
I
(z) =
T
s
2
z + 1
z 1
A low pass lter!

Im(z)
Re(z)
8. Transfer Function for Discrete Integration
Recall from previous slide
(1 z
1
)Y (z) =
T
s
2
(1 + z
1
)U(z)
Y (z) =
T
s
2
1 + z
1
1 z
1
U(z)
=
T
s
2
z + 1
z 1
U(z)
Integrator has a transfer function,
G
I
(z) =
T
s
2
z + 1
z 1
A low pass lter!

Im(z)
Re(z)
1
s

T
s
2
z + 1
z 1
Digital Control 8 Kannan M. Moudgalya, Autumn 2007
9. Derivative Mode
9. Derivative Mode
Integral Mode:
1
s

T
s
2
z + 1
z 1
9. Derivative Mode
Integral Mode:
1
s

T
s
2
z + 1
z 1
Derivative Mode: s
2
T
s
z 1
z + 1
9. Derivative Mode
Integral Mode:
1
s

T
s
2
z + 1
z 1
Derivative Mode: s
2
T
s
z 1
z + 1
High pass lter
9. Derivative Mode
Integral Mode:
1
s

T
s
2
z + 1
z 1
Derivative Mode: s
2
T
s
z 1
z + 1
High pass lter
Has a pole at z = 1.
9. Derivative Mode
Integral Mode:
1
s

T
s
2
z + 1
z 1
Derivative Mode: s
2
T
s
z 1
z + 1
High pass lter
Has a pole at z = 1. Hence produces in partial fraction
expansion, a term of the form
9. Derivative Mode
Integral Mode:
1
s

T
s
2
z + 1
z 1
Derivative Mode: s
2
T
s
z 1
z + 1
High pass lter
Has a pole at z = 1. Hence produces in partial fraction
expansion, a term of the form
z
z + 1
(1)
n
9. Derivative Mode
Integral Mode:
1
s

T
s
2
z + 1
z 1
Derivative Mode: s
2
T
s
z 1
z + 1
High pass lter
Has a pole at z = 1. Hence produces in partial fraction
expansion, a term of the form
z
z + 1
(1)
n
Results in wildly oscillating control eort.
Digital Control 9 Kannan M. Moudgalya, Autumn 2007
10. Derivative Mode - Other Approximations
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s

10. Derivative Mode - Other Approximations


Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s
T
s
z
z 1
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s
T
s
z
z 1
Forward dierence: y(k) = y(k 1) + T
s
u(k 1)
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s
T
s
z
z 1
Forward dierence: y(k) = y(k 1) + T
s
u(k 1)
(1 z
1
)Y (z) = T
s
z
1
U(z)
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s
T
s
z
z 1
Forward dierence: y(k) = y(k 1) + T
s
u(k 1)
(1 z
1
)Y (z) = T
s
z
1
U(z)
Y (z) = T
s
z
1
1 z
1
U(z)
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s
T
s
z
z 1
Forward dierence: y(k) = y(k 1) + T
s
u(k 1)
(1 z
1
)Y (z) = T
s
z
1
U(z)
Y (z) = T
s
z
1
1 z
1
U(z) =
T
s
z 1
U(z)
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s
T
s
z
z 1
Forward dierence: y(k) = y(k 1) + T
s
u(k 1)
(1 z
1
)Y (z) = T
s
z
1
U(z)
Y (z) = T
s
z
1
1 z
1
U(z) =
T
s
z 1
U(z)
1
s

10. Derivative Mode - Other Approximations


Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s
T
s
z
z 1
Forward dierence: y(k) = y(k 1) + T
s
u(k 1)
(1 z
1
)Y (z) = T
s
z
1
U(z)
Y (z) = T
s
z
1
1 z
1
U(z) =
T
s
z 1
U(z)
1
s

T
s
z 1
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s
T
s
z
z 1
Forward dierence: y(k) = y(k 1) + T
s
u(k 1)
(1 z
1
)Y (z) = T
s
z
1
U(z)
Y (z) = T
s
z
1
1 z
1
U(z) =
T
s
z 1
U(z)
1
s

T
s
z 1
Both derivative modes are high pass,
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s
T
s
z
z 1
Forward dierence: y(k) = y(k 1) + T
s
u(k 1)
(1 z
1
)Y (z) = T
s
z
1
U(z)
Y (z) = T
s
z
1
1 z
1
U(z) =
T
s
z 1
U(z)
1
s

T
s
z 1
Both derivative modes are high pass, no oscillations,
10. Derivative Mode - Other Approximations
Backward dierence: y(k) = y(k 1) + T
s
u(k)
(1 z
1
)Y (z) = T
s
U(z)
Y (z) = T
s
1
1 z
1
= T
s
z
z 1
U(z)
1
s
T
s
z
z 1
Forward dierence: y(k) = y(k 1) + T
s
u(k 1)
(1 z
1
)Y (z) = T
s
z
1
U(z)
Y (z) = T
s
z
1
1 z
1
U(z) =
T
s
z 1
U(z)
1
s

T
s
z 1
Both derivative modes are high pass, no oscillations, same gains
Digital Control 10 Kannan M. Moudgalya, Autumn 2007
11. PID Controller
11. PID Controller
Proportional Mode: Most popular control mode.
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset and increased oscillations
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset and increased oscillations
Integral Mode: Used to remove steady state oset.
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset and increased oscillations
Integral Mode: Used to remove steady state oset. Increase
in integral mode generally results in
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset and increased oscillations
Integral Mode: Used to remove steady state oset. Increase
in integral mode generally results in
Zero steady state oset
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset and increased oscillations
Integral Mode: Used to remove steady state oset. Increase
in integral mode generally results in
Zero steady state oset
Increased oscillations
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset and increased oscillations
Integral Mode: Used to remove steady state oset. Increase
in integral mode generally results in
Zero steady state oset
Increased oscillations
Derivative Mode: Mainly used for prediction purposes.
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset and increased oscillations
Integral Mode: Used to remove steady state oset. Increase
in integral mode generally results in
Zero steady state oset
Increased oscillations
Derivative Mode: Mainly used for prediction purposes. Increase
in derivative mode generally results in
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset and increased oscillations
Integral Mode: Used to remove steady state oset. Increase
in integral mode generally results in
Zero steady state oset
Increased oscillations
Derivative Mode: Mainly used for prediction purposes. Increase
in derivative mode generally results in
Decreased oscillations and improved stability
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset and increased oscillations
Integral Mode: Used to remove steady state oset. Increase
in integral mode generally results in
Zero steady state oset
Increased oscillations
Derivative Mode: Mainly used for prediction purposes. Increase
in derivative mode generally results in
Decreased oscillations and improved stability
Sensitive to noise
11. PID Controller
Proportional Mode: Most popular control mode. Increase
in proportional mode generally results in
Decreased steady state oset and increased oscillations
Integral Mode: Used to remove steady state oset. Increase
in integral mode generally results in
Zero steady state oset
Increased oscillations
Derivative Mode: Mainly used for prediction purposes. Increase
in derivative mode generally results in
Decreased oscillations and improved stability
Sensitive to noise
The most popular controller in industry.
Digital Control 11 Kannan M. Moudgalya, Autumn 2007
12. PID Controller - Basic Design
12. PID Controller - Basic Design
Let input to controller by E(z)
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z).
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z). If
gain is K,
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z). If
gain is K,
i
is integral time
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z). If
gain is K,
i
is integral time and
d
is derivative time,
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z). If
gain is K,
i
is integral time and
d
is derivative time,
u(t) = K
_
e(t) +
1

i
_
t
0
e(t)dt +
d
de(t)
dt
_
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z). If
gain is K,
i
is integral time and
d
is derivative time,
u(t) = K
_
e(t) +
1

i
_
t
0
e(t)dt +
d
de(t)
dt
_
U(s) = K(1 +
1

i
s
+
d
s)E(s)
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z). If
gain is K,
i
is integral time and
d
is derivative time,
u(t) = K
_
e(t) +
1

i
_
t
0
e(t)dt +
d
de(t)
dt
_
U(s) = K(1 +
1

i
s
+
d
s)E(s)
U(s)

=
S
c
(s)
R
c
(s)
E(s)
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z). If
gain is K,
i
is integral time and
d
is derivative time,
u(t) = K
_
e(t) +
1

i
_
t
0
e(t)dt +
d
de(t)
dt
_
U(s) = K(1 +
1

i
s
+
d
s)E(s)
U(s)

=
S
c
(s)
R
c
(s)
E(s)
If integral mode is present, R
c
(0) = 0.
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z). If
gain is K,
i
is integral time and
d
is derivative time,
u(t) = K
_
e(t) +
1

i
_
t
0
e(t)dt +
d
de(t)
dt
_
U(s) = K(1 +
1

i
s
+
d
s)E(s)
U(s)

=
S
c
(s)
R
c
(s)
E(s)
If integral mode is present, R
c
(0) = 0.
Filtered derivative mode:
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z). If
gain is K,
i
is integral time and
d
is derivative time,
u(t) = K
_
e(t) +
1

i
_
t
0
e(t)dt +
d
de(t)
dt
_
U(s) = K(1 +
1

i
s
+
d
s)E(s)
U(s)

=
S
c
(s)
R
c
(s)
E(s)
If integral mode is present, R
c
(0) = 0.
Filtered derivative mode:
u(t) = K
_
1 +
1

i
s
+

d
s
1 +

d
s
N
_
e(t)
12. PID Controller - Basic Design
Let input to controller by E(z) and output from it be U(z). If
gain is K,
i
is integral time and
d
is derivative time,
u(t) = K
_
e(t) +
1

i
_
t
0
e(t)dt +
d
de(t)
dt
_
U(s) = K(1 +
1

i
s
+
d
s)E(s)
U(s)

=
S
c
(s)
R
c
(s)
E(s)
If integral mode is present, R
c
(0) = 0.
Filtered derivative mode:
u(t) = K
_
1 +
1

i
s
+

d
s
1 +

d
s
N
_
e(t)
N is a large number, of the order of 100.
Digital Control 12 Kannan M. Moudgalya, Autumn 2007
13. Reaction Curve Method - Ziegler Nichols Tun-
ing
13. Reaction Curve Method - Ziegler Nichols Tun-
ing
Applicable only to stable systems
13. Reaction Curve Method - Ziegler Nichols Tun-
ing
Applicable only to stable systems
Give a unit step input to a stable system and get
13. Reaction Curve Method - Ziegler Nichols Tun-
ing
Applicable only to stable systems
Give a unit step input to a stable system and get
1. the time lag after which the system starts responding (L),
13. Reaction Curve Method - Ziegler Nichols Tun-
ing
Applicable only to stable systems
Give a unit step input to a stable system and get
1. the time lag after which the system starts responding (L),
2. the steady state gain (K) and
13. Reaction Curve Method - Ziegler Nichols Tun-
ing
Applicable only to stable systems
Give a unit step input to a stable system and get
1. the time lag after which the system starts responding (L),
2. the steady state gain (K) and
3. the time the output takes to reach the steady state, after
it starts responding ()
13. Reaction Curve Method - Ziegler Nichols Tun-
ing
Applicable only to stable systems
Give a unit step input to a stable system and get
1. the time lag after which the system starts responding (L),
2. the steady state gain (K) and
3. the time the output takes to reach the steady state, after
it starts responding ()
R = K/
L
K
Digital Control 13 Kannan M. Moudgalya, Autumn 2007
14. Reaction Curve Method - Ziegler Nichols Tun-
ing
14. Reaction Curve Method - Ziegler Nichols Tun-
ing
R = K/
L
K
14. Reaction Curve Method - Ziegler Nichols Tun-
ing
R = K/
L
K
Let the slope of the response be calculated as R =
K

.
14. Reaction Curve Method - Ziegler Nichols Tun-
ing
R = K/
L
K
Let the slope of the response be calculated as R =
K

.
Then the PID settings are given below:
14. Reaction Curve Method - Ziegler Nichols Tun-
ing
R = K/
L
K
Let the slope of the response be calculated as R =
K

.
Then the PID settings are given below:
K
p

i

d
P 1/RL
PI 0.9/RL 3L
PID 1.2/RL 2L 0.5L
14. Reaction Curve Method - Ziegler Nichols Tun-
ing
R = K/
L
K
Let the slope of the response be calculated as R =
K

.
Then the PID settings are given below:
K
p

i

d
P 1/RL
PI 0.9/RL 3L
PID 1.2/RL 2L 0.5L
Consistent units should be used
Digital Control 14 Kannan M. Moudgalya, Autumn 2007
15. Stability Method - Ziegler Nichols Tuning
15. Stability Method - Ziegler Nichols Tuning
Another way of nding the PID tuning parameters is as follows.
15. Stability Method - Ziegler Nichols Tuning
Another way of nding the PID tuning parameters is as follows.
Close the loop with a proportional controller
15. Stability Method - Ziegler Nichols Tuning
Another way of nding the PID tuning parameters is as follows.
Close the loop with a proportional controller
Gain of controller is increased until the closed loop system
becomes unstable
15. Stability Method - Ziegler Nichols Tuning
Another way of nding the PID tuning parameters is as follows.
Close the loop with a proportional controller
Gain of controller is increased until the closed loop system
becomes unstable
At the verge of instability, note down the gain of the controller
(K
u
) and the period of oscillation (P
u
)
15. Stability Method - Ziegler Nichols Tuning
Another way of nding the PID tuning parameters is as follows.
Close the loop with a proportional controller
Gain of controller is increased until the closed loop system
becomes unstable
At the verge of instability, note down the gain of the controller
(K
u
) and the period of oscillation (P
u
)
PID settings are given below:
15. Stability Method - Ziegler Nichols Tuning
Another way of nding the PID tuning parameters is as follows.
Close the loop with a proportional controller
Gain of controller is increased until the closed loop system
becomes unstable
At the verge of instability, note down the gain of the controller
(K
u
) and the period of oscillation (P
u
)
PID settings are given below:
K
p

i

d
P 0.5K
u
PI 0.45K
u
P
u
/1.2
PID 0.6K
u
P
u
/2 P
u
/8
15. Stability Method - Ziegler Nichols Tuning
Another way of nding the PID tuning parameters is as follows.
Close the loop with a proportional controller
Gain of controller is increased until the closed loop system
becomes unstable
At the verge of instability, note down the gain of the controller
(K
u
) and the period of oscillation (P
u
)
PID settings are given below:
K
p

i

d
P 0.5K
u
PI 0.45K
u
P
u
/1.2
PID 0.6K
u
P
u
/2 P
u
/8
Consistent units should be used
Digital Control 15 Kannan M. Moudgalya, Autumn 2007
16. Design Procedure
16. Design Procedure
A common procedure to design discrete PID controller:
16. Design Procedure
A common procedure to design discrete PID controller:
Tune continuous PID controller by any popular technique
16. Design Procedure
A common procedure to design discrete PID controller:
Tune continuous PID controller by any popular technique
Get continuous PID settings
16. Design Procedure
A common procedure to design discrete PID controller:
Tune continuous PID controller by any popular technique
Get continuous PID settings
Discretize using the method discussed now or the ZOH equiv-
alent method discussed earlier
16. Design Procedure
A common procedure to design discrete PID controller:
Tune continuous PID controller by any popular technique
Get continuous PID settings
Discretize using the method discussed now or the ZOH equiv-
alent method discussed earlier
Direct digital design techniques
Digital Control 16 Kannan M. Moudgalya, Autumn 2007
17. 2-DOF Controller
17. 2-DOF Controller
y
T
c
R
c
G =
B
A
S
c
R
c
r u

17. 2-DOF Controller


y
T
c
R
c
G =
B
A
S
c
R
c
r u

u =
T
c
R
c
r
S
c
R
c
y
17. 2-DOF Controller
y
T
c
R
c
G =
B
A
S
c
R
c
r u

u =
T
c
R
c
r
S
c
R
c
y
It is easy to arrive at the following relation between r and y.
17. 2-DOF Controller
y
T
c
R
c
G =
B
A
S
c
R
c
r u

u =
T
c
R
c
r
S
c
R
c
y
It is easy to arrive at the following relation between r and y.
y =
T
c
R
c
B/A
1 + BS
c
/AR
c
r
17. 2-DOF Controller
y
T
c
R
c
G =
B
A
S
c
R
c
r u

u =
T
c
R
c
r
S
c
R
c
y
It is easy to arrive at the following relation between r and y.
y =
T
c
R
c
B/A
1 + BS
c
/AR
c
r =
BT
c
AR
c
+ BS
c
r
17. 2-DOF Controller
y
T
c
R
c
G =
B
A
S
c
R
c
r u

u =
T
c
R
c
r
S
c
R
c
y
It is easy to arrive at the following relation between r and y.
y =
T
c
R
c
B/A
1 + BS
c
/AR
c
r =
BT
c
AR
c
+ BS
c
r
Error e, given by r y is given by
17. 2-DOF Controller
y
T
c
R
c
G =
B
A
S
c
R
c
r u

u =
T
c
R
c
r
S
c
R
c
y
It is easy to arrive at the following relation between r and y.
y =
T
c
R
c
B/A
1 + BS
c
/AR
c
r =
BT
c
AR
c
+ BS
c
r
Error e, given by r y is given by
e =
_
1
BT
c
AR
c
+ BS
c
_
r
17. 2-DOF Controller
y
T
c
R
c
G =
B
A
S
c
R
c
r u

u =
T
c
R
c
r
S
c
R
c
y
It is easy to arrive at the following relation between r and y.
y =
T
c
R
c
B/A
1 + BS
c
/AR
c
r =
BT
c
AR
c
+ BS
c
r
Error e, given by r y is given by
e =
_
1
BT
c
AR
c
+ BS
c
_
r =
AR
c
+ BS
c
BT
c
AR
c
+ BS
c
r
Digital Control 17 Kannan M. Moudgalya, Autumn 2007
18. Oset-Free Tracking of Steps with Integral
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) =
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) = lim
z1
z 1
z
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
z
z 1
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) = lim
z1
z 1
z
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
z
z 1
Because the controller has an integral action,
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) = lim
z1
z 1
z
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
z
z 1
Because the controller has an integral action, R
c
(1) = 0:
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) = lim
z1
z 1
z
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
z
z 1
Because the controller has an integral action, R
c
(1) = 0:
e() =
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) = lim
z1
z 1
z
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
z
z 1
Because the controller has an integral action, R
c
(1) = 0:
e() =
S
c
(z) T
c
(z)
S
c
(z)

z=1
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) = lim
z1
z 1
z
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
z
z 1
Because the controller has an integral action, R
c
(1) = 0:
e() =
S
c
(z) T
c
(z)
S
c
(z)

z=1
=
S
c
(1) T
c
(1)
S
c
(1)
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) = lim
z1
z 1
z
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
z
z 1
Because the controller has an integral action, R
c
(1) = 0:
e() =
S
c
(z) T
c
(z)
S
c
(z)

z=1
=
S
c
(1) T
c
(1)
S
c
(1)
This condition can be satised if one of the following is met:
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) = lim
z1
z 1
z
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
z
z 1
Because the controller has an integral action, R
c
(1) = 0:
e() =
S
c
(z) T
c
(z)
S
c
(z)

z=1
=
S
c
(1) T
c
(1)
S
c
(1)
This condition can be satised if one of the following is met:
T
c
= S
c
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) = lim
z1
z 1
z
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
z
z 1
Because the controller has an integral action, R
c
(1) = 0:
e() =
S
c
(z) T
c
(z)
S
c
(z)

z=1
=
S
c
(1) T
c
(1)
S
c
(1)
This condition can be satised if one of the following is met:
T
c
= S
c
T
c
= S
c
(1)
18. Oset-Free Tracking of Steps with Integral
E(z) =
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
R(z)
lim
n
e(n) = lim
z1
z 1
z
A(z)R
c
(z) + B(z)S
c
(z) B(z)T
c
(z)
A(z)R
c
(z) + B(z)S
c
(z)
z
z 1
Because the controller has an integral action, R
c
(1) = 0:
e() =
S
c
(z) T
c
(z)
S
c
(z)

z=1
=
S
c
(1) T
c
(1)
S
c
(1)
This condition can be satised if one of the following is met:
T
c
= S
c
T
c
= S
c
(1)
T
c
(1) = S
c
(1)
Digital Control 18 Kannan M. Moudgalya, Autumn 2007

You might also like