Abstract:The temperature of the heat-sealing knife of the bagging machine is usually controlled by PID algorithm, but the control effect is not so good since the PID control parameters are mostly set by human experience. To solve this problem, an improved SA-WOA algorithm is proposed to realize the self-tuning of PID control parameters. First, the step response curve method is used to establish the transfer function model of the system, and then the advantages of the whale algorithm and the simulated annealing algorithm are considered, and the two are combined. On this basis, the algorithm is improved to improve the convergence speed and optimization effect of the algorithm. The improved algorithm is simulated and compared on the MATLAB R2017b platform. Finally, the control parameters obtained from the simulation are tested on the bagging machine. The simulation comparison results show that the parameter control effect obtained by the algorithm optimization in this paper is better compared with the relay feedback algorithm, the particle swarm algorithm and the improved particle swarm algorithm based on simulated annealing. The actual test results show that the parameter control effect obtained by the algorithm in this paper is good and can meet the actual demand.