This thesis proposes the design of an optimized sliding mode controller (SMC) for an autonomous underwater robot (AUR) by adjusting the two sliding mode parameters of the controller, that is, the switching surface (lambda) and sliding signal (rho) amplification rate Control performance depends on these parameters. The optimization techniques used in this degree are natural methods including Particle Swarm Optimization (PSO), Genetic Algorithm (GA) and Simulated Annealing (SA). All three methods are used to find the sliding parameters. The best mode for autonomous underwater robots Using two performance index criteria, Integral Absolute Error (IAE) and Integral Time Absolute Error (ITAE). The test results show that the particle swarm optimization (PSO) method is effective and robust in improving the temporal response of sliding mode control systems for autonomous underwater robots that are better than other methods.