Optimization of Switching Control and Microgrid Energy Management System with Alternate Arm Converter Based on Bacterial Foraging Algorithm

,


Introduction
Concerns over the energy issue and the environmental harm caused by fossil fuels have grown in recent years, and this has led to the broad application of renewable energy sources (RESs) including solar, biomass, wind, and geothermal energy.However, wind and solar energy are inherently volatile and intermittent, and adding these RESs directly to power networks may cause issues with reliability, energy efciency, and power quality [1].Because of their high volatility and randomness, dispersed renewable energy sources provide substantial difculties to the microgrid's ability to operate economically and reliably [2].Accurate generation schedule preparation is exceedingly difcult because to the numerous stochastic resources and the load requirement [3].However, to ensure a consistent supply of electricity and efcient use of the battery storage, a microgrid must be equipped with an energy management system (EMS) to efciently dispatch and distribute various energy supplies based on their availability and associated costs [4].Te main intention of designing an efcient energy management system (EMS) is to accomplish many objectives, including lowering power losses, managing energy fuctuations, maximizing the use of alternative energy sources, and increasing the system load factor, among others [5].
Te novelty of this research is presenting the design of an optimized control strategy for obtaining the desired output across alternate arm converter (AAC) and designing an efcient embedded energy management system in integrating a microgrid with alternate arm converter (AAC) and AC grid to meet the load demand.Instead of focusing solely on AC grid supply, this strategy focuses on the maximum optimized usage of available solar PV energy, wind energy, and energy stored in the battery.In this confguration, an integrated CUK-SEPIC dualinput converter decides the input to AAC based on the control provided by the energy management system.
Te following list summarises on the main contributions of the research work: (a) A nine-level alternate arm converter model (b) A comparative analysis on the spectral analysis of the output voltage of AAC obtained by incorporating diferent controllers which is supported by the design in MATLAB/Simulink and Fast Fourier transform analysis waveforms (c) An optimized control strategy based on bacterial foraging optimization algorithm is incorporated in AAC to obtain a desired and smooth output which is supported by its results (d) An efcient energy management system is designed to monitor and optimally utilize the energy resources available to meet the load Te rest of the paper is organized as follows: Te operation and control strategies implemented in AAC are discussed in the preliminaries.Te proposed methodology of the work is presented in Section 3, and in Sections 4 and 5, the design and operation of EMS, results, and discussion are presented.

Alternate Arm Converter.
Te alternate arm converter (AAC) is one of the latest topologies among voltage source converter (VSC) family which can be implemented in telecommunication industry, railway traction and many other applications.Te notable features of alternate arm converter (AAC) superior to modular multilevel converter (MMC) are DC fault tolerant capability, capability to pull through AC faults and reduced number of submodules by half in each leg when compared with MMC for the same power rating, etc, [6].Te AAC topology is framed by stack of full bridge submodules (SM) connected in a cascaded manner.Tese cascaded submodules are called as waveshaping circuits which are attached to a two-level converter, namely, director switch (DS) in series with an inductor (Larm) and an equivalent series resistance (ESR-Rarm) forming an arm.Tere are two arms in each phase/leg, the upper arm and lower arm.A symmetrical design is adopted in both the arms.Tis leg design is incorporated for other phases but with 120 degrees apart.Te director switch (DS) is the most important component in this confguration which alternates either the upper arm or the lower arm to operate individually.Te main purpose of DS is to alter the current fow between the upper arm and the lower arm from which the converter has obtained its name as "Alternate Arm Converter."Te advantage of this topology is to reduce the power loss caused due to the continuous fow of current in both the arms even when only one of the arms is contributing to the output when compared to other topologies such as fying capacitor, neutral point clamped (NPC) inverter, cascaded H-bridge multilevel inverter, diode-clamped multilevel inverters, and modular multilevel converters.
A submodule comprises of either half bridge or full bridge confguration as shown in Figure 1.
In case of half bridge confguration, S1 is turned ON and S2 is turned OFF in an alternative pattern in order to prevent short-circuit condition when both the switches are switched ON simultaneously.Depending on the direction of the current iupper or ilower, capacitor connected across S1 and S2 is charged or discharged.In case of a full bridge, switches S1 and S4 are triggered ON simultaneously while S2 and S3 are in OFF state.When S2 and S3 are ON, S1 and S4 are in an OFF condition to generate an output voltage across the terminals in the positive and negative cycles.

Operation.
Te alternate arm converter can be operated as an inverter as well as a rectifer.In this research, the AAC functions as an inverter.A DC voltage of Vdc/2 is applied across the upper arm and lower arm of AAC.Te confguration of a single-phase nine-level AAC is depicted in Figure 2. Let us consider that there are P number of full bridge submodules connected in cascade, and this cascade connection is joined with an inductor Lupper arm and director switch DS1 in series to form the upper arm as shown in Figure 2. Another arm with the same symmetrical confguration forms the lower arm.An AC output voltage can be measured between the point of meeting of these two arms and the ground by connecting a load.A smooth and controlled AC output voltage is obtained by adapting a proper switching sequence to either insert or bypass a submodule into the path of current fow to be a part in generating the output voltage.Te director switch (DS) consists of a few IGBTs connected in series.Te switches present in the submodules and director switches are triggered by the phase shift PWM technique.
A smooth output is obtained without the need of flters which contributes in the reduction of the converter cost by increasing the number of submodules in each arm.A threephase output voltage is obtained by connecting the symmetrical topology together displaced with 120 degrees apart as R, Y, and B phase/leg.A circulating current i circ fows through the 6 arms due to the capacitor voltage imbalance in the submodules present in the upper arm and lower arms International Transactions on Electrical Energy Systems which is reduced/suppressed by the arm inductors, L upperarm and L lowerarm in each leg.Te currents i dc fows from the DC link, i upper and i lower are the arm currents, and i a is the current that fows through the load connected between the midpoint of the leg and ground.

