To improve the cost and reliability of utility-tied PWM inverter, this paper investigates an AC voltage sensorless grid synchronization control, either in grid-parallel inverter mode or in boost PFC rectifier mode. Based on d-q coordinate, the sensorless technique utilizes an AC line voltage estimator and an angle-searching algorithm. By commanding a positive or negative d-axis current, the fast current loop regulator controls a bidirectional power flow. The method can detect when the grid is gone, as a possible built-in anti-islanding function. Experiments verified the validity of the proposed method.