The invention provides a novel comprehensive ship 
path tracking and anti-rolling optimization control method. The method comprises the steps of building a ship 
motion control model with a 
rudder angleas an input according to ship motion characteristics; selecting a prediction 
time domain and a control 
time domain, and predicting a future state of a 
system; converting the ship 
path tracking and anti-rolling problem into the 
optimization problem considering the combination of 
energy consumption and control performance, solving the 
optimization problem under the constraint of an 
actuator, and applying a first element of a solution to the 
system; and building a 
fin stabilizer control model based on a sliding mode method, and performing online 
estimation on an unknown part of the 
system through an RBF neural 
network method. According to the method, a ship can be enabled to track a set 
route, so that the steering burden of sailors can be reduced, meanwhile the rolling motion of the ship canbe reduced, the 
hazard of wind 
waves on 
ship safety, ship equipment, cargo safety and personnel health can be reduced, and the normal operation of ship precision instruments is ensured. In addition,the 
energy consumption of the ship can be reduced, so that the ship is more economical and environment-friendly.