Control Strategy of AAC.
Te research focuses on an efcient control strategy to control the real and reactive power in grid-tied inverters and to obtain minimum THD in the output voltage for an AAC.Te integration of the microgrid and inverter with the AC grid is not an easy task to interface, as proper/right synchronization must be developed to avoid unbalance between them neglecting which may lead to unbalancing of loads, damage to the entire system, poor power quality, unstable operation of the grid and in severe cases outage may also occur which have to be taken care.In order to transfer maximum power from renewable energy sources to the grid, the frequency, and the phase angle of the output current and voltage of the inverter must be synchronized which can be implemented using diferent control strategies incorporating the concept of the power transfer theorem [7].
In order to synchronize the microgrid with the AC grid, an efcient control strategy must be adapted which also improves the performance of AAC by generating the proper switching pattern to switch on the IGBT switches in the SMs and DSs.Tere are various traditional control strategies such as current control method, voltage control method, space vector control technique, decoupled control method, and direct power control which are implemented in grid-tied and standalone inverters.

Proposed Control Strategy for AAC.
Te proposed control strategy for AAC integrating the grid and the alternate energy sources feeding the load is shown in Figure 3.A DC voltage of Vdc = 10 kV is applied as input to the AAC which generates an AC output voltage across the load R load .A smooth and regulated AC output voltage is obtained by adopting an efcient control strategy, the synchronous reference frame vector current control method with phase locked loop (SRF-PLL) is used to generate the gating pulses to trigger the IGBT switches.Te synchronous reference frame control or dq control employs the transformation of 3 phase AC signals to 2 phase rotating components using Park and Clarke transformation techniques.Te dq0 (Hd, Hq, and H0) voltages and currents are obtained by transforming the actual/measured (Ha, Hb, and Hc) voltages and currents of AAC using the Clarke-Park transformation method which is depicted in equation (1).Te real power can be regulated by the d axis component and the reactive power by the q axis [8][9][10][11].Te idea behind this transformation is to analyse the complex signal easily in 2 axes, the direct axis (i.e., the real axis) and the quadrature axis (i.e., the imaginary axis) such that the output of the inverter is made to rotate with the frequency of the grid voltage to synchronize the inverter voltage with the grid.Te SRF-PLL is implemented to obtain the phase angle and frequency to synchronize with the grid parameters.Te PLL's primary function in a threephase system is to precisely evaluate the phase diference between the input and output voltage and current waveforms.Te angle calculated by PLL is taken to be W and the actual angle is taken to be ω * t which is given by equation (2).When the PLL traces the phase angle and if it is nearly equal to the actual voltage vector angle (ωt − W), then it can be expressed as in equation (3).

Hd
Hq In the proposed control strategy, there are two loops: the current control loop and the voltage control loop implemented in the design for synchronization of AAC with the grid to generate proper switching pulses for IGBTs in AAC.
Te current and the voltage controllers used in the loops are implemented to control the static errors which can be reduced to bring the dq voltages and currents in steady state.Te placement of the controllers is decided by the processing 4 International Transactions on Electrical Energy Systems speed and how quick they respond to signals [11].Te framework of the current control loop is presented in Figure 4.
In case of current loop, the controlling variables are inductor currents and in voltage control loop, capacitor voltages are considered as the controlling variables [11,12].Te voltage control loop is used to maintain and regulate the real and reactive power.As the output voltage and current of AAC are 3 phases, it is complex and difcult to analyse.Tus, a synchronous reference frame PLL is an ideal control strategy that can be incorporated to provide the suitable synchronization where park transformation is necessary to track the phase angle of the output voltage of AAC and the AC grid.Te AAC output voltage and current are the inputs to the PLL as shown in Figures 4 and 5. So, park transformation is applied to all the controllable variables such as currents and voltages as the phase angle of the AAC voltage must be decoupled in order to make the controlled current and grid voltage in phase with each other after fltering.Te three-phase reference and the measured signals are transformed.Tis analysis is done as it is easy to control these constant dc values when transformed from abc to dq0 [9][10][11][12][13][14][15][16].
Te PLL present in the current loop produces a controlling signal I (d-q) , and the reference signal I dref is compared with I d to produce an error output signal e I which is expressed by equation ( 4).In a rotating reference frame, the I q component becomes zero when the PLL is locked, and when it is not locked, it exhibits a small error in case of a balanced three-phase system.A control/reference signal (V ref1 ) δI which is given as input to the reference signal generator is generated by the controller when the error signal e I is fed to the controller.In case of the voltage control loop, the actual input voltage (V dc ) given to AAC from the energy sources is measured and then compared with the desired reference voltage to produce an error signal e V which is processed by the controller to generate a control signal δV which is fed to the reference signal generator which is expressed in equations (5).Te framework of voltage control loop is depicted in Figure 6.In order to synchronize the AAC output voltage with the grid, the measured output voltage (V AACmeasured ) is fltered and applied to the PLL for transformation to obtain the frequency and phase angle.Te reference signal generator generates 3 phase voltages (V1, V2, and V3) with the help of δI (V ref1 ), δV, and frequency of the measured output voltage which is presented in equations ( 6)- (11).Te signals obtained from the reference signal generator (V referencea , V referenceb , and V referencec ) are then multiplied with δI (V ref1 ) to provide V abcref (V refa , V refb , and V refc ) signals.Tese signals are then used to generate pulses to trigger the IGBT switches in the submodules and DSs of AAC by comparing with a carrier signal using the phase shift PWM technique in a proper manner to achieve the desired output which is represented by equations ( 12)- (14).Te fow and modules for generating the reference signals and switching pulses to AAC are represented in Figure 6.International Transactions on Electrical Energy Systems (1) Controllers.Tere are innumerable controllers available and still research is on progress to invent efcient, optimal, and high-speed controllers which can be implemented in the control systems to achieve the desired output depending on various applications.In this paper, three diferent controllers such as the conventional PID, fractional order proportional integral derivative (FOPID), and the FOPID controller trained by the metaheuristic algorithm is incorporated in the proposed control strategy to obtain the desired output of AAC, and a comparative analysis is done based on the performance and the THD value of the output voltage.Te PID controller is a versatile and robust feedback controller used in numerous applications.It is sometimes referred to as the three-mode controller (or three-term controller) because it has three parameters in its design.Te value of these parameters is determined based on the performance index.When the system parameters are altered to the point where the index reaches an extreme value, typically a minimum value, the system is said to have attained optimal control.Te performance index may be either positive or zero and is determined using the expressions such as integral square error (ISE), integral absolute error (IAE), integral time squared error (ITSE), and integral time absolute error (ITAE) which are functions of the error signal.
In s-domain, the transfer function of PID controller is given by where G(s) is the plant transfer function, U(s) and E(s) are output and input signals to the PID controller, and Kp, Ki, and Kd are the proportional, integral, and diferential gain parameters [17].
Even though PID controllers are suitable widely for all industrial applications, only a partial part of the loops in the PID controllers is tuned to achieve the optimum result.Te extension of study of derivatives and integrals for noninteger orders led to the latest advancement in the mathematical analysis which paved path for fractional calculus [18] which caused a transition from classical models designed by differential equations for noninteger order.Te fractional calculus has been used in recent years to model and control a variety of physical systems, diverse and widespread felds of engineering and science applications in order to increase the quality and robustness of the conventional PID controller which led to the implementation of fractional order PID (FOPID) controllers in control systems fractional-order controllers with fractional orders of I and D is one of the techniques used to enhance conventional PID controllers.FOPID controllers have two additional parameters, the order of fractional integration and the order of fractional derivative, in addition to the proportional, integral, and derivative parameters (Kp, Ki, and Kd) as shown in Figure 7.In order to increase the FOPID's fexibility, it has fve - 6 International Transactions on Electrical Energy Systems parameters which have the freedom to tune over a wide range to obtain an accurate output [18][19][20][21].
Te design of FOPID controller is very complex as it contains additional two variables (λ, µ) to obtain a good performance of the system.Te FOPID diferential equation is given by the following equation: where G(s) is the plant transfer function, Kp, Ki, Kd, λ, and µ are the proportional, integral, and diferential gain, the order of fractional integration, and the order of fractional derivative parameters.Te FOPID diferential equation is given by the following equation: where U(t) is the command signal given to the plant to achieve the desired output, E(t) is the error signal which is the diference between the set point/reference point and the actual or measured output, and D is the functioning operator related to the order of diferential and integral.
2.4.Bacteria Foraging Optimization Algorithm.Te bacteria foraging algorithm, a novel nature-inspired optimization technique, is based on how a swarm of Escherichia coli forages collectively.Te four basic processes that make up the optimization process are chemotaxis, swarming, reproduction, and elimination-dispersal.Tese procedure particular and theoretical underpinnings are both discussed.Animals that use inefective foraging strategies are eliminated by natural selection (the means of fnding, handling, and consuming food).Tis strategy thereby encourages the genetic transfer of the animal efcient foraging strategies.Better food-seeking organisms can successfully reproduce, whereas those with lower reproductive success rates are either wiped out or altered.Te BFOA feeds similarly to the E. coli bacteria that dwell in our intestines.Tis technique has successfully shown its efciency as a tool for power system optimization [22,23].Following is a brief discussion of the four stages of the foraging process: chemotaxis, swarming, reproduction, and elimination.
2.4.1.Chemotaxis. Figure 8 shows how the chemotherapeutic taxis mimic the swimming and tumbling motions of E. coli.Moving in the same direction continually is a requirement of swimming.While tumbling is characterised by irregular movement within a stride, it depends on how the nutrients were found along the way.As their health improves, bacteria will continue to travel in that way.However, if there is a deadly material nearby, it will fall or veer of course.Troughout its existence, the bacteria will shift between the two states.Te movement of E. coli bacteria throughout a search area for a nutrient is described by the following equation: where C(n) indicates the count of steps moved by bacteria randomly represented by tumble process, φ(i) represents the tumble generating a unit length randomly, and θ n represents the position of the nth bacterium at the ith chemotactic, jth reproduction steps, and kth elimination dispersal event [24].

