Fuzzy rule-based set point weighting for fuzzy PID controller

The objective of this work is to design a fuzzy rule-based set point weighting mechanism for fuzzy PID (FPID) controller so that an overall improved closed-loop performance may be achieved for linear as well as nonlinear process models. Till date, tuning criteria for FPID controllers are not well defined. Trial-and-error approach is primarily adopted and it is quite time-consuming and does not always ensure improved overall closed-loop behaviour. Hence, to ascertain satisfactory closed-loop performance with an initially tuned fuzzy controller, a fuzzy rule-based set point weighting mechanism is reported here. The proposed scheme is capable of providing performance enhancement with instantaneous weighting factor calculated online for each instant based on the latest process operating conditions. The proposed methodology is capable of ascertaining acceptable performances during set point tracking as well as load recovery phases. Efficacy of the proposed scheme is verified for linear as well as nonlinear process models through simulation study along with real-time verification on servo position control in comparison with the others’ reported performance augmentation schemes as well as fuzzy sliding mode control.


Introduction
Presently, controllers with inherent intelligence are found to be recognized as a complementary to the conventional controllers in various industrial closed-loop control applications. Fuzzy logic controller (FLC) [1,2] belongs to a class where intelligence of an expert is incorporated through appropriate framing of fuzzy rules [3]. Proper selection of scaling factors (SFs) [4] with duly chosen fuzzy rules plays a crucial role towards designing a FLC. Inappropriate choice of SFs for FLC may result unsatisfactory closed-loop performance. Till date, SFs [5,6] are usually chosen through multiple attempts, i.e. by trial and error or based on optimization techniques [7,8], which are not easy to deal with for obtaining the desirable closed-loop response, especially for processes with modelling error. Consequently, improperly tuned FLC may result unwanted oscillations during servo and load recovery phases which may lead to actuator saturation [9].
For restricting oscillations during set point tracking, fixed set point weighting (FSW) [10] is a well-accepted methodology for conventional PID controllers but it hardly offers any benefit during load recovery. In case of FSW, a fixed set point weighting factor (usually 0.4-0.6) [11] is incorporated with the proportional term of the PID controller [12]. It results lower overshoot but increased rise time due to relatively sluggish response. To mitigate such inadequacies of FSW, Hang and Cao [13] introduced variable set point weighting (VSW) where the set point weighting factor gets varied during set point tracking through three distinct values to restrict the overshoot without sacrificing the dynamic behaviour of the process.
However, VSW technique [13] is incompetent to provide any improvement during load rejection phase. For higherorder linear and nonlinear processes, oscillations are truly intolerable during set point tracking and load recovery, especially in the presence of dead time. Set point weighting mechanism for nonlinear processes is reported in [14] by Mantz. Sree and Chidambaram [15] proposed integral square error (ISE)-based set point weighting scheme for unstable processes with zero. In case of integrating and time delayed unstable processes, overshoots are truly excessive, and hence, to alleviate such issues set point weighting methodologies are reported in [16,17].
To ensure acceptable performance during transient phases, fuzzy logic-based set point weighting with conventional PID controller is proposed by Visioli [18] where the weighting factor for the proportional term is calculated with the help of fuzzy rules. Later, another effective weighting strategy known as dynamic set point weighting (DSW) for PID controllers is reported in [19,20] where the weighting factor is varied depending on the current process operating conditions and hence capable of providing an overall performance enhancement. To overcome the limitation of improper tuning for fuzzy controller which results undesired oscillations during closed-loop operation, dynamic set point weighting (DSW) mechanism [21][22][23] is incorporated while designing the FLC. DSW technique is capable of ensuring lesser oscillations while tracking new set value and faster load recovery. However, the DSW methodology is not quite straightforward to employ in real-time applications.
Here, the idea of dynamic set point weighting is realized with the help of heuristic fuzzy rules. Knowledge of an experienced process operator is utilized for designing the fuzzy rule base which provides the suitable value for set point weighting factor depending on the current process operating conditions. A set of nine predefined fuzzy rules are framed here to provide the appropriate weighting factor ( fu ) for the fuzzy PID controller based on the current change of error ( Δe ) calculated from the recent process output. Superiority of the proposed fuzzy set point weighting mechanism for the fuzzy PID controller (FSWFPID) is established by comparing its performance with conventional fuzzy PID (FPID) [4] controllers as well as other performance augmentation schemes reported for FPID controllers like self-tuning fuzzy PID (STFPID) [24,25], dynamic set point weighting fuzzy PID (DSWFPID) [21] and fuzzy sliding mode controllers (FSMC) [26][27][28]. Superiority of the proposed FSWFPID is verified for integrating second-order and higher-order linear and nonlinear processes as they provide large oscillations in the presence of dead time. To have quantitative performance estimation for the reported controllers, a list of performance indicespercentage overshoot (%OS), rise time (t r ), settling time (t s ), integral absolute error (IAE), integral time absolute error (ITAE) and total variation in control action (TV)are evaluated for each setting separately. In addition to closed-loop performance analysis, robustness of the proposed controller is also studied with parametric variations in dead time and in the presence of measurement noise. Apart from simulation study, real-time validation is made on a DC servo position control unit.

