It is necessary to model the power system of the target ship before developing the simulator of ship automatic power station. In order to build an automation model that conforms to the reality, taking the medium voltage power system of a ship as the research object, the single-machine simulation model, the dual-machine parallel simulation model and the five-machine parallel simulation model under different power are established by using the modular modeling method in MATLAB/Simulink software. The accuracy and validity of the model are verified by analyzing the shaft power, excitation voltage, terminal voltage and motor speed of the generator. The experimental results show that the model can accurately reflect the real situation of ship power system operation, and has practical application value.