Management of Voltage Profile and Power LossMinimization in a Grid-Connected Microgrid System Using Fuzzy-Based STATCOM Controller

Department of Electrical Engineering, Pan African University Institute for Basic Science, Technology and Innovation, P.O. Box 62000-00200, Nairobi, Kenya Department of Electrical Engineering, Multimedia University, P.O. Box 30305, Nairobi, Kenya School of Electrical Engineering, Addis Ababa Institute of Technology, P.O. Box: 1176, Addis Ababa, Ethiopia School of Electrical Engineering, Jomo Kenyatta University of Agriculture and Technology, P.O. Box 62000-00200, Nairobi, Kenya


Introduction
Today's energy consumption has steadily increased, yet the investments in conventional power system and usage of fossil fuels have declined correspondingly. us, electrical energy systems worldwide are working under a stressed condition resulting in less reliability, poor power quality, frequent power outages, and high-energy price [1]. In addition, the conventional electrical grid system is a strictly hierarchical and a one-way pipeline. However, an increasing energy demand, rapid development of technological advancement, energy crisis, power outages, economic incentives, and societal awareness of environmental concern are leading research areas to renewable energy and distributed power network systems with high-power reliability, stability, quality, and security requirements for improvement of existing network and topology [2].
By applying several control techniques, the increased penetration of solar and wind micro sources at different locations changes the structure of the conventional power system into an interconnected two-way, high-efficiency, high-reliability, and a stable network system termed as microgrid [3]. So that microgrid is the ultimate solution for the current energy problem which is often fueled by the renewable energy resources.
Renewable energy sources, particularly PV and wind, have intermittent and unpredictable nature depending on weather and climatic changes. Along with this, the network system produces a high fluctuation in their outputs and integrating the microgrid system alone in distribution network is not entirely safe in meeting the demand for the load [4]. Due to the fluctuations, instability, poor voltage regulation, less reliability, and degraded efficiency the power system has experienced [5], maintaining the system voltage profile with fluctuating micro sources is a big challenge.
Implementing reactive power compensation devices is an embryonic need for steady-state operation of the system. Reactive power causes a negative impact on effectiveness and capacity of the power system and involves energy losses and high costs as well as rising of power quality problems [6]. To solve the power quality issues, fixed capacitor banks and synchronous condensers have been used for several years [7]. However, such compensation of reactive power has some drawbacks that include high losses, slow response time, rigidity, high cost, and large dimensions.
In order to tackle the power system operational challenges related to monitor, operation, and control, Flexible Alternating Current Transmission System (FACTS) devices were introduced and established in the late 1980s [8]. However, electronics topologies are required for the accurate and potential operation of the FACTS devices to increase the system security, reliability, quality, and performance [9]. e most commonly used converter in FACTS family due to its fastest response in reactive power compensation is the static synchronous compensator (STATCOM). It is a shunt connected reactive compensation device. Using STATCOM, power quality problems such as voltage fluctuation, voltage unbalance, voltage sag, poor power factor, and unbalanced load are compensated [10].
By increasing the transmission lines capacity, STAT-COM eliminates the need to build new lines. Various control strategies are used to allow operation of the power system within the operating limits required. e most commonly utilized controllers of STATCOM are Proportional-Integral (PI), Proportional-Integral-Derivative (PID), fuzzy logic controller (FLC), and Artificial Neural Networks-(ANN-) based controllers [11]. In the commercial STATCOM controller, PI type controllers are consolidated and adequate due to their satisfactory dynamic responses. Subsequently, the flow research is centered around acquiring an increasingly hearty and versatile activity of STATCOM for varieties of the crossover power system.
In recent years, various researches have been presented on STATCOM. Research on STATCOM for Reactive Power Flow Control in microgrid system has been presented. But it only worked for current control of the microgrid integrated distribution system and did not deal with voltage fluctuation control [12]. e penetration of microgrid system to the radial distribution network to minimize the power loss has been reported in [13]. But the integrated wind and PV micro sources were not concerned about voltage profile improvement and mitigating disturbances using FACTS controllers.
Voltage control by means of reactive power support for a hybrid power system network has been proposed in [14]. But the work did not utilize STATCOM to diminish the voltage fluctuation with the bundle side converter.
Reactive power control and power factor improvement using STATCOM, SVC, and UPFC alternatively for wind energy based microgrid integration to the network have been reported in [15]. However, the work did not use FACTS controllers to reduce voltage fluctuation caused by the random nature of wind and solar energy for improving power quality and reliability. e literature review shows that there is very little research on STATCOM controller-based voltage fluctuations and loss minimizations caused by solar-wind based grid connected microgrid systems. With the growing installation of PV and wind based microgrid system, the FACTS controllers still need enhancements by tuning of controller's gain and broad investigations have to be made under various operating conditions.
In the STATCOM controller, the controller gains were usually designed based on a linearized system equation for the system under a nominal load condition [10]. ese controller gains stayed fixed in a daily activity of the STATCOM. Since the load changes with time in daily operation of the STATCOM, the network grid, the closed loop eigenvalues, and the dynamic performance will change. In this way, to keep up great unique reactions, the controller should be adjusted depending on system stacking conditions.
Artificial Neural Networks (ANNs) have been proposed to adapt to the controller gains of the STATCOM [16][17][18]. But they require offline training which is usually timeconsuming. In addition, they need no inference signal and evaluation function in real-time applications.
In this study, the objective is to increase the reliable operating limit of the microgrid integrated power system network by incorporating fuzzy logic based STATCOM controller for reactive power compensation. Also, it is aimed to reduce the voltage fluctuation and power loss occurring due to the varying nature of renewable energy sources.
To the best of the authors' knowledge, a study dealing with the grid connected microgrid system voltage fluctuation improvement and power loss minimization using fuzzy logic based STATCOM controllers has not been published.
is paper is organized as follows. Section 2 presents the methodology of the research, Section 3 presents the simulation results and discussions, Section 4 gives the summarized results, and Section 5 discusses the conclusion of the study.

