A method for controlling a grid-tie inverter, comprising: acquiring an output voltage of the grid-tie inverter and an output current value of the grid-tie inverter at a current moment; calculating N output current values of the grid-tie inverter at a next moment based on the output current value at the current moment, wherein the N output current values at the next moment are in one-to-one correspondence to N switch states of the grid-tie inverter, and N is a natural number greater than or equal to 2; and obtaining a grid phase of the grid-tie inverter based on the output voltage, and acquiring a first reference current based on the grid phase, establishing a third-order state model based on an output current of the grid-tie inverter; acquiring a second reference current based on the third-order state model and the first reference current, wherein the second reference current comprises a compensation value for a system disturbance; determining a first switch state from the N switch states, wherein a difference value between the output current value at the next moment corresponding to the first switch state and a value of the second reference current at the next moment is a minimum value among difference values between the N output current values at the next moment and the value of the second reference current at the next moment; and controlling the grid-tie inverter to perform power transmission in the first switch state at the next moment, characterized in that the third-order state model is { X 1 = i g X 2 = X ̇ 1 = d i g dt X 3 = X ̇ 2 where X 1 represents the output current i g of the grid-tie inverter, X 2 is a differential of X 1, and X 3 is a differential of X 2 and represents the system disturbance, the second reference current is obtained by the following equation: u = k p i ref 1 − X 1 − k d X 2 − X 3 b 0 where u represents the second reference current, i ref1 is the first reference current, k p = w c 2, k d = 2 w c, w c is a cut-off frequency of the grid-tie inverter, b 0 = 1 LC, L is an inductance of the grid-tie inverter, and C is a capacitance in the grid-tie inverter. acquiring an output voltage of the grid-tie inverter and an output current value of the grid-tie inverter at a current moment; calculating N output current values of the grid-tie inverter at a next moment based on the output current value at the current moment, wherein the N output current values at the next moment are in one-to-one correspondence to N switch states of the grid-tie inverter, and N is a natural number greater than or equal to 2; and obtaining a grid phase of the grid-tie inverter based on the output voltage, and acquiring a first reference current based on the grid phase, establishing a third-order state model based on an output current of the grid-tie inverter; acquiring a second reference current based on the third-order state model and the first reference current, wherein the second reference current comprises a compensation value for a system disturbance; determining a first switch state from the N switch states, wherein a difference value between the output current value at the next moment corresponding to the first switch state and a value of the second reference current at the next moment is a minimum value among difference values between the N output current values at the next moment and the value of the second reference current at the next moment; and controlling the grid-tie inverter to perform power transmission in the first switch state at the next moment, characterized in that the third-order state model is { X 1 = i g X 2 = X ̇ 1 = d i g dt X 3 = X ̇ 2 where X 1 represents the output current i g of the grid-tie inverter, X 2 is a differential of X 1, and X 3 is a differential of X 2 and represents the system disturbance, the second reference current is obtained by the following equation: u = k p i ref 1 − X 1 − k d X 2 − X 3 b 0 where u represents the second reference current, i ref1 is the first reference current, k p = w c 2, k d = 2 w c, w c is a cut-off frequency of the grid-tie inverter, b 0 = 1 LC, L is an inductance of the grid-tie inverter, and C is a capacitance in the grid-tie inverter.