Optimal Control of an Autonomous Microgrid Integrated with Super Magnetic Energy Storage Using an Artiﬁcial Bee Colony Algorithm

: This article presents a microgrid that uses sustainable energy sources. It has a fuel cell (FC), wind energy production devices, and a superconducting magnetic energy storage (SMES) device. The performance of the suggested microgrid is improved by adapting an optimal control method using an artiﬁcial bee colony (ABC) algorithm. The ABC algorithm has many advantages, including simplicity, adaptability and resilience to handle difﬁcult optimization issues. Under usual circumstances, wind and FC energies are typically appropriate for meeting load demands. The SMES, however, makes up the extra capacity requirement during transient circumstances. Using the ABC optimum controller, the load frequency and voltage are controlled. Measurements of the microgrid’s behavior using the newly developed optimal controller were made in response to step variations in wind power and load demand. To assess the performance of the suggested system, simulations in Matlab were run. The outcomes of the simulations demonstrated that the suggested microgrid supplied the load with AC power of steady amplitude and frequency for all disruptions. Additionally, the necessary load demand was precisely mitigated. Furthermore, even in the presence of variable wind speeds and SMES, the microgrid performed superbly. The outcomes under the same circumstances with and without the optimal ABC processor were compared. It was discovered that the microgrid delivered superior responses using the optimal ABC controller with SMES compared to the microgrid without SMES. The performance was also compared to the optimally controlled microgrid using particle swarm (PS) optimization.


