Applying photovoltaic power generation system to the ship's power grid will reduce the pollution of ship to the ocean. In order to improve the efficiency and quality of photovoltaic power generation on board the ship, In this paper, robust control is used in DC side, and Z-source capacitor voltage outer loop control and current inner loop control are used in AC side, The robust controller and regulator are designed to realize the fast tracking of grid-connected current. At the same time, active damping technology is also used on the grid side to suppress the resonance of the LCL filter, which improves the reliability of the ship grid-connected system. Finally, simulations verify the correctness and effectiveness of the theory.