Artificial ecosystem optimized neural network controlled unified power quality conditioner for microgrid application
Energy Informatics volume 6, Article number: 45 (2023)
Unified power quality conditioner is chiefly employed to offer power quality improvement, especially in grid connected mode of operation in microgrid applications. This article proposes an artificial ecosystem optimized neural network for control of photovoltaic system and battery powered UPQC for microgrid applications. The intelligent routine implemented by the proposed controller helps tune parameters such as the error between load voltage references and measured load voltage signals so that the optimal performance of the system can be reached as its exploratory and exploitation capabilities are leveraged in controller design. A prototype of a three-phase system with a dually powered conditioner is tested and validated in MATLAB-Simulink environment in a variety of dynamic scenarios that are commonly present in a contemporary distribution network, such as grid voltage changes, grid inaccessibility, variation in photovoltaic power output, and nonlinear load. It is shown that the proposed controller, being aware of the instantaneous values of grid voltages, was able to adequately compensate in magnitude and phase under all dynamic scenarios to maintain the load voltage constant at the nominal value and sinusoidal. When the system switches automatically from grid-connected mode to islanded mode due to a grid fault, it was observed that the controller prioritizes delivering uninterrupted power to critical loads and enables fast discharge from the battery. The total harmonic distortion percentages of grid currents and load voltages are found to be within the limits as per IEEE-519 standards.
In recent times, there has been considerable interest among government departments, scientists, building owners, and the public in renewable energy sources and their deployment and installation. This is mainly due to the optimism about the adoption of sustainable technologies, the general feeling of good duty towards the planet, and the high visibility of merits. Among the several renewable energy technologies, photovoltaic (PV) systems score above the rest due to their translation of energy-saving potential into realistic outcomes and the easy availability of sunlight as a resource. The declining cost of solar power leaves more room for investments in the pairing of solar generation with electricity storage to address the variation challenges for grid integration (Lua et al. 2021). But the unpredictable and stochastic nature of solar energy brings forth an array of challenges to the planning, management, and operation of power grid systems, as the fluctuation in the output can lead to cost increases, difficulty in grid integration, and issues with control and reliability of the system (Karthika and Gomathi 2022). Battery storage systems can be suitably employed to enhance power quality, stability, and reliability and to provide features such as voltage sag compensation and frequency regulation. They are primarily used to store the energy over the medium term to support the grid in times of peak demand, thereby reducing cost of energy and help deferring infrastructure upgrade.
Photovoltaic generation, together with localized loads, batteries and corresponding control circuits, constitutes a DC microgrid. Microgrids can be suitably controlled to operate either in grid-connected mode or standalone mode and can seamlessly switch between the two modes. In a defined area, these systems could help facilitate meeting an additional power demand or maintaining regular supply. Standalone mode is also referred to by many terms: autonomous, self-reliant, isolated, or islanded mode. For the sake of clarity and uniformity, we will use the term—islanded mode—throughout this paper. If the code permits, battery units can support islanded operation of the grid, in the event of a power outage. During islanded mode, both real and reactive power is generated within the microgrids, and the battery systems offer stability and reliability to local loads.
Shunt and series compensation are traditionally used for improving power quality in power grid network. Shunt-connected topologies typically improve all things related to current, such as power factor, power, and current harmonics, while series compensation aids in mitigating voltage harmonics, sag, swell, and load voltage fluctuations in Point of Common Coupling (PCC). Nonlinear loads connected to the PCC might introduce harmonic and power quality issues in the grid. A series active compensator, typically, is leveraged to keep the load profile voltage constant at one per unit. Unified power quality conditioner (UPQC) combines the advantages of series compensation with shunt-connected topologies to offer power quality improvement, especially in grid-connected mode of operation. The UPQC device combines a shunt-active filter together with a series-active filter in a back-to-back configuration to simultaneously compensate the supply voltage and the load current (Monteiro et al. 2003; Devi et al. 2020). The main purpose of a UPQC is to compensate for voltage imbalance, reactive power, negative-sequence current, and harmonics (Gu et al. 2002; Kinhal et al. 2011). When dealing with microgrid difficulties such as fluctuating power supply and demand, an energy management system (EMS) is an essential ingredient for ensuring the grid's safe, cost-effective, and methodical functioning (Jitender and Prasenjit 2020; Nikhita and Seethalekshmi 2021; Senthil-Kumar et al. 2015; Vinod 2012). Intelligent control units or an energy management system (EMS) are responsible for its secure, economical, and systematic operation while addressing microgrid challenges, such as uncertainty in power generation and power demand (Md et al. 2019).
Hence, this paper proposes an Artificial Eco system Optimized Neural Network (AEONN) controller for PV and battery-powered UPQC for microgrid applications, and the system’s capability to be able to deal with dynamic scenarios such as grid voltage changes, grid inaccessibility, variation in photovoltaic power output, and nonlinear load is assessed and validated. As we will see in the next section, though several works have used nature-inspired optimization techniques in DC microgrids, none involved UPQC system. We have adopted the control methodology explained in Sachin and Bhim (2021) for our design, but instead of the traditional PI controller, we have employed artificial ecosystem optimization in shunt and series compensation schemes to leverage its exploratory and exploitation capabilities in controller design. The following are the salient features of the system presented in this work:
Integration of the production of renewable energy with the improvement of power quality at the supply and load sides.
Maintaining a constant load voltage profile with a nearly sinusoidal grid current.
Adaptability to changes in irradiance and PV system output
Seamless, automatic transfer between standalone and grid-tied modes. This is highly beneficial when critical loads such as hospitals, data centers, and factories are on the network.
Control of UPQC using artificial eco system optimized neural network for ensuring effective functioning of the system for above-listed objectives.
The rest of the paper is organized as follows: the next section provides an overview of the literature on the related topics. Section Methodology provides a brief background on the controller design of the subsystems, such as shunt and series active compensators and bidirectional converter. Section AEONN control describes the methodology of the proposed controller, while section Results presents the significant results and corresponding discussion, and section Conclusion draws the conclusions.
There are several studies in the literature that have reported linear control of microgrids, but the system exhibits nonlinear behavior due to dynamic scenarios present on the grid side as well as the load side. Linear control strategies are typically implemented with several feedback loops by proportional-integral (PI) controllers, while proportional-integral-derivative (PID) controllers use high-pass filters to implement the derivative components.
Liping et al. (2009) compared PI, PID, and fuzzy controllers based on design methodology, implementation issues, and experimentally measured performance. A major drawback of the scheme, however, is that the PI controller increases the dimension of the closed-loop system (Chimaobi and Alexis 2010). Another drawback is that the constant power loads’ current and voltage experience overshoots during transients that may be undesirable in some applications (Chimaobi and Alexis 2010). Grant and Philip (2006), Axel et al. (2009), and Julian et al. (2007) explored a nonlinear control approach called boundary control to achieve more robustness and better transient performance at the cost of complexity in implementation. Vahid et al. (2008) attempted to tackle the issue of constant power load using a combination of linear and nonlinear control approaches. Sana et al. (2023) opined that grid integration with the distribution network required hierarchical control structures for maintaining stable operation and control, which is otherwise challenging due to several technical challenges related to the large-scale integration of inverter-based resources.
In recent times, advancements in nonlinear control approaches have given rise to more sophistication in microgrid control. These modern control techniques offer a valuable alternative to the conventional control techniques mentioned above in terms of improvement in control performance. Artificial Intelligence (AI) techniques aid in the modeling of controllers in microgrids when the number, type, and nature of renewable energy sources and consumer participation are increasing by the day, which in turn leads to more complexity and uncertainty.
Among the AI techniques, several works cited the use of fuzzy and neural network-based strategies. While the fuzzy technique addresses the problems that arise due to uncertainty in the environment by embedding inference procedures that are akin to human reasoning, controllers implemented on neural network models leverage advantages such as supervised learning to tackle nonlinearity and to deal with Maximum Power Point Tracking (MPPT), voltage and frequency control, and load sharing. Intelligent controllers are notably suitable for these types of applications because they can adapt to uncertainties and be used when the exact model of a system is not available or is prone to changes (Tania et al. 2020). Navid et al. (2019) proposed an adaptive controller in a fuzzy-based model and applied it to a DC microgrid test bed that fed one constant power load, while Hiroaki et al. (2013) presented a new voltage control that combines fuzzy control with gain-scheduling techniques to accomplish both power sharing and energy management. Ahmed et al. (2022) presented an optimal adaptive fuzzy management strategy designed for a DC microgrid based on a fuel cell system, photovoltaic array, and battery bank.
Artificial neural networks (ANN) have certain characteristics that make them advantageous in the development of controllers in the different levels of control that microgrids must include to be economic, efficient, and able to satisfy the energy power quality and quantity requirements (Tania et al. 2020). ANN has been used for current and voltage control in microgrids, most popularly in tuning the parameters of the PI controller. Chettibi and Mellit (2018) presented a controller for MPPT tracking by implementing a neural network optimization for voltage reference for the PI controller. Marko et al. (2013) attempted to solve an optimization problem using neural networks to reduce energy imbalances between electric energy production and consumption. Michael et al. (2016) presented a neural network model to predict voltage in an environment with high penetration of renewable energy sources, using the well-known Levenberg–Marquardt algorithm for achieving the learning.
A few nature-inspired optimization techniques have been cited in the literature for DC microgrid control. Shehab et al. (2019) presented a fuzzy logic controller that was optimized using an artificial bee colony technique to increase the system’s energy-saving efficiency, in which the microgrid consisted of solar PV, wind turbine, battery energy storage and fuel cell. Basma et al. (2022) used an African vulture optimization algorithm to demonstrate the stability of a DC bus through voltage control for a DC-islanded microgrid. Farid et al. (2017) discussed the comparison of flower pollination algorithm, modified particle swarm optimization, and perturb and observe methods in MPPT-coupled inductor sepic converters on a DC microgrid-isolated system, while Hany and Mahmoud (2018) discussed a water cycle algorithm for efficient operation of microgrid. Sathish et al. (2022) introduced an artificial gorilla troop optimizer for use in artificial neural networks that manage energy consumption in DC-AC hybrid distribution networks.
None of the above works that have reported the use of intelligent control and nature-inspired techniques have dealt with the UPQC system, and we identified this as the research gap to explore in our work. Of those works that dealt with UPQC technologies, different control design methods have been discussed. Palanisamy et al. (2013) proposed a method of power angle control via the use of UPQC for interconnecting PV modules with the grid, while Victor et al. (2018) built a UPQC with a transformer-free model. Tey et al. (2002) detailed their study on the development of a UPQC for the correction of harmonics in a low AC voltage system with control provided by an ANN, and particularly, the inverter operation was managed by means of the Levenberg–Marquardt Back Propagation (LMBP) method. Hina et al. (2022) focused their study on the controller implementation for a UPQC that was part of a microgrid in which ANN provided the basis for the controller. In both of these works, artificial neural network control was used for overall control, not particularly for compensation. The use of ANN for overall control with the Levenberg–Marquardt algorithm as its core has some disadvantages—it needs a large amount of input and output data pairs for training the neural network, and this algorithm is trapped into the local minima points for efficient convergence. Hence, the AEONN controller is proposed in this paper to leverage its exploratory and exploitation capabilities in optimization and compensation and this controller utilizes the Artificial Ecosystem-based Optimization (AEO) algorithm which belongs to a class of meta-heuristic algorithms that were inspired by nature, and originally introduced by Weiguo et al. (2020).
Sachin and Bhim (2021) reported a fascinating study on control methodology for shunt and series compensators, and we have adopted this control methodology explained in Sachin and Bhim (2021) for our design, but instead of the traditional PI controller, we have employed artificial ecosystem optimization in shunt and series compensation schemes. The PI controller increases the dimension of the closed-loop system and increases search space. Traditional PI controller can compensate for a part of harmonic, which is not too fruitful (Sen et al. 2018). Also, the appropriate selection of initial gains of PI controller, as done in Sachin and Bhim (2021) requires intuition and knowledge of the process, which can be eliminated by the proposed control design technique. When substituted for a traditional PI controller, the intelligent routine implemented by the AEONN controller helps tune the parameters so that the optimal performance of the system can be reached when PV sources and battery systems are involved. It is shown that this would enhance the voltage profile and current harmonics, and the power fed to nonlinear loads can be optimized. This efficient and reliable algorithm makes it possible to achieve a seamless transfer of power between islanded and grid-connected modes, which is otherwise a challenge with UPQC topologies. This feature is highly beneficial when critical loads, such as hospitals, factories, and data centers, are on the distribution network.
In this work, simulation-based experimentation is used to examine the system's performance in full detail. The system's performance is assessed under a variety of dynamic scenarios that are commonly present in a contemporary distribution network, such as grid voltage changes, automated changeover, grid inaccessibility, variation in PV power output, and nonlinear load. When the system switches automatically from grid-connected mode to standalone mode in the event of a grid fault or failure, the behavior of the system is also assessed.
In this section, the basic control methodology for the battery and photovoltaic-powered UPQC for microgrid application is detailed. The overall circuit diagram with its three chief subsystems—the bidirectional converter, series, and shunt compensators—is shown in Fig. 1. The point of common coupling is via the switches SW1, SW2, and SW3, using which the microgrid is connected to the three-phase system. Under normal operations, the system is connected to the grid via these switches. During any grid disruption event, the system will be operated via the UPQC operating in its islanded mode. The dually powered UPQC system includes a battery and a solar PV array integrated with the series and shunt compensators in conjunction with the DC link between them. The voltage source converters that make up these active compensators are linked to the supply via the interfacing inductors. To reduce the harmonics generated by the high-frequency switching of these devices, ripple filters are installed, as shown in the circuit diagram in Fig. 1.
Firstly, the shunt compensator’s control logic is described in the following paragraph, followed by that of the series compensator and the bidirectional converter, respectively. The shunt compensator of the dual-powered UPQC system operates in two modes, depending on whether it is operated in the grid-connected mode or islanded mode. When it is connected in the grid connected mode under normal operation, the compensator acts as a current regulator and while it is in the islanded mode under any grid disturbances, it acts as the voltage regulator. The fundamental purpose of the shunt compensator under islanded operation is to maintain a constant load voltage profile despite irradiance and load changes. The detailed control logic diagram of these modes is shown in Fig. 2.
In this work, we assume that the signal that distinguishes between the two modes is known by the symbol C_sig. When C_sig equals zero, the system operates in its islanded or standalone mode, whereas when C_sig equals one, the system is in its grid-connected mode. During grid-connected mode, the shunt compensator compensates for the load current and provides the PV electricity to the normal working grid. Whenever there is a load imbalance or little irradiance fluctuation, the shunt compensator is set up to provide power to the grid, and the battery bank provides the required extra power. In this way, the network’s stability is improved by pumping active power into the grid. As seen in Fig. 2, the gate pulses to control the Shunt Voltage Source Converter (SH-VSC) are generated using the reference currents received. When the system is operating in an isolated or islanded mode, the SH-VSC is structured to maintain a constant load voltage, regardless of fluctuations in the load currents and the solar irradiances. Here, a three-phase sine generator is used to generate the reference load voltages, which are then related to the measured load voltages for processing by the optimized AEONN controller to obtain the load reference current. Therefore, when the system is in standalone mode, the reference load currents are compared with the measured load currents, ahead of the generation of gate pulses for the SH-VSC. Depending upon the control logic signal, based on whether the system is operating in islanded or grid-linked mode, the corresponding gate pulses are delivered to the SH-VSC. As shown in Fig. 3, using the phase voltages, the voltages at the point of common coupling are obtained as follows:
The control logic for the decision signal C_sig, is depicted in Fig. 4. This signal, C_sig, is used to distinguish between grid-connected mode of operation and islanded mode and enables the switches to connect during the former and detach from the grid during the latter. The main criteria that decide the output of the decision signal C_sig are the phase differences, voltage magnitude differences, and frequency differences between the load and PCC voltages, along with the operating mode. As seen from Fig. 4, some conditions in the control logic include checking whether the phase difference and the frequency difference between the load and PCC voltages are less than 3° and 0.3 Hz, respectively. The same is true if the voltage magnitude difference is under 0.05 p.u. or above 0.3 p.u. All the criteria outputs are sent to two AND logic blocks, with one obtaining the output corresponding to standalone mode, that is when it is less than 0.05p.u., and the other corresponding to grid-connected mode having an amplitude difference tolerance of up to 0.3p.u. The outputs of the AND logic blocks are then sent to the OR logic gate to ultimately produce the decision control signal C_sig.
The series compensator’s control logic is given as follows: As shown in Fig. 5, the gate pulses for the series voltage source converter (SER-VSC) are generated using Pulse Width Modulation (PWM). The control logic for this is based on Park-Clark’s synchronized reference frame theory. During grid-connected mode, the SER-VSC regulates load voltages to eliminate PCC voltage swings, whereas during islanded mode, the SER-VSC is bypassed as the SH-VSC controls the voltage at the time of grid outages.
To maintain the load voltages and the PCC voltages in phase, SER-VSC injects the required voltage, and this is done by translating these voltages into their d-q reference frame. The voltage differences between the d-q axes’ load and source voltages yield the actual SER-VSC voltages, and the corresponding differences between the load references and source voltages yield the reference SER-VSC voltages as given in the following equations.
The controllers receive the SER-VSC voltages in the d-q frame, and the necessary regulator voltages are produced, which are translated back into their corresponding values in abc frame and sent to the switching logic generator to generate the output signals depending on the decision signal C_sig. The AEONN controller is used to generate the reference compensating voltages for series compensation, as can be seen in Fig. 5. Using this control signal, the decision signal and the reference signal obtained from the load voltages, the switch logic determines the signal to be output to the PWM generator.
Finally, we describe the control logic for the bidirectional converter, which is responsible for keeping the system’s dc-link voltage constant throughout. To sustain the dc-link voltage of the SH-VSC and the SER-VSC systems, the duty cycle is generated via the proposed AEONN controller. The controller processes the MPPT voltage and the PV voltage error to obtain the duty cycle for the gate pulse generation as given by Eq. (13). Using the generated duty ratios, proper switching signals for the converter are produced via the PWM signal generator, as shown in Fig. 6.
The AEO algorithm offers particularly great optimization capabilities in microgrid applications for dealing with grid or load variations and typically requires only two parameters: the number of iterations and the population size. This feature, when combined with its simple structure, makes it a desirable candidate for problems requiring faster convergence. It neither imposes many tuning parameters nor a suitable range of values for these parameters. The computational complexity of this algorithm is further reduced due to its exploration and exploitation capabilities, which depend on a linearly decreasing value in the search space.
The AEO algorithm is based on a synthetic ecosystem having three operators: production, consumption, and decomposition (Weiguo et al. 2020). For the first operator, increasing the exploration-to-exploitation ratio is of paramount importance. The second operator typically improves the algorithm's exploratory capabilities, while the third operator is used to enhance its exploitation. To find a solution, AEO typically adheres to the following guidelines, as depicted in Fig. 7: the population of the ecosystem is made up of three different types of organisms: producers, consumers, and decomposers. Consumers make up the rest of a population, and they might be carnivores, herbivores, or omnivores. Each member of a population either contributes to the food chain or breaks it down.
Each person in the population has an energy level that their function aptness value quantifies. Since all individuals are arranged in decreasing order of function aptness value, greater values imply greater energy requirements for the minimization function. The worst person, x1, with the highest function aptness value, is a producer, whereas the best person, xn, with the least function aptness value, is a decomposer. Since the remaining xs are consumers, we may safely assume that x2 and x5 are herbivores, x3 and x7 are omnivores, and x4 and x6 are carnivores. A producer in an ecosystem uses carbon dioxide, water, sunshine, and nutrients from the decomposer to make food energy. In AEO, the decomposer (the best individual) and the lower and higher bounds of the search area are used to update the producer, who is the poorest individual in a population, and the latter then instructs the rest of the population's members, both herbivores and omnivores, to look in those regions. Using AEO, we can generate a new person to replace the present one at random, and it might be either the best person (xn) or a person generated at random from the search space (xrand). The following is a representation of the production operator's mathematical model (Weiguo et al. 2020):
where n is the size of the population, T is the maximum number of epochs, L and U are the minimum and maximum bounds, respectively, r1 is an arbitrary number between 0 and 1, r is a random vector between 0 and 1, a is a linear weight constant, and xrand is the position of a randomly generated distinct in the exploration space. Equation (14) uses the weight coefficient a to linearly drift the person from an arbitrarily generated starting point near the optimal starting point as the number of repeats increases. Equation (14) shows that in the first few iterations, × 1(t + 1) may cause the other people to accomplish a broad search of the exploration space, while in the last few iterations, × 1(t + 1) can cause the other people to engage in a highly exploitative phase around xn. Using Eq. (14), we can reproduce this production operator in both 2D and 3D spaces. Suppose this production behavior is carried out 20 times. The operator provided by Eq. (14), as seen in Fig. 7, progressively drives a randomly produced person in the direction of the ideal person who achieves the position of the best person after 20 repetitions.
All consumers may engage in consumption operator once the producer completes production operator. A consumer may get food energy by eating a creator or an arbitrarily chosen customer with less energy, or both. Levy flying is a scientific operator that mimics the foraging behaviors of several creatures, such as cuckoos, bumblebees, deer, and lions. Levy flight is a kind of arbitrary walk that can discover the global optimum since certain steps have higher lengths over time. As a result, levy flying was often included in algorithms as it was inspired by nature to improve their optimization efficiency. This straightforward, parameter-free random walk with the levy flying feature promotes computational search space reduction since it does not require tuning of parameters. Given below C is the consumption factor (Weiguo et al. 2020):
The standard distribution N(0,1) has a mean of 0 and a normal deviation of 1. It has been discovered that these arbitrary walks tend to congregate around a fundamental location and sometimes allow for lengthy jumps away from the starting position. It gives AEO the chance to avoid regional extremes and scan the full search area. Therefore, although different consumer types use various consumption techniques, this consumption component may aid each consumer in their quest for food.
A consumer will only eat the producer if it is a randomly selected herbivore. Consumers × 2 and × 5 are both herbivores who exclusively eat the manufacturer × 1, as seen in Fig. 7. Equation (19) quantitatively represents this herbivore eating pattern.
If a consumer is nominated at random to be a carnivore, it can only eat a customer arbitrarily who has a greater energy level. The consumer × 6 in Fig. 7 is a carnivore, so it must arbitrarily select a consumer from the group of people × 2 to × 5 with the highest energy level for food. The following equation represents a carnivore's eating habits:
If a consumer is arbitrarily selected as an omnivore, it may devour both a producer and a consumer with a greater power level. The consumer × 7 in Fig. 7 is an omnivore; thus, it must devour both the producer × 1 and a customer arbitrarily nominated among the people × 2 to × 6 who have more energy than × 7. The following is the precise equivalence that describes how an omnivore consumes food:
where r2 is a chance number that falls between [0, 1]. When using this consumption operator, AEO adjusts a search person's position in relation to the worst or an arbitrarily selected distinct in a populace, or both. This performance favors examination and enables AEO to conduct a worldwide search.
For an ecosystem to work properly, decomposition is a very important process. It also supplies crucial nutrients for the producer's development. When every member of the population passes away during decomposition, the decomposer's remnants will deteriorate or undergo chemical breakdown. To quantify this behavior, we develop the decay factor D and the weight constants e and h. By adjusting D, e, and h, one may determine where the decomposer xn is relative to the location of the ith person xi in the population. It partially demonstrates exploitation by allowing each person's next position to circulate around the best person (the decomposer). The following equation accurately describes this breakdown behavior (Weiguo et al. 2020):
Equation 14 is applicable to extending the position to 2-D and 3-D spaces as well. As the gap between the current person xi and the person xn becomes larger, the sampled points become more sparsely distributed, where most of the sampled points randomly disperse in this range. According to this scenario, a few sampled points tend to randomly occupy certain places that are located far from the individual xn. This finding may be used to justify taking advantage of and avoiding the regional extreme. AEO creates a population at random to begin the optimization process. The primary exploration individual changes its location as per Eq. (14) at each iteration, while the other people have the same chance of updating their positions based on Eqs. (20)–(23). If someone is provided a better function value, the algorithm will accept it and each person will adjust their position. During the updating process, if a person crosses the lower or higher bound, a random number will be created in the search space. Until the AEO algorithm meets a termination value, all updates are carried out iteratively. The finest parameter so far discovered has finally been returned.
In summary, the following observations are made in accordance with the procedure and the corresponding optimization results:
With a greater number of iterations, the production helps AEO build an applicant solution that drifts from an arbitrarily created location to the optimal location and will direct other people to conduct consumption operators throughout the consumption process. The equilibrium between exploratory and manipulative search is substantially aided by this tendency.
The eating element motivates AEO to conduct a worldwide exploration. Each customer is equally likely to be an herbivore, a carnivore, or an omnivore throughout the eating process.
Using three important factors, the decay permits AEO to modify each person's position depending on the best result in the populace. It could improve AEO exploration. The flowchart of the AEO procedure is shown in Fig. 8.
Neural network structure
Neural networks have the capability to organize themselves depending on the inputs they receive throughout the learning process and create and remember the mapping between the input–output pair. This capability is exploited in controller applications where a nonlinear relationship between the input and output data pairs exists. The valuable feature of the ANN controller is its ability to learn, adapt, calculate the mean square error, and predict the corresponding output to reduce the error between input and output. Figure 9 depicts the generalized black diagram of an ANN based controller.
The generic structure of the ANN controller with AEO optimization embedded makes it an ideal candidate for microgrid applications. The data-based approach of ANN, wherein knowledge is contained within and extracted from the data itself, is very applicable to tuning the controller parameters so that the optimal performance of the system can be reached when PV sources and battery systems are involved in the microgrid. More importantly, the AEONN controller uses the same method for training the shunt and series compensator as well as the bidirectional converter. For UPQC compensation, it is necessary that the controller response be fast and accurate. In the proposed AEONN controller, the generation of error between load voltage reference and sensed load voltage signals must be not only rapid and accurate but also consistent over a large operating range.
The AEONN model is built in the following ways: (1) load the data; (2) fix the targets and number of neurons; (3) create the feed-forward neural network; (4) calculate each neuron's starting weight value and bias; (5) obtain the cost function to determine a neuron's output; (6) run the AEO routine; and (7) get the AEONN weights and Mean Squared Error (MSE). This paves the way for the optimal network structure. The number of neurons was fixed at ten for a rapid response of the controller, and the feed-forward network propagates from the input layer to the output layer in a forward direction through the hidden layer. Table 1 shows the parameters of the feed-forward network configured.
Figure 10 shows the snapshot of the program routine written for shunt compensation.
The above AEONN algorithm was tested for MPPT, shunt, and series compensators, and the optimal value of the fitness function in all these cases was examined. The convergence plot corresponding to the shunt compensator is shown in Fig. 11 in which the best cost value of 0.635 was reached by the 67th iteration and stayed stable after that. Similarly, the MPPT algorithm produced 1.59 at the 100th iteration, while the series compensator had the best cost value of 2.56 at the 500th iteration.
AEONN controller schematics
A prototype of a three-phase, battery, and PV-powered UPQC is tested in MATLAB-Simulink (R2021a) in a variety of dynamic settings, representative of both standalone and grid-connected modes of operation to assess the system's performance in each setting. Table 2 displays the specifications of the settings that were employed.
The overall implementation in Simulink is shown in Fig. 12, which shows the various subsystems such as the PV system, battery management system, MPPT control system, PWM generator, coupling inductor, and a nonlinear load, complete with the proposed AEONN controller.
The simulation results for normal and dynamic irradiance conditions with grid-connected mode as well as islanded mode operation at the time of grid fault conditions are presented in this section. We show the zoomed results for better clarity.
Grid connected mode
Firstly, the PV system was assumed to be operating under normal conditions, that is, the irradiance maintained at 1000 W/m2 and the temperature maintained at 25 °C under grid-connected mode. The performance of the dually powered UPQC with the proposed controller was assessed under these normal test conditions.
Normal PV system condition
First, we describe the zoomed results of the normal test conditions. The proposed system was simulated with a nonlinear load, and the magnitude of the load current varies according to the number, type, and nature of the loads. It can be observed from the schematics in Fig. 12 that the load current is simply a branch current, and hence its peak value of approximately 2.5A is less than that of grid current (about 10A). The photovoltaic and battery-powered UPQC system with the AEONN controller ensures a steady stream of supply in the grid at all times to be able to compensate for grid voltage changes, automatic changeover, and variation in PV power output. This is yet another reason for the grid current to be in excess of the load current in magnitude. The grid voltage was maintained at 1 p.u. at its nominal value of 110 V; Fig. 13 shows the corresponding peak value of grid voltage, and that the controller is able to maintain a constant voltage across the nonlinear load satisfactorily. Figure 14 depicts the grid, load, and compensator currents, while from Fig. 15, it can be observed that the voltage of the battery is held at 120 V and current is at 24 A, and the battery is constantly being charged by the normal conditions prevailing at the grid and load sides.
Voltage sag condition
Voltage fluctuations at the grid side are a scenario that is very much a possibility in a contemporary network, as the PCC may not be near the voltage-regulated supply node and hence voltage sag and swell conditions are validated for the proposed controller in this subsection and the next. When a 0.2 p.u. voltage sag condition was created at the grid side, the grid voltage reduced from a peak value of approximately 155 V to 124 V for a duration of 0.3 s to 0.5 s, but the system was able to maintain the load voltage constant at 1 p.u. due to the injection of compensation voltage by the series active compensator, and the amount of voltage compensated was found to be exactly what was required in magnitude and phase, and the load voltage was sinusoidal, as can be observed in Figs. 16 and 17. The shape of waveforms for currents at grid, load, and compensator sides, respectively, are same as in Fig. 14 for the sag condition as well. The AEONN controlled shunt converter supplies the current in a phase opposite to the harmonics present in load currents due to the combination of the sag condition and nonlinear loads, and so the grid currents were compensated accordingly. Thus, the harmonics in grid currents were reduced, and the proposed controller was able to deliver very satisfactory results under sag the condition.
Voltage swell condition
Under this scenario, the grid voltage was increased to 1.2 p.u. (186 Vp), mirroring under-loaded conditions that can prevail in a contemporary distribution network, and the results were analyzed. Figure 18 shows the grid, load, and compensated voltages, while Fig. 19 shows the zoomed figures of the same. It can be observed that the AEONN controlled UPQC system efficiently compensates for the swelled voltage and helps sustain the sinusoidal load voltage waveform at 1 p.u. This is primarily due to the series converter, controlled by the AEONN, being aware of the instantaneous values of grid voltages, and was able to introduce out-of-phase voltages under the swell condition to maintain the load voltage sinusoidal, along with mitigating the harmonics at the load side. The contribution by the controlled shunt compensator in reducing its reactive current drawn from the grid also assists the series compensator in injecting the correct voltages, in both magnitude and phase. Hence, here again, we see that the proposed controller was able to maintain a constant load voltage with a sinusoidal waveform.
Dynamic change in irradiance
The simulation results with dynamic change in irradiance conditions (i.e., irradiance change from 1000 W/m2 to 500 W/m2 at 0.5 s and temperature maintained at 25 °C) are presented in this subsection. Figure 20 shows grid voltage reduced to 0.8 p.u. between time periods of 0.2 s to 0.4 s and increased to 1.2 p.u. between 0.6 s to 0.8 s and that the AEONN controller efficiently compensates both for the sag and swelled voltage and helps sustain the sinusoidal load voltage waveform at 1 p.u. It can be observed that under the dynamic change in irradiance condition, the amount of voltage compensated was found to be exactly what was required in magnitude and phase, and the load voltage was sinusoidal, as can be observed in Fig. 20.
As the primary function of a UPQC is to improve power quality by mitigating voltage sags, swells, and harmonics, the dually powered UPQC with the proposed controller injects compensating current into the grid, as can be seen in Fig. 21, with its magnitude and phase in accordance with the required degree of compensation. Under conditions of irradiance fluctuation, the AEONN controlled shunt compensator sets up to provide active power into the grid, and the battery bank supplies the required extra power. During the compensation process, any excess current flows into the grid, and hence the peak value of grid current is higher than that of load current. The AEONN controlled shunt converter, as shown in Fig. 21, injects accurate compensation current in the point of common coupling to make the grid current sinusoidal. The controller supplies the current in a phase opposite to the harmonics present in load currents under the dynamic change in irradiance, and so the grid currents were compensated accordingly, and the proposed controller was able to deliver very satisfactory results under this scenario.
The simulation results with grid disturbance conditions when a grid fault occurs are presented in this subsection, and the system’s ability to maintain seamless operation from grid-connected mode to islanded mode and from islanded mode back to grid-connected mode is investigated. With irradiance maintained at 1000 W/m2 and temperature maintained at 25 °C, the grid is made unavailable between 0.3 to 0.5 s, as grid voltage is reduced to 0.2 p.u. during this period, as can be seen in Fig. 22, and it can be noted that a constant load voltage profile is adequately maintained by the shunt compensator as the series compensator does not have any role during this mode of operation. Here again, by maintaining the grid currents sufficiently higher than the load current, the controller was able to counteract voltage disturbances and maintain a stable voltage at the load side. The dually powered UPQC, controlled by AEONN, automatically switches to islanded mode, which can be noticed by the absence of grid current in Fig. 23, and prioritizes the resource to be available for critical loads. A continuous supply of power, though not at its nominal value, is provided by the battery system, as can be noticed in Fig. 24, as the battery is discharging at a fast rate to supply power to the critical load. Upon restoration to grid-connected mode, it can be noted from Fig. 22 that the phase voltages of the load are aligned with those of the grid voltages, and thus a seamless transition from islanded mode to normal operation is enabled by the proposed controller.
Total harmonic distortion
We investigated the waveforms of PCC grid currents and load voltages of AEONN controlled UPQC system and calculated the total harmonic distortion (THD) percentages of fundamental components. Figure 25 shows the THD of the current of the grid at normal conditions is 3.67% while the THD of the load voltage is 0.02%. It was found that the PCC grid current THD and load voltage THD are both under 5%, satisfying the requirements of the IEEE-519 standard.
We also simulated the UPQC system with just a traditional PI controller under normal condition, and obtained the waveforms of grid current and load voltages (Figs. 26 and 27), and calculated THD percentages of fundamental components (Fig. 28). The THD of the grid current and load voltage with traditional PI control was found to be 8.31% and 0.12%, respectively and the grid current THD is over the limit as per IEEE-519 standards. On the other hand, the proposed AEONN controller, in comparison to the traditional PI controller, has been able to efficiently reduce the high amount of THD in both the grid current and load voltage variables and bring it within the limits so as to obey the IEEE-519 standard as demonstrated in Fig. 25.
We investigated the waveforms of PCC grid currents and load voltages for all the scenarios discussed above and calculated the THD percentages of fundamental components. The summary of what we found is presented in Table 3. As can be seen, the values pertaining to the proposed AEONN controller are within the limits as per IEEE-519 standards.
This study detailed a new method for controlling the UPQC system that was dually powered by the battery and photovoltaic system, based on an artificial ecosystem optimized neural network. AEO algorithms are a great choice as optimization routines in controller applications due to their simpler structure, enhanced exploration capability, and faster convergence, reduced complexity, and cost. The intelligent control algorithm was implemented in the shunt and series compensator of UPQC, both of which exhibited excellent performance attributes both under normal and voltage fluctuation conditions during grid-connected mode of operation when normal PV system behavior was established. The system was able to maintain a constant load voltage profile with a satisfactory PCC grid current under all the stated conditions. The system was also assessed under dynamic conditions such as irradiance changes and fault occurrence, and the battery system was able to instantly start discharging the current to maintain a steady stream of power to the vital loads, while the overall system also ensured a quick and seamless transition when normal operation was restored. The quality of power delivered also conformed to the standards of IEEE-519, as evidenced by the THD values of the point of common coupling currents. The system shows a lot of promise for real time implementation, as this would mean faster response of the controller due to the intelligence embedded without compromising the accuracy of compensation. These modeling approaches can be employed to design, test, and commission dually powered UPQC systems in the microgrid and could aid in the systematic planning of the macrogrid as well. Our future research will focus on improving the speed and accuracy of the controller in combination with robust battery and inverter design strategies of PV system, along with the provision of electricity pricing.
Availability of data and materials
Data is available from the authors upon request.
Artificial Ecosystem Optimized Neural Network
Artificial neural network
Energy management system
Levenberg Marquardt Back Propagation
Maximum Power Point Tracking
Point of common coupling
Proportional Integral Derivative
Pulse Width Modulation
Series voltage source converter
Shunt voltage source converter
Total harmonic distortion
Unified power quality conditioner
Voltage source converter
Ahmed F, Syedali F, Hegazy R, Dalia Y, Mohammad AA, Olabi AG (2022) Optimal adaptive fuzzy management strategy for fuel cell-based DC microgrid. Energy 247:123447. https://doi.org/10.1016/j.energy.2022.123447
Axel S, Jan L, Jorg K, Wolfgang S (2009) Design of generalized hysteresis controllers for DC–DC switching power converters. IEEE Trans Pow Electron 24:128–146. https://doi.org/10.1109/TPEL.2008.2009176
Basma S, Hani MH, Fadia MA, Yasser MA, Shasdy HE, Adel ES (2022) African vulture optimization-based optimal control strategy for voltage control of islanded DC microgrids. Sustainability 12:11800. https://doi.org/10.3390/su141911800
Chettibi N, Mellit A (2018) Intelligent control strategy for a grid connected PV/SOFC/BESS energy generation system. Energy 147:239–262. https://doi.org/10.1016/j.energy.2018.01.030
Chimaobi NO, Alexis K (2010) Analysis of boundary control for buck converters with instantaneous constant-power loads. IEEE Trans Pow Electron 25:2018–2032. https://doi.org/10.1109/TPEL.2010.2045658
Devi SC, Shah P, Sachin D, Bhim S (2020) Solar PV Array Integrated UPQC for Power Quality Improvement Based on Modified GI. Paper presented at the IEEE 9th Power India International Conference (PIICON), Sonepat, India, 2020. https://doi.org/10.1109/PIICON49524.2020.9113032.
Farid DM, Alfis SLH, Ainur RN, Rangga ES (2017) Comparison method of flower pollination algorithm, modified particle swarm optimization and perturb & observe in MPPT coupled inductor sepic converter on DC microgrid isolated system. Paper presented in the 2017 International Conference on Advanced Mechatronics, Intelligent Manufacture, and Industrial Automation (ICAMIMIA), Surabaya, Indonesia, 12–14 October 2017. https://doi.org/10.1109/ICAMIMIA.2017.8387604.
Grant EP, Philip TK (2006) Trajectory paths for dc–dc converters and limits to performance. In: Abstracts of the IEEE Workshops on Computers in Power Electronics, NY, USA, 16–19 July 2006. https://doi.org/10.1109/COMPEL.2006.305650.
Gu J, Xu D, Liu H, Gong M (2002) Unified power quality conditioner (UPQC): the principle, control, and application. Paper presented at the Power Conversion Conference, Osaka, Japan, 2002. https://doi.org/10.1109/PCC.2002.998518.
Hany HM, Mahmoud M (2018) Water cycle algorithm-based optimal control strategy for efficient operation of an autonomous microgrid. IET Gen Transm Distr 12:5739–5746. https://doi.org/10.1049/iet-gtd.2018.5715
Hina M, Hafiz MM, Jahangir BS, Faheem A, Rashid H, Mohamed FE, Salah K, Joseph MG (2022) Implementation of ANN controller based UPQC integrated with microgrid. Mathematics 10(12):1989. https://doi.org/10.3390/math10121989
Hiroaki K, Yushi M, Toshifumi I (2013) Distribution voltage control for DC microgrids using fuzzy control and gain-scheduling technique. IEEE Trans Pow Electron 28:2246–2258. https://doi.org/10.1109/TPEL.2012.2217353
Jitender K, Prasenjit B (2020) Power quality control based on voltage sag/swell, unbalancing, frequency, THD and power factor using artificial neural network in PV integrated AC microgrid. Sustain Energy Grids Netw 23:100365. https://doi.org/10.1016/j.segan.2020.100365
Julian Y-CC, Kelvin K-SL, Henry S-HC (2007) Higher order switching surface in boundary control of inverters. IEEE Trans Power Electron 22(1753):1765. https://doi.org/10.1109/TPEL.2007.904209
Karthika SK, Gomathi BR (2022) Forecasting photovoltaic power output using long short-term memory and neural network models. Intl J Engg Appl 10(2):116–125. https://doi.org/10.15866/irea.v10i2.20788
Kinhal VG, Agarwal P, Gupta HO (2011) Performance investigation of neural-network-based unified power-quality conditioner. IEEE Trans Pow Del 26(1):431–437. https://doi.org/10.1109/TPWRD.2010.2050706
Liping G, John YH, Nelms RM (2009) Evaluation of DSP-based PID and fuzzy controllers for DC–DC converters. IEEE Trans Ind Electron 56:2237–2248. https://doi.org/10.1109/TIE.2009.2016955
Lua X, Chen S, Nielsen CP et al (2021) Combined solar power and storage as cost-competitive and grid-compatible supply for China’s future carbon-neutral electricity system. PNAS 118:42. https://doi.org/10.1073/pnas.210347111
Marko C, Gregor C, Igor K, Maja AK (2013) Scheduling of Electric Energy in Smart Grids Using a Combination of Neural Networks and Local Optimization. Paper presented in the 8th EUROSIM Congress on Modelling and Simulation, Cardiff, UK, 10–13 September 2013. https://doi.org/10.1109/EUROSIM.2013.27.
Md AH, Hemanshu RP, Md JH, Frede B (2019) Evolution of microgrids with converter-interfaced generations: challenges and opportunities. Intl J Electr Pow Energy Syst 109:160–186. https://doi.org/10.1016/j.ijepes.2019.01.038
Michael P, Kai H, Oliver G, Mikhel R (2016) Voltage estimation in active distribution grids using neural networks. Paper presented in IEEE Power and Energy Society General Meeting (PESGM), Boston, MA, USA, 17–21 July 2016. https://doi.org/10.1109/PESGM.2016.7741758.
Monteiro LFC, Aredes M, Neto JAM (2003) A control strategy for unified power quality conditioner. Paper presented at the IEEE International Symposium on Industrial Electronics, Brazil, 9–11 June 2003. https://doi.org/10.1109/ISIE.2003.1267280.
Navid V, Shirin Y, Mohammad HK, Jan DB, Tomislav D (2019) Adaptive TS fuzzy-based MPC for DC microgrids with dynamic CPLs: nonlinear power observer approach. IEEE Syst J 13:3203–3210. https://doi.org/10.1109/JSYST.2018.2880135
Nikhita G, Seethalekshmi K (2021) Artificial neural network and synchro squeezing wavelet transform based control of power quality events in distributed system integrated with distributed generation sources. Intl Trans Elect Energy Syst 31:12824. https://doi.org/10.1002/2050-7038.12824
Palanisamy K, Kothari DP, Mahesh KM, Meikandashivam S, Jacob IR (2013) Effective utilization of unified power quality conditioner for interconnecting PV modules with grid using power angle control method. Intl J Elect Pow Energy Syst 48:131–138. https://doi.org/10.1016/j.ijepes.2012.11.026
Sachin D, Bhim S (2021) Performance analysis of solar PV array and battery integrated unified power quality conditioner for microgrid systems. IEEE Trans Ind Electr 68:4027–4035. https://doi.org/10.1109/TIE.2020.2984439
Sana F, Md EH, Mohammad TA, Ameen G, Aman MT (2023) Grid integration impacts and control strategies for renewable based microgrid. Sust Energy Tech Assess 56:103069. https://doi.org/10.1016/j.seta.2023.103069
Sathish M, Mohana J, Kamaraj P (2022) Hybrid DC–AC microgrid energy management system using an artificial gorilla troops optimizer optimized neural network. Energies 15:8187. https://doi.org/10.3390/en15218187
Sen Y, Youbing Z, Luyao X, Haiqiang L (2018) Shunt active power filter based on proportional integral and multi vector resonant controllers for compensating nonlinear loads. J Electr Comp Engg. https://doi.org/10.1155/2018/1312064
Senthil-Kumar A, Rajasekar S, Ajay-D-Vimal PR (2015) Power quality profile enhancement of utility connected microgrid system using ANFIS-UPQC. Procedia Technol 21:112–119. https://doi.org/10.1016/j.protcy.2015.10.017
Shehab AS, Mahmoud K, Muhammad K, Mohammad AA (2019) An energy management system for residential autonomous DC microgrid using optimized fuzzy logic controller considering economic dispatch. Energies 12(8):1457. https://doi.org/10.3390/en12081457
Tania BLG, Alberto CM, Jose AD-M (2020) Artificial neural networks in microgrids: a review. Engg Appl AI 95:103894. https://doi.org/10.1016/j.engappai.2020.103894
Tey LH, So PL, Chu YC (2002) Neural network-controlled unified power quality conditioner for system harmonics compensation. Paper presented in the IEEE/PES Transmission and Distribution Conference and Exhibition, Yokohama, Japan, 6–10 October 2002. doi: https://doi.org/10.1109/TDC.2002.1177620.
Vahid Y, Amir B, Bhaskaran R, Eduard A, Lucy P, Dragan M (2008) Proximal time-optimal digital control for synchronous buck DC–DC converters. IEEE Trans Power Electron 23:2018–2026. https://doi.org/10.1109/TPEL.2008.924843
Victor SP, Ryan SC, Henry SH, Alan WL, Weimin W (2018) A transformer-less unified power quality conditioner with fast dynamic control. IEEE Trans Pow Electron 33:3926–3937. https://doi.org/10.1109/TPEL.2017.2715059
Vinod K (2012) Enhancing electric power quality using UPQC: a comprehensive overview. IEEE Trans Power Electr 27:2284–2297. https://doi.org/10.1109/TPEL.2011.2172001
Weiguo Z, Liying W, Zhenxing Z (2020) Artificial ecosystem-based optimization: a novel nature-inspired meta-heuristic algorithm. Neural Comp Appl 32:9383–9425. https://doi.org/10.1007/s00521-019-04452-x
This research received no external funding.
Ethics approval and consent to participate
Consent for publication
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Ratnakaran, R., Rajagopalan, G.B. & Fathima, A. Artificial ecosystem optimized neural network controlled unified power quality conditioner for microgrid application. Energy Inform 6, 45 (2023). https://doi.org/10.1186/s42162-023-00301-3