Abstract
Proportional–integral–derivative control system has been widely used in industrial applications. For complex systems, tuning controller parameters to satisfy the process requirements is very challenging. Different methods have been proposed to solve the problem. However these methods suffer several problems, such as dealing with system complexity, minimizing tuning effort and balancing different performance indices including rise time, settling time, steady-state error and overshoot. In this paper, we develop an automatic controller parameter optimization method based on Gaussian process regression Bayesian optimization algorithm. A non-parametric model is constructed using Gaussian process regression. By combining Gaussian process regression with Bayesian optimization algorithm, potential candidate can be predicted and applied to guide the optimization process. Both experiments and simulation were performed to demonstrate the effectiveness of the proposed method.
Keywords
Introduction
In industrial applications, Proportional–integral–derivative (PID) control is deployed in over 90% systems because it is very easy to use and relatively robust. However, tuning the PID parameters to achieve required process requirements is not an easy task due to the following reasons: (1) several performance indices, including overshoot, rise time, steady-state error and settling time must be evaluated at the same time; (2) the relationship between the PID parameters and these performance indices is unknown; (3) it is not realistic to perform many experiments to tune controller parameters due to cost and safety-related issues. Therefore, developing an efficient method to tune PID controller parameters is worth investigating.
There are some rule-based methods developed to tune PID controller parameters, such as Tyreus–Luyben method, Cohen and Coon method, Ziegler–Nichols method, Ciancone–Marline method, internal model control (IMC) method and C-H-R method. 1 Some disadvantages of these methods are as follows: (1) obtaining optimal PID controller parameters is challenging; (2) it is difficult to consider all performance indices simultaneously; (3) controller parameter tuning process could be affected by disturbances and noise. For complex dynamic systems, it is even harder to achieve optimal system performance using rule-based methods.
To overcome the problems of rule-based methods, some optimal parameter optimization methods are explored. Based on a soft computing optimization method, Matousek et al. 2 developed an optimal PID controller parameter tuning method. Compared to some existing methods, the proposed method is quite effective. Particle swarm optimization method and genetic algorithms are also proposed 3 to tune controller parameters. However, these methods are implemented offline and local optimal parameters could be identified.
Some machine-learning methods are also investigated to automatically tune the controller parameters. For some critical systems, automatic parameter tuning may cause safety issues; 4 hence, a safety critical controller parameter tuning method is investigated using safe Bayesian optimization method. Because neural networks are very powerful to construct a model, they are used to explore optimal controller parameters.5,6 However, many data sets must be collected to train the networks. For industrial applications, it is not a good idea to perform many experiments considering the manufacturing cost, labor, safety and so on. Chan et al. 7 proposed a Gaussian process to predict the optimal performance of a system. It is a very interesting method; however, the balancing method between modeling and prediction is not discussed; furthermore, the performance indices are not evaluated simultaneously.
Since the PID controller parameters must be tuned on the real system, it would be ideal if the controller parameters could be obtained by performing a few experiments. Hence, it is worth investigating a more efficient parameter optimization method. However, tuning the PID controller parameters online is very challenging due to the following reasons:
Industrial processes are typically very complex. It is very difficult to obtain optimal controller parameters;
Constructing a model using a few data sets to predict optimal parameters is a good way to solve the problem, but local minima could be generated if the data sets cannot represent the system;
There are always uncertainties and noise in the data collection;
Multiple performance indices must be considered simultaneously in parameter tuning process.
Considering the challenges and requirements in PID controller parameter tuning, we propose a new method based on Gaussian Process Regression (GPR) and Bayesian optimization algorithm (BOA). By combining these two methods, a system model can be constructed iteratively using GPR, and potential candidate can be predicted at each iteration using BOA. Hence, the combined GPRBOA method can guide the optimization process and thus reduce the number of experiments. To avoid local convergence, a method to investigate unexplored region is developed. In order to validate the proposed method, we performed simulation as well as experiments. Multiple performance indices including settling time, steady-state error, rise time and overshoot are evaluated during the optimization process. A multi-objective optimization problem is formulated to consider all performance indices simultaneously. Uncertainties and noise were added to the simulation and experiments. The results demonstrate that the proposed method is very effective in PID controller parameter optimization.
Proposed solution
The proposed framework of optimizing PID controller parameters is illustrated in Figure 1.