Proposed controller design
In this section, detailed structure of the proposed fuzzy rule-based set point weighted fuzzy PID controller (FSWF-PID) is described. Figure 1a shows the block diagram of the FSWFPID with two inputs-weighted error ( e fw ) and change of error ( Δe ), and two outputs-normalized control action ( u N ) and its incremental value ( Δu N ). For simplicity, fuzzy PI (FPI) and fuzzy PD (FPD) controllers are combined together to realize the fuzzy PID (FPID) controller. Benefit of this structure is that both FPI and FPD controllers share the common control rule base (CRB) and input SFs ( G e , G Δe ), only the output SFs ( G u , G Δu ) are different. For the FPI, output SF is G Δu whereas for the FPD it is G u . All the normalized inputs ( e N , Δe N ) and outputs ( u N , Δu N ) of FSWFPID are defined over the common normalized domain − 1-+ 1. Two distinct sets of membership functions (MFs) with 7 and 5 input-output fuzzy sets are considered with 49 and 25 control rules. To avoid the need of any prior knowledge, both the control rule bases (CRB) consisting of 49 and 25 rules are designed with unbiased choice of MFs-symmetric triangles with equal base and 50% overlap with adjacent MFs as shown in Fig. 1b and d, respectively. Corresponding rule surfaces are shown in Fig. 1c and e which are found to be highly nonlinear in nature. Here, u N is the normalized output of FPD and the same is also considered as the incremental normalized output (Δu N ) for FPI.
In case of proposed fuzzy controller Mamdani type fuzzy inferencing [4] is employed. It is observed that the design method of a typical Mamdani fuzzy controller [1] is similar as sliding mode fuzzy controller where the diagonal form of CRB is treated as sliding (switching) line and the magnitude of specific positive or negative fuzzy value of control action (u) is determined on the basis of the distance between its corresponding state vector (e) and the sliding line. Hence, the control rule bases (CRB) of the proposed fuzzy controller (with 49 and 25 rules) are designed following the concept of sliding mode principle [29]. This rule generation technique is quite simple and straightforward. Consequent part of the entire rule base can easily be obtained through a simple calculation based on their respective position in the rule table using the following principle-with seven  corresponding to e N , Δe N and Δu N or u N may be indexed as i, j, and k , respectively, where i, j, and k have index val- for N (odd) number of fuzzy partitions. Consequently, a rule R (ij,k) is framed for the input combination of fuzzy sets i and j (antecedent) with the output fuzzy set k (consequent), obtained by the following relation: As an example, due to 7 fuzzy partitions ( N = 7 ) for a given input combination e N , Δe N =(PM, NB) , i.e. (i, j) = (2, − 3) the output fuzzy set according to Eq. (1) is . Therefore, the corresponding rule is Hence, the corresponding rule is R (ij,k) = R (33,3) = R (PB PB,PB) : Then R e(i), Δe(j) = Sgn e (i) + Δe (j) N − 1 2 .

