This paper presents the direct control philosophy to compensate the power quality problems utilizing unified power quality conditioner (UPQC). The series part of UPQC is controlled as a sinusoidal current source by using a three-phase full-bridge voltage-source inverter, while the shunt part is controlled as a sinusoidal voltage source by using a four-leg voltage-source inverter. The mathematic model of UPQC is set up. The performance of proposed UPQC system was analyzed under non-ideal and unbalanced load conditions. The simulation results based on Matlab/Simulink are presented to show the effectiveness and feasibility of the topology structure and control philosophy.