Swarming.
Germs move forward in concentric circles due to the phenomenon known as swarming.Due to the nutritional impact, it will be split using succinate into small groups.Bacteria under duress produce attractants that signal other bacteria to form a swarm.To warn others to remain at a safe distance from it, it also produces a repellent.Tey are all drawn to one another by the attractant and drawn away from one another by the repellent as a result.

Reproduction.
According to the most fundamental principle of natural selection, the healthiest bacteria will reproduce in this environment, which is how bacteria replenish their numbers.Tey will replace any undesirable or defunct microorganisms.Te population remains unaltered as a result.Te replications of the healthiest bacteria were International Transactions on Electrical Energy Systems placed in the same area as the original (unchanged).Te stronger, healthier microorganisms frequently die of.Te healthiest bacteria will eventually create its own generation with the identical copy, regardless of gender.

Elimination.
Te unfavourable environmental conditions will infuence the bacteria's daily survival, or they will eventually move to the ecosystem's healthiest area.Tis is a natural phenomenon where the bulk of the germs disperse randomly in all directions as a result of an abrupt change in the environment.Even in the direst situations, all the bacteria in one region can move to another.In this new location, the bacteria can now fnd the global optimum.Furthermore, it might help bacteria get away from the local optima's trap.Figure 9 depicts the suggested BFOA algorithm's fow diagram.
Te main objective of this work is to achieve a low harmonics output AC voltage and current across the AAC.In order to obtain the goal, a FOPID controller tuned with BFOA is incorporated in the feedback loop of the control strategy, and the design is implemented using MATLAB software.Te FOPID controller tuned by BFOA performance is estimated by the performance indices which are based on the error criterion.Tere are many performance criterions to maximize and minimize the desired parameters.In this paper, the integral absolute error (IAE) is implemented to achieve the desired AC output voltage and current.Te generalised IAE is given in the following equation: where e t is the error of the signal.In Figure 3, there are two control loops in the control strategy where two FOPID controllers trained by bacterial foraging optimization algorithm are designed to achieve the desired AC output voltage and current.
Te objective function of output current control and output voltage control is given by equations ( 4) and (5).Te diferential equations of the FOPID controllers can be expressed by the following equations: where δI(t) and δV(t) are the controlling signals to generate the three-phase sinusoidal reference signals.Te phase shift PWM technique is used to generate the pulses for fring the gates of the IGBT switches in the AAC to achieve the desired output voltage and current [25,26].
Te BFOA consists of four processes in order to achieve its prey.Tey are (1) chemotaxis, (2) swarming, (3) reproduction, elimination, and dispersal process.Te BFOA is a process of iteration which begins by initializing the population (prey food) which in this case is to compute the voltage error eV(t) and current error eI(t).Te following is the procedure implementation of BFOA: Step 3. Iterate through chemotaxis, swarming, reproduction, and elimination-dispersal for each bacterium i in the population, (i) Perform chemotaxis: (ii) Compute the ftness function F (i) based on IAE using the current controller parameters.(iii) Update bacterium's position based on chemotactic steps and step size: Step 5. Controller performance evaluation (i) Evaluate the controller's performance using IAE with the updated parameters.(ii) Repeat the iterations until a stopping criterion is met.
Step 6. Implementation and testing (i) Implement the FOPID controllers with the updated parameters in MATLAB.(ii) Simulate and test the control strategy with the AAC system model to observe the impact of the tuned FOPID controllers.
Step 7. Analysis and results (i) Analyse simulation results to assess the efectiveness of the tuned FOPID controllers in achieving low harmonics AC output voltage and current.
Step 8. Conclusion (i) Summarize the results and fndings, discussing the efectiveness of the proposed control strategy for achieving low harmonics AC output voltage and current in the AAC system.