Fuzzy rule generation
Fuzzy PID (FPID) controller can be realized by parallel operation of FPI and FPD controllers which share the common control rule base (CRB), and is designed with 49 and 25 'If-Then' rules as shown in Fig. 2a Figure 1a shows the block diagram of the proposed controller where the input variables are weighted error ( e fw ) and change of error ( Δe ) with SFs G e and G Δe

Realization of the proposed controller
In Eq. (2), the weighted error e fw is y fu − y where y fu is the fuzzy rule-based weighted set point (Fig. 3). The weighted error e fw is normalized ( e N ) through multiplication with the input scaling factor G e . Similarly, in Eq. (3) Δe N is obtained by multiplying Δe with G Δe and both the normalized inputs ( e N , Δe N ) are fed to the fuzzy inference block. Similarly, output variables ( u, Δu ) are given by For realizing the control action of FPI, additional integrator block is required as shown in Fig. 1a. Fuzzy PID control action ( u FPID ) is obtained by combining the weighted outputs of FPI ( u FPI ) and FPD ( u FPD ) as given by Eq. (7).
(2) e N = G e e fw = G e y fu − y , For the FPI, incremental control output can be expressed by The nonlinear function f denotes the rule base mapping between input-output variables. Similarly, for the fuzzy PD controller (FPD) approximated linear expression of the controller output can be written as Now, if ∆t is the sampling interval then from Eq. (7) approximated linear expression of the control signal for the fuzzy PID controller (FPID) [21] at a time instant n can be written as Now, for the proposed FSWFPID, both the error signals are involved in Eq. (10) of fuzzy PI and fuzzy PD controllers, control action is computed based on fuzzy rules with set point weighting mechanism and hence it can be expressed as.      In Eq. (11), y r is the set point and fu is the weighting factor which is computed with the help of 9 fuzzy rules as shown in Table 1. MFs are realized by 9 symmetric triangles having equal base and 50% overlap defined over the normalized range [− 1, + 1] and meaning of the input-output linguistic variables for MFs are listed in Table 2. Fuzzy rule-based weighting factor fu is calculated based on the current value of normalized change of error ( Δe N ). To calculate the appropriate value of the weighting factor, the weighting parameter is added (Fig. 1a) to a constant value (unity) and the resulting weighting factor is employed to obtain the weighted set point as given by Eq. (13) (12) or u FPID (n) = n ∑ j=1 G Δu G e y fu (j) − y(j) + Δe(j) Δt + G u G e y fu (n) − y(n) + Δe(n) .