Methodology
e objective of this study is to build a single line diagram of the IEEE 30 standard bus system model for conducting power flow analysis using MATLAB/PSAT. Furthermore, the paper aims to find out the improved voltage profile, reduced loss, and increased power system performance by integrating microgrid and FACTS devices to the main grid.

Wind Power System
Modelling. Today, the most preferred generators for wind energy conversion systems are doubly fed induction generator (DFIG) [19]. It is the ideal generator used in wind energy systems with adjustable speed. e term "doubly fed" means the stator voltage is produced from the three-phase power supply and the buck-to-buck converter produces the rotor voltage. For either the normal or fault condition, DFIG is realized by regulating the buck-to-buck converters using different controllers [20]. e exact equivalent circuit of the system has been presented in [5].
DFIG has two progressive converters as rotor side control and grid side control as realized in [17]. In the grid side control circuit of the wind, Vbus (grid voltage), Q (reactive power component), and three-phase current component (Ia, Ib, and Ic) are taken in the grid side control circuit of the wind and Vbus and Id and Iq are controlled. With space vector changes, voltage components (Vd and Vq) and current segments (Iq and Id) are changed to threephase signals. e angles are determined with PLL (phaselocked loop) by utilizing voltage esteems and utilized in space vector transformation. e aerodynamic model of the power of the rotor as a function of air flow on the blades has been shown in [18] and the mechanical power extracted (Pm) from a wind turbine is given in the following equation [21]: where Cp is a power coefficient, which varies with tip speed ratio of wind turbine (λ), pitch angle (β), and air density (ρ �1.225 kg/m 3 ).

Photovoltaic System
Modelling. Photovoltaic (PV) cells can convert photons of light into electrical energy. PV cells are connected in parallel to increase the current and in series to increase voltage. A photovoltaic cell for its forward-biased characteristics using a one-diode model is detailed in [22,23]. e equivalent circuit of a one-diode PV cell consisting of photo lights (I ph ), series (R s ), and shunt (R sh ) resistors is modelled in [23,24] and the current flow of PV system can be determined in the following equation: where k is Boltzmann constant (1.38 × 10 −23 J/K), T is the absolute temperature (K), q is electron charge (1.6 × 10 −19 C), r is linearity factor, V pv is the output voltage of the solar cell, and Io shows the dark saturation current value. e mathematical model of the photovoltaic system with perturb and observe (P&O) algorithm used for the maximum power point tracking (MPPT) is presented in [25].

Power Flow Analysis.
e current and voltage measurements of the network in each bus and active and reactive power flow in each line are analyzed using power flow analysis method. Newton-Raphson (N.R), Gauss-Seidel (G.S), and fast-decoupled (FD) power flow methods are the most widely used strategies of power flow analysis. N.R is the most preferred because of its quadratic convergence, more computation time per iteration, and being efficient for large networks [26,27].

Power Flow in STATCOM Controller.
Static synchronous compensator (STATCOM) is a parallel-connected DC to AC converter. If it is overexcited, it acts as a capacitor which provides reactive power and acts as an inductor when underexcited and absorbs reactive power. Figure 1 shows the modified equivalent circuit of STATCOM connected to bus A [22].
Based on Figure 1, the active and reactive power equations when STATCOM is connected are calculated as follows [28]:

