You are on page 1of 7

Construction and Analysis of PID, Fuzzy and

Predictive Controllers in Flow System


Edwin Pruna, Victor H. Andaluz, Luis E. Proaño, Christian P. Carvajal,
Ivón Escobar, and Marco Pilatásig

Abstract— This paper presents the construction of a flow [7]. While the fuzzy control is a specific methodology for
station that allows the implementation of different advanced detecting abnormalities in the quality control of various
control technique. Furthermore this work focuses on comparing processes such as water treatment using heuristic rules with
of the performance of traditional PID controllers, Fuzzy logic
a hierarchical structure which tries to assimilate the human
and predictive MPC when controlling the flow dynamic variable
and to analyze the advantages and disadvantages of these thinking in numerical data [8], this, when applying a PWM
control strategies in industrial processes. The characteristics of inverter, fast dynamic response is achieved to improve the
the controllers are tested both in simulation and shortcomings of traditional controllers [9]. In research
experimentation with dedicated software in systems analysis. studies, combining both drivers give rise to an advanced
control strategy like the fuzzy PID that manages to achieve
Index Terms— Fuzzy Logic, PID, Predictive MPC. high static accuracy, high dynamic performance and
robustness [10]. While the MPC is within optimal controls,
I. INTRODUCTION
meaning that the performance depends on the optimization of

S INCE 1947, with the automatic revolution, electronic


controllers have managed to break several limitations in
the oil, food and power generators industry -among
a criterion that is related to the future system behavior. This
will be obtained through the dynamic model of the station
(Prediction Model). Another important fact of this control
others. This has brought security, flexibility and economy in will be the future time considered for optimization called
its operation. Sturdier systems have been introduced. Control prediction horizon [11].
methods have evolved from [1]; 1) control ON-OFF which As explained, this paper focuses on the comparison of
is the simplest way to control a dynamic variable where the
traditional PID controllers, Fuzzy Logic and Predictive MPC
actuator has only two states [2]; 2) PID controllers that
applied to industrial processes of fluid control. Therefore,
currently, in the industry, have been chosen about 95% for
stability controllers, response speed, steady-state error,
their simple structure, accuracy, reliability and robustness to
some extent, high stability in first-order system and processes disturbance response are analyzed. This way, it can be
where response times are not that critical [3]; 3) advanced determined which control method is more efficient for a
controllers are characterized by handling multiple variables process with variable flow dynamics. For which a flow
at the same time, and are based on future prediction of the to- station that allows perform the necessary tests with all
be-controlled variable. Among them, these stand out; a) required components that simulate a real industrial process is
Fuzzy Logic or experts, with recent deployments in Japanese built. Moreover, the HMI system allows real-time monitoring
industries, as it improves the response times of the process, of the process variables.
experts work in nonlinear systems, with great sensitivity to This paper consists of VI sections including the
changes of the process variable [4]; b) Model Predictive Introduction. Section II introduces the problem formulation.
Control MPC. It is characterized by a mathematical model to In Section III, the construction of the flow plant is described.
predict the behavior of the system. Thus, it defines a In Section IV, PID, Fuzzy Logic and Predictive controllers
prediction and control horizon [5], among others. using LabVIEW are implemented. In Section V, a
According to various applications and studies it shows that comparison among PID controllers, Fuzzy logic and
the PID control can curb the phenomenon of inverse time Predictive using the curves obtained in the preceding
delay and greatly improve the dynamic characteristics of the paragraph is made. Finally, in Section VI, the conclusions are
original system [6], a major disadvantage of this control shown
strategy is its precision only in linear or first-order systems.
Yet, Nelder-Mead method allows control in second-and- II. PROBLEM FORMULATION
third-order nonlinear processes through real-time simulations
At present, the industry has migrated to automated
processes to maintain dynamic variables in established
Edwin Pruna, Víctor H. Andaluz, Luis Proaño, Christian Carvajal, Ivón
Escobar, Marco Pilatásig are with the Universidad de las Fuerzas Armadas
ranges in order to obtain a final product in optimal and
ESPE, Sangolquí-Ecuador. E-mail: {eppruna, vhandaluz1, leproaño, ccarvajal, standardized conditions. In addition, as secondary objective
ipescobar, mapilatagsig} @espe.edu.ec and no less important, the controls are not only focused on
9781509011476/16/$31.00©2016IEE the product but also on protecting both the operator and the
machine. Therefore, it is indispensable to know the installed in line pipe are set. Additionally, it has an actuator
advantages, disadvantages and features of different methods responsible for capturing the signal given by the controller
of control. and change the frequency of a centrifugal pump feeding of ½
Known that not all industrial processes operate in the same AC phase HP, which is responsible for varying the flow rate;
way, it is not feasible the use a single controller: i) PID and finally vi) Transmitter performs the flow variable
controller is used in most industrial processes due to its high measurement, ROSEMOUNT 8732E measures the volume
performance, its limiting (being unsuitable for second-order flow by detecting the velocity of a conductive liquid passing
processes) ii) Fuzzy Logic Control has an algorithm based on through a magnetic field delivering a standard current value
hierarchical levels similar to the human thinking, it also has [12], the station is shown in Fig. 2 with its components.
good functionality and fast processes. And the iii) Predictive
Model is a control method that has entered the industry in
recent years as the best option to control a process with
multiple inputs and multiple outputs.
When performing the control of dynamic variables such as
flow, the implementation of methods of robust and advanced
control is necessary since these processes contain several
factors involved in the variable. For example, the fluctuation
of the flow, the pressure exerted in the pipe, etc.

