Battery Cell Balancing of V2G-Equipped Microgrid in the Presence of Energy Storage Aggregator

,


Introduction
High electricity usage and load demand in Sarawak cities are caused by consumers from various backgrounds, including residential, commercial, and industrial consumers.As a result, renewable energy sources are becoming increasingly popular because they can meet the demand for electrical energy while also resolving the problem of electrical energy defcit.Te use of renewable energy sources consists of a variety of confgurations in the electricity generation system.One of the most common confgurations is the use of photovoltaic solar generation in the microgrid system [1].Photovoltaic resources are more desirable for microgrid use because they do not have any moving components and there are no losses associated with motion.But its intermittent nature is the main drawback of solar power.Hence, energy storage systems [2] are generally recommended for intermittent sources.Te increasing penetration of the PV system may also have signifcant efects on power distribution systems soon, especially because of the intermittent nature of its output caused by cloud cover.Coordinated use of the solar power system with electric vehicles will therefore be a possible solution that can help maintain the grid's fat power profle [3].Since electric vehicles are parked on average 22 hours a day at work or home, the microgrid can integrate electric vehicles as an energy storage unit.When parked and plugged into the electrical grid, electric vehicles can consume and store energy and will also be able to supply power back to the grid when needed [4].Electric vehicles which are used as energy storage for microgrid consist of a larger battery pack and an electric motor.Te battery pack is a combination of cells connected in series and parallel to obtain the desired operating voltage and current rating.Te batteries of electric vehicles are developed by stacking many individual cells in a specifc order.According to [5], the electric vehicle batteries are not similar to those used in electronic devices.Electric vehicle batteries needed to withstand high energy and power capacity within several limits in terms of space and weight.Lithium-ion cells are recommended storage technologies for EVs due to their high energy capacity, afordable price, longer lifespan, and also low self-discharge rate.However, due to the dynamic behaviour of charging and discharging of EVs, the capacity of the battery pack is not constant, leading to a power imbalance.Balancing plays a crucial role in preserving battery life [6] because, without it, cell voltages can gradually deviate over time.Tis divergence in voltage levels can lead to a rapid decline in the overall capacity of the battery pack during its use, ultimately jeopardizing the integrity of the entire battery system and diminishing its lifespan.Tis issue becomes particularly critical in high-voltage battery systems, such as those commonly used in hybrid electric vehicles (hybrid EVs) [7,8] that rely on regenerative braking.Hence, it becomes imperative for the battery management system (BMS) to incorporate an efcient balancing mechanism.
In an electric vehicle battery pack, individual cell voltages tend to diverge over time due to variations in state of charge (SOC), impedance, capacity, self-discharge rate, and temperature characteristics.Cell balancing serves the dual purpose of extending battery lifespan and enhancing safety.Te passive balancing technique [9] is a simple and easily implementable method which makes the overcharged cell dissipate excess energy using a bypass technique.Tis approach provides a cost-efective solution for cell balancing and is commonly used in industrial applications.On the other hand, active balancing employs capacitive or inductive methods to efciently transfer charge from overcharged to undercharged cells.A fxed-shunting resistor-based passive balancing method is introduced in [10].Te authors have implemented a method for balancing the cells of the lithium battery.Te limitation of this method is heat dissipation, and it can be used for only less number of cells connected in series.Te authors in [11] developed a switched shunting resistor-based passive balancing method.Tis method can be used only for low-voltage applications, and it afects the battery life.A cell bypass active balancing method is introduced in [12].Te method is very cheap and very easy to control.Te switches used in the cell bypass method experience high current stress, which increases the losses in the system.Te authors in [13] developed a cell-to-cell active balancing method for high-power applications.However, this method makes the system bulky and is very difcult to control.Te cell-to-pack active balancing method is introduced in [14].Tis topology sufers from higher voltage and current stress as well as being very expensive.Te packto-cell active balancing method is introduced in [15].In this topology, the maintenance can be more challenging due to the need to access and service individual cells within the pack.Te cell to pack-to-cell topology is implemented in [16].It allows for a more efcient use of cell space, potentially reducing the overall weight and size of the battery pack.It simplifes battery management as cells are grouped, but can still require robust balancing and monitoring.
Cybersecurity concerns in EV charging stations [17] arise from the extensive data exchange between the charging infrastructure, vehicles, and user accounts.Tis data includes personal information, billing details, and vehiclerelated data, making it a prime target for cybercriminals.Malware and ransomware attacks can compromise the software running in EV charging stations.An attack can disrupt service, potentially leaving EV drivers stranded, and attackers may demand ransoms for restoring functionality.
From the literature, the key research gaps identifed in the balancing systems are as follows: (i) Passive balancing wastes excess energy as heat during balancing, reducing overall efciency (ii) Passive balancing process potentially requiring additional cooling measures (iii) Passive balancing process is a slower balancing process as it relies on the natural discharge of overcharged cells (iv) Active balancing is more energy-efcient as it transfers charge instead of dissipating it, but some energy loss still occurs (v) Active balancing requires additional components such as capacitors or inductors, increasing system complexity and cost (vi) Active balancing systems may have more points of potential failure due to additional components.
From the research gaps, the objectives of the proposed system are framed.
(i) To choose a suitable approach for battery modelling in order to anticipate charge/discharge behaviours, state of charge, voltage, and various battery attributes (ii) To design a two-switch fyback converter by considering the drawbacks of a conventional fyback converter (iii) To implement a modifed balancing method which overcomes the drawbacks of the existing methods (iv) To test the developed balancing method in a microgrid system with a battery aggregator (v) To compare the efectiveness of the suggested technique with the existing methods Te work mainly concentrates on two approaches.Te frst approach is to integrate electric cars as one energy storage aggregator and model the aggregator for the microgrid.Te second approach is to implement the developed battery balancing method to balance the voltage of the total battery packs inside electric vehicles.Tis is because if there is a diference between the voltage and the capacity of 2 International Transactions on Electrical Energy Systems the attached battery cells, the entire battery pack cannot function efciently, which has led to an energy storage imbalance [18].Te energy storage capacity is reduced and cannot work efciently when connected to the microgrid.Te paper is organized as follows: Section 2 discusses the modelling of the battery.Section 3 discusses the proposed converter design.Section 4 discusses the developed balancing method.Section 5 presents the results of the entire system.Section 6 presents the conclusion of the developed system, pointing out the highlights of the proposed balancing method.

