An adaptive tuning method for parameters of a digital PID controller, which is characterized by a cyclic sequence of operations to adjust in equal time intervals only one PID parameter Kp, Ki, or Kd at any time point t in a closed control loop by analog feedback of the actual value xt by means of a pass counter and three additional indices k for Kp, m for Ki, and n for Kd used as iteration steps, and:
- 1) A tuning equation to calculate an adjustment step value dKp k for a proportional coefficient Kp in iteration step k at time t:
- dK
- p
- k
- =
- (
- d
- 2
-
- y
- t
- -
- K
- i
- m
- -
- 1
- ·
- de
- t
- ·
- dt
- -
- K
- d
- n
- -
- 1
- ·
- d
- 3
-
- e
- t
- dt
- )
- ·
- de
- t
- (
- de
- t
- )
- 2
- -
- (
- dy
- t
- -
- K
- i
- m
- -
- 1
- ·
- e
- t
- ·
- dt
- -
- K
- d
- n
- -
- 1
- ·
- d
- 2
-
- e
- t
- dt
- )
- ·
- d
- 2
-
- e
- t
- (
- de
- t
- )
- 2
- ,
- where:
- dt is the sampling time of a digital PID controller;
- dyt is a control variable change at time t, which is determined as dyt=yt−yt−1, ∀t≥1 on the condition that dy0=y0:
- d2yt is the 2nd order differential of the control variable yt at time t, which is calculated as d2yt=dyt−dy−1, ∀t≥1 on the condition that d2y0=dy0;
- et is the control error between the setpoint w and the actual value xt at time t, which is calculated as et=w−xt, ∀t≥0;
- det is a 1st order differential of the control error et at time t, which is calculated as det=et−et−1, ∀t≥1 on the condition that de0=e0;
- d2et is a 2nd order differential of the control error et at time t, which is calculated as d2et=et−2·et−1+et−2, ∀t≥2 on the condition that d2e0=e0 and d2e1=e1−2·e0;
- d3et is a 3rd order differential of the control error et at time t, which is calculated as d3et=et−3·et−1·et−2−et−3;
- ∀t≥3 on the condition that d3e0=e0, d3e1=e1−3·e0, and d3e2=e2−3·e1+3·e0;
- Ki m−1 is the actual integral action coefficient Ki at time t, which was modified in iteration step m−1;
- ∀m>1 on the condition that Ki 0 was assigned a certain initial value for Ki;
- Kd n−1 is the actual derivative action coefficient Kd at time t, which was modified in iteration step n−1, ∀n>1 on the condition that Kd 0 was assigned a certain initial value for Kd,
- 2) a tuning equation to calculate the adjustment speed αp k for the proportional coefficient Kp in iteration step k at time t:
- α
- p
- k
- =
- K
- p
- k
- -
- 1
- ·
- de
- t
- +
- K
- d
- n
- -
- 1
- ·
- d
- 2
-
- e
- t
- dt
- -
- dy
- t
- dK
- p
- k
- ·
- de
- t
- ·
- dt
- ,
- α
- p
- k
- ∈
- [
- 0.001
- ,
- e
- t
- 4
- 2.71828
- ∈
- [
- 0.0001
- ,
- 1
- ]
- ]
- ,
- where:
- Kp k−1 is the actual proportional coefficient Kp at time t, which was modified in iteration step k−1;
- ∀k>1 on the condition that Kp 0 was assigned a certain initial value for Kp,
- 3) a tuning equation of the proportional coefficient Kp in a negative direction for iteration step k:
- 4) a tuning equation to calculate the adjustment step value dKi m for an integral action coefficient Ki in iteration step m at time t:
- dK
- i
- m
- =
- (
- d
- 2
-
- y
- t
- -
- K
- p
- k
- ·
- d
- 2
-
- e
- t
- -
- K
- d
- n
- -
- 1
- ·
- d
- 3
-
- e
- t
- dt
- )
- ·
- e
- t
- e
- t
- 2
- ·
- dt
- -
- (
- dy
- t
- -
- K
- p
- k
- ·
- de
- t
- -
- K
- d
- n
- -
- 1
- ·
- d
- 2
-
- e
- t
- dt
- )
- ·
- de
- t
- e
- t
- 2
- ·
- dt
- ,
- 5) a tuning equation to calculate the adjustment speed αi m for the integral action coefficient Ki in iteration step m at time t:
- α
- i
- m
- =
- dy
- t
- -
- K
- i
- m
- -
- 1
- ·
- e
- t
- ·
- dt
- -
- K
- d
- n
- -
- 1
- ·
- d
- 2
-
- e
- t
- dt
- dK
- i
- m
- ·
- e
- t
- ·
- dt
- ,
- α
- i
- m
- ∈
- [
- 0.001
- ,
- 4
- ·
- ❘
- "\[LeftBracketingBar]"
- e
- t
- 3
- ❘
- "\[RightBracketingBar]"
- 2.71828
- ∈
- [
- 0.0001
- ,
- 1
- ]
- ]
- 6) a tuning equation of the integral action coefficient Ki in a positive direction for iteration step m:
- 7) a tuning equation to calculate the adjustment step value dKd n for a derivative action coefficient Kd in iteration step n at time t:
- dK
- d
- n
- =
- (
- (
- d
- 2
-
- y
- t
- -
- K
- p
- k
- ·
- d
- 2
-
- e
- t
- -
- K
- i
- m
- ·
- de
- t
- ·
- dt
- )
- ·
- d
- 2
-
- e
- t
- (
- d
- 2
-
- e
- t
- )
- 2
- -
- (
- dy
- t
- -
- K
- p
- k
- ·
- de
- t
- -
- K
- i
- m
- ·
- e
- t
- ·
- dt
- )
- ·
- d
- 3
-
- e
- t
- (
- d
- 2
-
- e
- t
- )
- 2
- )
- ·
- dt
- ,
- 8) a tuning equation to calculate the adjustment speed αd n for the derivative action coefficient Kd in iteration step n at time t:
- α
- d
- n
- =
- K
- p
- k
- ·
- de
- t
- +
- K
- d
- n
- -
- 1
- ·
- d
- 2
-
- e
- t
- dt
- -
- dy
- t
- dK
- d
- n
- ·
- d
- 2
-
- e
- t
- ·
- dt
- 2
- ,
- α
- d
- n
- ∈
- [
- 0.001
- ,
- ❘
- "\[LeftBracketingBar]"
- e
- t
- 5
- ❘
- "\[RightBracketingBar]"
- 13.5914
- ∈
- [
- 0.0001
- ,
- 1
- ]
- ]
- 9) a tuning equation of the derivative action coefficient Kd in a negative direction for iteration step n:
- Kdn=Kdn−1−αdn·dKdn,
- αdn·dKdn∈[−0.5,+0.5]
- and using the above tuning equations derived by reverse engineering of the digital PID controller to automatically adjust the PID controller parameters;
- and control a controlled system based on the adjusted parameters of the PID controller.