III. CONSTRUCTION OF FLOW PLANT


This section presents the construction of a station for
monitoring and controlling the flow. In order to simulate
control systems in industrial environments compactly; the
station consists of the following blocks, as shown in Fig. 1

Fig. 2. Flow Station with its elements.

IV. CONTROL ALGORITHMS


A. Dynamic Model of Flow Station
On the study of control strategies, it’s necessary to know
a priori, the mathematical model that the to-be-controlled
Fig. 1. Diagram of Flow Station Blocks.
plant owns. The plant has parameters that can vary over time.
It is especially necessary a model as accurate as the station
Fig. 1 shows the block diagram of the flow control system for the MPC control. The acquisition of the model is
in closed loop: i) Set Point defines the value to be achieved performed based on the experimental identification
within the range of 10 to 40 LPM. The value input is done by procedure with the support of calculation tools available in
touch screen for traditional controls in the PLC incorporated MATLAB.
in the station or by the HMI of the host computer where the Fig. 3 depicts the reaction curve of the registered process
advanced control algorithms are run; ii) Controller has two in open loop of the input values, being the flow through the
alternatives for the execution of control strategies, in the first pipe and the output referenced to pump power commanded
place the PLC for classic controls, while the second one is a by the frequency inverter. The range of variation of each of
computer with a data acquisition card (DAQ) which is the variables considered is between the minimum of 10 LPM
responsible for effecting communication between the and the maximum of 40 LPM, represented with values of 1
computer and the module. The set point values and the value to 5 respectively. Each value is taken with time of sampling
of the process variable enter this block to internally perform Ts = 100 ms (time that an experiment conducted in the
the calculation of error and control algorithm in order to laboratory lasts). The most important thing is that there
deliver a signal of 1V to 8V; iii) Plant has a container of 45 should be no alteration in the system.
cm3 called reserve tank which contains the liquid to be For identification of the plant dynamic model, the
pumped through the pipe and returns to the container. To command "ident" of MATLAB is used, the same that relates
simulate disturbances in the flow station, three manual valves the behavior of the inputs and outputs of the flow station. So
the model is defined as: The mathematical representation in discrete-time of a
( )= (1) PID control is shown in (4)-(7), where it is considered that
( )
=
where: = 1.0181; = 0.0015064; = • Proportional action
0.0000762 ; while the percentage of acceptance of the
obtained mathematical model is shown in Table I. ( )=( ( )) (4)
6
Entrada
Input
Output
5 Salida
• Trapezoidal integral action
4
Voltage [V]

