11 - 2 Matlab Simulink PID
11 - 2 Matlab Simulink PID
11 - 2 Matlab Simulink PID
1 1
■ The closed loop ′
𝐻 𝑠 1+ 𝐾𝑂𝐿
transfer function for
τ𝐼 𝑠 τ𝑠 + 1
′ =
set point changes : 𝐻𝑠𝑝 𝑠 1 1
1+ 1+ 𝐾𝑂𝐿
τ𝐼 𝑠 τ𝑠 + 1
𝐻′ 𝑠 τ𝐼 𝑠 + 1
′ = 2 2
𝐻𝑠𝑝 𝑠 τ3 𝑠 + 2ζ3 τ3 𝑠 + 1
1 1 + 𝐾𝑂𝐿 τ𝐼 1 1 + 1.36 3
ζ3 = = = 1.01
2 𝐾𝑂𝐿 τ 2 1.36 3
2τ3 ζ3 = 5.21
■ Transfer function of 𝐻′ 𝑠 3𝑠 + 1
=
closed loop → ′
𝐻𝑠𝑝 𝑠 6.62 𝑠 2 + 5.21 𝑠 + 1
𝐻′ 𝑠 3𝑠 + 1 1
′ = =
𝐻𝑠𝑝 𝑠 3𝑠 + 1 2.21𝑠 + 1 2.21𝑠 + 1
■ Response → ℎ′ 𝑡 = 1 − 𝑒 −𝑡/2.21
𝑡 = −2.21 𝑙𝑛 1 − ℎ′ 𝑡
■ At ℎ 𝑡 = 3 𝑓𝑡 → ℎ′ 𝑡 = 1.0 𝑓𝑡 → 𝑡 = ∞
PID CONTROLLER
IN SIMULINK
With derivative filter
PID controller in Simulink
1 τ𝐷 𝑠
𝐺𝑐 = 𝐾𝑐 1 + +
τ𝐼 𝑠 ατ𝐷 𝑠 + 1
1 𝑁 1 τ𝐷 𝑠
𝑃+𝐼 +𝐷 = 𝐾𝑐 1 + + 𝑃 = 𝐾𝑐
𝑠 1 τ𝐼 𝑠 ατ𝐷 𝑠 + 1
1+𝑁
𝑠 𝐾𝑐
𝐼=
1 𝐷 𝐾𝑐 𝐾𝑐 τ𝐷 𝑠 τ𝐼
𝑃+𝐼 + = 𝐾𝑐 + +
𝑠 1 +1 τ𝐼 𝑠 ατ𝐷 𝑠 + 1
𝑁 𝑠 𝐷 = 𝐾𝑐 τ𝐷
1 𝐷𝑠 𝐾𝑐 𝐾𝑐 τ𝐷 𝑠
𝑃+𝐼 + = 𝐾𝑐 + + 1
𝑠 1𝑠+1 τ𝐼 𝑠 ατ𝐷 𝑠 + 1 𝑁=
𝑁 ατ𝐷
Example:
■ For PID controller with parameter value of
■ 𝐾𝑐 = 15, τ𝐼 = 0.5, τ𝐷 = 0.1 𝑤𝑖𝑡ℎ α = 0.16
𝑃 = 𝐾𝑐 = 15
𝐾𝑐 15
𝐼= = = 30
τ𝐼 0.5
𝐷 = 𝐾𝑐 τ𝐷 = 15(0.1) = 1.5
1 1
𝑁= = = 62.5
ατ𝐷 0.16(0.1)
Example: Comparison P,PI and PID
PID CONTROLLER
IN SIMULINK
Without derivative filter
PID controller in simulink
the PID control (without a derivative filter) is given by
𝑃′ 𝑠 1
𝐺𝑐 = = 𝐾𝑐 1 + + τ𝐷 𝑠
𝐸 𝑠 τ𝐼 𝑠
1 𝐾𝑐 𝑣𝑎𝑙𝑢𝑒
τ𝐼
𝑠𝑢𝑏𝑠𝑦𝑠𝑡𝑒𝑚
τ𝐷
Example:
■ For PID controller with parameter value of
■ 𝐾𝑐 = 15, τ𝐼 = 0.5, τ𝐷 = 0.1
END