Comparative Analysis of PID, FOPID, and FOPID-BFOA Controllers.
A comparative analysis on the performance of a nine-level AAC using controllers such as PID, FOPID, and FOPID controller using bacteria foraging optimization technique that are implemented in the proposed control strategy to obtain the desired output and also its fast Fourier transform (FFT) spectral analysis is designed and simulated in MATLAB/Simulink for the confguration which is depicted in Figure 3. Te Ziggler Nicholas method, Cohen-Coon, Astrom-Hagglund (AMIGO) and Chien-Hrones-Reswick methods are the diferent tuning methods that are available for determining the parameters for the designing of the PID and FOPID controllers [19][20][21].Te PID and FOPID controllers can also be tuned either manually or automatically by the tuner in MATLAB/ Simulink.
Tere are many metaheuristic algorithms/techniques which have been implemented in research for optimization of various parameters depending upon the applications since many years, and it has gained more importance in control systems because it can provide the best solution among various other possible solutions for any given complex problem optimally and quickly.To obtain a smooth and regulated AAC output voltage, the values of Kp, Ki, Kd, λ and µ are obtained by tuning the FOPID controller using the bacteria foraging optimization algorithm (FOPID-BFOA) to achieve the optimized desired values.Te design parameters of Kp, Ki, Kd, λ, and µ used in PID, FOPID, and FOPIDtuned BFOA controllers are tabulated and presented in Table 1.
Tus, on performing the comparative analysis of PID, FOPID, and FOPID-tuned BFOA, it is analysed that error value obtained by FOPID-tuned BFOA is very less when compared to other controllers.Te spectral analysis is also determined for the AAC output voltage which gives a THD value of 21.46% for the PID controller, 18.60% for FOPID, and 4.26% for FOPID-BFOA is shown in Figures 10 and 11.Tus, from the above analysis, it is found that FOPID-BFOA gives better results than other controllers.

The Proposed Energy Management System (EMS)
Due to the irregular availability of natural resources and climatic conditions, the renewable energy sources are insufcient to deliver power to meet the load requirements without any interruption which led to the inclusion of energy storage devices.In order to prevent any supply interruption or for erratic or unexpected load consumption, energy storage is therefore a crucial component of a hybrid renewable energy system.When there is more energy generation than load demand, the energy storage system stores the excess energy and delivers it when there is more load demand than energy generation.By correcting any discrepancies between energy demand and supply, energy storage also serves as an energy bufer, enhancing system functionality and reducing the impact of any power outages.In this topology, battery banks act as a backup to meet the demand.Te entire power fow is managed, self-controlled and regulated by a controller to decide and give priority to which energy source has to fulfl the load demand based on the availability and charging/ discharging the battery depending on the state of charge (SoC) and isolate the load from the grid during conditions when the load demand is fulflled by the microgrid.When the power from the solar, wind, and battery is not meeting up with the instantaneous load demand, then the controller immediately directs the grid to feed the load, thereby isolating the AAC side connected to microgrid.
Te entire confguration of the proposed energy management system in integrating the microgrid, AAC, and the grid feeding an industrial load and a resistive load is pictorially represented in Figure 12.An efcient and optimal control strategy for utilising the renewable resources, energy storage device and charging/discharging of battery maintaining the uninterrupted power fow to meet the load demand is designed.Te energy management system comprises of a controller which is programmed to perform the function of regulating and managing the energy from the renewable 10 International Transactions on Electrical Energy Systems  International Transactions on Electrical Energy Systems energy sources, from battery based on availability and economic sources or from the grid to be fed based on the instantaneous load demand requirements [27].Te controller receives the instantaneous power from solar, wind, battery and load and generates duty cycles(control signals/pulses) based on the availability of the input energy sources to maintain the power fow to the load.Te AAC input voltage is being controlled by the control signals directed by the energy management controller whether the load is supplied either from renewable energy sources or battery.Te battery is charged from the AC grid through an AC-DC converter when the grid is isolated from the load.A controlled and regulated 10 kV is achieved by the fuzzy controller implemented in the battery submodule to feed the AAC in case of renewable energy sources are unfavourable to generate power.
Te input voltage to AAC is obtained either from the integrated CUK-SEPIC converter or from the battery.A three-phase output voltage of 10 kV is generated based on the switching pattern of the upper arm and lower arm submodules in each phase or leg.At the point of common coupling (PCC), the AAC and AC grid feeds the power to meet the load demand of an industrial and resistive load without any interruption.Based on the availability of power generated by renewable energy sources and battery, the AAC satisfes the load demand.But there are consequences which arise due to climatic factors/conditions which reduce the generation of power from them.Te load demand is met without any interruption either from microgrid or AC grid by a control signal generated by the energy management controller.Tus, the energy management controller tracks the entire operating characteristics of all the devices and commands them to operate in a sequential manner to achieve an efcient way of integrating the microgrid and grid with the load without any discrepancies.