() ( )
3 ( )= ∑ (5)
2
• Partial derivative action
1

0 ( )=− ( ( )− ( − 1) (6)
0 2 4 6 8 10 12 14 16 18 20 22 24 26
Time [s] where , y represent the positive earnings: adjustment
proportional, integral time and derivative time, respectively.
Fig. 3. System output to a determined input.
The established PID controller uses an integral sum
correction algorithm of the three actions [13].
TABLE I: ADJUSTMENT OF THE TRANSFER FUNCTION
( )= ( )+ ( )+ ( ) (7)
Domain Adjustment percentage
C. Fuzzy Control
Continuous (s) 96,37 %
Discrete (z) 96,76 % The fuzzy model is a control strategy characterized by: i)
Expert knowledge of the dynamics of the system, a coded rule
To implement the predictive control model, MPC, it is base and derived from practice and human experience; ii)
necessary that (1) is represented as a State Pattern. Implementation of the controller design without a function of
rigorous transfer of the station; iii) Control through words
( + )= ( )+ ( )+ ( ) interpreting the common sense, instead of using numbers or
(2) sentences instead of equations.
( )= ( )+ ( )+ ( )
where, Fuzzy controller
x (t) 0.80 −0.23 0.007 0.008 x (t)
x (t) 0.59 0.22 0.20 −0.01 x (t) SP Inference Defuzzyficati
= + Fuzzyfication
x (t) −0.02 −0.68 −0.28 −0.38 x (t) mechanism on
x (t) 0.006 −0.019 −0.15 0.87 x (t)
0.007 u (t) −0.01 e (t) Knowledge Process
0.12 u (t) 0.04 e (t) Base
+ +
0.11 u (t) 0.12 e (t)
0.008 u (t) −0.57 e (t)
Transmisor
( ) = −12.16 0.9008 0.022861 −0.07599 x (t) +
+ 0 u (t) + e (t) Fig. 4. Strategy fuzzy control loop.

B. PID Control Fig. 4 shows the proposed control scheme, where the
PID control is the most classic and common control in the accumulated error ( ) is defined by the difference between
industry control. For the proposed controller design, it was present error ( ) minus error ( − 1), i.e.,
considered that the: i) Controller will be applied to a transfer ( ) = ( ) − ( − 1) (8)
function with linear trend; ii) Process variable must be within It is worth mentioning that ( ) and ( ) represent the
the parameters set by the operator; iii) Tuning values or inputs of fuzzy control which must be fused ( ) with five
control gains must give a good performance to get the best triangular membership functions and two trapezoidal ones;
response of the controller in the flow system. and ( ) with three triangular fuzzy sets representing all
The error of the PID controller is defined by the difference states (linguistic) that the input can take. The functions of the
of the Set Point, SP, and the process variable (PV). input ( ) are distributed symmetrically in a range of -100 to
( )= − (3) 100 as shown in Fig. 5; also, the membership degrees must
be cross linked so that each value remains represented in at define all possible logical statements (Table II). Finally,
least two functions, and each function must be defined in a every action the output makes should be diffused, with the
range of 50 in order to filter noise measurement. aim of representing every action in a number, using the
method of the area center defined by:
( )
= (9)
( )
where ( ) is the area of the diffuse solution, is the
center of gravity (concrete control action) of the membership
function ( ) of the control conditions.

TABLE II: Control Conditions


ACUMMULATED ERROR
N C P
Fig. 5. Membership functions of the Error input variable ( ).
NA T T T

E NMA A A A

R
NB MA MA MA
R
O C MA C MB
R
PB MB MB MB

