Professional Documents
Culture Documents
Samopodešavanje Pid Kontrolera Pomoću Veštačke Inteligencije
Samopodešavanje Pid Kontrolera Pomoću Veštačke Inteligencije
1. Introduction
As in other industrial fields, PID (Proportional, Integral and Derivative) con-
troller is the most commonly used heating, ventilation and cooling (HVAC) systems,
because it is simple and usually sufficient for various processes. [1] If a mathemati-
cal model of a process can be derived then it is possible to determine parameters of
the controller so that closed-loop performance, regarding steady-state behavior, can
be achieved. [2] The standard tuning procedures are time consuming, and poorly
tuned control system may waste energy, reduce occupant comfort and cause
excessive wear of actuators.
Auto tuning has been successfully applied in many industries, taking into
account linear [1], nonlinear [3] and fractional [4] systems, systems of variable order
[5] and the systems with time delay [1][6]. To this day, many different methods for
self-tuning were studied [1], such as Global Search, One Parameter Search, Hooke
Jeeves Search, Genetic Algorithm [7][8], Particle Swarm Optimization [9], fuzzy
logic [8] etc., and minimization of energy consumption was the only optimization
393
criteria. Research has shown that analyzing performance indicators such as oversho-
ot [10] and transient time [11] provide improved control law, and therefore, occu-
pant comfort can be assured.
2. Method
The PID controller continuously calculates the error value e(t) as the diffe-
rence of the desired set point and a measured process variable and applies correction
based on proportional, integral and derivative actions, Figure 1.
The tuning is the adjustment process of proportional gain Kp, integral gain Ki
and derivative gain Kd to the optimum values for the desired response. To the time,
tuning is mostly intuitive, but it can be hard if multiple and often conflicting
requirements are to be achieved. The basic requirement for tuning is stability, but
regarding different systems behavior, others can be considered such as peak overs-
hoot, rising and transient time.
In this paper, parameters of PID controller are determined using the methods
of artificial intelligence: Genetic Algorithm and Particle Swarm Optimization. The
SISO system of interest is described with second order transfer function:
Y (s) b1s + b0
G
= (s) = (2)
U ( s ) a2 s 2 + a1s + a0
Potential solutions are given in three dimensional space as (Kp, Ki, Kd). Every
potential solution is graded using fuzzy logic based on peak overshoot and transient
time.
394
2.1 Genetic Algorithm
Genetic Algorithm – GA is global stochastic search algorithm based on the
principles of evolution, such as mutation, crossover and selection. Each potential
solution is called individual having a set of properties (chromosomes or genotype)
which can be changed, i.e. mutated. A set of individuals is called population. The
algorithm starts from a population of randomly selected individuals which is modifi-
ed through generations (i.e. iterations). In each generation, measure of quality is
evaluated for every individual using the fitness function. Based on the individual’s
fitness, they are selected as the parents for crossover forming a new generation of
descendants. Descendants are the result of recombination of parent’s chromosomes
and random mutation of the genes. The new generation of descendants is used in the
next iteration of the algorithm.
2.2 Particle Swarm Optimization
Particle Swarm Optimization – PSO is iterative algorithm based on imitation
of the behavior of animal groups or individuals in these groups such as birds, fish or
insects.
395
v [ k=
] w [ k ] ⋅ v [ k − 1] +
c p [ k ] ⋅ rp [ k ] ( p [ k ] − x [ k ]) + (4)
cg [ k ] ⋅ rg [ k ] ( g [ k ] − x [ k ])
The first addend in (4) is called inertial component and performance of the
algorithm, especially the precision around solution, can be substantially improved
when the inertial factor w decreases from 0.9 to 0.4 through the iterations. Second
and third addends in (4) are called cognitive and social components, retrospectively.
Variable acceleration factors cp and cg increase the ability of the algorithm to search
the space of solutions reducing the likelihood of getting stuck in a local optimum.
Initially, the particles are driven by their own experience, but the influence of cogni-
tive component is reduced over time by decreasing the cp factor. Consequently,
social component is improved by increasing the cg factor, encouraging the group
experience.
396
Figure 3 GA optimization – control signal
397
Figure 5 PSO algorithm – control signal
4. Conclusion
Since both algorithms are stochastic and depending on the initial population,
it is preferable to have large set of solution candidates over the search space. This
entails considerable number of calculations and it can be time consuming. Indeed,
multiple executions of the auto tuning algorithms have shown that even with smaller
sets of candidates PSO algorithm is faster in obtaining the optimal PID parameters.
Nonetheless, final result, i.e. system response, was always better regarding the over-
398
shoot and settling time. The reason for this is hidden in the fact that GA descendants
are limited by their parent’s genes which shouldn’t be overwhelmed by the mutation.
PSO particles are much more flexible having greater freedom of movement in the
search space. This auto-tuner could be applied in other industry fields. In the future,
the solution could be improved including other performance indicators in the opti-
mization criteria.
5. References
[1] Bi, Q., et. al., Advanced controller auto-tuning and its application in HVAC
systems, Control Engineering Practice, Vol. 8 (2000), pp. 633-644
[2] Yu, C. C., Autotuning of PID Controllers: A Relay Feedback Approach, 2nd
Edition, Springer, 2006
[3] Tan, K.K., Ferdous, R., Huang, S., Closed-loop automatic tuning of PID con-
troller for nonlinear systems, Chemical Engineering Science, Vol. 57 (2002),
pp. 3005-3011
[4] Alagoz, B. B., Ates, A., Yeroglu, C., Auto-tuning of PID controller according
to fractional-order reference model approximation for DC rotor control, Mec-
hatronics, Vol. 23 (2013), pp. 789-797
[5] Tavakoli, S., Griffin, I., Fleming, P. J., Tuning of decentralized PI (PID) con-
trollers for TITO processes, Control Engineering Practice Vol. 14 (2006), pp.
1069-1080
[6] Wang, Y. G., Shao, H. H., PID auto-tuner based on sensitivity specification,
Trans IChemE, Vol. 78 (2000), pp. 312-316
[7] Huang, W., Lam, H. N., Using genetic algorithms to optimize controller
parameters for HVAC systems, Energy and Buildings, Vol. 26, pp. 277-282
[8] Sharkawy, A. B., Genetic fuzzy self-tuning PID controllers for antilock braking
systems, Engineering Applications of Artificial Intelligence, Vol. 23 (2010), pp.
1041-1052
[9] Omar, M. H. T., Ali, W. M., Mostafa, M. Z., Auto Tuning of PID Controller
Using Swarm Intelligence, International Review of Automatic Contrl, Vol. 4,
No. 3 (2011), pp. 319-327
[10] Pavković, D., Polak, S., Zorc, D., PID controller auto-tuning based on pro-
cess step response and damping optimum criterion, ISA Transactions, Vol. 53
(2014), pp. 85-96
[11] Boiko, I., Self-tuning PI controller, IFAC Symposium on Power Plants and
Power Systems Control, Kananaskis, Canada, 2006
399