SUGISAKAMASANORI

Journal of Robotics, Networking and Artificial Life
Vol. 9(4); March (2023), pp. 321–325
ISSN (Online):2352-6386; ISSN (Print):2405-9021
https://alife-robotics.org/jrnal.html

Shinichi Imai
Graduate school, Tokyo Gakugei University, 4-1-1, Nukuikita-machi, Koganei, Tokyo, 184-8501, Japan.

Received 11 November 2021
Accepted 24 October 2022

Local linear models
PID controller

PID control is widely used in process systems represented by chemical processes and petroleum
refining processes. The reason is that PID control has a simple structure. However, most of theexisting systems are non-linear systems, and it is difficult to always obtain good control resultswith fixed PID control. Therefore, in this study, we propose a method of tuning the PID gain
according to the deviation (control error) of the control result, and verify the effectiveness of thismethod through experiments. For self-tuning PID control using a local linear model, we propose
a program that performs PID tuning only when the deviation occurs with a certain magnitude. A
simulation is performed on the Hammerstein model, which is a non-linear system. As a result ofthe experiment, the number of PID gain changes could be significantly reduced.

Control error.

© 2022 The Author. Published by Sugisaka Masanori at ALife Robotics Corporation Ltd.
This is an open access article distributed under the CC BY-NC 4.0 license(http://creativecommons.org/licenses/by-nc/4.0/).

for the deviation, and PID control is performed only
when the threshold is exceeded. If the deviation is smaller
than the threshold value, control is performed withoutchanging the PID gain. We performed simulations on abilinear model, which is a nonlinear system, and verified
the effectiveness of this method when focusing on thereduction of computational load and control results. We
propose a method for tuning the PID gain according to
the deviation (control error) of the control result andverify its effectiveness based on numerical examples.

1. Introduction
PID control [1],[2] is widely used in industries, including
process systems such as chemical processes andpetroleum refining processes, because it has a simple
structure and its physical interpretation is clear. However,the characteristics of many existing systems vary
according to environmental and operating conditions andinclude nonlinear systems. Therefore, it is difficult toobtain accurate control results with fixed PID control.
Consequently, machine learning and data-driven [3],[4]control methods have been proposed to effectively
control nonlinear systems. However, in these methods,
PID tuning is performed step by step; hence, thecomputational processing load is high, and the processing
can be performed using only a high-precision computer.
In this paper, we developed a method for tuning the PID
gain only when the control result does not follow thetarget value. In the proposed method, a threshold is set

2. A design of a self-tuning control system using
a local linear model that performs PID tuning
according to deviation
Fig. 1 shows a block diagram of the proposed control
system. The authors have previously proposed a method
for calculating control parameters using the concept ofthe local linear model [5]. This method can control anonlinear system by locally establishing a linear model.

Corresponding author’s E-mail: shimai@u-gakugei.ac.jp http://www.u-gakugei.ac.jp/321

In the proposed control method, the deviation isevaluated for a self-tuning control system using a local
linear model. The nonlinear system is controlled by
performing PID tuning only when a deviation occurs to acertain magnitude.
2.1. System description
First, consider the discrete-time nonlinear systemrepresented byy(t) = f(φ(t − 1))(1)where, y(t) represents the system output and f(∙)
represents the nonlinear function. Also, φ(t-1) represents
the state of the system before time t-1 (historical data)and is called the information vector. The information
vector φ(t-1) is defined by the following equation.
φ(t − 1) ≔ [y(t − 1), y(t − 2), ⋯ , y(t − 𝑛𝑦 )u(t − 1), u(𝑡 − 2), ⋯ , u(t − 𝑛𝑢 ) ] (2)Furthermore, u(t) is the control input, and 𝑛𝑦 and 𝑛𝑢 are
the orders of the output and input, respectively. Now,
suppose that the nonlinear system represented byequation (1) can be locally represented by a linear model
as follows
𝐴𝑖 (𝑧 −1 )y(t) = 𝑧 −(𝑘𝑚 +1) 𝐵𝑖 (𝑧 −1 )𝑢(𝑡)(i = 1,2, ⋯ , N)(3)where, in Eq. (3), km represents the minimum estimateof the lag time, and when the lag time is known, km is set
to that value; when the range of the lag time is unknown,
k 𝑚 is set to 0. Furthermore, 𝑧 −1 represents a time-delay
operator, meaning 𝑧 −1 𝑦(𝑡) = 𝑦(𝑡 − 1) . Also, A(𝑧 −1 )and B(𝑧 −1 ) are given by
A𝑖 (𝑧 −1 ) = 1 + 𝑎𝑖,1 𝑧 −1 + ⋯ + 𝑎𝑖,𝑛𝑦 𝑧 −𝑛𝑦(4)−1−1−𝑛𝑢
B𝑖 (𝑧 ) = 𝑏0 + 𝑏𝑖,1 𝑧 + ⋯ + 𝑏𝑖,𝑛𝑢 𝑧(5)After the above preparation, the controller is designed forthe local linear model.

Fig. 1 Block diagram

For the linear model represented by Eq. (3), consider thefeedback control law given by Eq.
−1−1(6)R( z ) y(t ) + S ( z )u(t ) − R(1)r (t ) = 0

where, r(t) represents the target value at step t. R(𝑧 −1 )and S(𝑧 −1 )are polynomials designed based on the poleconfiguration of the closed-loop system, respectively.

Ri ( z −1 ) = ri ,0 + ri ,1 z −1 +  + ri ,n1 z − n1−1S i ( z ) = 1 + si ,1 z−1+  + s i , n2 z− n2(7)R(𝑧 −1 ) and S(𝑧 −1 ) are designed based on the poleplacement method. In this case, the input-output relationof the closed-loop system composed of equations (3) and(6) is expressed by the following Eq.

y i (t ) =z − ( km +1) Bi ( z −1 ) Ri (1)r (t )P( z −1 )(8)
The denominator polynomial P(𝑧 −1 ) of Eq.(8) is definedby the following Eq.

P( z −1 ) := Ai ( z −1 ) S i ( z −1 )+ z − ( km +1) Bi ( z −1 ) Ri ( z −1 )(9)
It can be seen that P(𝑧 −1 ) is the characteristic
polynomial of the closed-loop system. The following
equation is used to design this polynomial.

2.2. Controller Design
Design the controller based on the following steps.
[STEP1] Construction of multiple linear models
For the nonlinear model, multiple linear models areconstructed, system identification is performed using thelumped least squares method, and the parameters of𝐴𝑖 (𝑧 − 1) and 𝐵𝑖 (𝑧 − 1) (i = 1, 2, - - - , N; where i takesthese values unless otherwise noted) included in thelinear model of Eq. (3) are estimated. ) parameters in thelinear model.
[STEP2] Design of control systemP( z −1 ) = 1 + p1 z −1 + p2 z −22P1 = −2e cos(P2 = e−

4  −12) := Ts := 0.25(1 −  ) + 0.51
322(10)(11)