PMA B B B
Fig. 6. Membership functions of Accumulated Error Variable ( ).
PA BB BB BB
The labels correspond to the values that ( ) can take on
a specified range {-100 ... 0 ... 100} with fuzzy sets {NA,
NMA, NB, C, PB, PMA, PA}, where in each case P D. Predictive Control based on MPC model.
represents positive, N is negative. A corresponds to high, M The aim of MPC is to obtain a future path of the
is medium, B is low, e.g., PMA corresponds to a medium- manipulated variable u. In this regard a prediction horizon N
high positive error. Whereas N, C and P, are functions is set, for which future outputs will be predicted at every
representing the accumulated error ( ) negative, zero and moment . Therefore, a prediction model is used (2) which
positive, respectively. See Fig. 6. aims to describe the behavior of the flow process variables to
be controlled. The predictions are dependent on values
For the controller output, five triangular fuzzy sets and obtained until the instant and on the future control signals.
two trapezoidal ones, with considerations of uniform For the calculation of future control signals, a cost
distribution and intervals required for each membership function or optimization criterion is required. This is
function are used. The controller output determines the responsible for punishing errors that occurs between the
voltage to be sent to the plant, and is represented as {BB, B, predicted output and the reference trajectory. The
MB, C, MA, A, T} in a range of {-3 ... 0 ... 3} where C is optimization iterative algorithm returns a vector containing
zero, B is low, M is medium, A is high, and finally T is all. the future control actions, the dimension of vector depends
See Fig. 7. | on the control horizon. However, only the first element of the
vector must be sent to the plant. This process is repeated for
each instant . The MPC strategy and the idea of involved
terms [14] are illustrated in Fig. 8.

Fig. 7. Membership functions of the output variable.

The control conditions are defined in order to link


logically the degrees of membership of the input variables
( ) and ( ) with the output. Therefore, it is necessary to
Past Future

Ymax Medium
Reference
r Estimated

PREDICTION
HORIZON

Ymin

t
Mov. Past
Mov. Planned
CONTROL HORIZON
Umin

-5 -4 -3 -2 -1 K +1 +2 +3 +4 +5 +6 +7

Fig. 8. MPC control reference.


The MPC in state-space must ensure zero steady-state
error. Therefore, a model with embedded integrator [15] is
used. In (2) the upgraded model patterns are A, B, C, D. The Fig. 9. Experimentation system.
prediction of the states for each instant of time ki is obtained E. PID control tests
from For the first experiment, the PID control (7) is
( + )= ( )+ Δ ( )+ implemented. So Fig.10 represents the response of the plant
+ Δ ( + − 1) (10) in reference to the desired Set Point value (SP); while Fig. 11
where M and N are the control and prediction horizons, shows the development of error, which tends to zero
respectively. With the same criterion, it can be used to obtain asymptotically, i.e.,
the output predictions. lim ( ) = 0
( + )= ( )+ Δ ( ) + →
+ Δ ( + 1) + 45
Pv-PID
+ Δ ( + − 1) (11) 40 SP

35
Flow [LPM]

The set of output predictions can also be represented by: 30


= ( )+ (12) 25
where patterns and are constants formulated based on
20
the upgraded model patterns. With these patterns, the
optimization can be determined. They are responsible to 15
minimize the error between the predicted outputs and the set 10
point which gives attention to the variation of the control 5
signal with the use of the cost function , 0
( , )=( − ) ( − )+ (13) 0 1 2 3 4 5 6 7 8 9 10 11
Time [s]
Dimension depends on the control horizon and only the Fig. 10. Execution of PID algorithm on the flow station.
first term of the resulting vector must be sent to the controller.
40
V. EXPERIMENTAL RESULTS ERROR PID
30
The built experimental system shown in Fig. 9 has as a
20
Flow [LPM]

control unit containing: Core i5 computer with frequency of