Battery Modelling
In order to create a battery-powered system that functions efectively, a precise battery model becomes imperative.Such a model possesses the capability to anticipate both the dynamic and steady-state behaviours of the battery.In practice, crafting a precise model for diferent battery chemistries poses a signifcant challenge, primarily because of the intricate electrochemical nature of batteries.Depending on the trade-of between system accuracy and implementation complexity, the extended Tevenin model [19] can efectively capture battery transients at various levels, ranging from 1RC to 2RC and 3RC, up to the nth order model.Consequently, the implementation of RC models is adopted to enhance the performance of EVs battery management systems (BMS).

3RC Battery Model.
Te framework for solving the optimal cell balancing problem is based on the Tevenin 3RC electrical equivalent circuit model (ECM).Electrochemical impedance spectroscopy (EIS) is a test used to derive model parameters.Figure 1 illustrates the ECM featuring three parallel RC pairs.
where, V R1C1 ,V R2C2 , V R3C3 are the voltages of the shunt RC pair, represents the output voltage of the 3RC model, equation (2) represents the transient voltage response of the system. dV where where, τ 1 , τ 2 , and τ 3 , indicate the time constant of the 3RC network.
Te battery terminal voltages V t , V oc , and V 1 , V 2 , V 3 represent the open circuit voltage (OCV) and voltage drop across the 3RC branch's polarization resistance, respectively.Equation ( 5) presents the formula to determine the battery's SOC.
C, capacity of the battery, SOC o , initial SOC of the battery, and η is Coulombic efciency.Te current integration (Coulomb counting) method is used to determine the battery SOC.Since the self-discharge rate of Li-ion batteries is minimum, the coulomb efciency value is close to 1.
According to equation ( 6), η lowers when more battery charge and discharge cycles are performed.Battery testing under charge and discharge circumstances yields a link between battery voltage and SOC.
Te charging current is presented in the following equation: Te current and voltage of the pack is presented in equations: Battery system output is shown in the following equation: International Transactions on Electrical Energy Systems 3 I o is the output current, I Bo,(t) is the output current of the balancing circuit, and P o is the power output of battery pack.
During the balancing process, the power balance equation for each cell is displayed in the following equation: P lB denotes the power loss across the balancing circuit.
Te constraints of current in the battery balancing circuit are as follows: I Bmax and I Bmin are the maximum and minimum balancing current limits for the circuit.During balancing, the following constraints are imposed in order to achieve voltage and temperature equilibrium: where Δ V is the highest typical cell-to-pack voltage disparity where Δ T is the maximum temperature disparity between the average of each cell and the pack.Te change in battery temperature is calculated using the frst-order diferential equation, as given in the following equation: where T a represents the ambient temperature in degrees Celsius, T B signifes the battery temperature in degrees Celsius, stands for the battery's initial temperature, which is set equal to the ambient temperature in degrees Celsius.C T denotes thermal capacitance in Joules per degree Celsius, while R T signifes thermal resistance in degrees Celsius per Watt.P L represents the power loss across the battery's internal and polarization resistance.To calculate the power loss for the 3RC equivalent battery model, the following equation is used Te value of R 1 , R 2 , R 3 , and R 0 are estimated at diferent SOC through EIS test.