Control of Strategy of STATCOM.
e role of the control system is to increase or decrease the DC voltage of the capacitor, so that the produced AC voltage has the appropriate amplitude for the reactive power needed. e control system must also keep the voltage produced by the AC in phase with the system voltage in the STATCOM link bus to either produce or absorb reactive power. PLL (phase-locked loop) synchronizes the system voltage and provides a reference angle to the measuring device. e STATCOM voltage and current positive-sequence elements are measured, using phase-to-dq transformation and a running-window average. e voltage regulator block (outer loop) measures the reactive current reference Iqref used by the current regulator block (inner loop) from the calculated voltage (Vmeas) and the reference voltage (Vref ). e current regulator output is the α angle which is the inverter voltage's phase change in relation to device voltage. Firing Pulses Generator generates pulses from the PLL output (w.t) and current regulator output (α angle) for the inverters of STATCOM. e block diagram of the proposed STATCOM control strategy is shown in Figure 2.

Fuzzy-PI Controller Design for STATCOM Controller.
Linear PI controllers are entrenched in traditional control system and it is regularly used as a benchmark against Journal of Electrical and Computer Engineering different kinds of controllers [29]. Since PI controller is linear with fixed parameter, it is not usually suitable and robust for strongly nonlinear systems.
Hence, challenges urged the creation of an effective technique to solve such problems. One of these methods is adaptive tuning of the PI controller which is used to adjust the gain of integral controller at any disturbance that leads to an adjustment in device condition using fuzzy logic control. Fuzzy logic controller (FLC) is a versatile controller and suits complex environments. Like Boolean or crisp logic, fuzzy logic tackles vagueness and ambiguity. Fuzzy logic is a rulebased operation, which is simple to design for any number of inputs and outputs [30].
FLC's structure consists of mainly five parts, namely, knowledge base, fuzzification, inference, rule base, and defuzzification, as shown in Figure 3.
In fuzzification, crisp values of input are converted into linguistic values, in compatibility with the fuzzy set. e high quality of fuzzification approach is dependent on the interference signal [31].
Rule base is basically the control methodology of the system. It is for the most part acquired from master information or heuristic as a lot of If-en principles. e knowledge base comprises a database of the plant and attendant control goal. It provides all the essential descriptions for the fuzzification process.
e inference mechanism is also called fuzzy model which applies fuzzy reason to rule base to get a proper output. e most commonly used fuzzy inference mechanisms are Takagi   while Takagi-Sugeno is suitable for fast-changing dynamic systems. In this work, due to its intuitive, widespread acceptance and being well suited to human input, Mamdani fuzzy inference system is used.
e defuzzification converts the range of output variables into corresponding universe system and yields a non-fuzzycontrol action from an inferred fuzzy process which can be transformed into crisp values. e structure of the fuzzy-PI controller used for STATCOM controller simulation is shown Figure 4. It has two inputs and one output. Inputs of the controller are error (e) of measured and reference voltage and change of error (de).
(1) PI Controller Structure. e PI controller used in this study has the following mathematical expression: where u is the control output, k i and k p are the integral and proportional gains, and e is the error input to the controller.
(2) Fuzzy Logic Control Structure. As shown in Figure 4, the fuzzy logic controller controls the peak voltage in the reactive control loop of STATCOM. e error (e) and change of error (de) are calculated and regulated, respectively. e regulated values of "e" and "de" are given to the fuzzy logic controller as an input. e control output of fuzzy is multiplied with a PI controller output gain factor (Kp) to get proportional derivative and with another gain (Ki) of PI controller again multiplied and integrated to get proportional-integral.
en, both values are multiplied to get a combined proportional-integral-derivative action from fuzzy logic controller (FLC).
In this study, we preferred triangular membership function for both input and output fuzzy sets. e membership function of error (e) and change of error (de) chose five fuzzy sets defined as Positive Big (PB), Positive Small (PS), Zero (Z), Negative Small (NS), and Negative Big (NB) and two fuzzy sets for output named as Positive Big (PB) and Zero (Z) were used as shown in Figures 5(a)-5(c), respectively. e fuzzy-PI controller rule base and surface viewers are illustrated in Table 1 and Figure 6. e simulation study is done for changing of Iqref from 0 A to +200 A at 0.5 sec., from +200 A to −200 at 0.8 sec., and from −200 A to 0 A at 1.1 sec. Performance of fuzzy-PI controlled STATCOM is evaluated for changes in Iqref. e following are considered as preconditions for normal operation of the proposed system.
(a) At the moment of disturbance, when the voltage magnitude at bus is far towards positive from reference value, the error value is also increased. If the error value is more than +0.025, the change of integral gain must be large for damped in voltage magnitude. (b) At the moment of disturbance, when the voltage magnitude at bus is far towards negative from reference value, the error value is also increased. If the error value is less than −0.025, the change of integral gain must be large for damped voltage magnitude.   Journal of Electrical and Computer Engineering (c) e error value is limited within +0.025 > e > −0.025 when disturbance is vanished. Moreover, the change of integral gain must be zero and the output of fuzzy-PI controller is the fixed value of integral gain.