Framework of proposed controller parameter optimization method.
Given a set of PID controller parameters, the output of a complex system can be obtained. The performance indices such as rise time, overshoot, steady-state errors and settling time can then be evaluated. Based on the performance evaluation, GPRBOA can generate a potential optimal candidate to perform the experiment again. When the system response satisfies the desired system performance requirements, the process stops. Hence, there are two major problems we have to deal with: evaluation of performance indices and controller parameter optimization method based on GPRBOA.
Performance indices
When considering the controller parameters as the input to a complex system, the structure of the system with multiple input and output can be illustrated in Figure 2.

The structure of a system with multiple input and multiple output.
For a system with several performance indices, they must be balanced. Considering safety-related issues, we may need to stop experiment when some performance indices are out of range or the system becomes unstable. Hence a multi-objective optimization problem with constraints is formulated
where
where
GPR
GPR is an effective tool to construct models for complex systems.8,9 It is a non-parametric method which can deal with uncertainties and noisy observations. 10
For a complex process with PID control, we assume that the relationship between the output (performance indices) and the input (PID controller parameters) can be written as
where
After performing a series of experiments, the output of a system with PID control can be evaluated using equation 2. We can then obtain a set of data
The covariance function is very important in constructing a model and predicting system output. Given a data set
where
By deriving the conditional distribution, we can predict the mean and variance of the system output
with
where
Equation (9) tells that the covariance function
where
The marginal likelihood can be calculated using
Because the system is assumed to be a Gaussian process, the log marginal likelihood can be solved analytically. The following equation is then obtained
By maximizing the marginal log likelihood, we can obtain the optimal hyperparameters
Once the hyperparameters are determined, the covariance function
Performance evaluation
Once the mean and variance of
where
Exploration and exploitation
When building a model using Gaussian process, a few data sets are required at the beginning to make sure the model is reasonable; meanwhile, local convergence must be avoided during the optimization process. In order to solve the problem, we must generate some data sets based on exploration. To minimize the number of experiments and expedite the optimization process, we must generate candidate set of controller parameters based on predicted optimal controller parameters. Therefore, these two processes must be balanced. GPRBOA can switch between the exploration process and exploitation process to update the system model and perform optimization. For the exploitation process using equation 16, the prior information is required, but it is unknown when the system model is not available. Hence, a balancing method is proposed in this paper to control the exploration process and exploitation process to generate candidate set of controller parameters
where
where
where
where
GPRBOA implementation
GPRBOA balances the exploration process and exploitation process. At each iteration, new data sets are added into the existing data sets to update the system model. The updated model is then used to predict the mean and variance of the system output. The process of implementing GPRBOA is shown in Figure 3.

