Introduction

Distributed generation (DG) can be represented as a small-scale power system that contains loads, energy sources, energy storage units and control and protection systems [1]. Using DG is more attractive as it improves the system quality, decreases the carbon emission and reduces the losses in transmission and distribution systems [2]. DG can be connected to the main grid or operates autonomously. When DG is connected to utility grid, the control systems required to maintain the active and reactive power output from the energy sources connected to DG is simple. However, under autonomous operation, the DG is disconnected from the utility grid and operates in islanded condition. Usually, a stand-alone DG system used to supply power to isolated areas or places interconnected to a weak grid. The application of above DG other hand reduces the probability of energy supply scarcity. The proposed DG consists of renewable energy sources (RES) based power sources (i.e solar PV, wind and fuel cell) and storage device as battery along with controllable loads [3, 4]. The solar PV and wind energy are complimentary in nature and both are depends upon climatic condition, hence to get uninterrupted power supply at any time and maintaining the continuity of load current, one of the mostly developed energy source like FC is combined with these RES [5, 6]. However, electric power system is mostly affected by nonlinear loads, mostly arc furnaces, SMPS, power electronics converters, and house hold electronic equipment plays a key role in polluting the supply voltages and currents. The increase of power electronics-based equipment in household appliances and industries are the main cause of pollution of power system [7]. Consequently, the power quality (PQ) improvement is a major issue now a day’s. The research in the area of power electronics makes sure that unified power quality conditioner (UPQC) plays a vital role for achieving superior power quality levels. In the present scenario, the series active power filter (APF) and shunt APF alone do not meet the requirement for compensating the PQ distortions. A UPQC consist of two inverter integrated with the DC-link capacitor where the series APF is integrated though a series transformer and the shunt is through interfacing inductor. The series inverter acts as a voltage source where as the shunt one is acts as a current source. Simultaneous compensation of voltage and current related PQ distortions using UPQC is achieved by proper controlling of series APF and shunt APF [8]. The shunt APF is employed for providing compensating currents to PCC for generation/absorption of reactive power and harmonics suppression. Moreover, the operation of SAPF is depend upon three main parts which are momentous in its design; these consist of the control method used for generation of reference current, technique used for switching pulses generation for the inverter and the controller used for DC link capacitor voltage regulation. Different control strategy explained in literature as follows. The use of SAPFs for current harmonic compensation typically in domestic, commercial and industrial applications have explained in Montero et al. [9]. The experimental study and simulation design of a SAPF for harmonics and reactive power compensation is explained by Jain et al. [10]. The power balance theory for active and reactive power compensation have developed by Singh et al. [11]. The instantaneous reactive power techniques of three phase shunt active filter for compensation of source current harmonics have been explained by Akagi et al. [12]. Similarly, Sag is the most significant PQ problem facing by lots of industrial consumers. The control for such a case can be analyzed by protecting sensitive loads in order to preserve a load voltage without sudden phase shift [13]. Different control strategies for series APF are analyzed by Benachaiba et al. [14] with importance on the reimbursement of voltage sags with phase jump. Different control techniques to reimburse voltage sags with phase jump are also projected and compared by Jowder et al. [15]. To ensure stable operation and improve the system performance of DG in island mode, a comparative study of two different control techniques used in UPQC like reference current generation i.e SRF method and MSRF method in conjunction with pulse width modulation based hysteresis band controller and PI controller based DC-link voltage controller are proposed in this paper by using Matlab simulation software. The PQ issues like; voltage sag compensation, current and voltage harmonics were analyzed both with nonlinear load under ideal and non-ideal source condition.

A lot of researches on PQ analysis using UPQC have already been done for grid connected system, whereas, it is mostly ignored for standalone mode. Hence, this paper focuses on PQ analysis of a DG system operated in standalone mode. It is found from literature study that the realization of UPQCs mostly depends on three significant factors and these are control technique employed for (a) reference current generation, (b) regulation of DC-link capacitor voltage and (c) generation of switching pulses for inverter [16]. In most of the reported works, the reference current generation scheme is done employing either conventional SRF technique. In the present work, authors have used or MSRF techniques approach seeing its advantages over SRF technique [17]. Literature survey also reveals that the UPQC have been widely used for enhancement of PQ under ideal source condition and very few paper has been found for non-ideal source condition application. Hence, in this work the PQ issues are investigated both under ideal and non-ideal source condition. Moreover, it is also reviewed from the Literature that the SRF and MSRF techniques based designed UPQCs for enhancing the PQ level of DG system operated under grid connected mode. Whereas, hardly any work on the application of MSRF technique based designed UPQC is found in the standalone mode operated DG system. Therefore, this motivates the present authors to further investigate the PQ issues of adopted islanded DG system in the presence of UPQC designed using MSRF approach for reference current generation and PI controller for DC-link voltage control. Moreover, in the present study the proposed controller is also tested in nonideal source condition which is normally ignored by previous researchers.