Selecting the IEEE 30-Bus System.
is work considers the IEEE 30-bus system. e bus, line, and transformer data of the IEEE 30-bus standard system are taken from [32]. e network consists of 7 generators, 37 lines, and 6 transformers, while loads are interconnected to 21 buses. e rated base value 100 MVA is taken for power and base voltages of 69 kV, 13.8 kV, and 18 kV are used in three different regions. Bus 1 is considered as a slack bus. All units are in per-unit values as per bus and line parameters are in p.u.

Software Used.
e open-source MATLAB interfaced freely downloadable system called PSAT 2.1.10 (Power system Stability Analysis Toolbox) software is used to model the systems. It is a graphical user interface (GUI) and Simulink editor toolbox used for power system model, control, analysis, and operation. PSATcan conduct simulations of continuation power flow (CPF), small-signal stability analysis (SSSA), power flow (PF), and time-domain simulation (TDS).

Summarized Flow Chart.
e IEEE 30-bus system and microgrid were modelled using MATLAB/PSAT software for integration system.    the buses were evaluated. From the results, we observed that bus 30 has the lowest voltage magnitude of 0.88341569 p.u. as shown in Table 1. So it was considered as the weakest bus of the IEEE 30-bus system. en, the modelled microgrid was integrated into the weakest bus, that is, bus 30, and continuation power flow (CPF) was again applied to determine the STATCOM controller placing and the weakest bus was found to also be bus 30. Eventually, the continuation power flow results were evaluated for the introduction of microgrid and FACTS controllers into the network. Figure 7 shows the flow chart of the algorithm.

Simulation of Base Case.
e simulation was conducted on the IEEE 30-bus system and the performance was assessed by applying power flow on the system. Figure 8 illustrates the single line diagram of the IEEE 30-bus system model using PSAT Simulink. e load flow simulation is performed after the PSAT model is loaded directly to its main N-R power flow. N-R iterative approach approximates the set of nonlinear equations simultaneously to a set of linear equations using Taylor expansion. By doing so, bus  Journal of Electrical and Computer Engineering voltage, voltage angle, and active and reactive power flow are computed using an iterative approach of the N-R simulation process. After running the power flow, the voltage magnitude, the power, and line flow were obtained and checked. Accordingly, the lowest voltage is 0.883416 p.u., which is that of bus 30. en, it is chosen as the location for microgrid integration.

Simulation of IEEE 30-Bus System with Microgrid.
e microgrid, which is connected to the IEEE 30-bus system, consists of a 6 MW wind and 7.5 MW PV energy resources as optimally modelled in [33]. e photovoltaic system has to supply its own load from its bus and the wind energy source has to supply its own load from its bus as well. When they were brought to a single bus together with their buses and loads, they formed a microgrid system having three buses as shown in Figure 9. After that, the microgrid was integrated into the weakest bus of IEEE 30-bus system as indicated above. erefore, the overall microgrid integrated IEEE 30-bus standard system would have 33 buses, 24 loads, 39 lines, 7 generators, and 6 transformers. Because of the randomness nature of the solar and wind power resources in the microgrid system, the generated power increased or decreased depending on the level of solar irradiation and wind speed. e integration of the microgrid system into the network is, therefore, an exceptionally challenging task with power quality issues such as voltage fluctuations, power factor reduction, and high-power losses. Hence, adding STAT-COM controller to the system is a significant solution to solve such problems. e lowest voltage is found in bus 30 of the IEEE 30-bus system including the microgrid buses as described above.
us, bus 30 with a magnitude of 0.64993 p.u. is the weakest and most collapsed bus, which can be an appropriate location of STATCOM.
Because of its advantages mentioned in [27], STATCOM controller is selectively installed in parallel to bus 30 to improve the voltage profile of the system by compensating reactive power.
Moreover, the fluctuation of voltage and reduction of power angle due to the integration of microgrid cause power loss, which lowers the performance of the power system.