Working Principle of the Integrated CUK-SEPIC DC-DC
Converter.Te parameters such as voltage, current, and power obtained at the output of the solar PV system, wind turbine (after AC-DC conversion), and battery are not in a controlled and regulated form.So, it has necessitated the inclusion of DC-DC converters to obtain a regulated output across the load.DC-DC converters play a vital role in the integration of microgrid with the AC grid.
In this proposed design, an integrated CUK-SEPIC DC-DC converter which is a dual-input converter has been incorporated.Te integrated dual-input DC-DC converters have gained more importance in the latest power electronics applications in obtaining the converter output power based on the availability of the inputs.Te main advantage of utilising the fused converters is that it reduces the number of devices used to build separate DC-DC converters allocated to operate separately for each input source voltage; this in turn reduces the cost and power losses and improves the efciency of the converter [27][28][29].
Te integrated CUK-SEPIC shown in Figure 13 operates based on the input energy sources availability.In this dualinput converter design, the CUK converter is connected to the solar PV system, and the SEPIC converter is connected to the wind turbines.LCUK, CCUK, M1, and D1 form the CUK converter circuit, and LSEPIC, CSEPIC, M2, and D2 frame the SEPIC converter.Lo and Co act as the flter and output is obtained across the common coupling terminals which are fed as input across AAC.