The main contributions of present work are as follows.

  1. a)

    A DG system comprising of solar, wind and fuel cell based RES is modeled for standalone mode of operation.

  2. b)

    Design of SRF and MSRF based UPQC for the adopted DG system is carried out.

  3. c)

    The performance of the proposed UPQC model is tested for voltage sag mitigation and harmonics compensation competency considering ideal and non-ideal (harmonics) in source voltage condition.

  4. d)

    The proposed MSRF technique with PI controller provides superior and faster compensation due to its adaptive nature. The THD of the source current is reduced to 2.54% and 2.15% under ideal and non-ideal source condition, respectively.

This rest of the paper is structured in following manner: In Section 2, design of proposed DG system is described. In Section 3, modelling of UPQC with its different control schemes are presented including the proposed MSRF and conventional SRF. The simulation results are presented in Sections 4 showing effectiveness of the proposed algorithm in comparison to the conventional algorithms. The paper ends with a brief conclusion in Section 5 by summarizing significant contributions of proposed work.

Proposed System

The projected DG system (comprising of solar, wind and fuel cell based energy sources) is shown in Fig. 1 where DG system generates DC power to the DC bus and by using a power inverter this DC power is converted to AC. The AC bus delivers the power to the load which may be a linear or nonlinear. The UPQC is located in between the DG and nonlinear load which manage the power quality of the system by using different control techniques.

Fig. 1
figure 1

Basic block diagram of DG with UPQC

Modeling of Solar PV

A single diode model based PV cell is used for design of DG]. The Fig. 2 represents the single diode equivalent model of solar PV system. The basic equation for design of PV system is given below [18, 19].

$$ \mathrm{I}={\mathrm{I}}_s\hbox{-} {\mathrm{I}}_d\hbox{-} {\mathrm{I}}_{sh} $$
(1)
$$ \mathrm{I}s=\left[{\mathrm{I}}_{sc}+{\mathrm{K}}_i\left({\mathrm{T}}_k\kern1em \mathrm{T}\right)\right]\times \frac{G}{1000} $$
(2)
$$ {\mathrm{I}}_{RS}=\frac{{\mathrm{I}}_{sc}}{\left[\exp \left(q\times {V}_{OC}/{\mathrm{N}}_S\times k\times \mathrm{A}\times \mathrm{T}\right)-1\right]} $$
(3)
$$ {\mathrm{I}}_o={\mathrm{I}}_{RS}{\left[\frac{\mathrm{T}}{{\mathrm{T}}_r}\right]}^3\exp \left[\frac{q\times {\mathrm{E}}_{go}}{\mathrm{A}k}\left\{\frac{1}{{\mathrm{T}}_r}-\frac{1}{\mathrm{T}}\right\}\right] $$
(4)
$$ {\mathrm{I}}_{PV}={\mathrm{N}}_P\times {\mathrm{I}}_{Ph}-{\mathrm{N}}_P\times {\mathrm{I}}_O\left[\exp \left\{\frac{q\times {V}_{PV}+{\mathrm{I}}_{PV}\times {R}_{se}}{{\mathrm{N}}_s\times \mathrm{A}k\mathrm{T}}\right\}-1\right] $$
(5)
Fig. 2
figure 2

Solar cell single diode model

Where.

Rse resistance in series (Ω), Ι0 reverse saturation current of diode in (A), Voc open circuit voltage in (V), Rsh shunt resistance in (Ω), Ιsc short circuit current in (A),ΙPV diode photo current in (A), VPV diode voltage in (V), k Boltzmann constant,

ΝP parallel connected cells, T temperature of the p-n junction in (Kelvin), Νscells in series, A diode ideality factor, q electron charge. Based on the Eqs. (1)–(5), a single diode model solar PV cell is developed and implemented in MATLAB simulations.

