EasyManua.ls Logo

LSIS Master-K K200S - D Control; Pseudo Code of PID Control

LSIS Master-K K200S
238 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 15 The PID function of K200S MASTER-K
15-14
15.3.3 D control
The continuous formula of derivative term is as following;
dt
dy
KTdDD
dt
d
N
Td
=+×
N : high frequency noise depression ration
y : the object to be controlled (PV)
The digitized formula is as following (Use Tustin approximation method)
[ ]
)1()(
2
2
)1(
2
2
)(
+
+
= nyny
hN
Td
KTdN
nD
hN
Td
hNTd
nD
15.3.4 Pseudo code of PID control
The pseudo code of PID control is as following;
Step 1 : Get constants that are used for PID operation
Ti
h
KBi ×= : integral gain
)2(
)2(
hNTd
hNTd
Ad
×+×
×
×
=
: derivation gain
)2(
)2(
hNTd
TdNK
Bd
×+×
×
×
×
=
Tt
h
A =0 : anti-windup gain
Step 2 : Read SV and PV value
PV = adin(ch1)
Step 3: Calculate the proportional term.
P = K × (b × SV PV)
Step 4 : Update the derivative term. (initial value of D = 0)
D = As × D Bd × (PV PV_old)
Step 5 : Calculate the MV. (initial value of I = 0)
MV = P + I + D
Step 6 : Check the actuator is saturated or not.
U = sat(MV, U_low, U_high)
Step 7 : Output the MV value to the D/A module
Step 8 : Update the integral term.
I = I + bi × (SV PV) + A0 × (U MV)
Step 9 : Update the PV_old value.
PV_old = PV

Table of Contents

Related product manuals