Proposed System
In this work, a modular fyback converter is introduced for cell balancing.Te primary aim of this approach is to address voltage imbalances within battery cells.Tis new architecture uses a transformer with numerous windings to separate the single input and multiple output terminals.Trough a simple switch operation, the developed confguration ensures that the battery's voltage is kept stable when being charged or discharged.Te usage of the conventional fyback converter [20] leads to excessive stress on the switch and the formation of ringing due to the primary electric feld efect, potentially resulting in damage to the switch.Consequently, the switch experiences increased voltage stress caused by the input voltage.To address this issue, an individual clamp circuit is necessary to suppress voltage spikes and enable the fow of current through the magnetizing inductor when the switch is turned of.However, the presence of such a clamping circuit can lead to power dissipation through the resistance element, ultimately limiting the long-term power efciency of the converter.To address the drawbacks of the conventional fyback converter a modular two-switch converter is designed.Te developed confguration contains two switches (Q1 and Q2), alongside two diodes, D1 and D2, interconnected in a bridge confguration.When adapting a typical fyback converter circuit for cell balancing purposes, it transforms into a design in which four battery cells within a single transformer distribute the similar magnetic fux.In contrast to the conventional fyback converters, where the circuit necessitates a number of transformers equivalent to the number of cells, our proposed design allows for a reduction to just one transformer.Tis innovation harnesses shared magnetic fux to facilitate rapid voltage synchronization and straightforward voltage detection.Moreover, the use of modular fyback converters minimizes the impact of voltage spikes caused by leakage when compared to traditional single-switch converters, thereby enhancing overall battery performance.Figure 2 presents the basic confguration of the developed two-switch modular fyback converter.Figure 3 presents the modes of operation of the proposed converter, considering a single battery cell in the circuit.
In Figure 3(a), when both switches Q1 and Q2, each with a duty cycle ratio of D, are concurrently activated a connection is made between the input terminal and the transformer's primary winding.As a result, the diode in the secondary winding of the transformer receives a reverse voltage across its terminals.Consequently, during this period, the current within the secondary winding is obstructed, directing it to pass through the freewheeling diode, where it is transformed into reactive power.Tis results in a reduction in both power loss and system noise.Te inductor current is given as 4 International Transactions on Electrical Energy Systems where V g is the input voltage, and L m is the magnetizing inductance.Figure 3(b) illustrates the coordinated deactivation of switches Q1 and Q2.Te current fowing through the magnetising inductor must continue in the same direction even after the switch is turned on and of; therefore, it is returned to the input terminal and reversed by the two freewheeling diodes.Tis leads to a linear decrease in the inductor current, denoted as i M .Figure 4 portrays the equivalent circuit when both Q1 and Q2 are deactivated, assuming that the primary side current remains above zero Equation ( 20) displays the secondary winding current (i sec ) from the transformer.
Here, L l2 represents the secondary side transformer's leakage inductance, while V out signifes the output voltage.Te energy stemming from leakage is channeled back through the diode, transforming it into reactive power.Tis process results in a reduction in power loss and system noise.Te determination of the operational mode at this stage relies on whether the step-down converter meets the conditions outlined in equation ( 21), thereby initiating the operation mode when the specifed condition is met.
Tus, when equation ( 21) is satisfed, the diodes play a role in enabling current fow through voltage inversion, thereby transferring energy from the primary side to the secondary side.In addition, the voltage equation governing the current on the secondary side remains in accordance with the following equation:  International Transactions on Electrical Energy Systems Te primary side current (i M ) is given as follows: Where, Te operation of the circuit during this phase concludes when the primary current in the transformer reaches zero.Subsequently, as depicted in Figure 3(c), the inductor voltage also drops to zero.Te amount of energy transferred within the magnetising inductor rapidly reduces when the current on the primary side of the transformer drops to zero.Ultimately, all currents within the modular fyback converter reach zero, as illustrated in Figure 3(d).Following this, switches Q1 and Q2 proceed to repeat the turn-on operation mode simultaneously.

