This paper proposes a control strategy active power filter under non-ideal main voltages. The P-Q Theory is used to generate three-phase active power filter reference currents, but the P-Q Theory has a weakness when implemented under non ideal main voltages. This paper proposes a reference current generation method using modified P-Q Theory under non-ideal main voltages conditions. Before calculating the P-Q Theory, the non-ideal voltage at the source is normalized by using PLL to determine the phase angle which is then carried out by generating an ideal three-phase signal. The proposed method is simulated and implemented in a three-phase active power filter controller. The test results show the improvement in the performance of the P-Q Theory under non ideal main voltages with THD 7.21% to THD 3.29%.