Implementation of GPRBOA for PID controller parameter optimization.
After performing experiments using the initial set of parameters, the system output is evaluated using equation 16. If the system performance does not satisfy the desired system requirements, the system model is updated using the data sets. The hyperparameters are then evaluated to balance the exploration and exploitation processes. A new candidate is then generated. Using the new set of controller parameters, the experiment is performed again. The process stops once an optimal set of controller parameters is found.
Simulation results
In order to validate the proposed method, we performed simulation first. Even though a linear system was used for simulation, we added random noise to each model parameter. The added noise makes the system nonlinear. The simulation was implemented using MATLAB. The implemented transfer function is
with
In the simulation, a white noise (signal-to-noise ratio 30 dB) is added to the model parameters (
The ranges of the PID parameters are set as
The step size is 0.5. We used the following weights in order to minimize the steady-state error
The step response of the system with noise is shown in Figure 4. The optimal set of PID parameters are

The step response for a system with noise.
The performance indices are as follows: overshoot 53.5%; settling time 3.7 s; rise time 0.08 s and steady-state error in the simulation range is −0.0018.
The optimization process is shown in Figure 5. There are exploration and exploitation processes in the experiments. The optimal set of controller parameters was found using 10 simulations. The simulation continued using the identified optimal controller parameters with random noise added to the model parameters. If the system was not stable, a random number greater than two was added to the output.

The controller parameter optimization process for a system with noise. The optimal set of parameters were identified using 10 experiments.
Different transfer functions with added noise were also simulated. Even though the number of experiments exploring optimal set of parameters may be different, the performance of the proposed method is quite consistent.
Experimental results
Experiments were also performed to evaluate the proposed method. A servo motor position control system was developed to demonstrate the controller parameter tuning process. The experimental system is shown in Figure 6. The servo motor (Smart Motor SM34405D) with a 4:1 high precision gear box is mounted on a work table. An arm with a fixed weight is installed on the motor shaft. The proposed method is implemented on a computer, which receives the system response from the controller and generates candidates for the controller. To demonstrate the robustness of the proposed method, an adjustable weight to change the motor payload is added. The location of the adjustable weight can be changed to simulate the disturbance to the controller. The ranges of the PID controller parameters are set in the computer program.

The motor control system used to demonstrate the proposed method.
At each experiment, the motor moves about
Ranges of performance indices.
Because the steady-state error is more important than the other performance indices, we used the following weights
To generate new candidate, the range of each PID controller parameter must be set
The step size is important for computational time. The step sizes of the three PID controller parameters are 1000, 100 and 2000 for proportional gain, integral gain and derivative gain, respectively.
After an experiment is performed, its performance index is evaluated using equation 2. The result is then sent to the computer. The proposed method will generate a new candidate set of controller parameters and the candidate set is sent to the robot controller. The experiment will be performed again. This process continues until a set of optimal controller parameters is identified.
Table 2 shows the experimental results. For some cases, such as
PID controller parameters and four performance indices.
Note: The values of
The system response using optimal set of controller parameters is shown in Figure 7. The optimal set of PID controller parameters is

The step response using optimal parameters obtained using GPRBOA for a system with noise.
The position tracking error of the optimal set of controller parameters is shown in Figure 8. The rise time is 0.21 s, settling time 0.3 s, overshoot

The position-tracking error using optimal parameters.
Figure 9 shows the performance indices and the number of experiments performed to find the optimal PID parameters (11 experiments). We can see that the exploration and exploitation processes are involved in parameter optimization process. Once the optimal set of PID parameters is found, the experiment continues to verify the performance of the optimal set of controller parameters for the system with random payload.

The experimental results for PID controller parameter optimization process. An optimal set of controlled parameters was identified using 11 experiments.
We performed many experiments using different payloads and the results are quite consistent. Therefore, the proposed method is an effective tool to explore an optimal set of controller parameters to satisfy system performance requirements.
Compared to other existing methods, our proposed method has several advantages:
Compared to the method developed by Chan et al., 7 our method considers several performance indices simultaneously and develops a balancing method to avoid local convergence.
Compared to the methods based on neural network,5,6 our method guides the optimization process, thus requires fewer experiments.
Compared to the rule-based methods, 1 our method does not require human involvement and can achieve optimal solution.
Conclusion
In this paper, an online PID controller parameter optimization method is developed based on GPRBOA. The system model and potential optimal candidate are updated iteratively. The exploration and exploitation processes are balanced using a proposed acquisition function method. A multi-objective optimization method is formulated. To validate the proposed methods, both simulation and experiment were performed. The results demonstrate the proposed method can be used to guide the PID controller parameter tuning process to achieve optimal output. The proposed method is based on non-parametric modeling and optimization algorithms, thus it can be applied to optimize process parameters for other complex systems.
Footnotes
Acknowledgements
The authors would like to thank the Ingram School of Engineering, Texas State University, for supporting the research.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.
Funding
The project is partially supported by the Program of Foshan Innovation Team of Science and Technology (grant no. 2015IT100072). The project is partially supported by ABB Inc.