Proposed Cell Balancing Method
Figures 5(a) and 5(b) depicts the operational mode of the proposed battery balancing method.As soon as Q1 and Q2 of the converter are turned of, energy is transferred through the transformer to the secondary cell stage, where it can be regulated to achieve a stable voltage.Tus, the power retained by the transformer is transferred to the cell stage via the transformer in conjunction with the electrical current passing via the diode during switch-on operation.Consequently, in situations where there exists a voltage imbalance among cells, the transformer's energy is equalized among them through their shared magnetic fux.Hence, as illustrated in Figure 6(a), the cell voltage undergoes a diferential charging and distribution process, with the charging being diferentially allocated based on the variance among the cell voltages.Conversely, if a specifc cell voltage surpasses a predetermined threshold, it becomes imperative to halt the charging process automatically, thereby averting the risk of overcharging the battery cells.Consequently, as depicted in Figure 6(b), any excess energy exceeding the maximum charge voltage is transformed into reactive power and redirected back to the power supply source.Tis action efectively interrupts the distribution of voltage among the cells.
Te transformer coil receives power from the primary side when the switch is turned on.Tis applied voltage's polarity is established by the direction of the current, while its amplitude is set by the duty cycle of the switch.In practise, cell balancing takes place when the converter switch is in its of position, as shown in Figure 7. Assuming a circuit is made up of two cells, m and l, at a given time, with diferent charging voltages, energy fows from the cell with the higher charging voltage to the cell with the lower charging voltage when the switch is of.Even as the number of cells increases, the charging principle can be used to calculate the magnitude and direction of energy transfer.Ten, if cell' m′ has a higher charging voltage (V m ) than cell 1 (V l ) cell' m′ will charge faster.
where L l represents the leakage inductance, which serves as an impedance that restricts the fow of electricity.Figure 8 presents the three-winding transformer charging circuit of the proposed model.During this period, the cell's output voltage follows the equations ( 25)-( 27) based on the specifc magnetizing inductance conditions depicted in Figure 8. 6 International Transactions on Electrical Energy Systems Tis very principle remains applicable when the number of cells is expanded to n by augmenting the number of windings on the secondary side.Figure 9 presents the control of the proposed technique.

Comparison of the Proposed Method with Existing
Methods.Table 1 provides a comparison of diferent balancing techniques with the proposed method, considering factors such as reliability, control strategy, balancing speed, and other relevant criteria.Te choice of a cell balancing method is primarily guided by the control strategy and design principles that aim to minimize the use of hardware components.Te control schemes, which encompass aspects like charge and discharge regulation, play a vital role in determining which method to employ.Despite the utilization of capacitor-based balancing systems during both charging and discharging phases, they exhibit an inherent efciency of only 50%.Moreover, they are unsuitable for Liion battery chemistry, which demands a minimal degree of  voltage imbalance.In contrast, the transformer-based balancing system is more efcient than the inductor-based system and is characterized by greater complexity.