The flowchart of P&O MPPT method is shown in Fig. 3 which generates the required pulses for the boost converter [20,21,22,23,24]. The Fig. 4 shows the MATLAB simulation of PV with MPPT and boost converter and Fig. 5 shows its corresponding output voltage where the required voltage of 230 V is achieved. The parameters required for design of solar PV system is illustrate in Table 1.

Fig. 3
figure 3

Flowchart of P & O MPPT algorithm

Fig. 4
figure 4

Simulation of Solar PV with MPPT and Boost converter

Fig. 5
figure 5

Output voltage of boost converter

Table 1 Different parameter and their ratings to carry out the simulation work of solar PV

Modeling of WES

The wind generator is the second energy source in the construction of DG. A permanent magnet synchronous generator (PMSG) based wind system is used for generation of wind power. The basic equation foe wind power [25] is given by (6).

$$ {P}_0=\frac{1}{2}\pi \rho {C}_P\left(\lambda, \beta \right){R}^2{V}^3 $$
(6)

Where P0 represents the turbine mechanical power, ρ is the air density, λ is the tip-speed ratio, given by λ=ΩR/V, β is the pitch angle, R is the blade radius-speed of the wind.”The wind energy conversion system (WECS) is modelled and developed by using these parameters. The Fig. 6 shows the basic wind energy conversion system.

Fig. 6
figure 6

Wind energy system block diagram

The mechanical energy of turbine converted to electrical energy with the help of generator [26, 27]. Figure 7 display the simulation of PMSG wind system with rectifier and step-up converter and Fig. 8 shows its corresponding output voltage.

Fig. 7
figure 7

Simulink model of PMSG based wind energy system with boost converter

Fig. 8
figure 8

DC output voltage of wind energy system

FC Modeling

Proton exchange membrane (PEM) FC is considered as another energy source of the DG. The FC consists of two electrode i.e. positive cathode, negative anode, and an electrolyte. The pressurized hydrogen gas enters as the anode of the FC and oxygen enters the cathode [28, 29]. In a basic PEMFC diagram is shown in Fig. 9, and its chemical reactions are shown in Eqs. (7)–(9) [30].

Fig. 9
figure 9

Fuel cell model

Anode reaction

$$ \left(2{\mathrm{H}}^{+}+2{\mathrm{e}}^{-}\right)\to {\mathrm{H}}_2 $$
(7)

Reaction at cathode

$$ \left(2{\mathrm{H}}^{+}+2{\mathrm{e}}^{-}+1/2\mathrm{O}2\right)\to {\mathrm{H}}_{2O} $$
(8)

Net reaction”

$$ {\mathrm{H}}_2+1/2\mathrm{O}2\to {\mathrm{H}}_{2O} $$
(9)
$$ {\displaystyle \begin{array}{l}{\mathrm{E}}_{\mathrm{Thermo}}=1.229\hbox{-} 0.00085\times \left(T\hbox{-} 298.15\right)+4.31\times {10}^5\times T\\ {}\times \left[\ln \left({P}_{H2}\right)+\frac{1}{2}\ln \left({P}_{O2}\right)\right]\end{array}} $$
(10)
$$ {V}_{act}=-\left[\xi 1+\xi 2\times T+\xi 3\times T\times \ln \left({CO}_2\right)\right] $$
(11)
$$ {V}_{Ohmic}={i}_{FC}\left({R}_M+{R}_C\right) $$
(12)
$$ {V}_{FC}={E}_N-{V}_{act}-{V}_{Ohmic}-{V}_{con} $$
(13)
$$ {V}_s=k\times {V}_{FC} $$
(14)
$$ {V}_{con}=\ln \left(1-\frac{J}{J_{\mathrm{max}}}\right)\times \left(-B\right) $$
(15)

The thermodynamically predicted voltage (Ethermo) of FC is shown in Eq. 10 [31]. The equation shown in 10 to 15 is required for modeling of PEMFC in MATLAB [32].

The simulation FC with boost converter is shown in Fig. 10 and the output voltage which is match with the output voltage of other DGs is shown in Fig. 11. The Table 2 represent different parameters of FC.

Fig. 10
figure 10

Fuel cell with boost converter

Fig. 11
figure 11

Output voltage of boost converter

Table 2 Parameters of the Fuel cell

Modeling of UPQC

