Inverter is an important part of photovoltaic power generation integrated into the grid. Through the inverter,the direct current output by photovoltaic array and energy storage battery can be converted into AC power for connection to the grid. This paper analyzes the mathematical model of the inverter and puts forward the model prediction control,however the single vector MPC (model prediction control) algorithm has the problem of large control error,which will lead to the deviation between the predicted current and the reference current,resulting in large current ripples. Two-vector MPC algorithm was proposed to resolve the problems existing in single vector MPC algorithm. Finally,the modeling and simulation analysis of the one-vector and two-vector MPC inverter was conducted to verify the superiority of the two-vector MPC algorithm.