The research background of the water quality detection robot lies in effectively monitoring and assessing the quality of water bodies to address the increasingly severe issue of water pollution. This technology, employing advanced sensors and machine learning algorithms, facilitates automated acquisition of water quality data, enabling real-time analysis and reporting of various indicators in the water bodies. Consequently, it provides crucial evidence for safeguarding the environment and human health. This article investigates the problem of posture control in water quality detection robots operating in complex underwater environments. It compares three control algorithms: the traditional PID fuzzy control algorithm, and a BP neural network-based PID algorithm. Through experimental simulation, these algorithms are evaluated based on their differences in system dynamic performance. The results indicate that the utilization of the BP neural network PID algorithm significantly enhances both stability and control precision of the robot when dealing with non-linear environments characterized by uncertainties. This algorithm combines traditional PID control with neural network technology, allowing for adaptive optimization of PID controller parameters through training the neural network. As a result, it overcomes limitations associated with traditional PID and fuzzy control algorithms while improving overall performance.