Вы находитесь на странице: 1из 10

Proposal of a Fuzzy Control System for Heat

Transfer Using PLC

Martin Nesticky(B) , Tomas Skulavik, and Jaroslav Znamenak

Faculty of Materials Science and Technology in Trnava,


Slovak University of Technology in Bratislava,
Paulinska 16, 917 24 Trnava, Slovak Republic
{martin.nesticky,tomas.skulavik,jaroslav.znamenak}@stuba.sk

Abstract. The article presents a fuzzy controller design for using PLC
as a control system. The subject of controlling is a mathematical model
of a heat exchanger modeled in Simulink. The control algorithm was
developed and congurated in the FuzzyControl++ conguration tools
for the automation of technical processes. The goal of the paper is to
explore the possibilities to implement and realize the potential of fuzzy
control in areas belonging to the domain of classical regulation. Model of
the closed loop control system in virtual environment is used to perform
multiple simulations to detect the system behavior under various condi-
tions. It is concluded that the applied control strategies can oer same
properties in progress of regulation and oer better approach to intuitive
knowledge base design and conguration parameters of controller.

Keywords: Fuzzy control Programmable logic controller Heat


exchange

1 Introduction

Ecient control is tightly related to improvements in the quality of industrial


production processes. In complex plants, a choice has to be made between
the various available strategies (conventional, fuzzy and neural) developed in
last decades. In the industry, fuzzy logic is implemented in non-linear closed-
loop controllers, response prognostics of mathematically complex processes or
a process automation application that cannot be solved with existing standard
tools. Empirical process know-how and verbalized knowledge by experience can
be directly transformed into controllers, patter identication or decision logic.
Numerous intuitive software programs, which require only minimal specialist
knowledge about fuzzy logic, allows to use fuzzy logic in many elds and appli-
cations of industrial automation.
The model of an indirect heat exchanger and a Fuzzy control system is
designed in this paper. For the designing process of the exchanger model, Matlab
Simulink was used. Simulink is widely used to spread engineering ideas, includ-
ing developing safety-critical software [1], designing industrial communication

c Springer International Publishing AG 2017
R. Silhavy et al. (eds.), Artificial Intelligence Trends in Intelligent Systems,
Advances in Intelligent Systems and Computing 573, DOI 10.1007/978-3-319-57261-1 2
12 M. Nesticky et al.

systems [2], designing controllers for various systems [3,4], and others. Fuzzy
Logic Toolbox software provides the direct implementation of the control sys-
tem into a simulation as in [5]. Nowadays, many processes operated by humans
are automated using various control techniques. Conventional control technique
performance, such as PID control, in itself is often inferior to that of the human
operator. One of the reasons is that linear controllers, which are commonly used
in conventional control, are not appropriate for nonlinear plants. Another rea-
son is that humans aggregate various kinds of information and combine control
strategies, that cannot be integrated into a single analytic control law.
Fuzzy logic can capture the continuous nature of human decision processes
and as such is a denite improvement over methods based on binary logic (widely
used in industrial controllers). Programmable Logic Controller systems were
used typical for discrete (event) control automotive, electronics, etc. Their
primary goal was to replace the relay technology. Nowadays, wide instruction
libraries including function block for continues control (well-designed PID, lead-
lag blocks, etc.) together with fuzzy toolboxes for PLCs and a universal fuzzy
system for PLC with a possibility to convert Matlab fuzzy system into PLCs
fuzzy structure do exist [6].

2 Materials and Methods


In this paper, mathematical model of controlled system represent heat transfer
in indirect heat exchanger. The model is based on template system presented
in [7]. The heat exchanger consist of two tanks. The tanks shares one wall as
a partition. This partition is used for heat transfer and has surface area S.
Warmer liquid A is in the rst tank, with input temperature T1 and output
temperature T10 . Colder liquid B is in the second tank, with input temperature
T2 and output temperature T20 . In the system is a ow valve, which regulates
the ow of the liquid A into the rst tank (Fig. 1).
In the considered system, q1 denotes the amount of the uid A in-owing to
the rst tank with volume of V1 . The uid B in-ows to the second tank with
the amount of q2 . The second tank has volume V2 . The changes of temperatures
of uids in the tanks are expressed by the equation

Fig. 1. Indirect heat exchanger


Proposal of a Fuzzy Control System for Heat Transfer Using PLC 13

dT10 q1 q10 ks S
= T1 T10 (T10 T20 ), (1)
dt V1 V1 1 cp1 V1

dT20 q2 q20 ks S
= T2 T20 + (T10 T20 ), (2)
dt V2 V2 2 cp2 V2
where ks is thermal conductivity of partition, is density of liquids and cp is
specic heat capacity of liquid. From these formulas, following block diagram
was composed (Fig. 2). To build the model in Matlab Simulink it was necessary
to take into account the adjustable input amount of the uid q1 using the input
ow valve (Fig. 3). Controlling of the temperature of the uid B in the second
tank is made by adjusting q1 , the inow of uid A to the rst tank. Blocks Divide
modules were added to the block diagram, which enable setting input ow q1
using the fuzzy controller. The required information about characteristics of the
system was obtained from the modied model. The information was used to
correct the design of the fuzzy controller.