σ indicates a parameter corresponding to the rise time,and μ is a parameter related to the damping
characteristics of the response, which is adjusted by δ.
Here, R(𝑧 −1 ) and S(𝑧 −1 ) are calculated based on Eq.(9).
In order to obtain R(𝑧 −1 ) and S(𝑧 −1 ) uniquely, it isnecessary to set their orders to 𝑛1 = 𝑛𝑦 and 𝑛2 = 𝑛𝑢 +𝑘𝑚 , respectively. In this way, the pole placement control
system can be designed for each linear model.
[STEP3] Replacement with PID controller
We have described a control method based on the poleplacement method. This method can be replaced by adesign method based on PID control if it is considered in
the same way as in Eq.(6). First, consider the PID control
law of the following Eq.

where, A_i (z^(-1)) and B_i (z^(-1)) are the systemparameters of each linear model estimated in [STEP1].
1 i (t ) i (t ) = N

i =1N  (t ) = 1

NNow, Eq.(6) is rewritten as follows

y (t ) + u (t ) −r (t ) = 0

KI =(14)

KD =(15)
ri , 2(22)

𝜏 > |𝑒(𝑡)|(23)The PID control described in Section 2.2 is performed
only when this condition is satisfied, and the control isperformed without changing the PID gain if it is notsatisfied. Here, the parameter τ included in Eq. (23)denotes the design parameter given by a certain positive
constant. Setting this parameter requires trial and error.

The above allows us to adjust the PID parameters basedon the approximate pole configuration.
(16)[STEP4] Calculation of weights
Next, for each local linear data calculated in [STEP2], theestimation error 𝜀𝑖 (𝑡) is calculated for each model, andthe weight ω𝑖 is calculated based on this. 𝜀𝑖 (𝑡) is theerror between the system output value y(t) and theestimated output value ŷ(t) of each linear model. Here,ŷ(t) is calculated based on equation (3) by the following
formula4.

Simulation

In order to verify the effectiveness of this method, anumerical example for a nonlinear system is presented.
The Bilinear model is used as the control target. The
Bilinear model, which is expressed by the following
equation, is considered as the control target.

yˆ i (t ) = − Ai ( z −1 ) y(t ) + z − ( km +1) Bi ( z −1 )u (t )

 (t ) = y (t ) − yˆ i (t )K (i) := K P (i), K I (i), K D (i)We explain how to perform PID tuning only when thedeviation reaches a particular magnitude with respect tothe competitive tuning PID control using the local linear
