Abstract:[Objective] Aiming to the problem of design weighting factor in model predictive control, non-dominated sorting genetic algorithm II (NSGA-II) and Bayesian optimization algorithm are used to design weighting factors in this paper. [Methods] Based on model predictive torque control (MPTC) for permanent magnet synchronous motor (PMSM), NSGA-II and Bayesian optimization algorithm were used to design weighting factors in two scenarios, which were without/with considering switching frequency control, respectively. When without considering switching frequency control, only one weighting factor needed to be designed, when with considering switching frequency control, two weighting factors needed to be designed. And based on the weighting factors designed by two algorithms, a comparison of the two algorithms in terms of control performance, execution time and memory occupancy was carried out. [Results] The results showed that both weighting factors design algorithms were feasible for PMSM MPTC system with/without considering switching frequency control. The weight factors obtained by NSGA-II that minimize the fitness function value were essentially equivalent to the optimal weight factors derived from the Bayesian optimization algorithm, and control performances were basically equivalent. The control performance of Bayesian optimization algorithm was relatively superior. [Conclusion] NSGA-II can provide a set of Pareto optimal solutions suitable for diverse application scenarios. Characterized by high computational complexity, extended processing times, and substantial memory requirements, it is well-suited for dynamically evolving operational environments. And the Bayesian optimization algorithm is easy to implement and doesn’t need too much resource, has better optimization effect and higher optimization efficiency in complex scenarios involving multiple control objectives.