Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

11 - 2 Matlab Simulink PID

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Example :

■ Consider liquid level system with PI controller shown below.


■ Given A = 3 ft2, R = 1.0 min/ft2, K 𝑉 = 0.2 cfm/psi, K 𝑚 = 4
mA/ft, Kc = 4, K 𝐼𝑃 = 0.75 psi/mA, and τ𝐼 = 3 min.
■ Suppose that the system is initially at the nominal steady
state with a liquid level of 2 ft. If the set point suddenly
changed from 2 to 3 ft, how long will it take the system to
reach
a) 2.5 ft 𝐴 = 3 𝑓𝑡 2
b) 3 ft 𝐾𝑃 = 𝑅 = 1 𝑚𝑖𝑛/𝑓𝑡 2
τ = 𝑅 𝐴 = 3 𝑚𝑖𝑛
Solution:
1
■ For PI controller → 𝐺𝑐 = K 𝑐 1 +
τ𝐼 𝑠

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

𝑓𝑡 3 /𝑚𝑖𝑛 𝑚𝑖𝑛 𝑝𝑠𝑖


𝐾𝑂𝐿 = 𝐾𝑐 𝐾𝑣 𝐾𝐼𝑃 𝐾𝑝 𝐾𝑚 = 4 0.2 1.0 1.7 = 1.36
𝑝𝑠𝑖 𝑓𝑡 2 𝑓𝑡
Solution:
ττ𝐼 3(3)
τ3 = = = 2.57
𝐾𝑂𝐿 1.36

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

■ The step change in set point: ′


3−2 1
𝐻𝑠𝑝 𝑠 = =
𝑠 𝑠
Solution:
1
𝐻′ 𝑠 =
𝑠 2.21𝑠 + 1

■ Response → ℎ′ 𝑡 = 1 − 𝑒 −𝑡/2.21

𝑡 = −2.21 𝑙𝑛 1 − ℎ′ 𝑡

■ At ℎ 𝑡 = 2.5 𝑓𝑡 → ℎ′ 𝑡 = 0.5 𝑓𝑡 → 𝑡 = 1.53 𝑚𝑖𝑛

■ At ℎ 𝑡 = 3 𝑓𝑡 → ℎ′ 𝑡 = 1.0 𝑓𝑡 → 𝑡 = ∞
PID CONTROLLER
IN SIMULINK
With derivative filter
PID controller in Simulink

PID controller transfer function


(with a derivative filter)

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

You might also like