In order to further improve the output torque and stability of the external rotor permanent magnet synchronous motor, a double-layer non-uniform Halbach external rotor permanent magnet synchronous motor (DNH) structure is proposed and optimised. Finite element models of DNH and other structures are established to compare the electromagnetic characteristics of these motors and verify the superiority of the proposed structure. Secondly, the multi-objective whale optimisation algorithm is improved, and the algorithm is tested by test function to verify the improvement effect. Further, the Spearman correlation of the parameters is calculated, and the parameters are layered. The first layer parameters are optimised by the improved multi-objective whale optimisation algorithm, and the second layer parameters are optimised by parameter scanning. Finally, the motor performance of the initial scheme, single layer optimisation scheme, and hierarchical optimisation scheme is compared by simulation. The simulation results show that the hierarchical optimisation method is superior to the single layer optimisation method. By comparing with other schemes, the performance advantages of hierarchical optimisation DNH in terms of average output torque, cogging torque, torque ripple, permanent magnet cost and other parameters are proved, as well as the effectiveness of the optimisation method. In order to further increase the output torque and reduce the torque ripple, a double-layer non-uniform Halbach outer rotor permanent magnet synchronous motor is designed. The correlation coefficient between the motor structure and the performance parameters is calculated to screen the optimised parameters and stratify the optimised parameters. The multi-objective whale optimisation algorithm is improved, and the multi-objective hierarchical optimisation of the designed motor is carried out based on the algorithm. image