Matlab/simulink simulation of unified power quality conditioner-battery energy storage system supplied by PV-wind hybrid using fuzzy logic controller

Received May 2, 2018 Revised Nov 11, 2018 Accepted Dec 2, 2018 This paper presents performance analysis of Unified Power Quality Conditioner-Battery Energy Storage (UPQC-BES) system supplied by Photovoltaic (PV)-Wind Hybrid connected to three phase three wire (3P3W) of 380 volt (L-L) and 50 hertz distribution system. The performance of supply system is compared with two renewable energy (RE) sources i.e. PV and Wind, respectively. Fuzzy Logic Controller (FLC) is implemented to maintain DC voltage across the capacitor under disturbance scenarios of source and load as well as to compare the results with Proportional Intergral (PI) controller. There are six scenarios of disturbance i.e. (1) non-linear load (NL), (2) unbalance and nonlinear load (Unba-NL), (3) distortion supply and non-linear load (Dis-NL), (4) sag and non-linear load (Sag-NL), (5) swell and non-linear load (Swell-NL), and (6) interruption and non-linear load (Inter-NL). In disturbance scenario 1 to 5, implementation of FLC on UPQC-BES system supplied by three RE sources is able to obtain average THD of load voltage/source current slightly better than PI. Furthermore under scenario 6, FLC applied on UPQC-BES system supplied by three RE sources gives significantly better result of average THD of load voltage/source current than PI. This research is simulated using Matlab/Simulink.


INTRODUCTION
PV and wind are the most RE distributed generations (DGs) because they are able to convert sunlight and wind into power. PV and solar are the potential DGs sources since it only need sunlight to generate electricity, where the resources are available in abundance, free and relatively clean. Indonesia has enormous energy potential from the sun because it lies on the equator. Almost all areas of Indonesia get sunlight about 10 to 12 hours per day, with an average intensity of irradiation of 4.5 kWh/m 2 or equivalent to 112.000 GW. The potential of wind energy in Indonesia generally has a speed between 4 to 5 m/s and classified as medium scale with potential capacity of 10 to 100 kW. The weakness of PV and wind turbine besides able to generate power, they also produces a number voltage and current harmonics resulted by presence of several types of PV and wind turbine devices and power converters as well as to increase a number of non-linear loads connected to the grid,so finally resulting in the decrease in power quality.
In order to overcome and improve power quality due to presence of non-linear loads and integration of PV and wind turbine to grid, UPQC is a proposed. UPQC serves to compensate for source voltage quality problemsi.e. sag, swell unbalance, flicker, harmonics, and load current quality problems i.e. harmonics,  Figure 1 shows proposed model in this research. The RE sources based DGs used i.e. PV, Wind Turbine, and PV-Wind Turbine Hybrid connected to 3P3W distribution system with 380 volt (L-L) and 50 Hz frequency, through UPQC-BES system. PV array produce power under fixed temperature and radiation as well as connect to UPQC-DC link through a DC/DC boost converter. The maximum power point tracking (MPPT) method with Pertub and Observer (P and O) algorithms helps PV produce maximum power and generate output voltage, as the input voltage for DC/DC boost converter. The converter serves to adjust duty-cycle value and output voltage of PV as its input voltage to produce an output voltage corresponding to UPQC DC link voltage. Wind turbine type used is a permanent magnetic synchronous generator (PMSG) with variable speed and fixed voltage which generating power and is connected to UPQC DC link circuit through AC/DC bridge rectifier. The rectifier helps to change AC PSMG stator output voltage to DC voltage through LC circuit that serves to filter and smooth it before connected to UPQC-DC link.BES connected to the UPQC-DC link circuit serves as energy storage and is expected to overcome interruption voltage and overall help UPQC performance to improve voltage and current quality on source and load bus. Simulation parameters proposed in this study is shown in Appendix Section. Power quality analysis is performed on PV, Wind, PV-Wind Hybrid respectively, connected to 3P3W system through UPQC DC-link (on-grid) using BES circuit. Single phase circuit breakers (CBs) are used to connect and disconnect PV, Wind, and Hybrid PV-Wind respectively with UPQC DC-link.
There are six disturbance scenarios i.e. (1) NL, (2) Unba-NL, (3) Dis-NL, (4) Sag-NL, (5) Swell-NL, and (6) Inter-NL. In scenario 1, the model is connected a non-linear load with RL and LL of 60 Ohm and 0.15 mH respectively. In scenario 2, the model is connected to non-linear load and during 0.3 s since t=0.2 s to t=0.5 s connected to unbalance three phase load with R1, R2, R3 as 6 Ohm, 12 Ohm, 24 Ohm respectively, and value of C1, C2, C3 as 2200 μF. In scenario 3, the model is connected to non-linear load and source voltage generating 5 th and 7 th harmonic components with individual harmonic distortion values of 5% and 2% respectively. In scenario 4, the model is connected to non-linear load and source experiences a sag voltage disturbance of 50% for 0.3 s between t=0.2 s to t=0.5 s. In scenario 5, the model is connected to a non-linear load and source experiences a swell voltage disturbance of 50% for 0.3 s between t=0.2 s to t=0.5 s. In scenario 6, the model is connected to non-linear load and source experiences an interruption voltage interference of 100% for 0.3 s between t=0.2 s to t=0.5 s. FLC is used as a DC voltage control in a shunt active filter to improve the power quality of the load voltage and current source and compare it with PI controller. Each disturbance scenario uses a PI controller and FLC so that the total of 12 disturbances. The result analysis of research was carried out i.e.
(1) voltage and current on source or poin common coupling (PCC) bus, (2) voltage and current on load bus, (3) harmonic voltage and harmonic current on source bus and (4) harmonic voltage and harmonic current on load bus. The final phase is to compare performance of UPQC-BES system on-grid supplied by PV, Wind, PV-Wind Hybrid respectively using two controllers to improve power quality of load voltage and source current under six disturbance conditions.  Figure 2 shows the equivalent circuit and V-I characteristic of a solar panel. A solar panel is composed of several PV cells that have series, parallel, or series-parallel external connections [14].

