Gain Scheduling of PID Controller Based on Fuzzy Systems

. This paper aims to utilize fuzzy rules and reasoning to determine the controller parameters and the PID controller generates the control signal. The objective of this study is to simulate the proposed scheme on various processes and arrive at results providing better response of the system when compared with best industrial auto-tuning technique: Ziegler-Nichols. The proposed scheme is based upon the Ultimate Gain (K u ) and the Period (T u ) of the system. The error and rate of change in error gains are tuned manually to get the desired response using LabVIEW. This can also be done with various optimization techniques. A thumb rule for choosing the ranges for K c , K d and K i has been obtained experimentally.


Introduction
Control systems play an integral role in wide range of industrial and experimental applications.For any process to be carried out smoothly and efficiently, it is required to continuously monitor the system variables pertinent to the system.A manufacturing plant would generally require that a precise flow of some fluid being used in the manufacturing process maintain a stable flow-rate or temperature.
Various control schemes are available for the control of liquid level and flow process.Among them, the commonly used scheme is the conventional PID (Proportional-Integral-Derivative) control which is the most dominant and effective.The design of such a controller specifically requires three parameters i.e. proportional gain, integral time constant and derivative time constant [1].Due to their linear structure, the conventional PID controllers are usually not effective if the processes involved are higher order and time-delay systems, nonlinear systems, complex and vague systems without precise mathematical models, and systems with uncertainties [2].So for the overall improved performance, fuzzy PID controllers are preferred.Fuzzy logic is used to realise the scheduling algorithms for the controller parameters because it allows smoothly varying non-linear functions to be created [3].Also in the fuzzy control, the linguistic descriptions of human expertise in controlling a process are represented by fuzzy IF-THEN rules [4].So with this an expert control system is designed.An adaptive PID controller has been constructed as an initial step in the development of this implementation [5].The parameters as well as the required number of fuzzy rules in the fuzzy inference system can simultaneously learned by the accumulated GA [6].Fuzzy PID controllers can be divided into two parts i.e.Gain Scheduling and Direct Action.For the gain scheduling type of fuzzy PID controllers, the PID gains are tuned based on a fuzzy inference system rather than the conventional Ziegler and Nichols's approach [7,8].An adaptive fuzzy gain scheduling scheme for conventional PI and optimal controllers has been studied.The proposed controller offers better performance than fixed gain controllers [9].In present research work, PID controllers are proposed based on fuzzy gain scheduling for process control using LabVIEW 2014 [10].

PID Controllers
The derivative control action utilizes the rate of change of error signal.Derivative control brings a stabilizing effect to the system.It is sometimes referred to as 'anticipatory control'.The combined mathematical expressions for the proportional, integral and derivative control action in the Laplace domain is: and in the time domain is : where, mv(t) is the measured variable, mv ss is the steady state value of measured variable, e(t) is the difference between the current value and the set point, K c is the proportional gain, τ i is the parameter that scales the integral controller, τ d is the parameter that scales the derivative controller.ICAET 2016 -

Fuzzy Based Gain Scheduling
Fuzzy gain scheduling is all about using fuzzy rules and reasoning to determine the controller parameters based on error signal and rate of change of error signal.Figure 1 shows the PID control system with fuzzy gain scheduler.
The approach here is to exploit fuzzy rules and reasoning to generate controller parameters.It is assumed that K c , K d , and K i are in prescribed ranges [(K cmin ,K cmax ),(K dmin ,K dmax ) and (K imin ,K imax )].K c , K i and K d are normalized into the range between zero and one by the following transformation: Where x= p , i and d for proportional ,integral and derivative gain respectively.In this scheme, PID parameters are determined based on current error e(k) and its rate of change, (k).The parameters K c , K i and K d are determined by a set of fuzzy rules of form: If e (k) is A i and (k) is Bi, then K c is C i , K d is D i , and K i = E i For i= 1, 2…….n.
Here A, B, C and D are fuzzy sets on corresponding supporting sets.The membership functions (MF) of these fuzzy sets are divided into N representing negative ,P positive ,ZO zero, S small, M medium and B big.Thus NM represents negative medium, PB positive big and so on.The fuzzy sets C, D and E may be ether Big, Small or Medium and are characterized by the same membership functions.The fuzzy rules are to be extracted from operator's expertise.Here the rules were driven experimentally based on the step response of the process Once K c ' ,K d ' and K i ' are obtained , the PID parameters are obtained from following equations: The design process has following steps: x Defining the control objectives and criterion.
x Determining the input and output relationships and choosing a minimum number of variables for input to the fuzzy logic engine (typically error and rate-ofchange-of-error).
x Breaking the control problem down into a series of "if x and y then z" rules, using the rule-based structure of fuzzy logic that define the desired system output response for given system input conditions.x Creating fuzzy logic membership functions that define the meaning (values) of input/output terms used in the rules.x Creating the necessary pre-and post-processing fuzzy logic routines if implementing in software, otherwise programming the rules into the fuzzy logic hardware engine.
x Testing the system, evaluating the results, tuning the rules and membership functions, and re-testing until satisfactory results are obtained.Within fuzzy controller three separate schedulers are created for proportional (K c ), derivative (K d ) and integral (K i ) gains.Each of them has two inputs and one output with inputs having 7 membership functions each and output having 3 membership functions.Each of them is separately discussed below.