This chapter begins with system configuration and detailed description on UPQC. The basic structure of UPQC is shown in Fig. 12 which consist of two inverter connected to a common dc-link capacitor. The series inverter is connected though a series transformer and the shunt inverter is connected in parallel with the point of common coupling. The series inverter acts as a voltage source where as the shunt one is acts as a current source. The main function of UPQC is to control the power flow and reduce the harmonics distortion both in voltage and current waveform.

Fig. 12
figure 12

Basic UPQC system block diagram

The series APF topology is shown in Fig. 13. The series APF protects load from the utility side disturbances. In case of series APF Park’s transformation method is used for generation of unit vector signal. A PWM generator, generating synchronized switching pulses, is given to the six switches of the series converter. The objectives of the series converter can be achieved by providing appropriate switching pulses.

Fig. 13
figure 13

Block diagram of Series Active Filter

The Fig. 14 shows the basic structure of shunt active filter. The shunt active power filter injects compensating current to the PCC such that the load current becomes harmonics free. The aid of voltage source inverter and interfacing inductor the compensating current is generated which minimizes the harmonics component in the load current. The maximum di/dt can be accomplished by the inverter is determine by the voltage across the interfacing inductor. This is significant because higher di/dt is essential to reimburse the harmonic; hence the selection of interfacing inductor is vital. However, the ability of compensator depends upon interfacing inductor with higher size can compensate higher order harmonics.”

Fig. 14
figure 14

Block diagram of Shunt Active Filter

The SAPF generates compensating current which is in opposition to the harmonic current generated by nonlinear load. This compensating current cancel out the current harmonics caused and makes the load current sinusoidal. So the SAPF is used to eradicate current harmonics and reimburse reactive power at the source side so as to make load current harmonics free. The Eqs. 16 and 17 shows instantaneous current and the source voltage.

$$ Is(t)= IL(t)- IC(t) $$
(16)
$$ Vs(t)= Vm\sin\ \omega t $$
(17)

Fourier series method is used for expressing the non-linear load current as shown in Eq. 18.

$$ Is(t)=I1\mathrm{Sin}\left(\omega t+\Phi 1\right)+{\Sigma}_{n=2}^{\varepsilon } In\mathrm{Sin}\left( n\omega t+\Phi n\right) $$
(18)

“The compensation current of the active filter should be expressed by

$$ Ic(t)= IL(t)- Is(t) $$
(19)

Hence, for the exact compensation of reactive power and harmonics, it is essential to determine Is(t). The instantaneous value of source, load, and compensation current can be expressed by, Is(t), IL(t) & IC(t) where Vs(t) and Vm corresponds to instantaneous value and peak value of source voltage.

Control Scheme of UPQC

The SRF controller scheme works in steady-state as well as in dynamic condition exquisitely to manage the active, reactive power and reduce the harmonics in load current. There are many control methods available for SAPF, here we design two basic methods which is easy for implementation.

  • SRF Method

  • MSRF Method

SRF Method

The normal arrangement of SRF system contains a Phase locked loop (PLL) unit for vector orientation as shown in Fig. 15.

Fig. 15
figure 15

Block diagram of SRF control scheme

The control pattern includes the transfer of source current from abc to d-q. The three-phase load currents ILa, ILb, ILc is converted to Id- Iq using the transformation technique as given in Eq. 20.

$$ \left[\begin{array}{c}{i}_q\\ {}{i}_d\\ {}{i}_0\end{array}\right]=\frac{2}{3}\left[\begin{array}{ccc}\cos \theta & \cos \left(\theta -120\right)& \cos \left(\theta +120\right)\\ {}\sin \theta & \sin \left(\theta -120\right)& \sin \left(\theta +120\right)\\ {}\frac{1}{2}& \frac{1}{2}& \frac{1}{2}\end{array}\right]\left[\begin{array}{c}{i}_{la}\\ {}{i}_{lb}\\ {}{i}_{lc}\end{array}\right] $$
(20)

The d -axis component is employed for elimination harmonic current and reimbursements active reactive power. The unit vector is generating by PLL which is the main disadvantage of this method.

MSRF Method

The Fig. 16 shows the block diagram of modified SRF method for unit vector generation. The unit vector is generating by vector orientation method not by PLL.

Fig. 16
figure 16

Block diagram of modified SRF method