Photovoltaic model
where IPV is the photovoltaic current, Io is saturated reverse current, 'a' is the ideal diode constant, Vt=NSKTq -1 is the thermal voltage, NS is the number of series cells, q is the electron charge, K is the Boltzmann constant, T is the temperature of p-n junction, RS and RP are series and parallel equivalent resistance of the solar panels. IPV has a linear relation with light intensity and also varies with temperature variations. Io is dependent on temperature variations. The values of Ipv and Io are calculated as following (2) and (3): In which IPV,n, ISC,n and VOC,n are photovoltaic current, short circuit current and open circuit voltage in standard conditions (Tn=25 C and Gn=1000 Wm -2 ) respectively. KI is the coefficient of short circuit current to temperature, ∆T=T-Tn is the temperature deviation from standard temperature, G is the light intensity and KVis the ratio coefficient of open circuit voltage to temperature. Open circuit voltage, short circuit current and voltage-current corresponding to the maximum power are three important points of I-V characteristic of solar panel. These points are changed by variations of atmospheric conditions. By using (4) and (5)

PMSG wind turbine
Wind turbine is one of part of an integrated system, which can be divided into two types i.e. fixed and variable speed wind turbines. In fixed speed type, rotating speed of turbine is fixed and hence, frequency of generated voltage remains constant, so it can be directly connected to the network. In this case, maximum power can not always be extracted by wind. On the other hand, on variable speed, turbine can rotate at different speeds, so maximum power can be generated in each wind speed by MPPT method [10]. The advantage of 1483 using a PMSG over a synchronous generator and DFIG machine because it has high efficiency and reliability. Due to the elimination of rotor external excitation, machine size, and cost also decreases, making PMSG to be more controlled easily with feedback control system. PMSG has become an attractive solution on wind generation systems with variable speed wind turbine applications [15]. Figure 3 and 4 shows model of PMSG wind turbine and wind turbin power characteristic curve.  The output power of wind turbine can be expressed using (6), (7), and (8) [11].
Where λ is the speed-tip ratio, Vwindis wind speed, R is blade radius, ωr is rotor speed (rad/sec), ρ is the air density, CP is the power coefficient, PM is the output mechanical power, and TM is output torque of wind turbine. The CP coefficient is dependent on the pitch angle value, at which rotor blade can rotate along axis and tipspeed ratio λ expressed in (9).
Where β is a pitch angle blade. In a fixed pitch type, the value of β is set to a fixed value.

