Chapter 7 Usage of Various Functions
dI
dt
The digitized formula is as following;
(
I
(
I
c)
D control
The continuous formula of derivative term is as following;
Td
d
×
N
dt
N : high frequency noise depression ration
y : the object to be controlled (PV)
The digitized formula is as following (Use Tustin approximation method)
(
)
=
D
n
d)
Pseudo code of PID control
The pseudo code of PID control is as following;
- Step 1 : Get constants that are used for PID operation
=
Bi
K
- Step 2 : Read SV and PV value
- Step 3: Calculate the proportional term.
- Step 4 : Update the derivative term. (initial value of D = 0)
- Step 5 : Calculate the MV. (initial value of I = 0)
- Step 6 : Check the actuator is saturated or not.
- Step 7 : Output the MV value to the D/A module
- Step 8 : Update the integral term.
- Step 9 : Update the PV_old value.
3) Instruction and parameter setting
For the PID operation of MK80S, following 2 instruction are included in the KGLWIN software. (version 2.0 or later)
No.
1
PID8
2
PID8AT
K
=
e
e = (SV – PV) : deviation value
Ti
+
) 1
−
(
)
n
I
n
K
=
(
)
e
n
h : sampling period
h
Ti
Kh
+
) 1
=
(
)
+
(
)
n
I
n
e
n
Ti
dy
+
=
−
D
D
KTd
dt
2
−
2
Td
hN
(
−
) 1
−
D
n
2
+
2
Td
hN
Td
h
×
: integral gain
Ti
2 (
×
−
×
)
Td
N
h
=
Ad
2 (
×
+
×
)
Td
N
h
2 (
×
×
×
)
K
N
Td
=
Bd
2 (
×
+
×
)
Td
N
h
h
A =
0
: anti-windup gain
Tt
PV = adin(ch1)
P = K × (b × SV – PV)
D = As × D – Bd × (PV – PV_old)
MV = P + I + D
U = sat(MV, U_low, U_high)
I = I + bi × (SV – PV) + A0 × (U – MV)
PV_old = PV
Name
Perform the PID operation
Perform the auto tuning operation
KTdN
[
(
)
−
(
−
) 1
y
n
y
n
+
hN
: derivation gain
Description
7-
]
Need help?
Do you have a question about the K7 Series and is the answer not in the manual?