Control strategy
The objective of the proposed FSWFPID is to ascertain that the oscillations must remain within the acceptable limit for an initially designed fuzzy controller. To achieve this goal, weighting factor fu gets varied online depending on the current change of error ( Δe ) of the process variable. For better understanding of the online weighting mechanism, a typical closed-loop response depicting set point change followed by load disturbance along with its corresponding variation of Δe and fu is shown in Fig. 4.
(i) Subsequent to a unit step change as input, controlled variable will be smaller than the set value, i.e. y < y r and process output is moving towards the set value as shown by the arrowhead at the operating point A of Fig. 4. Under such operating condition, proportional action of the fuzzy control-   ler should be reduced to restrict the possible overshoot in the subsequent operating phase. Here, Δe r is negative, hence fu < 1.0 which results the weighted set point y fu < y r as depicted in Table 3, i.e. y fu − y < y r − y , thereby resulting weaker proportional action for FSWFPID compared to conventional FPID. Thus, the proposed scheme is capable of producing appropriate control action required to reduce the possible subsequent overshoot. (ii) As the controlled variable exceeds the desired value (point B of Fig. 4), i.e. y > y r and is moving further away from it, proportional action of the controller should strengthen up to restrict this diverging nature of the controlled variable. Consequently, control action should be strong enough to bring the controlled variable quickly back to its desired value. Under such circumstances, Δe r is negative, so y fu < y r as fu < 1.0 (i.e. y fu − y > y r − y ) as the current controlled variable gets further separated from y fu than the deviation from y r . Hence, the resultant proportional action of FSWFPID becomes stronger than FPID which provides faster convergence of the process by restricting further deviation of the controlled variable. (iii) After having overshoot, as process variable is moving rapidly towards the set point, there is a possibility of large undershoots in subsequent duration. Such situation is depicted by point C of Fig. 4 where y > y r . Under such circumstances, strength of proportional action for fuzzy controller needs to be reduced to restrict the possible undershoots.
Here, Δe r is positive resulting fu > 1.0 and hence y fu > y r and y fu − y < y r − y . Therefore, FSWF-PID results relatively softer proportional action which helps to reduce undershoots compared to the conventional FPID in subsequent operating phase. (iv) During downward movement of the controlled variable as shown by the point D of Fig. 4 where the process is moving away from the set value, required control action from the fuzzy controller should be dominant enough to restrict the possible undershoot. In such situation, Δe r is positive which results fu > 1.0 , hence y fu > y r and y fu − y > y r − y . Hence, the resultant proportional action of FSWF-PID will be stronger than FPID and the overall con-trol action becomes more aggressive to restrict the possible undershoots in the subsequent phases.
Hence, from the above discussions it is quite evident that the proposed fuzzy rule-based set point weighting mechanism for fuzzy PID controller (FSWFPID) is capable of providing suitable variation of control action which is expected to enhance the closed-loop performance of an initially tuned conventional fuzzy PID controller (FPID) during both the set point tracking and load rejection phases.

Performance analysis
In this section, performance of the proposed controller is evaluated through simulation study as well as real-time experimentation. Five well-known linear and nonlinear process models [12, 13, 18, 19, 20, 21, 24, 27, 28 and 29] are considered in the simulation study. The performances of the proposed FSWFPID are compared with conventional FPID and other reported fuzzy controllers, i.e. STFPID [24,25] and DSWFPID [21]. In addition, performance comparison is also made with fuzzy sliding mode control (FSMC) [26][27][28]. FSMC has proved its robustness against variation in process dynamics and external disturbances. The sliding surface of FSMC is considered in Eq. (14) where is the surface parameter.
Each process model is tested with same step set point change as well as impulse/step load disturbance. For comparison, percentage overshoot (%OS), rise time t r , settling time t s , integral absolute error (IAE), integral time absolute error (ITAE) and total variantion in control action (TV) are considered as performance indices. To establish the robustness of the proposed scheme same set of SFs, MFs and control rule bases are considered for all processes with separate values of dead time. In all cases, Mamdani type inferencing and centroid method of defuzzification is employed. For the neumerical integration Runga-Kutta fourth-order method [30] is considered and sampling time is taken as 0.1 s. Identical setting is also adopted during real-time evaluation with Quanser QUBE-Servo 2 [31] during servo tracking as well as load variations. Here, it is to mention that FSMC technique is basically PD controller by nature and hence suitable only for integrating processes. Integrating second-order plus dead time (ISOPDT) model is considered as given by Eq. (15) This process is also known as marginally stable process as one of its poles is at the origin and the presence of the dead time results difficulty in controlling the system. Here  Tables 4 and 5 contain the performance indices in terms of percentage overshoot (%OS), rise time t r , settling time t s , integral absolute error (IAE), integral time absolute error (ITAE) and total variantion in control action (TV) during closed-loop operation with 49 and 25 control rules, respectively. From the responses (Fig. 5a, b) and the listed performance indices (Table 4) it is found that overshoot has been entirely eliminated in case of our proposed FSWFPID with 49   control rules. In addition, considerable performance enhancement has also been observed during load recovery phase compared to FPID, STFPID and DSWFPID. Here, it is to note that performance enhancement is obtained in case of our proposed FSWFPID with lesser control effort as depicted by the smaller values of TV in comparison with other fuzzy PID controllers. Superior closed-loop performance is also reported by the proposed FSWFPID with 25 control rules as depicted in Fig. 6a and b for L = 0.05 s and L = 0.3 s, and related performance indices are listed in Table 5. Moreover, to substantiate the supremacy of the proposed controller, its performance (Eq. (12)) is compared with fuzzy sliding mode controller and the related responses and control actions are depicted in Fig. 7a and b for L = 0.05 s and L = 0.3 s with 49 rules. Similarly, closedloop responses with 25 rules are depicted in Fig. 8a and b and all the related performance indices are listed in Table 6. The variation of weighting factor for DSWFPID and  Fig. 9a and b, respectively. Based on the responses and performance indices, it is found that the proposed FSWFPID offers improved set point tracking and good load regulation compared to FPID, STFPID, DSWFPID and FSMC even in the presence of parametric uncertainties.

