At present, with the progress of electronic technology and the improvement of the demand for inverter control characteristics in various fields, multilevel inverters represented by three-level inverters have been more and more widely used. However, the algorithm of three-level inverter controlled by Space Vector Pulse Width Modulation (SVPWM) is complex, which brings great difficulty to its hardware programming. the principle of SVPWM in flying capacitor three-level inverter is described, and a control method of capacitor voltage balance which is easy to be realized digitally is proposed to solve the voltage offset problem of flying capacitor. The method inherits the widely used three-level space vector modulation strategy. By judging the unbalanced direction of the flying capacitor voltage and the flow direction of the load current, the hysteresis control is used to adjust the action mode of the redundant working state O - and O + , so as to realize the balance and stability of the flying capacitor voltage. The automatic code generation technology based on Model-Based Design (MBD) solves the problem that three-level SVPWM is difficult to be realized by hardware because of the complexity of the algorithm. The simulation results show that the proposed control scheme is correct and effective. The correctness and effectiveness of the proposed control scheme is verified by simulation and experimental results.