Aiming at the attitude control problem of AUV(autonomous underwater vehicle)in underwater navigation,the mathematical model of classical control law is adopted. According to the overall parameters and hydrodynamic parameters,it is substituted into the differential equations of vehicle body longitudinal motion. The Runge Kutta method is used to solve the differential equations through MATLAB self-programming software,and the classical control equation(algorithm)is introduced into the solution of the differential equations. The simulation results verify and support the lake test of AUV and provide theoretical support for the development of an AUV project demonstration prototype,which has a certain engineering reference value.