Choice of Membership Functions
Membership function basically comprises of the following two parts:

Input Membership Functions
Current error, e (k) and its rate of change, (k) are taken as two inputs with seven membership functions.The most widely used membership functions for inputs are triangular membership functions as it most simple of all and allows linear mapping between crisp input space and fuzzy input space.

Output Membership Functions
Output is defined with the help of three membership functions.Here the most important thing to consider is which type function should be chosen for the output membership function.For that it is required to understand the behaviour of output as needed, the Fuzzy controller should generate the signal so that output response is best optimized.In our study, the fuzzy Controller is generating controller gain i.The equation for the gaussian function is given as : Hence based upon the above study we conclude to choose Gaussian membership function for the output PID gains.It is shown in figure 4.

Design of Rule Base
The Rule Base for our Proposed Fuzzy Controller are designed taking into consideration the individual effect of Proportional Action , Derivative Action and Integral Action on a process output in terms of rise time (t r ), overshoot(M p ), settling time (t ss ), steady-state error (e ss ) etc.These are shown in the table 1.

Results & Simulations
A linear Second order system with delay: The process is a simple second order process with a time delay of 0.5 seconds.The transfer function of the process is shown below: T.F.=G 1 (s)[e -0.5s /(s+1) 2 ] (8) Various Plots defining the characteristics of the system are shown in figure 6 and 7. ICAET 2016 - The response for the process with Zeigler Nicholas tuned PID and Fuzzy tuned PID are shown in figure 8 Figure7 a) The performance of G(s) can be evaluated by comparison of various system parameters based on Ziegler Nichols Tuned PID, Reference Fuzzy PID & Fuzzy Tuned PID as given in Table 2.

Conclusions
Fuzzy gain scheduling is all about using fuzzy rules and reasoning to determine the controller parameters based on error signal and rate of change of error signal.In fuzzy control, linguistic descriptions of human expertise in controlling a process are represented as fuzzy rules or relations.The new scheme utilizes fuzzy rules and reasoning to determine the controller parameters and the PID controller generates the control signal.Simulation results show that better control performance can be achieved in comparison with Ziegler PID controllers.The proposed PID tuning scheme can be implemented on the hardware level where non-linearity and inherent noise is present to see if it improves the system response in comparison to PID tuned by conventional methods.
Various optimization techniques can also be applied for error and rate of change of error gains in future in order to improve the performance of the system.ICAET 2016 -

Figure 2
Figure1 PID Controller with Fuzzy Gain Scheduler Now taking into account the above facts, if we change the value of individual gains (K c , K i , K d ) at different intervals of the process we can generate a better process response in terms of rise time, overshoot, settling time etc.Consider Process Reaction Curve shown in Figure5that shows the step response of a system.Now the variations in the PID gains are formulated and generated (in Real time) depending upon the value of error (e) and rate of change in error ( ).Here e and are divided in seven regions i.e.Positive Big, Positive Medium, Positive Small, Zero, Negative Big, Negative Medium and Negative Small denoted by PB, PM, PS, ZO, NB, NM & NS as shown in Figure 5.The final generated PID Gains are also divided in three groups i.e.Small, Medium and Big.The appropriate ranges or values of the gains will be chosen depending on the values of error and rate of change in error.The rule base for K c (in case of Proportional Gain Rule Base), K i (in case of Integral Gain Rule Base) and K d (in case of Derivative Gain Rule base) is calculated depending upon the various input/output possibilities.

Figure 3 PIDFigure 4 Figure 5
Figure 3 PID Gains vs Rate of Error change

Figure 7 a
Figure 7 a) Bode Magnitude Plot b) Bode Phase Plot

Table 2
Performance evaluation for response of G 1 (s)