The algorithm has the advantages of easy implementation, high precision and fast convergence speed, and it also shows its superiority in practical problems. In the process of adjusting the brightness of the lamp, an improved particle swarm optimization algorithm is used to optimize the control strategy