a processor 2400 MHz, an internal DDR3-SDRAM memory 10
and storage capacity of 640 GB. 0
Several experimental tests were performed to test the
operation and performance of the proposed control -10
algorithms (7), (9) and (11), from which the most relevant are -20
shown. For the analysis of system performance, the Set Point
-30
is defined throughout the operating range, i.e., 10 to 40 LPM.
0 1 2 3 4 5 6 7 8 9 10 11
Time [s]
Fig. 11. PID control error.
F. Fuzzy control test
40
For the experiment with the fuzzy control (9), it is ERROR MPC
performed similarly to the previous control. So Fig.12 30
represents the response of the plant to changes in the Set 20

Flow [LPM]
Point SP. Whereas Fig. 13 shows the evolution of error.
10

45 0
Pv-Difuso
40 SP -10
35
Flow [LPM]

-20
30
25 -30
20 0 1 2 3 4 5 6 7 8 9 10 11
Time [s]
15 Fig. 15. MPC control error
10
5 H. Comparison of controls
0 Fig. 16 represents the response comparison of the plant to
0 15 6 2 7 3 8 94 10 11
Time [s] the three proposed controls. The figure illustrates that the
Fig. 12. Execution of Fuzzy algorithm on the flow station. MPC reacts faster than the PID and fuzzy. The stability of
each type gives as a result that the PID is slower than the
Fuzzy and MPC.
40
ERROR DIFUSO 45
Pv-PID
30
40 Pv-Difuso
Pv-MPC
20 35
Flow [LPM]

Flow [LPM] SP

10 30
0 25
20
-10
15
-20
10
-30
0 1 2 3 4 5 6 7 8 9 10 11 5
Time [s] 0
Fig. 13. Fuzzy control Error. 0 1 2 3 4 5 6 7 8 9 10 11
Time [s]
G. MPC control tests Fig. 16. Execution of PID, Fuzzy, MPC controllers
For the last test, the MPC control (11) is applied. Fig. 14
40
indicates the controller's response when set point changes are ERROR PID
made. And Fig. 15 represents the response of the plant to 30
ERROR DIFUSO
ERROR MPC
changes in the set point, SP. The experiment indicates that
the error tends to be reduced to zero and remain constant 20
Flow [LPM]

faster than the two control strategies mentioned before.


10
45
Pv-MPC
0
40 SP
35 -10
Flow [LPM]

