Modern Control Systems (MCS)

Download Report

Transcript Modern Control Systems (MCS)

Control Systems With Embedded
Implementation (CSEI)
Lecture-5
Digital Implementation of Analog Controllers
Dr. Imtiaz Hussain
Assistant Professor
email: [email protected]
URL :http://imtiazhussainkalwar.weebly.com/
1
Discretization of continuous-time controllers
• Basic idea: Reuse the analog design
• Want to get:
– A/D + Algorithm + D/A≈ G(s)
• Methods:
– Approximate s, i.e., H(z) = G(s’)
– Other discretization methods (Matlab)
2
Discretization of continuous-time controllers
• Approximation Methods
3
Discretization of continuous-time controllers
• Approximation Methods
4
Discretization of continuous-time controllers
• Approximation Methods
5
6
Example-2
• Using the three approximation methods to find the discretetime equivalent of a lead compensator.
𝐺 𝑠 =
10𝑠 + 1
𝑠+1
• Compare the approximation result by plotting the frequency
response of the continuous-time controller and the discretetime approximation for sampling periods T = 1, 0.5 and 0.1.
7
Example-2
• Solution: The
relations:
approximations
give
the
following
• Using Euler’s approximation
method
𝑧−1
10( 𝑇 ) + 1 10 𝑧 − 1 + 𝑇
𝐺 𝑧 =
=
𝑧−1
𝑍−1+𝑇
+
1
𝑇
8
Example-2
• Solution: The
relations:
approximations
give
the
following
• Using Backward Difference
approximation method
𝑧−1
10( 𝑧𝑇 ) + 1 10 𝑧 − 1 + 𝑧𝑇
𝐺 𝑧 =
=
𝑧−1
𝑍 − 1 + 𝑧𝑇
+
1
𝑧𝑇
9
Example-2
• Solution: The
relations:
approximations
give
the
following
• Using Tustin’s approximation
method
2𝑧−1
𝐺 𝑧 =
10(𝑇 𝑧 + 1) + 1
2𝑧−1
𝑇𝑧 +1+1
=
20 𝑧 − 1 + 𝑇(𝑧 + 1)
2(𝑍 − 1) + 𝑇(𝑧 + 1)
10
Example-2
• Frequency Response @ T=1
11
Example-2
• Frequency Response @ T=0.5
12
Example-2
• Frequency Response @ T=0.1
13
PI Controller
• Figure shows the diagram of a PI type analog controller.
• The controller contains two channels (a proportional channel
and an integral channel) that process the error between the
reference signal and the output.
14
Digital PI Controller
• Digital PI control law can even be obtained by the
discretization of a PI analog controller.
• The control law for an analog PI controller is given by
1
𝐶(𝑠) = 𝐾 1 +
𝑇𝑖 𝑠
• Using Tustin’s Approximation method
2𝑧−1
𝑖. 𝑒 𝑠 =
𝑇𝑧+1
𝐶(𝑧) = 𝐾 1 +
1
2𝑧−1
𝑇𝑖
𝑇𝑧+1
15
Digital PI Controller
• Digital PI control law can even be obtained by the
discretization of a PI analog controller.
• The control law for an analog PI controller is given by
1
𝐶(𝑠) = 𝐾 1 +
𝑇𝑖 𝑠
• Using Tustin’s Approximation method
2𝑧−1
𝑖. 𝑒 𝑠 =
𝑇𝑧+1
𝐶(𝑧) = 𝐾 1 +
1
2𝑧−1
𝑇𝑖
𝑇𝑧+1
16
Digital PID Controller
• Many practical control problems are solved by PID controllers
or their variants.
𝑢(𝑡) = 𝐾𝑝
1
𝑒 𝑡 +
𝑇𝑖
𝑡
𝑜
𝑑𝑒(𝑡)
𝑒 𝑡 𝑑𝑡 + 𝑇𝑑
𝑑𝑡
• The continuous-time transfer function of a PID controller can
be obtained by taking the Laplace transform of above eq
𝐾𝑝 (𝑇𝑖 𝑇𝐷 𝑠 2 + 𝑇𝑖 𝑠 + 1)
𝐶𝑝𝑖𝑑 (𝑠) =
𝑇𝑖 𝑠
• PID controller is non-causal and cannot, and should not, be
implemented.
17
Digital PID Controller
𝐾𝑝 (𝑇𝑖 𝑇𝐷 𝑠 2 + 𝑇𝑖 𝑠 + 1)
𝐶𝑝𝑖𝑑 (𝑠) =
𝑇𝑖 𝑠
• The main reason is that the derivative term is non-causal and that
it amplifies high frequency noise in the measured signals.
• Hence, the gain of the derivative action must be limited.
• This can be achieved by introducing an additional low-pass filter
to the derivative action:
𝐾𝐷 𝑠
𝐾𝐷 𝑠 ≈
𝜏𝐿 𝑠 + 1
18
Digital PID Controller
𝐾𝐷 𝑠
𝐾𝐷 𝑠 ≈
𝜏𝐿 𝑠 + 1
𝐾𝑝 (𝑇𝑖 𝑇𝐷 𝑠 2 + 𝑇𝑖 𝑠 + 1)
𝐶𝑝𝑖𝑑 (𝑠) =
𝑇𝑖 𝑠
• With the augmentation of a low pass filter, the modified
continuous-time PID controller can be written as
𝐾𝑝 (𝑇𝑖 𝑇𝐷 𝑠 2 + 𝑇𝑖 𝑠 + 1)
𝐶𝑝𝑖𝑑 (𝑠) =
𝑇𝑖 𝑠(𝜏𝐿 𝑠 + 1)
• which introduced two zeros, a pole at the origin and another
“fast” pole.
• Any of the previous approximation methods can be used to
approximate the PID controller.
19
Digital PID Controller
𝐾𝑝 (𝑇𝑖 𝑇𝐷 𝑠 2 + 𝑇𝑖 𝑠 + 1)
𝐶𝑝𝑖𝑑 (𝑠) =
𝑇𝑖 𝑠(𝜏𝐿 𝑠 + 1)
• In order to “preserve” the PID structure, it is common to use the
bilinear transformation to approximate the integral action, and to
use the backward difference to approximate the differentiation
action.
• The reason backward difference is used instead of bilinear
approximation is that the later will introduce a pole at z = −1.
• Using this approximation, a continuous-time PID controller law,
can be written as:
𝑇𝑞 +1
𝑞−1
𝑢 𝑘 = 𝐾𝑝 𝑒 𝑘 + 𝐾𝑖
𝑒 𝑘 + 𝐾𝐷
𝑒(𝑘)
2𝑞−1
𝑇𝑞
• where q is one-step advance operator.
20
Digital PID Controller
𝑇𝑞 +1
𝑞−1
𝑢 𝑘 = 𝐾𝑝 𝑒 𝑘 + 𝐾𝑖
𝑒 𝑘 + 𝐾𝐷
𝑒(𝑘)
2𝑞−1
𝑇𝑞
• Above equation is further solved
𝐾𝑖 𝑇
𝑢 𝑘 = 𝐾𝑝 −
𝑒 𝑘 + (𝐾𝑖 𝑇)
2
𝑘
𝑗=0
𝐾𝐷
𝑒(𝑗) +
𝑒 𝑘 − 𝑒(𝑘 − 1)
𝑇
𝑘
𝑢 𝑘 = 𝐾𝑝(𝐷𝑖𝑔𝑖𝑡𝑎𝑙) 𝑒 𝑘 + 𝐾𝑖(𝐷𝑖𝑔𝑖𝑡𝑎𝑙)
𝑒(𝑗) + 𝑒 𝑘 − 𝑒(𝑘 − 1)
𝑗=0
21
To download this lecture visit
http://imtiazhussainkalwar.weebly.com/
END OF LECTURE-5
22