Fig. 2. Block diagram of indirect heat exchanger

All parts of closed loop control system can be designed in Simulink, but it is
possible to send some data out of the Simulink model for calculations. Figure 4
shows the model of controller. The error signal e and the change of the error de
are obtained, their values are converted and then sent to the PLC. The PLC uses
fuzzy logic to calculate the control signal u, which is send back to the Simulink.
To imitate system with ow valve as a regulator, Limited Integrator was added
as a subsystem (Fig. 5) where the function f (u) is as follows:

f (u) : u[2] (((u[1] > 0) + (u[2] >=0)) > 0) (((u[1] < 1) + (u[2] <= 0)) > 0)
(3)

Proposal and testing the fuzzy control of the heat exchanger was carried out
in Matlab Simulink. PLC systems is now used to implement the fuzzy logic in
the control process. It is possible to implement fuzzy logic and fuzzy control
14 M. Nesticky et al.

Fig. 3. Matlab model of indirect heat exchanger

Fig. 4. Feedback control loop

Fig. 5. Limited integrator


Proposal of a Fuzzy Control System for Heat Transfer Using PLC 15

in industrial controllers with FuzzyControl++, a Siemens conguration tool.


Development and conguration of fuzzy system is divided into two steps. In rst
step, the model of control system is modied in FuzzyControl++. In second step,
created data are downloaded to the PLC and the parameters are adjusted more
precisely. Developing and testing of the PLC fuzzy controller was carried on
in the virtual SIEMENS PLC S7-300. The processor was CPU315F-2 and MPI
interface was used to communicate with FuzzyControl++. Real-time connection
between Matlab Simulink and the PLC program was provided by the PLCSIM
blockset. In the PLC, the function block FB30 contains all the fuzzy algorithms
and procedures. The program automatically creates the data block DB30. This
data block contains all the variables and the parameters which represent the
structure of the fuzzy controller. The function block contains also the memory
elements, which are required to call function block FB30. It was necessary to
take into account, that if the Simulink model of heat exchanger uses data type
of INTEGER, the input and output from function block FB30 is only data type
of REAL. Therefore, conversion of input and output values are required in PLC
program. The fuzzy controller was proposed as a Sugeno type and was designed
in the FuzzyControl++.
This controller has two inputs (error signal e and derivation of the error sig-
nal de), and it has one output signal (the control signal u). Both of the input
signals e and de are dened by three membership functions. More functions
does not improve the accuracy of control but proportionally increase the com-
putation time. The functions were drafted in Membership Function editor using
a Gaussian curve for each input signal. The error signal e was in the interval
from 20 C to 20 C (Fig. 6) and the change of the error de was in the interval
from 0.1 C to 0.1 C (Fig. 7). The control signal u is output from designed
fuzzy module and this output signal is characterized by ve membership func-
tions close full, close more, without change, open more, open full. The function
close full fully closes the ow control valve and the function open full fully opens
the valve. The functions close more and open more control the valve setting in
small steps. The function whitout change makes no change on valve setting. Fea-
tures of controller also follows from fuzzy rules. Proper reaction of controller is
dependent on the appropriate design of fuzzy rules. The rules are created and

Fig. 6. Input variable e


16 M. Nesticky et al.

Fig. 7. Input variable de

Fig. 8. 3D representation of fuzzy rules

edited in the editor of fuzzy rules. The fuzzy rules for calculating the value of
the control signal u are as follows (Fig. 8):

If (e is M) and (de is Z) then (u is whitout change)


If (e is M) and (de is P) then (u is close more)
If (e is M) and (de is N) then (u is open more)
If (e is L) then (u is close full )
If (e is H) then (u is open full )

3 Results and Discussion


Sugeno fuzzy controller has been tested in several stages. At the beginning,
proposed design of controller has to be tested. During this test, the control
process was not aected by any error from outside and set point was static in
time. The result of this test was correct response of the control signal to dierence
between set point and actual value of the output temperature of the liquid B.
If the desired and the actual temperature were equal, then the control signal
stays in its stabilized value. If the dierence between the desired and the actual
temperature were positive or negative then the control signal was decreasing or
Proposal of a Fuzzy Control System for Heat Transfer Using PLC 17

increasing. If the actual temperature was in the appropriate proximity of the set
point then dynamical characterization was taken into consideration. Whether
change of the actual temperature was positive or negative, the control signal
was increasing or decreasing.
The next stage involved testing in closed loop controlling of heat transfer.
Initial condition of model parameter was set according the Table 1. Dynamical
characterization of the actual temperature of the uid B and desired tempera-
ture as a set point were compared. If controller failed in expected demands, then
parameters of membership function were adjusted. Several simulations with con-
stant values of a set point were performed and the progress of process variable
was monitored.

Table 1. Input parameters of the system

Symbolic name Initial value Description