30
-20
25
20 -30
15 0 1 52 6 3 4 7 8 9 10 11
Time[s]
10
Fig. 17. PID, Fuzzy and MPC controllers’ error
5
0
0 1 2 3 4 5 6 7 8 9 10 11
Time [s] VI. CONCLUSIONS
Fig. 14. Execution of MPC algorithm on the flow station By applying different types of control in a flow system
such as PID and Fuzzy, the behavior is similar. While the
strategy of MPC Control indicates that its speed to correct the [15] E. F. Camacho and C. Bordons, Model Predictive Control, España:
Escuela Superior de Ingenieros, Universidad de Sevilla.
error is faster since its output and the optimization of a
criterion are predicted. Edwin Pruna, graduated in Electronics
When applying appropriate tuning constants in the PID and Instrumentation Engineering from
control, the control strategy acts in a proper and satisfactory the Universidad de las Fuerzas Armadas
way. It achieves to meet the system and operator ESPE in 2007, and obtained a M.Sc. in
requirements. The well-defined Fuzzy control rules generate Energy Management in 2013. His
a great reliability in the system. It is concluded that the two research interests are: design and
control strategies are suitable for industrial processes. On the implementation of prototypes for
other hand, when the MPC defines its tuning variables well, engineering education, and virtual
it has better speed in the settling time and decreases rehabilitation for people disabilities.
oscillations when reaching the set point.
MIMO processes can merge the MPC control with the Víctor H. Andaluz was born in Ambato-
PID forming a cascade control. The MPC actions are Ecuador in 1984. He obtained a Ph.D. in
references of the PID control allowing the classic control Control Systems Engineering in 2011.
manage the optimization of resources and improve control Currently he is working at the
making the store error tend to zero asymptotically. Universidad de las Fuerzas Armadas
The characteristics of the flow station that cause problems ESPE, Latacunga-Ecuador. His area of
are: i) Transmitter, its configuration is determined for taking research is intelligent control applied to
90 samples to send the flow data; ii) The centrifugal pump production systems, mobile robots and
has "dead zones" since for the circulation of liquid, the rehabilitation of people disabilities
voltage level applied to the pump must reach a determined
value; iii) The pump introduces noise into the system since it Luis E. Proaño was born in Ambato,
has an engine inside; and finally iv) Delay in the system when Ecuador in 1992, graduatedin Electronics
the pump speed varies. and Instrumentation Engineering from
Universidad de las Fuerzas Armadas
REFERENCES ESPE in 2015. His research interests are
[1] A.Sanchez. Instrumentacion y control avanzado de automation and image processing.
procesos.Madrid: Ed Santos, 2013, pp 345-350.
[2] K. Ogata. Ingenieria de Control Moderno, 4ta ed, Madrid: Pearson Christian P. Carvajal was born in
Educacion, 2004, pp. 984-984.
[3] M. Johnson y M. Moradi, PID Control, Londres: Verlang, 2005, pp. Ambato, Ecuador in 1992, graduated in
539-541. Electronics and Instrumentation
[4] P. Ponse Cruz, Inteligencia Artificial con Aplicaiones a la Engineering from Universidad de las
Ingenieria, Mexico: AlfaOmega, 2010, pp 289-293. Fuerzas Armadas ESPE in 2015. His
[5] M. J.Willis y M. T. Tham Advanced Process Control. Dept. of
Chemical and Process Engineering. University of Newcastle. research interests are automation and
Agosto 2006. robotics.
[6] W. Zhuo, J. Yanyan y W. Shichao “The application of feedforward
PID control in water level control system” IEEE Congreso Mundial Ivón Escobar, is in Electronics and
de automatización,pp 3-5, 2012
[7] M. Tajjudin, N. Ishak, H. Ismail, M. H. Fazalul Rahiman y R. Instrumentation Engineering from
Adnan, “Optimized PID control by Nelder -Mead method for drive Universidad de las Fuerzas Armadas
systems electrohydraulic” IEEE Conferencia Sistema de Control y ESPE in 2008, obtained the degree of
Postgrado Coloquio de Investigación, 2011, pp 2-4. Master in Energy Management in 2013.
[8] C. Dadios, “Fuzzy logic control monitoring water quality and
monitoring for conservation of aquatic life in Lake Taal” IEEE The research are design and
Conferencia Tencon, 2012, pp 4-7. implementation of prototypes for
[9] E.-C. Chang y J. M. Guerrero, “Fuzzy variable structure control for engineering education and rehabilitation virtual.
PWM inverters” IEEE Conferencia Sistemas Difusos, 2011, pp 2-
3.
[10] J.Z. Cao, H. Yang y H. Nan, “Advanced Fuzzy PID Composite Marco Pilatásig, graduated in
Control for Stabilized” IEEE Conferencia Mecatrónica y Electronics and Instrumentation
Automatización, 2012, pp 2-5. Engineering from the Universidad de las
[11] D. L. Marruedo, “Control predictivo de sistemas no lineales con Fuerzas Armadas ESPE in 2005; and the
restricciones: estabilidad y robustez”. Ph.D. tesis, Universidad de
Sevilla, Sevilla, Andalucía, España, 2002. degree of Master in Energy Management,
[12] Emerson Process Management Rosemount 8732E, Integral Mount Technical University of Cotopaxi,
or Remote Mount Magnetic Flowmeter System, Emerson Process Ecuador in 2013. It plays the roles of
Management, 2011. Professor in the Department of Electrical
[13] National Instruments LabView, PID and Fuzzy Logic Toolkit User
Manual, National Instruments, 2009. and Electronics at the Universidad de las Fuerzas Armadas
[14] M. Maciejowski, Predictive Control with Constraints, ESPE, Latacuna

You might also like