Simulation Results of IEEE 30-Bus System including
Microgrid and STATCOM. Figure 10 below shows the single line diagram of the IEEE 30-bus system with microgrid and STATCOM integrated at bus 30 in parallel. e results showed that the voltage profile is increased compared to both the base case and that with only microgrid-integrated systems.  Rotor resistance (Rr) 0.01 p.u. 7 Rotor reactance (Xr) 0.08 p.u. 8 Magnetization reactance (Xm) 3.00 p.u. 9 Pitch control gain (Kp) 10 p.u. 10 Time constant (Tp)  3 sec  11 Voltage control gain (Kv) 10 p.u. respectively (see Table 2). ese values elaborate specifically that STATCOM has a capability to improve the power flow capacity and voltage profile in the microgrid-integrated IEEE 30-bus system. e details of wind power, photovoltaic power, and STATCOM controller parameters and values are given in Appendix A, Table 4, Appendix B, Table 5, and Appendix C, Tables 6 and 7, respectively.

Summarized Results
(a) e per-unit value of voltage magnitude is increased after incorporating STATCOM controller in the interconnected microgrid system. However, without the STATCOM controller, the per-unit voltage magnitude is fluctuating/decreased in a microgridintegrated network system. is is because of the randomness nature of wind and solar irradiation. e per-unit voltage comparison of the base case with microgrid and base case with both microgrid and STATCOM is represented clearly in Figure 11 below. Table 1 shows the per-unit magnitude of voltage profile for all the concerned test systems. On the Other hand, the real power loss for the base case is 0.127933 p.u. and it increased to 0.230291 p.u (see Table 3) using microgrid integration into the base case. is is due to the intermittent nature of renewable energy sources resulting in voltage fluctuation, which can increase power loss. By introducing STATCOM controller, the real power loss is decreased from 0.397967 p.u. to 0.35933 p.u (see Table 2). erefore, we can summarize that the incorporation of microgrid systems with STATCOM controllers is very essential to minimize power losses and improve the system's power capacity and performance. (b) e wave forms of DC link capacitor voltage, the perunit voltage measurement, and reactive power using proportional-integral (PI) control and fuzzy-PI controller for STATCOM are shown in Figures 12-14, respectively. From Figure 12, the PI controller output is compared with the output of fuzzy-PI controller in Figures 12(a) and 12(b), respectively. e DC link voltage is fluctuating extremely until 0.35 seconds in PI controller. is variation is reduced to 0.25 seconds by presenting fuzzy-PI controller. So, fuzzy-PI based controller of STATCOM is effective in reducing fluctuation, settling time, and damping the oscillations quickly. We can again notice that fuzzy-PI controller gives smaller overshoot in response and settling time. From Figure 13, the per-unit voltage magnitude is 1.03 for PI controller, whereas it is 1.04 for fuzzy-PI controller. It is also observed that the PI controller is taking more time to retort to the original stability position, whereas fuzzy-PI controller stabilizes instantly and there are no more transient oscillations.
e peak overshoot values for reactive power are 65 Mvar and 110 Mvar for PI and fuzzy-PI controllers, respectively (see Figure 14). Due to the high values of gain in PI, it causes peak overshoot waveforms at initial condition in fuzzy-PI controllers; however, the system is settled at 0.1 seconds, whereas it is settled at 0.35 seconds for PI controller alone.
Hence, from the above figures, we can conclude that the performance of fuzzy logic with proportional-integral (fuzzy-PI) controller for STATCOM device gives low peak overshoot and quick settling time. In addition, the proposed controller is effective in settling the final value and in damping the oscillations quickly. us, fuzzy-PI controller is proved to give improved performance compared to PI controller in STATCOM applications.

Conclusion
e modelling of a 6 MW DFIG wind and 7.5 MW photovoltaic based microgrid generation system was integrated and configured into the weak bus 30 in the IEEE 30-bus test system using MATLAB/PSAT environment. e power flow using N.R method was performed for the base case and with microgrid-integrated system with STATCOM controller. e microgrid-integrated system reduced the high voltage fluctuation and high-power losses. e parallel connection of the controller in the integrated system improved reactive power compensation and enhance the voltage profiles of the buses as well as minimizing line Gain and time constant of the current control (Kr, Tp) 50 p.u., 0.1 sec 5 Max and min current 1.2 p.u., 0.8 p.u. Active power gain 200 7 Reactive power gain 800 losses. Additionally, fuzzy-PI controller gives a good result compared to PI controller alone. Generally, this work demonstrates that the integration of microgrid with fuzzy-PI based STATCOM controller has played a significant role in increasing the system capacity while minimizing voltage fluctuation and line losses.