3
1000 kg/m Density of liquids
ks 1000 Wm2 /K Thermal conductivity of partition
V1 0.03 m3 Volume of the 1st tank
V1 0.04 m3 Volume of the 2nd tank
2
S 2m Surface area of partition
cp1 4195 kJ/(kg K) Specic heat capacity of liquid A
cp2 4183 kJ/(kg K) Specic heat capacity of liquid B
q1 0.0001 m3 /s Rate of ow of liquid A
q2 0.00021 m3 /s Rate of ow of liquid B

T1 80 C Input temperature of liquid A
T10 80 C Output temperature of liquid A

T2 20 C Input temperature of liquid B
T20 20 C Output temperature of liquid B

After fullling all requirements, the system was tested using a variable value
for set point instead of constant value. In the model this signal was generated by
the Signal Builder block. The signal was changing in steps and reaction of the
fuzzy controller was monitored. Ability of system reaction in time shows Fig. 10.
The test started with initial set temperature of 30 C.
At the beginning, the desired temperature was 30 C. Overshoot appeared
but it did not indicate the wrong functionality of the controller in this case. The
transfer heat between liquids takes some time, so the controller responses to
temperature changes gradually. Because of the inertia of the controlled system,
it incurs a delay between the actual temperature and desired temperature. The
fuzzy controller was also testing on ability to react on disturbance from outside.
In the time 9000 s the rate of ow of liquid B decreased as show Fig. 9. Figure 10
shows the increase of real temperature due to the disturbance. The controller
18 M. Nesticky et al.

Fig. 9. Trend of real temperature (PV) and desired temperature (SP) with disturbance
at 600 s

Fig. 10. Trend of actual temperature (PV) and desired temperature (SP)

responded correctly and in the time 9200 the real temperature and desired tem-
perature were equal.

4 Conclusion
This study applied a fuzzy system for controlling heat transfer in indirect heat
exchanger. The fuzzy system determines operating control parameters of heat
exchanger based on the current states. The approach with the expert knowl-
edge could obtain ecient and near-optimal solutions when compared to the
simulation-optimization approach. The Fuzzy Control System was implemented
in Programmable Logic Controller.
The virtual plant models and simulation models with other principles support
companies in identifying and implementing Industry 4.0 scenarios. Based on
the engineering experience, the fuzzy logic technologies have been developed to
consider the problems of optimization and decision making in the presence of
uncertainty. Many applications of fuzzy logic in industry have been successfully
developed.

Acknowledgments. The authors would like to thank for nancial contribution from
the STU Grant scheme for Support of Young Researchers.
Proposal of a Fuzzy Control System for Heat Transfer Using PLC 19

The research work is supported by the Project KEGA 040STU-4/2016 Moderniza-


tion of the Automatic Control Hardware course by applying the concept Industry 4.0
(Aplikacia konceptu Industry 4.0 v ramci modernizacie predmetu Technicke prostriedky
automatizovaneho riadenia).
This publication is the result of implementation of the project: UNIVERSITY
SCIENTIFIC PARK: CAMPUS MTF STU - CAMBO (ITMS: 26220220179) sup-
ported by the Research & Development Operational Program funded by the EFRR.

References
1. Rastocny, K., Zdansky, J.: Specicities of safety PLC based implementation of the
safety functions. In: Proceedings of International Conference Applied Electronics,
Pilsen, 57 September 2012, pp. 229232 (2012). ISBN 978-80-261-0038-6, ISSN
1803-7232, IEEE Catalog Number: CFP1269A-PRT
2. Franekova, M., Kallay, F., Peniak, P., Vestenicky, P.: Communication security of
industrial networks. Monography, EDIS ZU, Zilina (2007). ISBN 978-80-8070-715-6
3. Tothova, M., Pitel, M.: Reference model for hybrid adaptive control of pneumatic
muscle actuator. In: 9th IEEE International Symposium on Applied Computational
Intelligence and Informatics (SACI 2014), pp. 105109. IEEE Press, Timisoara
(2014)
4. Tothova, M., Pitel, M., Mizakova, J.: Electro-pneumatic robot actuator with arti-
cial muscles and state feedback. Appl. Mech. Mater. 460, 2331 (2014)
5. Tothova, M., Pitel, J., Hosovsk
y, A.: Simulation of hybrid fuzzy adaptive con-
trol of pneumatic muscle actuator. In: Silhavy, R., Senkerik, R., Oplatkova, Z.K.,
Prokopova, Z., Silhavy, P. (eds.) Intelligent Systems in Cybernetics and Automa-
tion Theory. AISC, vol. 348, pp. 239246. Springer, Cham (2015). doi:10.1007/
978-3-319-18503-3 24
6. Korosi, L., Turcsek, D.: Fuzzy system for PLC. Slovak University of Technology,
Faculty of Electrical Engineering and Information Technology, Institute of Control
and Industrial Informatics (2011)
7. Noskievic, P.: Modelovani a idendikacia systemu, pp. 116118. Montanex, Ostrava
(1999). ISBN 80-7225-030-2
http://www.springer.com/978-3-319-57260-4

Вам также может понравиться