This thesis proposes the design of an optimized sliding mode controller for an autonomous underwater robot by adjusting the two sliding mode parameters of the controller, that is, the switching surface. and sliding signal amplification rate Control performance depends on these parameters. The optimization technique used in this degree is a natural method, namely the particle swarm method. genetic method Method for simulating toughness These three methods were used to find the best sliding mode parameters for the autonomous underwater robot. Using two performance index criteria: The absolute error integral and the absolute error integral multiplied by time. The test results show that the particle swarm optimization method is more effective and robust in improving the temporal response of the sliding mode control system for an autonomous underwater robot than other methods.