The Fig. 17 shows the block diagram to generate unit vector by sensing the supply voltage.” The unit vector generation is defining by the following equation.

$$ \cos \theta =\frac{V_{\alpha \kern0.5em }}{\sqrt{\left({V}_{s\alpha}2\right)}+\left({V}_{s\beta}2\right)} $$
(21)
$$ \sin \theta =\frac{V_{\beta \kern0.5em }}{\sqrt{\left({V}_{s\alpha}2\right)}+\left({V}_{s\beta}2\right)} $$
(22)
Fig. 17
figure 17

Unit vector generation Block diagram

Hysteresis Band Current Controller

The Fig. 18 shows the block diagram of hysteresis current regulator which generates the required pulses for inverter. In the current regulator the error signal is generated by comparing the reference current Isa*and actual current Isa. The switching pulses required for the inverter is design in such a way that when the error signal go beyond the upper band of hysteresis loop the lower switches of inverter are ON and upper switches are OFF and similarly the upper switches are ON and lower switches OFF when the error signal exceeds the lower band [33, 34]. So the actual current is always track with respect to reference current inside the hysteresis band.

Fig. 18
figure 18

Hysteresis current controller scheme

DC-Link Voltage Controller

The internal configuration of PI controller circuit is shown in Fig. 19 which consists of comparator, LPF, PI controller, and three phase sine wave generator for reference current generation. The DC link capacitor voltage is sensed and compared with a reference voltage and the error signal generated from the comparator is passed through a LPF filter. The cut-off frequency of the filter is set at 50 Hz which can suppress the higher order harmonics and permits only fundamental components.

Fig. 19
figure 19

PI controller block diagram

The voltage error E resulting from the difference between overall DC-link voltage Vdc and its reference voltage Vdcref is directly manipulated by a PI controller to approximate the magnitude Idc. The control approach can be summarized as follows.

$$ E= Vdcref- Vdc $$
(23)
$$ Idc=E\left( Kp+ Kidt\right) $$
(24)

The minimum value of design parameters used in the PI technique can be obtained as follows.

$$ {K}_p>{C}_{dc}\xi \omega $$
(25)
$$ {K}_i>{C}_{dc}\xi \left(\omega /2\right) $$
(26)

Damping factor ξ is fixed at 0.707, and ω is the angular frequency, Kp is proportional gain, Ki is integration gain. Further adjustment and tuning are performed in heuristic manner to improve control performance.

Simulation Results

The Simulink models of DG system connected to UPQC with different load is shown in Fig. 20.

Fig. 20
figure 20

DG connected to non-linear with proposed scheme

The performance of the proposed model is analyzed under following operating condition (referred as Scenarios).

  • Scenario 1: DG connected to nonlinear load without UPQC and UPQC with SRF technique considering ideal source.

  • Scenario 2: DG connected to nonlinear load with MSRF based UPQC ideal source.

  • Scenario 3: DG connected to nonlinear load with MSRF based UPQC non-ideal source.

Performance Analysis under Scenario1

In this case the system performance is analyzed by connecting non-linear load with the DG system first without UPQC and then with SRF based UPQC.

The performance of series APF can be evaluated by introducing voltage sag into the system. The profile of load voltage shown in Fig. 21a conforms that voltage sag is introducing from 0.1 s to 0.3 s of the load voltage waveform. For sag condition, the series APF detects the voltage drop and inject the required voltage through the series coupling transformer. It maintains the rated voltage across the load terminal. In order to compensate the load voltage sag, UPQC (employing SRF scheme) is turned on, which injects compensating voltage at the PCC as displayed in Fig. 21b as a result the load voltage is same as that of source voltage. The load voltage after compensation is shown in Fig. 21c. In general, the operation of the series part of the UPQC can be described as rapid detection of voltage variations at source and it injects the compensation voltage which maintains rated voltage across the load terminal.

Fig. 21
figure 21

Profile obtained under Scenario 1 (sag compensation) a Load voltage before compensation b Compensating voltage injected by UPQC c Load voltage after compensation

The shunt VSI in the UPQC is realized as shunt APF and is applied to solve the current related PQ distortions current harmonic distortion, reactive power demand etc. In order to investigate the performance of shunt APF a rectifier based nonlinear load is introduced into the system and the level of harmonics is checked. It is observed from the Fig. 22 (a) that the source current waveform has a total harmonic distortion (THD) of 16.60% as per the FFT analysis of the source current shown in Fig. 22b. In order to make source current to be sinusoidal the shunt APF of the UPQC with conventional SRF technique is turned on, at t = 0.1 s which injects compensating current as displayed in Fig. 22c. Hence, the THD level comes down to 3.40% as shown in Fig. 22d.