model in Section 2.2. First, the threshold is defined as τ.
The condition for τ is expressed by the followingequation.
.

 := 1 + si ,1 + si , 2(21)3. PID tuning method in response to deviation− ri ,1 − 2ri , 2ri ,0 + ri ,1 + ri , 2K ( N ) =   i (t )K (i )i =1In this case, from equations (12) and (14), the PID
parameter is given by

KP =(20)[STEP5] Generation of weighted PID parameters
Using the weights obtained in [STEP4] and the PID
parameters in Eq.(15), calculate the weighted PID
parameters using the following Eq.

(13)

Ri (1)

ii =1

where, 𝐾𝑃 , 𝐾𝐼 , and 𝐾𝐷 represent the PID gain,
respectively. Furthermore, e(t) is the control deviation,
which is given by the following Eq.

Ri ( z −1 )1i (t )In addition, ω𝑖 (𝑡) is the weight corresponding to theselected i-th information vector. The smaller thedifference between the actual outputs value of the systemand each linear model, the larger the value of this weight.
Note that the calculation of ω𝑖 (𝑡) based on equation (18)satisfies the following Eq.

u(t ) = K I e(t ) − K P y(t ) − K D −2 y(t ) (12)e(t ) := r (t ) − y(t )(19)

y(t ) = 0.4 y(t − 1) − 0.99 y(t − 2) + 0.3u (t − 1)

(17)
(18)
323

− 4.0  u1  2.0
 2 .0  u 2  3 . 4
 3.4  u  4.03
(26)Furthermore, the threshold τ for determining PID tuning
is set to 0.1. Also, the number of experiments is 400.
Fig.2 shows the control results obtained using theproposed method. Fig.3 shows the temporal change in
PID gain. The points shown in Fig. 2 indicate that the PID
gain is tuned. Based on the results in Fig. 2 and Fig. 3,
the control results of the conventional data-driven type
and the proposed method are compared, and it isconfirmed that the difference is slight. However, thenumber of changes in the PID gain needs to be varied 400
times because the conventional method tunes the PID
gain sequentially. Using the proposed method, thenumber of changes was 56, which was approximately 1/7of that of the conventional method; this is a significant
decrease in the number of PID gain changes. This result
suggests that the computational cost can be significantly
reduced and can be implemented on a low-function
computer.

Fig. 2 Control result using the newly proposed PID control
scheme5. Conclusions
In this paper, we present a self-tuning control systemusing a local linear model that performs PID tuning
according to the deviation for a nonlinear system.
Specifically, we propose a method that defines athreshold value and changes the PID gain to control only
when the conditions related to the threshold value aresatisfied. In addition, a simulation was performed on thebilinear model, a nonlinear system, to verify theeffectiveness of the proposed method. In the future, weplan to evaluate the control performance of the deviationthreshold setting using the item response theory.

Fig.3 Temporal change in PID of the proposed method− 0.1u (t − 2) + 0.1y(t − 1)u (t − 1)
+ 0.05 y(t − 2)u (t − 2) +  (t )(24)
However, ζ(t) is a Gaussian white noise with mean 0 andvariance 0.012. The target value is given as follows.
1.0(0 ≤ 𝑡 < 100)−1.0(100 ≤ 𝑡 < 200)𝑟(𝑡) = {3(200 ≤ 𝑡 < 300)
6(300 ≤ 𝑡 ≤ 400)

References
1. K.Heong Ang, G. Chong, Y. Li,"PID control systemanalysis, design, and technology", IEEE Transactions on
Control Systems Technology, Vol.13, Issue.4, 2005
2. C. Gao, F. Wang, Z. Fu,"Fuzzy self-tuning PID control
algorithm for belt conveyor driven by multi-motor",
Journal of Robotics, Networking and Artificial Life,
pp.175-178, 2017
3. T.Yamamoto, K.Takao and T.Yamada: Design of a DataDriven PID Controller, IEEE Trans. on Control Systems
Technology, Vol.17, No.1, pp.29-39, 2009(25)

Next, based on the static characteristics, a linear model
corresponding to the control input range is constructed asfollows. However, the number of divisions is set to N=3.
The various design parameters included in this method
are 𝑛𝑦 = 2, 𝑛𝑢 = 1, and 𝑘𝑚 = 0.
324

4. T. Kinoshita, T. Yamamoto,"Design of a Data-Driven
Controller with Evaluating Controller Performance",
Journal of Robotics, Networking and Artificial Life,
pp.257-260,2019
5. S. Imai and T. Yamamoto, “Design of a Self-TuningController using Multiple Local Linear Models for
Nonlinear Systems”, The transactions of the Institute ofElectrical Engineers of Japan. C, A publication ofElectronics, Vol.132,No.6, pp.860-865, 2012 (InJapanese)

Authors Introduction
Dr. Shinichi Imai
He graduated doctor course at
department of engineering in
Hiroshima University. He works
at department of education inTokyo Gakugei University. His
research area is about controlsystem design, educational
engineering.

325