Modes of Operation of an Integrated CUK-SEPIC DC-DC Converter.
Te integrated CUK-SEPIC converter operates in two modes, and each mode has three switching states based on the availability of the inputs.In mode 1, if turn ON time for M1 is more when compared to M2, then the converter will operate in I, II, and IV switching states, and in mode 2, the converter will operate in I, III, and IV states [27][28][29][30].Let us consider that ds1 and dw1 are the duty cycles of the solar PV system and wind system, Is and Iw are the average and RMS input currents fowing from the solar PV system and wind system, Vco is the voltage across the output capacitor Co and Io and Voc are the average output current and voltage of the converter at the point of common coupling.Te output voltage at the point of common coupling is given by the following equation: International Transactions on Electrical Energy Systems (1) Mode ( So, in this mode, no output voltage due to nonavailability of renewable energy sources at the input of the integrated CUK-SEPIC converter.So, a regulated output voltage is achieved across AAC to meet the load demand based on the renewable energy input sources availability.

Behaviour of the Energy Management
System.Te energy management system (EMS) plays a crucial role in controlling and regulating the power fow from various input energy sources to meet the load demand.Te controller present in EMS receives input voltage and current from the solar PV system, wind, load, and battery.Depending upon the availability of input energy sources and to satisfy the load demand, the controller is programmed in such an efcient manner that it generates duty cycles (control signals) ds1, dw1, db1, dbo1, iso, and iso_grid to direct the power from the solar PV system, wind mill, battery banks, and grid to meet the demand.Te controller also commands over the charging/discharging of the battery.Te energy management controller architecture [27] is depicted in Figure 14.

Control Strategy of the Energy Management System.
Te energy management system controller masters the operation of the integrated CUK-SEPIC converter, battery, AAC, and the AC grid to fulfl the requirements of the load by altering the duty cycles based on the availability and economic consideration of the input energy sources.In order to avoid any discrepancies in meeting the load demand, the controller is programmed such that it monitors and controls the entire system with the supporting slave controllers like fuzzy logic controllers in case of MPPT in solar PV system and wind system, to obtain the desired output across the point of common coupling at the outset of the integrated CUK-SEPIC converter, charging/discharging of battery depending on state of charge (SoC%) and FOPID-tuned BFOA controllers to achieve the desired output across AAC to synchronize with the grid and supply the load.Te proposed energy management system fow diagram is presented in Figure 15.International Transactions on Electrical Energy Systems Te controller is programmed in such a way that it receives inputs from the solar PV system, wind system, battery, load, AAC, and the AC grid.Te load current is compared by the controller with that of the solar and wind currents (Is and Iw) which is represented by the following equation: Te battery is charged to a maximum value of reference current Ibchref which is calculated by equation (32) which is the excess current and voltage available at the output of CUK-SEPIC converter at the point of common coupling.
Te load is fed either from solar or wind or by both through the point of common coupling of the CUK-SEPIC converter and AAC depending on the duty cycles ds1, dw1, dbo1, and iso_grid.Te SoC of the battery and the direction of the current fowing through the battery are monitored by the controller.If the SoC is less than 10%, then the controller is programmed to regulate the duty cycles db1, dbo1, iso_grid, and iso1 and commands the AC grid to charge the battery till the battery current Ibc reaches the maximum value of reference charging current Ibchref or otherwise the battery voltage remains in the same voltage when Ibc is equal to Ibchref depending on the current fow direction through the battery and SoC.Te increment or change in the duty cycle is represented by Δd.Te load is fed from the output of AAC.When the power generation of solar and wind is less than the load demand, the load requirements are achieved by discharging of the battery accompanying the solar and wind power which is initiated by the duty cycles dbo1 programmed by the controller when the SoC is greater than 40%.Te battery will be discharged till Ibdref which is the maximum reference discharge current calculated as per the following equation: Ten, in the next case, if the load demand is neither satisfed by the renewable energy sources nor the energy storage devices, then the controller is programmed to change the duty cycles ds1, dw1, db1, dbo1, iso1, and iso_grid in such a manner that the load is isolated from the input energy sources and AAC and the load requirements are fulflled by connecting the load with the AC grid [30].Tus, the controller which is embedded in the design of the energy management system optimizes and regulates the power fow between the microgrid, AAC, AC grid, and the load efciently and quickly.

Selection of System Parameters.
Te proposed integration of microgrid, AAC, and the grid, feeding an industrial load and a resistive load, along with an energy management system has been designed and analysed using MATLAB/Simulink software.Te results are discussed in the next section in detail with waveforms in support for analysis.
Te entire model has been designed using MATLAB/ Simulink which comprises of a solar energy conversion system, wind energy conversion system, integrated CUK-SEPIC converters, battery, AAC, FOPID controller, grid, transformer, loads, and energy management controller to control and regulate the instantaneous power delivered by various energy sources to the load is shown in Figure 16.16 International Transactions on Electrical Energy Systems A solar PV system is designed to generate a 10 kV output voltage.A solar module of 1kW/m 2 with a voltage at MPPT(Vmp) of 54.7V, current at MPPT(Imp) of 5.58A and maximum power rating of each module to be 305W is chosen to design the solar PV system.So, the design parameters for a 10 kV solar PV system are calculated as follows: Module specifcation for 1 kW/m 2 of type: SunPower SPR-305-WHT voltage: 54.7 V, current: 5.58 A and P: 305 W For V t = 10,000 V, V t = No. of series-connected module per V no. of series-connected module per string = 10,000/ 54.7 = 183 total no. of modules = total no. of series connected modules per string * no. of parallel strings no. of parallel strings = 1500 total no. of modules = 183 * 1500 = 2,74,500 total power = total no. of modules * power of one module = 2,74,500 × 305 = 83.7 × 10 7 W   International Transactions on Electrical Energy Systems So, solar PV system design parameters are chosen as number of cells per module: 96, number of seriesconnected modules per string: 183, and number of parallel strings: 1500 Te I-V and P-V characteristics of a single solar module are represented in Figure 17.A wind farm with grid-tied wind turbine system is designed for a rated voltage of 10 kV, a variable wind speed of 8 m/s for a period of 0.8 seconds, 12 m/s from 0.8 seconds to 1.2 seconds and 10 m/s from 1.2 seconds to 2 seconds is chosen as the wind velocity for a power rating of 70 MW for analysis purpose is shown in Figures 18 and 19.
Te instantaneous power generated by solar and wind systems are fed to the dual input integrated CUK-SEPIC converter.Tis topology has been a boon to the standalone and grid-tied systems, where the renewable energy sources are unpredictable and intermittent.Te main purpose to introduce this integrated converter is to maintain and satisfy the load demand by either a solar PV system (Vs) or a wind farm (Vw) or from both the sources without any interruption.An integrated CUK-SEPIC DC-DC converter design parameters is presented in Table 2.
Te duty cycles/control signals are ds1, dw1, db1, dbo1, iso1, and iso_grid generated by the energy management controller based on the input signals Vs, Vw, Vb, Vo, Is, Iw, Ibc, Ibd, I L , and SoC obtained from various energy sources and the load to regulate the fow of power between the input energy sources and the load rapidly without any interruption.
Te output voltage of Vo = 10 kV of the CUK-SEPIC converter is maintained by fuzzy logic controller using the following equations: where dso and dwo are duty cycles generated by fuzzy controller to achieve constant voltage across the common terminals of the CUK-SEPIC converter.Te duty cycles ds1, dw1, dso, and dwo are compared, and two pulses are generated which are used to trigger the MOSFET/IGBT switches M1 and M2 in the CUK-SEPIC converter to generate the constant output voltage Vo at the point of common coupling output terminals of the converter.Tis constant output voltage is fed to the alternate arm converter to meet the load requirements.Te input to AAC is fed with a constant voltage of 10 kV either from the output obtained at the common coupling terminals of the integrated CUK-SEPIC converter or from the battery based on the duty cycles (control signals) given to the switches which control the input given to AAC.If the input to AAC must be fed from the solar PV system or wind farm, two interfacing switches will be triggered with the same duty cycle (db01) generated by the energy management controller; otherwise, if the output from the battery must be fed as input to AAC, another set of switches will be triggered by the duty cycle (db1).Te battery is acting as an alternative reserve when there is no availability of power generated from the renewable energy resources.Te battery type implemented in this design is nickel-metal hydride (NiMH).When compared to lead-acid, nickel-cadmium (Ni-Cd), and lithium-ion batteries, the NiMH batteries produce higher power and energy density with long life cycle.Te state of charge (SoC%) of the battery does not afect the output power and they very safe in the point of operation and handling compatibility.But they are very expensive when compared to lead-acid battery [31,32].
Te discharging characteristics of the nickel-metalhydride battery are represented in Figure 20.Te battery discharges its voltage to AAC depending on the duty cycle db1 generated by the energy management controller.Te AC grid charges the battery when the battery is not discharging the energy to AAC.
Te parameters of the battery are given below: Type: nickel-metal-hydride battery Nominal voltage: 10500 V; rated capacity (Ah): 5000; Vin = 9000 to 10500 V; SoC = 50% Battery response time: 0.01 seconds Te alternate arm converter is a HVDC topology.In this proposed design, AAC is used to interface the input energy sources and the load.A nine-level AAC is designed for a DC input voltage of 10 kV to be integrated for microgrid applications.Te upper arm and lower arm inductors (Larm) and arm capacitors (Carm) are calculated using the following equations [6,15,33,34]: where the modulation index (ma) can be varied for undermodulation and over-modulation from 0 up to 1.15.ha is the harmonics, f is the fundamental frequency (f = 50 Hz), ω is the angular frequency in rad/s(ω = 2 * pi * 50 Hz = 314.15rad/s), Sn is the converter rated power, and EP is the energy power ratio.Choosing the EP value relies on the applications of the converter and it is usually chosen between 0 and 50 J/KVA.In this design, V dc is the DC link input voltage to the converter.C SM is the submodule capacitance, and n is the number of submodules in the upper arm and lower arm.Te number of submodules in the arms is selected based on the output voltage levels.
International Transactions on Electrical Energy Systems

Alternate Arm Converter Design
No. of series director switch N dir � 5 A three-phase AAC is designed using MATLAB/ Simulink.Te full bridge submodules are designed with 4 IGBTs and a capacitor C SM across each module.Te IGBTs in the submodules and in the director switches (DS) are triggered by the pulses generated using phase shift PWM technique with a switching frequency of 10 kHz.Te pulses are generated using control strategies adopted which was already discussed in the methodology section.So, the pulses are provided to the IGBTs in the upper and lower arm by proper switching sequence of each phase which are switched on and of generating the three-phase AC output voltage with 120 °displaced from each other.Te DC voltage inputs to the AAC are supplied either from solar or wind or from the battery.
Te grid is connected to the point of common coupling (PCC) to meet the load demand if in case the input from other sources is insufcient.Te AC grid and the output of AAC are connected to PCC.Depending on the duty cycles

20
International Transactions on Electrical Energy Systems iso1 and iso_grid generated by the energy management controller, either the grid or AAC feeds the loads.Te grid will satisfy the load requirements or charge the battery depending on the duty cycle (iso1).A resistive load of rating 850 kW and an inductive load of R � 100 kW and Qr � 1000 VAR are connected to PCC.Tus, the load demand is satisfed by the implementation of the energy management controller in the integration of microgrid, AAC, and AC grid.

Energy Management System
Controller.Te energy management system controller operates in 5 modes which generate the necessary control/duty cycle to operate the integrated CUK-SEPIC converter, either charge or discharge the battery, and feed the either from a microgrid or an AC grid as shown in Table 3. Te controller is initialized and it receives the output voltages and currents of the solar PV system (Vs, Is), wind (Vw, Iw), battery (Vb, Ib, and SoC), and load (Il and Vo) to generate the duty cycles (ds1, dw1, db1, db01, iso1, and iso_grid) to operate the CUK-SEPIC converter and battery.Te controller and entire proposed design are analysed for a time period of 0 to 2 seconds.Initially, both solar and wind energies are sufcient to feed the load which appears across the fused CUK-SEPIC converter for a time duration of 0 to 0.4 seconds.Te duty cycles ds, dw, iso_grid, and dbo1 triggers the switches in the integrated CUK-SEPIC converter and supply a regulated input voltage of 10 kV across AAC.Te battery is charged from 0 to 1.2 seconds by the ac grid which is controlled by the duty cycle db0.Te output voltage from AAC feeds the load demand which is being controlled by the duty cycle iso_grid which isolates the load from the grid for a duration of 0 to 1.6 seconds.
From 0.4 to 0.8 seconds, only solar output is available, and only the CUK converter generates 10 kV across AAC.During 0.8 to 1.2 seconds, only wind output is available, so only the SEPIC converter generates the 10 kV at the common point of the integrated CUK-SEPIC converter which is given as input to AAC.Te battery alone discharges the stored energy to AAC during 1.2 to 1.6 seconds when the switch connected across the battery is triggered by the duty cycle db.Te microgrid and AAC are isolated from the grid for a duration of 1.6 to 2 seconds which is controlled by the duty cycle iso given to the circuit breakers.Te grid alone feeds both the loads and stops charging the battery during this period.Tus, the energy management controller regulates and manages the power fow through the entire system without any interruption in meeting the load demand.

Results and Discussion
Te proposed AAC's suggested BFOA-trained FOPID controller has also been modelled and analysed using a MATLAB/Simulink model, and the results of the examination are reported.Te simulation parameters of the solar, wind, AAC converter, flter, and battery circuit are listed in Table 4.A solar module for 1 kW/m 2 , 54.7 V, a current rating of 5.58 A, and the power of each module are chosen as 305 W. A wind speed of 12 m/s is chosen as the wind velocity.Two loads with capacities of 850 kW and 100 kW and reactive power of 1000 VAR are taken for simulation studies.
Te waveforms of solar irradiance, the value of delta (δ) of the maximum power point tracking, solar PV voltage, its current curve, its output power, and the output voltage of the solar PV system with reference voltage are represented in Figures 21 and 22, respectively.It can be noted from the waveforms of the solar voltage and current that the values obtained matches with that of the rated values chosen for the simulation purposes.Te entire energy management system with integration of solar, wind, battery, AAC, AC grid, and load is analysed for a time duration from 0 second to 2 seconds.
Te wind velocity that swipes the wind turbine for a time duration from 0 second to 0.8 seconds is maintained at 8 m/ s, the wind velocity of 12 m/s is maintained from 0.8 seconds to 1.2 seconds, and from 1.2 seconds to 2 seconds a wind velocity of 10 m/s is maintained.Based on the wind velocity, the outputs of the wind energy conversion system (WECS) are analysed.Te performance parameters like the output voltage and output current of the wind farm, the AC-DC converter, the WECS-rated wind speed, and the variation of the output power are displayed in Figure 23.Te output voltage of the AC-DC converter represents the rated value of 10 kV, and it is noted that the voltage contains less ripples.From Figure 23, it can be detected that the WECS output power reaches a peak of 50 MW before it settles nearly around 25-30 MW during the time period between 0 second and 0. 4 seconds.Te duty cycle dw1 generated by the energy management controller is maintained at zero for analysis purpose so the power generated from WECS during time period from 0.4 seconds to 0.8 seconds is zero.During the time period between 0.8 seconds and 1.2 seconds, approximately 40 MW of power is generated by the WECS.Te output power is again zero during 1.2 seconds to 2 seconds as the duty cycle dw1 is again maintained at zero.
Te fuzzy logic controller generates a pulse based on the duty cycles ds1 and dw1 to trigger the MOSFET/IGBT switches M1 and M2.An output voltage of 9 kV-10 kV appears across the point of common coupling of the integrated CUK-SEPIC DC-DC Converter.Te output voltage is maintained around 9 kV-10 kV by the combined output voltage of solar and wind for the duration from 1 second to 0.4 seconds, and solar only contributes between 0.4 seconds and 0.8 seconds.During the time period 0.8 seconds-1.2seconds, the output power is contributed only by the wind system which is presented in Figure 24.International Transactions on Electrical Energy Systems Figure 25 depicts the battery voltage and current and the state of charge (SoC) of the battery.Initially, from 0 second to 1.2 seconds, the battery is charged by the AC grid which is initiated by the duty cycle db01.Based on the duty cycle db1, the battery delivers an output voltage of 10 kV to AAC for a time period between 1.2 seconds and 1.6 seconds, so that the SoC reduces from 50% to around 49.955%.
Figure 26 shows the waveforms of the energy management system.Te energy management controller generates duty cycles (control signals) to initiate and trigger the switches to operate such that initially input voltage to AAC is by both solar and wind systems for a time period of 0.4 seconds at the common point terminals across the CUK-SEPIC converter, then from 0.4 seconds to 0.8 seconds, only solar contributes output voltage to the common point terminals.At 0.8 seconds to 1.2 seconds, the output voltage at the common point of the CUK-SEPIC converter is generated only by wind, and the remaining duration is from 1.2 seconds to 1.6 seconds and from 1.6 seconds to 2 seconds, the power is contributed by the battery system and from the AC grid.So, the load requirements are met by the output voltage of AAC with the inputs from renewable energy sources and the battery till 1.6 seconds and during which the grid is isolated from the load which is controlled by the duty cycles "iso_grid" and "is01", but the grid charges the battery without being idle as commanded by the duty cycles "iso1" and "dbo1" produced by the energy management controller.Te load demand is supplied by only the AC grid for the remaining period which is controlled by the duty cycle "iso1."Te output of AAC and the AC grid are connected at      International Transactions on Electrical Energy Systems the point of common coupling (PCC2) and the load demand is satisfed by these energy sources which are optimized by the efcient energy management controller.Figure 27 shows the PWM pulses that are generated using the BFOA-FOPID method and are applied to the DS of the AAC, and the corresponding circulating currents that are generated in the 3 legs of the AAC are depicted in Figure 28.
Te circulating currents arise due to an unbalance in the submodule capacitor voltages which must be reduced and it constitutes a greater portion in increase of the power loss in the converter.Around 100 A of circulating current is fowing in each phase.Te average capacitor potential for upper and lower submodules of the AAC is presented in Figure 29.Te upper and lower arm current, internal circulating current of "a", "b", and "c" phases, and the voltage across the director switch of upper arm of "a" phase are shown in Figure 30.
Te output voltage and current of a three-phase AAC confguration are illustrated in Figure 31.Te voltage obtained at the output terminal of AAC is fed to meet the load demand.Two industrial loads, Load 1 and Load 2, are connected to the PCC.Te load demand is met either by renewable energy sources or battery or the AC grid which is controlled, regulated, and managed by the energy management system/controller.Te waveforms of the output voltage, current, and power of AAC and power delivered by AAC and grid to Load 1 are displayed in Figure 32.
Te waveforms of grid voltage and current are depicted in Figure 33, and the output voltage, current, and the power of load 2 and power delivered by the grid are represented in Figure 34.It can be witnessed from the graphs of the current and voltage waveforms that all the graphs are nearly sinusoidal in quality; henceforth, it can be presumed that the THD of the proposed system is very less.Te simulation   International Transactions on Electrical Energy Systems consequences presented in Table 1 show that the error produced with the proposed BFOA methodology in tuning the FOPID is very less as compared to that of only the FOPID controller without the application of BFOA and PID controller in achieving the desired output voltage of 10 kV across AAC to meet the load demand without any interruption with the integration of various input sources controlled by an efcient energy management system.
Table 5 provides a comprehensive overview of the performance analysis conducted on a microgrid energy management system (EMS) across various time intervals.Te microgrid refers to a comprehensive energy system that integrates various energy sources and loads in order to guarantee a power supply that is both efcient and dependable.Te table highlights the signifcant importance of the energy management system (EMS) in upholding the stability of the microgrid, efectively managing the equilibrium between energy supply and demand, and guaranteeing sufcient power allocation to diferent loads.Te comprehensive data provided in the table facilitates comprehension of the microgrid's performance across various scenarios, thereby playing a crucial role in the development and enhancement of energy management strategies for practical implementations.International Transactions on Electrical Energy Systems   International Transactions on Electrical Energy Systems

Conclusion
Tis paper investigated the design of an efcient control strategy for AAC and a comparative analysis of controllers based on performance and spectral analysis was performed.
Next, an optimal energy management system was proposed for a system integrating the microgrid and utility grid incorporating an AAC as an inverter to meet the load demand.Te parameters for the proposed system are selected based on the load demand considering diferent input energy sources, monitored, and controlled by an efcient energy management system based on various operating conditions of inputs, and the performance of the system is verifed through the results.An optimized control strategy is incorporated in AAC to obtain a desired output across it.A metaheuristic algorithm, bacterial foraging optimization algorithm, is implemented to train the FOPID controller to achieve the desired output to meet the load demand.Te load demand is satisfed either by the microgrid through AAC or the AC grid which is foreseen by the energy management system.An efcient energy management system has been designed, and the results have been verifed through simulation.Te work of this paper can be incorporated in the telecom industry and railway traction.

Figure 3 :
Figure 3: Block diagram of proposed control strategy.

Figure 4 :
Figure 4: Framework of the current control loop.

Figure 5 :
Figure 5: Framework of the voltage control loop.

Figure 6 :
Figure 6: Block diagram of generation of PWM gating pulses to upper and lower arm of AAC.

Figure 11 :Figure 12 :Figure 13 :
Figure 11: (a) Spectral analysis of FOPID controller tuned bacterial foraging optimization algorithm and (b) output voltage of nine-level AAC.

Figure 14 :Figure 15 :
Figure 14: Architecture of the energy management controller.

Figure 16 :
Figure 16: Design of the proposed energy management system.

Figure 17 :Figure 18 :0Figure 19 :
Figure 17: I-V and P-V characteristics of a single solar module.

Figure 21 :
Figure 21: (a) Delta value for MPPT of the solar PV system and (b) solar irradiance.

Figure 22 :
Figure 22: Solar PV system output voltage, current, and power.

Figure 23 :
Figure 23: (a) Output power of WECS, (b) output voltage and (c) current, and (d) output voltage and (e) current of AC-DC converter.

Figure 24 :Figure 25 :
Figure 24: Output voltage of integrated CUK-SEPIC converter (fused DC-DC converter) at PCC1 and output voltage of solar and wind systems.

Figure 29 :Figure 30 :
Figure 29: Average capacitor potential for 9 cells (upper SM and lower SM) of AAC.

Figure 31 :
Figure 31: Tree-phase output voltage and output current of AAC.

Figure 32 :
Figure 32: Output voltage, current, and the power of Load 1 and power delivered by AAC.
Figure 34: (a) Output phase voltage, (b) phase current, and (c) the power of Load 2 and power delivered by the grid.
1. M1-ON and M2-ON.In mode 1, both the solar and the wind outputs are available at the input of the converter.As both power generations are available, M1 and M2 are turned ON, and the diodes are reverse biased.Te solar and wind voltages charge the inductors LCUK and LSEPIC.Te output inductor Lo and output capacitor Co are charged by the discharging currents of CCUK and CSEPIC.Te energy stored in Co appears across the point of common coupling which is fed as input to AAC.Te relationship between the input and output parameters of the CUK-SEPIC converter is represented in the following equations:

Table 2 :
Design parameters of the integrated CUK-SEPIC DC-DC converter.

Table 3 :
Modes of operation of energy management controller.

Table 4 :
Design parameters of the proposed confguration.