In this paper, the efficiency of photovoltaic panels is improved by adding a solar tracking system. The solar tracking system is used to track the sun so that the photovoltaic always faces the sun. This system uses a dual axis consisting of a horizontal rotation axis and a vertical rotation axis. The motion of the horizontal axis of rotation follows the sun's azimuth angle from north to south. The movement of the vertical axis of rotation follows the sun's azimuth angle from east to west. Both types of movements are controlled using a PID controller optimized with an artificial intelligence approach, namely PID control with Particle Swarm Optimization tuning, with Firefly Algorithm tuning, Imperialist Competitive Algorithm tuning, Bat Algorithm tuning, and Ant Colony Optimization tuning. Experiments of various approaches were carried out and the corresponding performances were compared. The experimental results show that the control PID tuned by Bat Algorithm has the best performance in terms of settling time (0.073 s), undershot (1.193), and overshoot (19.734).