The PID controller adjusts the deviation of the whole control system according to the principle of PID control, so that the actual value of the controlled variable is consistent with the predetermined value of the process requirements.
Different control laws are applicable to different production processes, and the corresponding control laws must be reasonably selected, otherwise the PID controller will not achieve the desired control effect. At present, the parameters of PID controller are mainly adjusted manually. This method is not only time-consuming, but also can not guarantee the best performance.
Particle swarm optimization (PSO) has been widely used in function optimization, neural network training, fuzzy system control and other applications. This paper optimizes the PID controller by improving PSO. PID controller is a common feedback loop component [1-2] in industrial control applications, which has a wide range of applications. The system error signal and its integral and differential are weighted respectively. The controller can calculate the control signal to drive the controlled object through KP, Ki and Kd.
If the design of the controller is reasonable, the control signal will make the error change in the direction of reducing to meet the final control requirements. The system structure of the PID controller is shown in Figure 1. The optimization problem of the PID controller is to determine a set of appropriate parameters KP, thermostatic element Ki, Kd, so that the index can be optimized.
This paper chooses ITAE index as the ultimate optimization goal.
The model of PID controller is built in simulink, as shown in Figure 2.
By programming in matlab, the population size is set to 400, the maximum number of iterations is 200, the minimum fitness value is 0.2, and the speed range is [-1,1].
The optimal control parameters are KP = 33.
6470, Ki = 0.
1762, Kd = 38.
7880. The performance index is shown in Figure 3 and ITAE = 1.05. In this paper, the improved particle swarm optimization algorithm is used to optimize the PID controller. The optimization time is greatly reduced and the optimization effect is greatly improved.
The simulation results show that the improved particle swarm optimization algorithm improves its global search ability, and its convergence speed and optimization speed are also enhanced.