Introduction
A few decades ago, renewable energy sources were given increasing consideration as a viable alternative to fossil fuels [1]. Because they are pure, never run out, and are readily accessible, renewable energy sources have many benefits [2]. Recent years have seen the introduction of numerous renewable energy sources [3], including solar (PV) [4], wind, ocean waves [5], ocean tides, and microhydro [6]. Costs for solar PV and wind energy systems have dramatically decreased because of technological advancements and fast economic expansion [7]. Fuel cells (FCs), geothermal energy, microturbines, biomass, and other novel energy alternatives have all been researched in this context [8]. In many areas of the globe, the cost of energy generation by renewable systems is currently lower than that of recently built fossil and nuclear power facilities. A comparison of various green energy sources for the generation of electrical power revealed that wind energy is the best option in terms of cost [9].
These sources, however, are intermittent and dependent on the weather. Therefore, when using these resources, the power system faces challenges due to the unpredictable nature and variations in power output [10]. Hence, for the stability of grid-connected systems and autonomous systems, the incorporation of different sustainable energy sources is crucial. The load in a standalone renewable energy system is a single home that is not wired into the grid. Typically, these systems have limited capabilities. In some cases, a small electricity infrastructure, known as a microgrid, is created by connecting a few homes [11]. In islands where extending the electricity infrastructure is expensive and delivering gasoline is challenging and expensive, microgrid technology has gained popularity [12].
In the literature, a variety of autonomous microgrid designs have been reported with numerous control schemes [13]. The mix of wind energy and FC technologies offers a simple microgrid for standalone systems that possess wind energy in their areas. The ability to generate power even when the wind is not blowing is one of the main benefits of combining wind energy and FC technologies. To provide power during times of minimal wind, or even no wind at all, fuel cells can be used to store surplus energy produced by wind turbines during strong wind conditions. This can help to resolve the intermittent nature of wind energy and guarantee a more reliable supply of power in rural areas. Several studies have investigated the feasibility and performance of wind energy and fuel-cellbased isolated power systems. A combined wind/FC microgrid using an extreme searching controller for the best functioning of the wind rotor in turbulent wind is introduced in [14]. In [15], a combined wind/FC microgrid is examined, along with presentation of a thorough life cycle study of the system for use in Newfoundland. The microgrid was found to be extremely complex and challenging to describe. An electrolyzer and dynamic model for hydrogen storage are presented in [16], along with a wind/hydrogen power system. A microgrid that utilizes wind/hydrogen sources and is controlled by a cutting-edge power regulation method is described in [17]. This microgrid has a maximum power point tracking technique that was created using ideas from sliding-mode control theory and the reference conditioning method. An optimal controller for a small microgrid formed by a wind/FC hybrid system has been proposed in [18]. The optimal controller uses the mine-blast searching technique to promote the microgrid's response and regulate the energy produced. In [19], a layered market clearing algorithm is created that alternatively generates the best trading outcomes in intra-and inter-microgrid markets. The authors of [20] suggest that comparable output impedance mostly determines the power sharing performance of a conventional microgrid synced by the Global Positioning System (GPS). An overview of the optimization and control methods for fuel cell power plants in a microgrid setting is provided in [21]. A fuel-cell linked utility active/reactive sustainable energy management system using a unified linear self-regulating technique was proposed in [22].
The challenges related to microgrids, such as power fluctuations and intermittency phenomena, may be partially solved using additional storage systems to improve the microgrid's reliability. Recently, superconducting magnetic energy storage (SMES) has received significant attention in microgrid systems [23]. It is made up of an inactive filtration circuit, a converter, a management system, a quench protection circuit, a high temperature superconducting coil magnet, a cryogenic and vacuum system, and a quench protection circuit [24]. An SMES unit is capable of quickly storing or discharging significant quantities of electric energy. SMES has a higher cyclic efficiency than other energy storage systems, a higher power density, a faster reaction time, and an infinite number of charging and discharging cycles [25]. Load leveling, system stability, voltage stability, frequency regulation, transmission capacity development, power quality improvement, automated generation management, and uninterruptible power supplies are just a few of the uses of SMES [26].
Recently, controlling and enhancing the behavior of complex systems has been carried out using optimization methods [27,28]. Utilizing optimization methods, the suggested controller parameters can be tuned [29]. These approaches produced better outcomes and system responses than traditional tuning approaches [30]. However, the complexity of the objective functions and the rate of convergence vary between these methods [31]. Currently, ABC [32], a metaheuristic optimization method, is used to solve a wide variety of optimization issues [33]. The ABC algorithm has numerous uses in power systems due to its ease and flexibility of operation [34]. The advantages of the ABC algorithm, such as simplicity, global exploration, population diversity, adaptive behavior, low computational complexity, fewer control parameters and versatility, make it a popular choice for various optimization problems. However, the performance of the algorithm can still vary depending on the specific problem and the fine-tuning of its parameters. The microgrid proposed in [35] contains an FC unit that does not have recharge capability or a hydrogen storage tank. However, it includes a diesel generator and battery storage, along with wind/PV sources. The optimization technique is a combined ABC and gravitational search algorithm. The optimized parameter was the fuel cost.
The performance and reliability of power systems are enhanced by the integration of SMES. Additionally, the creation of sophisticated control systems and energy management techniques may aid in improving the performance and maximizing the energy economy of mixed wind/FC power systems. Hence, the idea of this study is to use the ABC algorithm to handle and regulate the energy of a wind-FC-SMES microgrid as efficiently as possible. This work makes the following contributions:

•
Development of an analytical model of the proposed wind/FC/SMES microgrid that is optimally controlled using the ABC algorithm.

•
Optimization of the performance of the proposed wind/FC/SMES microgrid using the ABC against variations in load power and wind speed. • An induction motor, representing the microgrid dynamic load, is optimally controlled using ABC.

•
The responses of the microgrid optimally controlled using ABC are compared to those using the PS.
The paper is organized as follows: The suggested microgrid's architecture is included in Section 2. The dynamic model of the microgrid is examined in Section 3. The ABC optimization is presented in Section 4. The details of the suggested microgrid energy management and control approach are presented in Section 5. The research findings are discussed in Section 6. Section 7 contains the conclusions of the study.

