<p>Power quality has become an important factor in power systems, for consumer and household appliances. The main causes of poor power quality are harmonic currents, poor power factor, supply voltage variations etc. A technique of achieving both active current distortion compensation, power factor correction and also mitigating the supply voltage variations at load side is compensated by unique device UPQC presented in this thesis. This concept presents a multi loop based controller to compensate power quality problems through a three phase four wire unified power quality conditioner (UPQC) under unbalanced and distorted load conditions. Here the UPQC is constituted of two voltage source converters (VSC) connected via power link. The series compensator is connected to the line in series and injects the voltage and thus compensates for voltage issues; whereas the shunt compensator injects current thus compensating for current issues, and is connected in shunt to the line. The voltage injection to the line uses an injecting transformer. The injection transformer is later replaced with injection capacitors, thus eliminating the drawback of conventional UPQC. In this way a good power quality is maintained.</p>