PID Tuning with reference tracking and plant uncertainty along with disturbance rejection

ABSTRACT Today’s world is now more interested in the robustness and automation of machines, robots, and vehicles for accurate performance in the events of external disturbances and uncertainties in the system parameters. For that purpose, a Proportional–Integral–Derivative (PID) control has found many applications in every field of industry and academics. Many methods can be used for tuning of PID, however, these methods suffer from continual variations of parameters and exterior disturbances. Therefore, a PID controller is needed that is robust to external disturbances and possess auto-tuning feature according to varying process conditions. The main motivation of this paper is to present a PID controller that is robust, continuously auto-tuned by considering uncertainties of the plant, optimize the response by minimizing the overshoot in reference tracking, and achieve stability in minimum settling time by rejecting disturbance. The earlier models can only do two tasks, tuning and optimization but this paper is proposing a contribution to such models by rejecting external disturbances and making sure the smooth running of the system. In this paper, we have done the simulation work to demonstrate the desired behaviour of the system and evaluate the effectiveness of the proposed model and a brief analysis is done by discussing the comparison between the previous work in literature and the proposed work.


Introduction
Feedback control is the most widely used form of the control system in the industry and robotic applications. A Proportional, Integral, and Derivative (PID) control is the most popular type of controller due to all important three elements: proportional, integral, and derivative. Proportional control improves the speed of the response, Integral control eliminates steady-state error and derivative response reduces oscillations. A Set Point (SP) is assigned to the controller and the sensor provides process variable (PV) value. The difference of SP and PV is called the error signal (e) that is fed to the controller. The controller then generates a response (u) to supply to the actuator for influencing the process variable which is then applied proportional, integral, and derivative actions.
The mathematical equation for a PID controller is given as under: where K p , K I , and K d denote proportional, integral, and derivative gains, y(t) represents controller output, and CONTACT Arslan Ahmed Amin dr.arslanamin@gmail.com e(t) denotes the error signal which is the difference between setpoint and process variable. The gains of the controller can be tuned by various methods such as Ziegler Nichol's first and second methods. Softwares are also available to fine-tune the gains for desired transient and steady-state response (Dunn, 2005;Hughes, 2015).
Setpoint tracking and regulation is the primary task of the PID controller regardless of the complexity of the process. PID controller can be used for linear as well as nonlinear processes. In the non-linear processes, a limited range is usually defined in which the system can be considered as linear. For more complex processes, software-based advanced tuning of the controller will be required. One popular strategy for nonlinear processes could be using intelligent control such as fuzzy logic, Artificial Neural Networks (ANN) and Genetic Algorithms (GA) as described in the literature (Essalmi et al., 2014;Fan et al., 2015;Hernández-Alvarado et al., 2016).
A fuzzy controller was used for speed regulation of an ANN-based PID controller for a permanent magnet synchronous motor. The purpose of the control is direct torque control with speed regulation (Essalmi et al., 2014). NN based PID controller for medical applications was reported in Fan et al. (2015). Alvarado et.al. presented a Neural Network (NN) based tunning method for the PID controller for underwater vehicles (Hernández-Alvarado et al., 2016). The controller was reported to possess the ability to tune the gains of the PID controller with the help of NNs in varying operating conditions and the system stability was proved in all varying conditions in a real environment. In Malekabadi et al. (2018), the ANN and GA based tuning method of PID controller was reported that was proved to be highly robust and adaptable to varying conditions with uncertainties. The PID controller was implemented on a 9 axis quadcopter in Yoon et al., (2016) with inertial measurement unit and the gains were tunned by ANN mechanism in realtime. The quadcopter was proved to be stable with smooth hovering capability.
In Zhang et al. (2012), a cascade type control system has been proposed with the neuro-PID controller to regulate the superheated steam temperature with an entropy minimization algorithm instead of a squared error minimization algorithm. Feedback and feedforward types are combined in the neuro controller design and the controller can produce fewer fluctuations in temperature. In Li et al. (2016), an internal model control based PID controller has been proposed for temperature control of superheated steam with the design in the frequency domain. Transfer functions are obtained in both magnitude and phase angle form and the controller gives better performance rejecting disturbances. A single neuron based adaptive PID controller has been reported in Yu et al. (2017) for temperature control of superheated steam.
Disturbances are essential unwanted inputs in the practical processes that need to be controlled properly to minimize their effects on the performance and stability of the closed-loop. Various old and new methods have been presented in the survey paper ranging from numerical methods to computer simulations and various types of state observers in feedback closed-loop form (Feng & Guo, 2017). Various methods in literature with mathematical analysis for active disturbance rejection have been presented in the survey paper (Huang et al., 2010). The total disturbance modelling has been described and its effects are shown to be mitigated. The active disturbance rejection control (ADRC) has been reported in Zhao and Guo (2016) for systems of type lower triangular having uncertainty terms to demonstrate robustness. An extended state observer (ESO) has been utilized for the estimation of uncertainty and asymptotic stability has been proved.
In Guo and Wu (2017), constant high gain ESO has been reported with an effective response for stable performance in the presence of uncertainties in the system. A robust control insensitive to parameter variations based on ADRC was proposed in Qing et al. (2009) for Micro-Electro-Mechanical Systems (MEMS) gyroscope. Simulation and experimental verifications in the fieldprogrammable-gate-array-based controller were carried out to demonstrate the superior performance of the controller. An ADRCS for ALSTOM gasifier was proposed in Huang et al. (2013) with simulation results proving its superior performance in rejecting disturbances over the PI controller. In Guo and Zhao (2013), ADRC was proposed for a class of multi-input multi-output nonlinear systems with comparison to the internal model principle-based control system. Numerical analysis and simulations prove the superior performance of the proposed ADRC in terms of disturbance rejection and fast response.
The major challenges faced in the design of controllers in the event of uncertainties and disturbances are found as under: The computational complexity of the systems in the advanced nonlinear process becomes very large especially in NN based control requiring costly controllers. It is very difficult to obtain a correct plant model for controller design in the events of uncertainties that affect mathematical modelling due to unmodelled dynamics effects. All the above-mentioned works deal with the optimization, rejection of disturbances, tuning of gains, achieving a steady-state in less settling time, and less overshoot separately or by considering the combination of two features. In this paper, we have considered the maximum factors to stabilize the system using an existing older version of the model ("PID Tuning with Reference Tracking and Plant Uncertainty -MATLAB & Simulink -MathWorks India", 2019). The design optimization has been done by tracking of a reference signal and optimizing the response with uncertainties in the plant model.
In this paper, our contribution is achieving the stability of the system in minimum settling time even in the presence of disturbances. The main motivation of this paper is to present a PID controller that is robust, continuously auto-tuned by considering uncertainties of plant, optimize the response by minimizing the overshoot in reference tracking, and achieve stability in minimum settling time by rejecting disturbance. The earlier models can only do two tasks, tuning and optimization but this paper is proposing a contribution to such models by rejecting external disturbances and making sure the smooth running of the system. In this paper, we have done the simulation work to demonstrate the desired behaviour of the system and evaluate the effectiveness of the proposed model and a brief analysis is done by discussing the comparison between the previous work in literature and the proposed work.
Further contents of the paper are organized as follows: methodology has been explained in Section 2, simulation, and results are presented in Section 3. Finally, the conclusion is mentioned in the last section.