Results and Discussion
Te simulation work is carried out for a 48V Li-ion battery pack with sixteen cells connected in series.Te two switch fyback converter-based balancing architecture is implemented in Matlab/Simscape, specifcally confgured for charging conditions, to assess the performance of the framework.Parameter values for the model are stored in the lookup table.During the simulation, cells are charged in the CC-CV mode and the variation in voltage across the cells is determined by modifying the initial state of charge (SoC) of the battery pack.Each cell has a capacity of 3.3Ah, and an inductor value of 10μH has been selected.Te simulation involves computing the open circuit voltage (OCV), terminal voltage, temperature, and SoC for each cell.At the outset, the voltage diference between cell1 and cell2 is intentionally maintained at a level exceeding 30mV.Once the cell voltages reach the designated charge threshold of 3.9V during a charging rate of 0.5C, the process of cell balancing is triggered.Te frst phase, Stage 1, commences by activating switch Q1 and Q2 as soon as cell 1's voltage surpasses that of cell 2. Subsequently, switch S1 is kept in the ON state, leading to the charging of inductor 1, and it remains ON until the voltage diferential between the cells falls below 30mV.Energy stored in inductor 1 is then transferred to cell 2 after approximately 5,800 seconds via the body diode of switch Q2.Te graph in Figure 10 displays minimal fuctuations in cell voltage due to the low balancing threshold voltage applied.Figure 11 presents the SoC of the cell1 and 2.
As illustrated in Figure 11, the entire charging process consumes approximately two hours to reach completion, with cell balancing requiring approximately 50 minutes.Charging takes place in an environment maintained at 20 °C.
During the charging process, cell temperatures gradually rise, peaking at 24.75 °C as depicted in Figure 12.Despite voltage fuctuations during charging, the current remains constant.As each cell reaches its maximum voltage, it switches to the constant voltage mode, as illustrated in Figure 13.In this mode, voltage is held steady while current gradually decreases to the lowest permissible level based on power rating.
Passive and the proposed balancing system simulation results reveal that passive balancing takes longer time due to greater voltage discrepancies among cells, as evidenced in Figures 14 and 15.Te proposed balancing method, as shown in Figures 16 and 17, efectively addresses the limitations of passive balancing.Te rise in temperature near the battery pack is attributed to heat generated by the balancing system, which accelerates battery aging mechanisms and reduces overall battery life.To analyse the temperature characteristics of the balancing system, two key parameters, maximum temperature (T max ) and temperature distribution (ΔT), among the cells are assessed.Te active system exhibits a lower maximum temperature (24 °C) compared to the passive system (27 °C), and ΔT does not exceed 4 °C during the charging process, as depicted in Figures 18 and 19.Te simulation results provide a wealth of important metrics, such as power dissipation, equilibrium duration, energy dissipation, energy efectiveness, and the overall expense of the equilibrium system.Tables 2 and 3 exhibit the results of simulations for both passive and active scenarios in a standard 48 V electric bicycle (E-bike) system.When passive balancing is employed, it becomes apparent that a substantial energy loss occurs only when there is a high degree of imbalance.In contrast, the proposed topology consistently demonstrates low energy loss, regardless of the extent of imbalance or the quantity of imbalanced cells within the battery pack.In low-power E-bikes, where the voltage requirements are relatively modest, the occurrence of cell imbalances is notably reduced.In the case of a fourteen-cell series-connected battery pack, the passive balancer required 48 minutes to bring the cell voltages below the balancing threshold (30 mV), as illustrated in Figure 14.Passive balancing exhibits minimal power dissipation, as indicated in Table 2, making it the practical choice for these scenarios.
Proposed balancing, on the other hand, is not a viable option due to its circuit complexity and high cost.Terefore, passive balancing fnds its applicability in low-power Ebikes.In situations where a signifcant voltage deviation exists (e.g., due to aged cells) and a greater number of imbalanced cells (resulting from multiple charge-discharge cycles), the passive balancer took 215 minutes to achieve balance but incurred a power loss of 4.55W, as detailed in Table 3.Given the substantial losses observed (as indicated in Table 3), opting for the proposed balancer becomes a more compelling choice.Te proposed balancer, as shown   3, managed to balance the cells within a range of 30 mV-200 mV in a signifcantly shorter time frame, taking between 15 and 42 minutes.A comparative analysis of cell balancing system characteristics among various electric vehicle (EV) variants is presented in Table 4.It is evident that although passive balancing reduces power loss, it does not yield signifcant cost savings from energy loss mitigation.Moreover, the passive balancing system's propensity for generating hot spots within the battery pack can have adverse efects on the battery's remaining useful life (RUL) and state of health (SOH) due to the high-energy losses it incurs.Figure 20 presents the comparison of the passive and proposed method with various balancing characteristics.