Model II: Second-order plus dead time (SOPDT) process [12, 13, 18, 24]
A typical SOPDT process model is given by Eq. (16) During simulation study four different values of dead time (i.e. L = 0.05s, 0.1s, 0.2s, 0.3s ) are considered where L = 0.1s is considered as nominal dead time and rest three perturbed values of dead times are considered for evaluating the robustness of the controller. Closed-loop responses along with their respective control actions with 49 rules are evaluated for L = 0.1s and L = 0.3s as shown in Fig. 10a and b, respectively. Related performance indices are listed in Table 7. Likewise, the responses for L = 0.1s    Fig. 11a and b, and the corresponding performance indices are shown in Table 8. From the listed values of performance indices, it is quite evident that the proposed FSWFPID is capable of restricting the initial overshoot and the load recovery is relatively faster than FPID, STFPID and DSWFPID with superior control effort.

Model III: Integrating fifth-order plus dead time process [32-34]
(17) G 3 (s) = Ke −Ls s( s + 1) 4 .    Fig. 14a and b. Similarly, responses with 25 rules are shown in Fig. 15a and b. Performance indices for the proposed controller along with FSMC are listed in Table 11. From the closed-loop responses and performance indices, it is found that the performance of the proposed FSWFPID controller is quite satisfactory with minimum overshoot and smaller IAE and ITAE values compared to FPID and STFPID. Here, it is to mention that the tuning parameters are not easy to calculate for DSWFPID with this fifth-order model.

Model IV: Second-order nonlinear process model [24]
Performance of the reported controllers along with the proposed FSWFPID are also verified for a secondorder nonlinear process as given by Eq. (18) for dead time L = 0.2s. Parametric variations are considered for evaluating the performances robustness with L = 0.05s, 0.1s and 0.3s with the same controller settings for the nominal model. Closed-loop responses with 49 rules for L = 0.2s and 0.3s are shown in Fig. 16a and b, respectively, for the conventional FPID, STFPID and DSWF-PID controllers. Corresponding performance indices are depicted in Table 12. Similar set of responses with 25 rules are shown in Fig. 17a and b and the related performance indices are listed in Table 13. Performance comparison is also made with FSMC as shown in Fig. 18a and b using 49 rules with L = 0.1s and 0.3s . Similarly, responses with 25 rules are depicted in Fig. 19a and b and the related performance indices are listed in Table 14. Here, it is note that FSWFPID results zero overshoot and considerable performance enhancement is observed (substantiated by smaller IAE and ITAE values) during load recovery phases compared to FPID, STFPID, DSWFPID and FSMC. Furthermore, total exerted control effort as given by TV value is also found to be smaller for FSWFPID.