Fig. 22
figure 22

Profile obtained under Scenario 1 (Harmonics Mitigation) a Source current before compensation b Harmonics content before compensation c Compensating current injected by UPQC d Harmonics content after compensation

Performance Analysis under Scenario2

It is observed from the scenario 1 that, DG connected with SRF method mitigates the harmonics only by 3.40%. Hence, the PQ analysis of the DG system by utilizing MSRF scheme is studied in this case. As the main objective of the research is to compensate the sag, decrease the harmonics and maintain the DC link capacitor voltage. Hence, the investigation is focused on series APF and shunt APF of the UPQC.

The voltage injected by the proposed controller is shown in Fig. 23a which reduces the sag from 0.1 s to 0.3 s and makes the load voltage equal to source voltage. The load voltage after compensation is presented in Fig. 23b. The profile of compensating current generated by MSRF based shunt APF and source current after compensation are shown in Fig. 23c and d respectively. It may be analyzed from the Fig. 23d that the source current is sinusoidal in nature, due to the injection of compensating current by the UPQC. The FFT analysis of the source current (after compensation) is presented in Fig. 23e which ensures further reduction of THD content to 2.54% in comparison to Scenario 1.

Fig. 23
figure 23figure 23

Profile obtained under Scenario 2 a Compensating voltage injected by Series APF of UPQC b Load voltage after compensation c Compensating current injected by Shunt APF of UPQC d Source current after compensation e Harmonics content after compensation

Performance Analysis under Scenario 3

In this scenario, the comparative performance analysis of the studied UPQC models is carried out under harmonics in supply voltage. This condition is achieved by introducing harmonics in the source voltage of phase A. Firstly, the performance is analyzed without UPQC in the presence of the nonlinear load.

The profile of is and its harmonic content (before compensation) are shown in Fig. 24a and b respectively. It may be observed from the Fig. 24a and b that the source current waveform is non-sinusoidal in nature having very high THD content of 28.23%. To make issinusoidal, firstly UPQC employing SRF technique based designed UPQC is turned on, which injects appropriate ic at the PCC as displayed in Fig. 24c. As a result, THD level comes down to 3.85%. The corresponding FFT analysis is portrayed in Fig. 24d.

Fig. 24
figure 24

Profile obtained under Scenario-3: a is before compensation, b THD content of is before compensation, c ic injected by UPQC using SRF scheme, d THD content of is after compensation

Secondly, the profile of ic generated by MSRF technique based designed UPQC is shown in Fig. 25a and b illustrates the is waveform after compensation. It may be viewed from the output waveform that the profile of is is nearly sinusoidal in nature, due to the injection of ic by the MSRF approach based designed UPQC. The FFT analysis of is after compensation using this approach is presented in Fig. 25c which ensures further reduction of THD content to 2.15%.

Fig. 25
figure 25

Profile obtained under Scenario-3: a ic injected by UPQC using MSRF scheme b is after compensation c THD content of is after compensation

The simulation is carried out for nonlinear load with these controllers and makes the is is almost sinusoidal after compensation. FFT analysis of the proposed method confirms that the THD of the source current is in compliance with IEEE-519 harmonic standards.

Conclusion

The research reveals that MSRF technique of UPQC makes it possible for improving the power quality of a DG system connected with non-linear load. The advantage of MSRF technique is that the production of sine and cosine angles for synchronization purpose instead of using PLL circuit that uses a basic unit vector generation scheme. Simulation results illustrates that the proposed MSRF technique with UPQC provides superior and faster compensation due to its adaptive nature. The THD of the source current is reduced to 2.54% for ideal source condition and 2.15% for nonideal source condition. Moreover, it also mitigates the voltage sag quickly as compare to SRF control scheme. The suggested method delivers superior output than the existing method in terms of harmonic mitigation and voltage sag compensation. The implementation of DG with UPQC makes an advantage that it can compensate all the power quality problems at any load condition. The work may be extended by integrating different control approach for reference current generation for UPQC and DC-link voltage control algorithm may be implemented for better PQ mitigation purpose.