Control of series active filter
The main function of series active filter is as a sensitive load protection against a number of voltage interference at PCC bus. The control strategy algorithm of the source and load voltage in series active filter circuit is shown in Figure 5. It extracts the unit vector templates from the distorted input supply. Furthermore, the templates are expected to be ideal sinusoidal signal with unity amplitude. The distorted supply voltages are measured and divided by peak amplitude of fundamental input voltage Vm give in (10) [6].
A three phase locked loop (PLL) is used in order to generate a sinusoidal unit vector templates with a phase lagging by the use of sinus function. The reference load voltage signal is determined by multiplying the unit vector templates with the peak amplitude of the fundamental input voltage Vm. The load reference voltage (VLa * , VLb * , Vc * ) is then compared against to sensed load voltage (VLa, VLb, VLc) by a pulse width modulation (PWM) controller used to generate the desired trigger signal on series active filter.

Control of shunt active filter
The main function of shunt active filter is mitigation of power quality problems on the load side. The control methodology in shunt active filter is that the absorbed current from the PCC bus is a balanced positive sequence current including unbalanced sag voltage conditions in the PCC bus or unbalanced conditions or nonlinear loads. In order to obtain satisfactory compensation caesed by disturbance due to non-linear load, many algorithms have been used in the literature. This research used instantaneous reactive power theory method "pq theory". The voltages and currents in Cartesian abc coordinates can be transformed to Cartesian αβ coordinates as expressed in (11) and (12) [16].
The computation of the real power (p) and imaginary power (q) is showed in (13). The real power and imaginary are measured instantaneously power and in matrix it is form is given as.The presence of oscillating and average components in instantaneous power is presented in (14) (13) ; Where p = direct component of real power, p = fluctuating component of real power, q = direct component of imaginary power, q = fluctuating component of imaginary power. The total imaginary power (q) and the fluctuating component of real power are selected as power references and current references and are utilized through the use of (15) for compensating harmonic and reactive power [18].
The signal loss p , is obtained from voltage regulator and is utilized as average real power. It can also be specified as the instantaneous active power which corresponds to the resistive loss and switching loss of the UPQC. The error obtained on comparing the actual DC-link capacitor voltage with the reference value is processed in FLC, engaged by voltage control loop as it minimizes the steady state error of the voltage across the DC link to zero. The compensating currents ( * The proposed model of UPQC-BES system supplied by three RE sources is shown in Figure 1. From the figure, we can see that PV is connected to the DC link through a DC-DC boost converter circuit. The PV partially distributes power to the load and the remains is transfered to three phase grid. The load consists of non linear and unbalanced load. The non-linear load is a diode rectifier circuit with the RL load type, while the unbalanced load is a three phase RC load with different R value on each phase. In order to economically efficient, PV must always work in MPP condition. In this research, MPPT method used is P and O algorithm. The model is also applied for UPQC-BES system which is supplied by wind and PV-wind hybrid respectively. In order to operate properly, UPQC-BES system device must have a minimum DC link voltage (Vdc). The value of common DC link voltage depends on the nstantaneous energy avialable to UPQC is defined by in (17)  where m is modulation index and VLL is the AC grid line voltage of UPQC. Considering that modulation index as 1 and for line to line grid voltage (VLL=380 volt), the Vdc is obtained 620, 54 volt and selected as 650 volt.
The input of shunt active filter showed in Figure 5 is DC voltage (Vdc) and reference DC voltage (Vdc * ), while the output is loss p by using PI controller. Then, the loss p is as one of input variable to generate the reference source current (Isa * , Isb * , and Isc * ). The reference source current output is then compared to source current (Isa, Isb, and Isc) by the current hysteresis control to generate trigger signal in IGBT circuit of shunt active filter. In this research, FLC as DC voltage control algorithm on shunt active filter is proposed and compared with PI controller. The FLC is capable of reduce oscilation and generate quick convergence calculation during disturbances. This method is also used to overcome the weakness of PI controller in determining proportional gain (Kp) and integral gain constant (Ki) which still use trial and error method.

Fuzzy logic controller
The research is started by determine loss p as the input variable to result the reference source current on current hysteresis controller to generate trigger signal on the IGBT shunt active filter of UPQC using PI controller (Kp=0.2 and Ki=1.5). By using the same procedure, loss p is also determined by using FLC.
The FLC has been widely used in recent industrial process because it has heuristic, simpler, more effective and has multi rule based variables in both linear and non-linear system variations. The main components of FLC are fuzzification, decision making (rulebase, database, reason mechanism) and defuzzification in Figure 7. The output membership function is generated using inference blocks and the basic rules of FLC as shown in Table 1.  The fuzzy rule algorithm collects a number of fuzzy control rules in a particular order. This rule is used to control the system to meet the desired performance requirements and they are designed from a number of intelligent system control knowledge. The fuzzy inference of FLC using Mamdani method related to max-min composition. The fuzzy inference system in FLC consists of three parts: rule base, database, and reasoning mechanism [19]. The FLC method is performed by determining input variables Vdc (Vdc-error) and delta Vdc (ΔVdc-error), seven linguistic fuzzy sets, operation fuzzy block system (fuzzyfication, fuzzy rule base and defuzzification), Vdc-error and ΔVdc-error during fuzzification process, fuzzy rule base table, crisp value to determine loss p in defuzzification phase. The After the Vdc-error and ΔVdc-error are obtained, then two input membership functions are converted to linguistic variables and uses them as input functions for FLC. The output membership function is generated using inference blocks and the basic rules of FLC as shown in Table 1. Finally the defuzzification block operates to convert generated loss p output from linguistic to numerical variable again. Then it becomes input variable for current hysteresis controller to produce trigger signal on the IGBT circuit of UPQC shunt active filter to reduce source current and load voltage harmonics. While simultaneously, it also improve power quality of 3P3W system under six scenarios due to the integration of three RE sources to UPQC-BES system.

RESULTS AND ANALYSIS
The analysis of proposed model is investigated through determination of six disturbance scenarios i.e. (1) NL, (2) Unba-NL, (3) Dis-NL, (4) Sag-NL, (5) Swell-NL, and (6) Inter-NL. Each scenario of UPQC uses PI controller and FLC so total number of disturbance are 12 scenarios.By using Matlab/Simulink, the model is then executed according to the desired scenario to obtain curve of source voltage (Vs), load voltage (VL), compensation voltage (Vc), source current (Vs), load current (IL), and DC voltage DC link (Vdc). Then, THD value of source voltage, source current, load voltage, and load current in each phase as well as average THD value (Avg THD) are obtained base on the curves. THD in each phase is determined in one cycle started at t = 0.35 s. The results of average of source voltage, source current, load voltage, and load current of 3P3W system using UPQC-BES system supplied by three RE sources i.e. PV, wind, and PV-wind hybrid are presented in Table 2, 3, and 4. Next THD in each phase and average THD are showed in Table 5, 6 and 7. Table 2 shows UPQC-BES system supplied PV connected 3P3W system using PI and FLC, disturbance scenarios 1 to 5 produce an average load voltage above 307 V. While in scenario 6, FLC produces a higher average load voltage of 304.1 V than if using a PIof 286.7 V. If reviewed from average source current with PI, the highest and lowest average source currents are generated by disturbance scenarios 2 and 4 of 28.15  Table 3 shows UPQC-BES supplied by wind connected to 3P3W with PI and FLC, scenarios 1 to 5 is able to obtain a stable load voltage above 308 V. The difference is that in scenario 6, PI generates a load voltage of 274.8 V, otherwise if using FLC, load voltage increases to 306.4 V. If reviewed from source current using PI, the highest and lowest average source currents are resulted by scenarios 2 and 4 of 28.28 A and 7.417 A. Rather, if using FLC, the highest and lowest average source currents are achieved in scenario 2 and 6 of 28.82 A and 3,420 A. Table 4 shows UPQC-BES supplied PV-wind hybrid connected 3P3W using PI and FLC, scenarios 1 to 5 produce an average load voltage above 307 V. While in scenario 6, FLC generates an average load voltage 305.9 V higher than if using PI control of 283.9 V. If reviewed from average source current with PI, the highest and lowest average source currents are resulted by scenarios 2 and 4 of 28.21 A and 6,773 A. Otherwise if using FLC the highest and lowest average source currents are achieved in scenario 2 and 6 of 28.82 A and 3.640 A respectively.  Table 7. Harmonics of 3P3W System Using UPQC-BES System Supplied by PV-Wind Hybrid Table 5 shows that average THD of load voltage (VL) of UPQC-BES system supplied by PV in 3P3W system for scenarios 1 to 5 using PI control is within limits in IEEE 519. The highest and lowest average THD load voltages are achieved under scenario 6 and 2 as 25.25% and 2.34% respectively. PI controller is also able to mitigate average THD source voltage in scenario 6 from not accessible (NA) to 25.25% on the load side. The highest and lowest average THD of source current are achieved in scenario 6 and 2 as 230.82% and 2.41%. Table 5 also indicates that average THD of load voltage of UPQC system supplied by PV with BES using FLC in scenarios 1 to 5, has fulfilled limits in IEEE 519. The highest and lowest average THD of load voltage are achieved under scenario 6 and 2 of 10.27% and 2.38%. The use of FLC method is also able to reduce average THD on source voltage in scenario 6 from NA to 10.27% on load side. The highest and lowest average THD of source current are achieved in scenario 6 and 2 of 32.30% and 2.413%. Table 6 shows that average THD of load voltage of UPQC-BES system supplied by wind in 3P3W system for interference scenarios 1 to 5 using PI is within limits prescribed in IEEE 519. The highest and lowest average THD load voltages is achieved under scenario 6 and scenario 2 as 28.14% and 1.90% respectively. PI controller is also able to reduce average THD source voltage in scenario 6 from NA to 28.14% on the load side. The highest and lowest average THD of source current are achieved in scenario 6 and 2 as 186.95% and 2.24% respectively. Table 6 also shows that average THD of load voltage of UPQC-BES supplied by wind using FLC in scenarios 1 to 5, has fulfilled limits prescribed in IEEE 519. The highest and lowest average THD of load voltage are achieved under scenario 6 and 4of 8.33% and 1.90%. FLC method is also able to reduce average THD on source voltage in scenario 6 from NA to 7.33% on load side. The highest and lowest average THD source current are achieved in scenario 6 and 2 of 27.33% and 2.22%. Table 7 shows that average THD of load voltage (VL) of UPQC-BES system supplied by PV-wind hybrid in 3P3W system for scenarios 1 to 5 using PI is within limits in IEEE 519. The highest and lowest average THD load voltages are achieved under scenario 6 and 2 as 27.8% and 2.22% respectively. PI is also able to mitigate average THD source voltage in scenario 6 from NA to 27.8% on load side. The highest and lowest average THD of source current are achieved in scenario 6and 2 as 302.45% and 2.407% respectively. Table 7 also indicates that average THD of load voltage of UPQC-BES system supplied by PV-wind hybrid using FLC for scenarios 1 to 5, has fulfilled limits in IEEE 519. The highest and lowest average THD of load voltage are achieved under scenario 6 and 2 of 8.48% and 2.26%. FLC method is also able to reduce average THD on source voltage in scenario 6 from NA to 8.48% on load side. The highest and lowest average THD of source current are achieved in scenario 6and 2 of 28.53% and 2.446%. Overall for UPQC-BES systemsystem supplied by three RE sources in scenarios 1 to 5 using PI and FLC is able to improve average THD of source current better on average THD of load current. Figure 9 presents UPQC-BES system performance supplied by three RE sources using FLC in scenario 6. Figure 9 a(i) shows that in scenario 6, UPQC-BES system supplied by PV at t=0.2 s to t=0.5 s, average source voltage (VS) falls as 100% to 0.4062 V. During the disturbance, PV is able to generate power to UPQC DC link and injecting full average compensation voltage (VC) in Figure 9 a(iii) through injection transformer on series active filter so that average load voltage (VL) in Figure 9 a(ii) remains stable at 304.1 V. As long as fault period, although nominal of average source current (IS) in Figure 9 a(iv) drops to 3.804 A, combination of PV and BES is able to generate power, store excess energy of PV, and inject current into load through shunt active filter so that average load current (IL) in Figure 9 a(v) remains as 8.421 A. Figure 9 b(i) presents on UPQC-BES supplied by wind at t=0.2 s to t=0.5 s average source voltage (VS) drops 100% to 0.3828 V. During the disturbance, wind is able to generate power to UPQC DC link and injecting full average compensation voltage (VC) in Figure 9 b(iii) through injection transformer on series active filter so that average load voltage (VL) in Figure 9 b(ii) remains stable at 306.4 V. During fault period, although nominal of average source current (IS) falls to 3.420 A, combination of wind and BES is able to generate power, store excess energy of wind, and inject current into load through shunt active filter so that average load current (IL) in Figure 9 b(v) remains as 8.569 A. Figure 9 c(i) indicates on UPQC-BES supplied by PV-Wind Hybrid at t=0.2 s to t=0.5 s average source voltage (VS) drops 100% to 0.4175 V. During the disturbance, PV-wind hybrid is able to generate power to UPQC DC link and injecting full average compensation voltage (VC) in Figure 9 c(iii) through injection transformer on series active filter so that average load voltage (VL) in Figure 9 b(ii) remains stable at 305.9 V. As long as disturbance period, although nominal of average source current (IS) falls to 3.640 A, combination of PV-wind hybrid and BES is able to generate power, store excess energy of wind, and inject current into load through shunt active filter so that average load current (IL) in Figure 9 c(v) remains as 8.488 A. Figure 10 shows spectra of load voltage harmonics on phase A of UPQC-BES system supplied by three RE sources using FLC in scenario 6. Figure 11 shows performance of average THD of load voltage and source current on UPQC-BES system supplied by three RE sources. Figure 11(a) shows that in scenario 1 to 5, the implementation of FLC on UPQC-BES system supplied by three RE sources is able to obtain average THD of load voltage slightly better than PI controller and both method have already met the limit in IEEE 519. Further under scenario 6, FLC applied on UPQC-BES system supplied by three RE sources gives significantly better result of average THD of load voltage than PI controller. In six disturbance scenarios, both PI controller and FLC applied on UPQC-BES system supplied by three RE sources, PV is able to obtain the highest average THD of load voltages. Figure 11(b) shows that in disturbance scenario 1 to 5, implementation of FLC on UPQC-BES system supplied by three RE sources is able to obtain average THD of source current slightly better than PI controller. Furthermore under scenario 6, FLC applied on UPQC-BES system supplied by three RE sources gives significantly better result of average THD of source current than PI controller. Both PI controller and FLC on UPQC-BES system supplied by three RE sources in six disturbance scenarios, PV is able to obtain the highest average THD of source current.

CONCLUSION
Comparative performance analysis of UPQC-BES system supplied by three RE sources i.e. PV, wind, and PV-wind hybrid respectively using PI controller and FLC have been discussed. In disturbance scenario 1 to 5, implementation of FLC on UPQC-BES system supplied by three RE sources is able to obtain average THD of load voltage slightly better than PI and both methods have already met the limit in IEEE 519. Under scenario 6, FLC applied on UPQC-BES system supplied by three RE sources gives significantly better result average THD of load voltage than PI. In six disturbance scenarios, both PI and FLC applied on UPQC-BES system supplied by three RE sources, PV is able to obtain the highest average THD of load voltage. In interference scenario 1 to 5, FLC method on UPQC-BES system supplied by three RE sources is able to obtain average THD of source current slightly better than PI. Furthermore under scenario 6, FLC applied on UPQC-BES system supplied by three RE sources gives significantly better result of average THD of source current than PI. Both PI and FLC on UPQC-BES system supplied by three RE sources in six scenarios, PV is able to obtain the highest average THD of source current.