Published online by Cambridge University Press: 20 March 2019
Designing the boundary layer thickness and switching gain in the nonlinear part of sliding mode controller (SMC) is one of the main subjects in SMC design that needs human experience, knowledge on the amplitude of disturbances, and information about the bounds of system uncertainties. In this paper, to reduce the trial-and-error effort by the designer(s) two different fitness functions in the horizontal and vertical planes are presented and a heuristic method is used for their optimization. The optimal switching gain in the proposed approach properly compensates the unmodeled dynamics, model uncertainty, and external disturbances. Chattering phenomenon in control signals and noise measurement effect are reduced by the optimal selection of boundary layer thickness. This proposed method is applied to an autonomous underwater vehicle (AUV) and evaluated through the real-time and cost-effective manner. The execution code is implemented on a single-board computer (SBC) through the xPC Target and is evaluated by the processor-in-the-loop (PIL) test. The results of the PIL test in the two different test cases indicate that the chattering phenomenon and amplitude of control signal applied to the actuators are reduced in comparison with the three conventional approaches in the AUV motion control.