Model V: Third-order nonlinear process model
Performance of FSWFPID is also demonstrated for a third-order nonlinear process as given by Eq. (19) with dead time L = 0.1s, 0.2s and 0.3s . Dead time L = 0.2s is chosen as the nominal dead time and consequently ± 50% perturbations are incorporated to justify the robustness of the proposed controller. Its responses along with their respective control actions for L = 0.2s and 0.3s with 49 are shown in Fig. 20a and b and with 25 rules are shown in Fig. 21a and b, respectively. Here, closed-loop responses for the proposed controller are compared with conventional FPID, STFPID and DSWFPID controllers. Closed-loop performance comparison is also made with FSMC for L = 0.2s and 0.3s and is shown in Figs. 22 (19) Table 15 for 49 rules  and Table 16 for 25 rules. Superiority of FSWFPID is also observed for this third-order nonlinear model in terms of smaller overshoot and faster settling in comparison with FPID, STFPID, DSWFPID and FSMC. Acceptable robustness of the proposed FSWFPID is also substantiated under parametric uncertainities of the nonlinear process model.

Real-time experimentation
In addition to the simulation study, performance of FSWF-PID along with FPID, STFPID and DSWFPID is evaluated on a PC-based servo position control system QUBE-Servo 2 by Quanser [31]. It is a compact rotary servo unit with inbuilt DAQ to perform a range of servo control experiments. During experimentation, the QUBE-Servo 2 has been configured with the QFLEX 2 module which allows control by a computer via USB connection. An easily attachable inertia (0.6 × 10 − 6 kg-m 2 ) disc is driven by a direct drive 18 V brushed DC motor. Rotary encoders (2048 lines/revolution) are used to measure the angular position of the disc and the angular velocity of the motor can also be measured. Connection between the different system components on the QUBE-Servo 2 is illustrated in Fig. 24a Fig. 25a and load rejection responses are provided in Fig. 25b. Similar set of responses with 25 control rules are depicted in Fig. 26a and b, respectively. Real-time responses clearly substantiate the improved performance of the proposed FSWFPID in comparison with STFPID and DSWFPID. Superiority of FSWFPID is also validated from the listed values of performance indices of Table 17. Overshoot is completely eliminated in case of our proposed FSWF-PID. IAE and ITAE values are found to be smaller for the proposed controller than the other reported controllers (STFPID and DSWFPID). Noise sensitivity of FSWFPID is also evaluated with addition of a measurement noise. Substantial noise signal with power 0.01 is incorporated to assess the efficacy of the proposed FSWFPID controller in the presence of unwanted noise during closedloop operation. Responses of the proposed FSWFPID for both 49 and 25 control rules in the presence of noise are depicted in Fig. 27a and b. From the responses of Fig. 27a and b, it is clear that the proposed FSWFPID has strong noise immunity and capable of exhibiting stable behaviour during both the transient and steady-state operating phases.

Conclusion
Here, a simple but robust tuning scheme with fuzzy rulebased set point weighting technique is proposed for an initially designed fuzzy PID controller. The most important feature of the proposed controller is that its functioning methodology is independent of the process model. Performance of the proposed tuning strategy is validated with well-known linear and nonlinear process models. Instantaneous value of the set point weighting factor is obtained based on expert defined 9 fuzzy rules depending on the instantaneous process change of error. The proposed methodology is found to be quite effective to provide acceptable performance with minimum overshoot during set point tracking as well as acceptable load variation. Efficacy of the proposed methodology has been justified through simulation study and real-time experimentation. Robustness of the proposed controller has also been observed in the presence of measurement noise. In future scope, number of fuzzy rules for fuzzy set point weighting may be increased towards further enhancement of the fuzzy PID controller. Moreover, similar strategy may also be adopted for Type-2 fuzzy controller and intuitionistic fuzzy control in noisy environment.          Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.