Methodology
We have designed a PID based robust control system for dealing with uncertainties and external disturbances. The PID parameters (K p , K d and K i ) have been continuously tuned as per process dynamics to make the system robust. The system is ensured to remain stable i.e. bounded input will give bounded output.
The proposed algorithm tunes the PID gains to achieve a balance between robustness and performance, and then optimize the response. The algorithm selects a crossover frequency, set a target phase margin, and then design for these parameters. If bandwidth, phase margin, or transient response vary then it will again calculate the gains for those values.
The flowchart of the proposed algorithm is given in Figure 1.

Formulation of Minimization Problem
The minimization problem is performed in three steps: (1). Formulation of constraints (2). Tracking (3). Optimization of parameters

Formulation of constraints
In this step, those values of parameters are determined by the algorithm that lie under the constraints y 1 (t), y 2 (t), upto y n (t) but the minimization of any objective function is not done at this level. And the constraints are linearly bounded y bound (t) that are given below: Then, the difference of outputs y bound − y sim will be calculated in the following way for lower bound: Similarly, for upper bound it will be: If c ≤ 0 then this solution is feasible.

Tracking
In tracking problem, a reference signal is specified as amplitudes of time: Then, a calculation is done for the response of simulation as following: Here, simulation time t sim can reach the value of t ref (Yu et al., 2017;Huang et al., 2010;Zhao and Guo, 2016).
After that the values are taken by doing union of both times and a new value is set called t new , while all other values that are out of this bound will be diminished.
In the next step for t new , y ref and y sim will be calculated In the final stage, the weighted integral error f will be calculated by using:

Optimization of parameters
Finally, the minimization is done in the following way: c(x) ≤ 0 (10) x ≤ x ≤x (11) where F(x) is the objective function. c(x) is contraint function, x is lower bound, andx is upper bound.

Results & discussion
The motivation of the proposed work to eliminate the disturbance in short settling time and track the reference signal by optimization to get the closest results when the plant is also uncertain. The system model has been presented in Figure 2.
The working of the model is explained as below: (1) Step block is generating the input signal.
(2) The summer block is used to subtract feedback from the step input to generate an error signal to feed to the PID block. (3) Disturbance block is inserted and we get the disturbance rejection from our plant for smooth running. (4) Saturation and Rate limits blocks are setting limits for max and min values of time and amplitude. (5) Plant block is shown with the uncertain transfer function in which two values in the denominator coefficients are unknown. (6) The scope block is giving the output signal. (7) The reference tracking specification block is plotting the model and giving the optimization option. (8) Response optimization GUI preload data is giving the design variables to compare them with the required variables.
The simulation is done by merging two models of PID tuning: one is Reference tracking and the other is disturbance rejection. We update the reference tracking model by inducing the disturbance rejection PID controller to Reference tracking and add disturbance block to it. Figures 3 and 4 show the un-optimized responses by the PID controller to achieve set-point tracking and rejecting disturbances.
In Figures 5 and 6, a predefined optimized task is launched to get the design variables to show how well the initial design specifications are satisfying the design requirements. The plant response without considering the uncertainties is indicated by the solid lines    The optimization is done which lessen the difference between the response of actual and ideal model for the insignificant constraints shown with the continuous lines and the maximum/minimum measurements shown with  Step response specification ( ≤ 0) Step response specification ( ≥ 0)  Figure 7 shows the improved disturbance rejection in less time by sliding the transient response until we get a balanced or steady response.
This model is an updated version of PID tuning with reference tracking and uncertain plant along with the disturbance rejection. It is now tuning the K p , K d , K i for optimization and also rejecting the disturbance. For future work, we can add a feature of speeding up the optimization.

Comparison
In Hernández-Alvarado et al. (2016), a PID is tuned online to control the underwater automobiles. PID gains are adjusted continuously whenever the underwater vehicle varies its parameter or has to face the currents of the ocean. In that algorithm tracking error is minimized without considering uncertainties, while by using the algorithm proposed in this paper, along-with minimization of tracking error, stability can be achieved in minimum possible time and overshoot can be made minimum. In this study, the algorithm is proposed where the disturbance rejection is also included along with the PID tuning with reference tracking in which the tracking error is minimized for optimization. It is made a two-process control not only made tracking error minimum but also decrease the settling time to achieve stability by rejecting the error in minimum possible time.

Conclusions
In this paper, PID controller tuning was done with a tracking reference to optimize the response and minimizing the time to get stable in the presence of uncertainty in plant and considering disturbance. In the proposed algorithm, PID gains were adjusted continuously to make the response optimized and become stable in minimum time by rejecting the disturbance. A comparison was also done with the model having only an optimization algorithm that shows that the system response of disturbance rejection after considering uncertainty has improved. This algorithm can do optimization and disturbance rejection ability to make the system stable.
In future work considerations, we are looking forward to adding some features to the model which will deal with all kind of disturbances and uncertainties by taking in to account all the necessary aspects like settling time, rise time, percentage overshoot and steady-state error at a time, to get the efficient response and we will also work on the faster response of optimization and disturbance.