Integration of Electric Cars into Microgrid Using a 24-Hour Simulation of the Vehicle-to-Grid System.
Te integration of electric cars as energy storage systems into the microgrid is carried out using MATLAB.Te design of a vehicle-to-grid (V2G) system is presented in Figure 21.Tis work mainly focuses on the impact of energy storage during of-grid and on-grid operations by analysing the active power graph.Electric vehicles that connect to the grid have only local information, and the voltage profles of other nodes are unknown.Te total number of electric cars in this simulation design is 100, and all of the electric cars combine to form one energy storage aggregator with a power output of 4 MW, as shown in the model specifcation of the energy storage aggregator in Table 5.International Transactions on Electrical Energy Systems   12 International Transactions on Electrical Energy Systems   International Transactions on Electrical Energy Systems Two diferent scenarios are simulated using a vehicleto-grid system, including one case in which the energy storage aggregator that combines all-electric vehicles is connected to the microgrid, known as on-grid, and another one case in which the energy storage aggregator is disconnected from the microgrid, known as of-grid.Te impact of electric vehicles connected to the power grid is studied in the frst phase simulation, and the results of the active power in frst phase is shown in Figure 22.Te second phase of simulation investigates the impact of electric vehicles disconnected from the network, and the results of the active power graph is shown in Figure 23.From the Figures 22 and 23 the following observations have been done: vehicle-to-grid (V2G) technology allows power to fow from electric vehicles to the grid, transforming them into not only a distributed load but also a distributed storage and generation system.Tis is shown by the active power graph as energy storage transitions from of-grid to on-grid operation.Te transition of energy storage from of-grid to ongrid demonstrates that connected electric vehicles add to the pre-existing peak active power of of-grid operation and provide an even higher peak active power during on-grid operations.Tis proves that energy storage plays an important role in increasing total energy generation during on-grid operation.Electric vehicle energy storage integration can be used as spare energy storage for grid support during peak load periods and can reduce the use of battery packs connected to a PV system during periods of high electrical demand, which can beneft the microgrid.

Conclusion
Tis paper introduces a two-switch fyback converter for balancing the cells of a lithium-ion battery.Te developed battery balancing method has been implemented, and its performance has been compared with the passive balancing method.Te modular design of the converter allows faster cell balancing.It can handle multiple cells simultaneously, which speeds up the balancing process, especially in large battery packs.Te two-switch topology can help reduce stress on the switches, potentially extending their lifespan.An advanced control algorithm is implemented for precise and adaptive cell balancing, optimizing the battery's overall performance.Furthermore, the developed method is used in EVs which are combined as one energy storage aggregator and integrated into microgrids.Te impact of connecting and disconnecting the energy storage from the microgrid shows that the overall active power of the microgrid 16 International Transactions on Electrical Energy Systems increased in pre-existing peak value from of-grid operation into on-grid operation.Tis emphasizes the fact that energy storage by using electric vehicles causes power fows in two directions, which not only distributes load but also distributed storage and generation to the microgrid.

Figure 3 :
Figure 3: Modes of operation of the developed converter.

Figure 4 :
Figure 4: Equivalent circuit during the switch of condition.

Figure 5 :
Figure 5: Proposed cell balancing method during (a) switch on and (b) of condition.

Figure 6 :
Figure 6: Graph (a) depicts the voltage balancing operation before the implementation of balancing control and (b) after balancing control has been applied.

Figure 9 :
Figure 9: Control of the proposed method.

Figure 20 :Figure 21 :Table 5 :Figure 22 Figure 22 :
Figure 20: Comparison of the passive and proposed method with various balancing characteristics.
dt), (dV R 3 C 3 /dt) presents the transient voltages.Te frst, second, and third parallel RC networks' respective time constants are denoted by R 1 C 1 , R 2 C 2 , and R 3 C 3 .Te discrete version of the equations created using ECM is represented as equation

Table 1 :
Comparative study of proposed balancing scheme with the existing balancing methods.

Table 2 :
Calculation of the energy efciency and cost associated with the passive system.

Table 3 :
Calculation of the energy efciency and cost associated with the developed system.

Table 4 :
Comparison of cell balancing system characteristics.