Microgrid Architecture
According to Figure 1, the suggested system is a combined wind/FC/SMES microgrid that can support two types of loads: both static and dynamic. A three-phase permanent magnet synchronous generator (PMSG) is powered by a wind turbine. The DC bus voltage is created by rectifying the PMSG's output voltage using a diode rectifier. Connected to that bus is a water electrolyzer that generates hydrogen gas for the FC engine. The system's DC bus is then linked to the FC's output voltage. Additionally, the DC bus provides a 3-φ inverter that is controlled so that it delivers the µ-grid loads with a steady AC frequency and voltage. It feeds the µ-grid output loads with AC power. The static load is represented by a universal R-L impedance. An induction motor with speed control also serves as the dynamic load. Typically, changes in wind speed result in changes in the PMSG's output power as well. Therefore, when the power of the wind production unit decreases, an FC unit provides electricity to the loads. As a result, it functions as a backup to supply any additional electricity required by the loads as well as to make up for any decrease in the quantity of wind energy produced. Additionally, SMES is crucial for regulating the production power of the wind µ-grid and enhancing the reliability of the electricity grid.
Due to the wind's fluctuating speed and capacity shifts, the system's load voltage is frequently not controlled. In order to control the output voltage and frequency of the µ-grid, the primary inverter uses a voltage controller. A vector-controlled induction motor's speed is also managed using the ABC optimization method.

Microgrid Modeling
In the subsections that follow, the precise dynamic model of each suggested system component will be covered.

The SMES Model
A large superconducting coil can be used for SMES, which is capable of holding electrical energy in the magnetic field produced by DC current passing through it. It has almost no electrical impedance at near absolute zero temperature so can be used for the SMES. Utilizing containers filled with liquid helium or nitrogen, the superconducting circuit is maintained at a cryogenic temperature. The cooling mechanism that keeps the coil at a cryogenic temperature causes some energy losses, but the energy losses in the coil are almost nonexistent because superconductors have no barrier to electron movement. Large quantities of electricity can be quickly and efficiently discharged from SMES coils, which also have an infinite capacity for filling and discharging cycles. While high temperature superconductor devices are still being developed due to their expensive costs, low temperature devices are already accessible [26].
Electrically, the SMES system may be modelled as a two quadrant DC/DC converter connected to a superconducting coil, as shown in Figure 2 [36]. The principle of operation of the SMES's two-quadrant converter is based on triggering the converter's switches simultaneously. When they are turned on, the diodes are reverse-biased and the coil will be charged. When they are turned off, the diodes become forward-biased and the coil discharges. By adjusting the duty cycle of the converter, the coil voltage can be controlled. The converter average model may be expressed as [37]: where (V sm ) is the mean voltage of the SMES coil, (I sm ) is the mean current of the SMES coil, (V dc , I dc ) are the DC-link voltage and current, and (d) is the duty cycle of the switches.

The Wind Turbine Model
The equations that represent the dynamic model of the wind turbine are given by [18]: Equation (1) presents the wind turbine's output power (P m ). The turbine's output power depends on the turbine blade radius (R), the air density (ρ), the wind speed (v w ), and the wind-turbine's performance coefficient (C p ). It is a very important factor for the wind-turbine's performance. The performance coefficient is given by Equation (3). It is a function of the blade pitch angle (β) and the tip-speed ratio (λ), which is presented by Equation (4), where (ω m ) is the mechanical angular speed of the turbine. Equation (5) represents the wind turbine's dynamic equation of the mechanical system, including the PMSG, where (B) is the mechanical viscous friction, (J m ) is the total system, and (T e ) is the electrical generator electromagnetic torque.

The PMSG Model
The dynamic model for the PMSG generator in the d-q rotor frame is provided using [1]: where the stator resistance is (r s ), the d-q components of the stator-current are (i sd , i sq ), and the stator d-q inductances are (L d , L q ). The pole pairs are (p) and the permanent flux linkage is (λ m ).

The Rectifier Model
The relationship between the PMSG speed and wind speed is well established. However, the wind's speed is constantly changing. Due to the fact that the PMSG's output voltage and frequency primarily depend on its speed, they are uncontrolled. However, regulated sources are typically required for electrical demands. The PMSG output voltage is rectified and attached to the DC line in order to address this issue. So, to provide the loads with controlled AC power, an inverter is used. Hence, an unregulated rectifier bridge is used. According to [38], neglecting the PMSG output impedance, the rectifier's typical relationships are: where; (I p , V p ) are the phase input current and voltage, and (V ro , I ro ) are the rectifier output mean current and voltage. Figure 3 displays the DC/DC converter's schematic in its traditional form. It is a buck-boost converter. The typical model of the DC/DC converter operating as a buck-boost is provided in [39]:

The DC/DC Converter Model
where, the duty ratio is (d1), and (V dc_o , I dc_o ) are the buck-boost converter's mean output voltage and current. The eight switching phases for the two-level inverter's associated space vectors are shown in Figure 4b. A representation of the inverter dynamic model is as follows [18]: .

The FC Model
Under typical environmental circumstances, the proton exchange membrane PEM FC typically has the behavior depicted in Figure 5. Normally, internal voltage losses in FCs result in voltage drops above the standard voltage values. There are three different types of power drops: activation polarization, concentration polarization, and ohmic polarization. Cell activation deficits are a result of the delay of chemical processes. By increasing the catalyst contact area, cell activation losses can be decreased. The FC electrical circuits' and their links' impedance, however, are what cause the resistive losses. The barrier can be adequately hydrated to reduce this portion of losses. The PEM FC electrical characteristics can be represented by the following relationships [40]: where (

The Artificial Bee Colony Optimization
Recently, many selection operators with superior enhancement have been suggested. The mating selection operators of different evolutionary techniques have different global and local search patterns, and they differ in their advantages when disposing optimization problems with particular characteristics, such as online learning, scheduling, multi-objective optimization, transportation, medicine, data classification and others [41][42][43][44] The artificial bee colony is one of the most significant metaheuristic optimization techniques because it is straightforward and needs few control parameters. The ABC algorithm is inspired by the intelligent activity of honeybees. The ABC expands a population-based search method, just like any optimization program [30,45]. Individuals are the food spots, and the pollinators try to investigate the locations of food supplies that contain a lot of nectar. The ideal answer is the greatest nectar food supply. The three kinds of bees used in the ABC algorithm are scout, onlooker, and worker bees. Scout pollinators look for sustenance sources without having any knowledge of where they are. With information acquired from watching worker bees perform a waggle dance, onlookers seek the food source. The locations of their historical memories and the quality of the food sources are determined by the experienced bees. A flowchart of the ABC algorithm is presented in Figure 6. In the ABC algorithm, the onlookers will choose their food source according to its probability magnitude (P j ), which is expressed by [46]: where (j) is the solution order that is proportionate to the food source's nectar quantity in that location, (f j ) is the fitness of the solution j, and (NS) is the quantity of food sources that is the same as the number of onlooker bees. (f n ) is the fitness of the solutions that is evaluated using: Using the following equation, the food location is modified depending on the prior location: where i ∈ {1; 2; . . . ; D} and k ∈ {1; 2; . . . ; NS} are selected at random. Although k is determined randomly, it must be different from j. The outcome of this random variable determines how the adjacent food locations are produced. The worker bees' approach is employed by each onlooker bee to update its solution. In order to assess whether or not the previous answer will be erased from memory, the onlooker bees compare the new and old solutions. The scout bee group looks for a fresh solution to update x j if there is no improvement in the solutions after a predetermined number of repetitions, according to: where (x i min and x i max ) are the limits for x j in the i th orientation. The ABC operation sequence is as follows: Step 1: Initialize the food sources for all bees.
Step 2: Every onlooker bee has to visit a food source, remember it, and assess a nearby source.
Step 3: The other onlooker sees the waggle dance, goes to that location, and selects a nearby neighborhood.
Step 4: The abandoned food sources are assessed and replaced with the fresh supplies that the scouts have found.
Step 5: The finest food supply so far is recorded.
Step 6: Repeat the process for all the bees.
Step 7: Check whether or not the best food source has been obtained. End.
Typically, ABC utilizes a fitness function to determine whether the output parameters are optimal. The proportional integral differentiation (PID) controller parameters are the variables that need to be designed, i.e., (K P , K I , and K D ). The integral time absolute error (ITAE) function, which is provided by the following, is, thus, the proposed fitness function in this study: where, t s is the simulation time, (V L ) is the load terminal voltage, (V L_ref ) is the reference load terminal voltage, and (v dc_ref ) is the DC-link reference voltage. The limitations or bands of the scaling parameters (K P , K I , and K D ) are assumed to have a range of [0.1-2] [30].

Microgrid Control and Optimization
The primary parts of the suggested microgrid's control system are its four controllers. Each controller is designed to manage a certain area of the microgrid. The first is the SMES converter, which is a two-quadrant converter. However, the second is the FC converter, which is a single-quadrant buck converter. On the other hand, the third controller is used to regulate the primary inverter controller. It controls the load's frequency and voltage. The fourth controller is the dynamic load controller, which regulates the induction motor speed. The control system parts are described as follows: • The SMES's DC/DC converter controller This controller's job is to regulate the charging and discharging procedures for SMES coils. In addition, it controls the DC bus voltage in conjunction with the FC as a backup. As seen in Figure 7a, a straightforward PID controller is used to regulate the current and voltage of the SMES using two stacked loops. When the SMES coil's current reaches its maximum limit, the controller stops charging it.

•
The FC's DC/DC converter controller Figure 7b depicts the buck converter control circuit. Based on the voltage error, the set voltage signal is produced. Hence, the PID controller then uses that error to produce the modulating signal for the PWM unit, which, in turn, produces the proper duty ratio square signal for the converter.

•
The output inverter controller The main inverter in the proposed microgrid is the current-controlled voltage source converter. So, as seen in Figure 8, the converter contains two stacked control loops. The output voltage loop's outer loop is where the measured output voltage and the reference voltage are compared. A straightforward PID controller that produces the reference output current receives the error signal as an input. Nevertheless, the ABC is used to optimize the PID parameters. The measured currents and the reference currents are contrasted. To create the converter switching signals, a pulse width modulator (PWM) is then fed by the error that was created.  Table 1 introduces the ABC controller's optimal parameters. This controller provides the speed regulation of an induction motor that emulates the system's dynamic load. Scalar control and vector control are two methods to control induction motors. Vector control technology operates with excellent performance and precision. As a result, Figure 9's optimum vector control approach is used to regulate the induction motor's speed. The optimal PID controller regulates the errors by measuring the actual speed and comparing it to the reference speed. The reference torque for the vector control system is produced by the controller. The induction motor model is used to estimate the rotor flux and torque of the induction motor. In [47], more explanations of vector control and estimators for induction motors are presented. At last, the control procedure can be abbreviated as: (a) If the DC-link voltage is trying to increase based on increase in wind velocity, the controller is turned on and the inverter duty cycle ratio is changed to keep the load AC voltage at its desired value. In addition, the fuel cell controller increases the charge current of the fuel cell to save any additional generated energy and keep the AC load voltage at the desired values. Consequently, the generator and voltage tend to minimize until stabilized to a convenient value. Using SMES guarantees smoothing of the DC-link voltage, especially in the case of presented renewable energy, such as wind. The vector control adjusts the stator voltage of the IM until the rotor speed reaches its desired value. If the DC-link voltage attempts to minimize in the case of low wind velocity, the controllers will implement an action that is counteractive to that outlined above, as illustrated in Figures 10-12. (b) Using SMES and the storage fuel cell helps keep the DC voltage stable and smoother in the event of wind and/or load changes.

Results
The performance of the proposed microgrid with the optimal controller was validated using digital computer simulations, as shown in  This system was simulated and tested using the MATLAB/SIMULINK software package to accommodate multiple operating methods for wind speed and load parameter variations. The microgrid parameters are presented in Table 2. The microgrid response was subjected to testing with varying static loads, induction motor speeds, and wind speed steps.  Figure 10 displays the results for some parameters of the proposed microgrid. The microgrid was subjected to step variations in the wind speed, as shown in Figure 10a. The wind velocity was kept at 11.5 m/s for the first second, increased to 13 m/s at the time of 1 s, dropped to 10.75 m/s at the time of 2 s, and increased to 14 m/s at the time 3 s. As seen in Figure 10b, the PMSG's rotor speed and wind speed were precisely proportional. Additionally, as shown in Figure 10c, the PMSG torque was negative and had a value that depended on the produced power. Then their values differed slightly. Figure 10d,e show the PMSG voltage and current variations corresponding to the wind speed and load disturbances. The variations in the pressure of the O 2 and H 2 gases inside the electrolyzer are indicated in Figure 10f. The values of P H2 and P O2 were the same, 0.04 to 0.05 Pa, in the first period of t = 0-1.5 s. Figure 11 presents the remaining results for the parameters of the proposed microgrid. Figure 11a displays the actual and reference per unit dynamic response of the load voltage with/without SMES controlled and optimized using the proposed ABC and PS optimization. The load voltage had the values 0.8, 0.9, and 0.85 V in the following three time periods: t = 0-1.5, 1.5-3 and 3-4, respectively. However, the optimal controller response was compared with/without the SMES and that using the PS optimal controller. The load voltage response with SMES using the proposed ABC had the perfect response without any overshoot and minimum settling time. On the other hand, the load voltage overshoots using the ABC optimal controller and without SMES had considerable values (14%, −2%, and 4%). The load voltage overshoots using the PS optimal controller and with SMES had the values: (4%, −8%, and 1%). It is assumed that the settling time of load voltage, in the case of utilizing SMES and ABC optimal controller, is taken as a reference. The settling time of the load voltage, in the case of utilizing the ABC optimal controller without SMES, was larger by 300%, 50%, and 70%. However, in the case of the PS optimal controller with SMES, the load voltage settling time was increased by 600%, 200%, and 500%. The response of the DC-link voltage and current with/without SMES with the optimal controller under the proposed disturbances is shown in Figure 11b,c, respectively. It is clear that the SMES did not have any effect on the DC-link voltage. Moreover, these Figures show that the DC-link voltage and current were smoother in the case of using SMES than in the case of not using SMES. Figure 11d,e illustrate the total AC load voltage and current response, respectively. It is shown that the AC load voltage had constant amplitude and frequency values, while the load current varied according to the demand of both the static and dynamic loads. Figure 11f shows the AC static load current waveform; however, its value equaled zero in the period t = 0.0-2.0 then increased in the period t = 2.0-3.0, decreasing again in the period t = 3.0-4.0 s. Figure 12 shows the optimally controlled induction motor response. The induction motor had a step load torque shown in Figure 12a. It worked at no load up to 2.5 s when a step load torque of 4 Nm was applied. Figure 12b shows the speed response of the induction motor. The reference speed had a step drop from 35 to 25 rad/s. The figure indicates that the optimal vector controller perfectly followed the induction motor's reference speed. It had little settling time and had no overshoots. Figure 12c presents the stator current of the induction motor at the commanded load torques and rotor speeds. The input inverter of the induction motor had the voltage waveform that is indicated in Figure 12d.

Conclusions
This study proposed a micro-electrical power grid system made up of an ABCalgorithm-based optimal controller architecture. The investigated hybrid FC/wind/SMES power system primarily consists of a generating unit feeding both dynamic and static loads. Wind power serves as the primary source for supplying loads and storing hydrogen in the FC via the electrolyzer at high wind speeds. In addition, the SMES's coil is energized during high wind speeds. However, the SMES improves the dynamic performance of the microgrid. The dynamic load is selected to be an optimally vector-controlled induction motor, while the static load is considered an inductive/resistive load. A water electrolyzer is considered for supplying hydrogen gas. To guarantee efficient optimization of sources, optimal control is applied to achieve a stable constant voltage and frequency load waveforms and dynamic load, as well as to compensate for decreasing wind power and/or to share the extra needed power using the fuel cell and/or SMES. The proposed microgrid was evaluated for step changes in wind speed, induction motor speed and torque, and static load current, using Simulink/MATLAB simulation tools. The simulation's findings demonstrate that the suggested generating system successfully supplies the loads in a precise manner despite any disruptions. Additionally, despite changes in wind speed and the current of the static load and/or dynamic load characteristics, the suggested optimum controller can keep the DC-link voltage and, therefore, the AC load voltage, at their ref-erence values. The performance of the optimally controlled microgrid using ABC was evaluated and compared with/without the SMES. The performance was also compared to the optimally controlled microgrid using PS optimization. The results indicated that the presence of the SMES diminished all types of overshoots in the response and greatly improved the dynamic response. The load voltage response with SMES and the optimal controller showed a perfect response without any overshoot; however, it had a maximum overshoot of~14% without using SMES. The load voltage settling time was reduced in the case of utilizing SMES by~73%. The suggested controller's primary limitations might be that ABC is trapped at local minima or that convergence occurs too soon.