Design of Fuzzy Logic Controller for Inductor Based Cell Balancing in Battery Management System

ABSTRACT


INTRODUCTION
Lithium-ion batteries are one of the most used energy storage media due to their wide range of applications.They are suitable for implementation in electronic devices, electric vehicles, renewable energy storage, and microgrids [1].However, to fulfill the specification of an energy system, batteries must be interconnected in series and parallel configurations with a specific number of cells to increase both their voltage and capacity.Battery systems with many cells can experience problems due to differences in cell capacity, discharge rate, internal resistance, and life span caused by small differences in manufacturing processes and chemical reactions in each battery cell [2].The variation in these parameters can lead to imbalance conditions in voltage and charge in individual cells, which can cause them to reach a full or empty condition earlier than other cells during the charging or discharging process [3].To overcome these problems, battery management systems (BMS) are used to control and monitor the individual cells in a battery pack to prevent overcharging, over-discharging, and thermal runaway.As one of the BMS functions, battery balancing system has a significant role in ensuring the performance, safety, and life span of the battery pack [4,5].
In general, there are two categories into which battery balancing methods can be divided into passive and active balancing.Passive balancing techniques operate by releasing the surplus charge from the most highly charged cell within the battery pack using resistors.Conversely, active balancing techniques move the extra charge from the most charged cell to the least charged cell through electronic components such as capacitors, inductors, or transformers [6].Capacitor-based battery balancing systems have good efficiency and are compact and low-cost balancing systems.However, they have limited balancing speed [7].On the other hand, transformer-based battery balancing systems offer better balancing speed, but they have some energy losses due to the use of a core in the transformer component.Meanwhile, the active balancing method based on inductors has advantages in terms of fast balancing, good efficiency, and cost competitiveness.
Researchers have conducted several studies on battery balancing systems utilizing inductors, including those based on a single inductor [8], multiple inductors [9], and modularized inductors [10], along with their control strategy.However, the inconsistency of the capacity and internal resistance of the cells in a battery pack makes it difficult to create an accurate mathematical model of the battery pack.Therefore, in this study, two fuzzy logic controls were designed to drive the PWM switching signals of inductor-based cell-to-cell balancing in the battery management system.

RESEARCH METHOD
The research was conducted in several stages.It began with a literature study on lithium battery packs, battery cell balancing systems, inductor-based balancing topology, and balancing algorithms.Two fuzzy logic controls with different shapes of membership functions were designed.Simulations were carried out for a simplified cell-to-cell balancing circuit by applying the controller to the drive duty cycle of the PWM signal.Then, the simulation results were compared for each method.

Inductor Based Cell Balancing Topology
An inductor-based cell balancing system is a type of active balancing system that uses inductors to transfer energy between cells in a battery pack.The fundamental principle of this system is to temporarily store excess energy from the higher-voltage cell in the inductor and then transfer that energy to the lower-voltage cell.This process involves controlled switching of the inductor on and off, which is typically performed by a microcontroller or other digital controller.The figures below illustrate the commonly used topologies for inductor-based cell balancing [11].Inductors are one of the four basic passive electronic components, along with resistors, capacitors, and diodes.They are characterized by their inductance, which is a measure of their ability to store energy in a magnetic field.They are also commonly referred to as coils or chokes.Inductors consist of a coil of wire wound around a core material, which can be made of various materials, such as air, iron, ferrite, or other magnetic materials.Among the core materials used in inductors, ferrite is popular due to its high magnetic permeability and excellent performance at high frequencies [12].

Simplified Balancing Circuit
The simplification of an inductor-based balancing circuit for energy transfer from cell to cell in a battery pack is depicted in Figure 3.It is assumed that the voltage of battery BA is higher than the voltage of battery BB.Initially, when switch SA is turned on and switch SB is turned off, battery BA is connected to inductor L; this condition is referred to as inductor charging mode.The current from the battery flows into the inductor and is stored in the form of a magnetic field.Then, when switch SA is turned off and switch SB is turned on, the energy stored in the inductor is transferred to battery BB; this condition is referred to as inductor discharging mode.This cycle repeats with rapid switching rates until the voltage of battery BA becomes equal to the voltage of battery BB.The rate at which these switches are toggled is referred to as the switching frequency.This process allows for the redistribution of energy between the batteries, ensuring that they maintain similar voltage levels.By employing this inductor-based balancing topology, cells with higher energy levels can transfer excess energy to cells with lower energy levels, thereby promoting a more uniform state of charge across the battery pack.The process of energy transfer from cell to cell is illustrated in Figure 4.

Fuzzy Logic Control Design
Fuzzy logic is a branch of logic used to model and analyze systems that are uncertain or ambiguous.It was first developed by Prof. Lotfi Zadeh in 1965.In fuzzy logic, each element within a set possesses a membership degree that spans from 0 to 1.This membership degree signifies the degree to which that member is part of the set.Fuzzy logic can be applied to model various types of systems, including control systems, classification systems, and decision-making systems.This is because fuzzy logic can manage the uncertainty and ambiguity often encountered in these systems.The flow of fuzzy logic can be described as follows: Fuzzifier, which transforms crisp input data into fuzzy input data; Inference engine, which uses a fuzzy rule base to generate output; Fuzzy rule base, which is a collection of rules governing how input data is processed to yield output; Defuzzifier, the stage where fuzzy output data is converted into crisp output data.The flow of fuzzy logic is shown in Figure 5.In this paper, two Mamdani fuzzy logic controllers (FLC) are designed.The first proposed FLC utilizes a combination of triangular and trapezoidal membership functions (FLC-TT).These membership functions are fundamental building blocks in fuzzy logic, enabling the modeling of linguistic variables and their associated degrees of truth.By employing these shapes, the FLC can capture a wide range of input-output relationships with a relatively simple structure [13].The second proposed FLC takes a different approach by employing Gaussian and sigmoid membership functions (FLC-GS).These functions offer distinct advantages, particularly in capturing more complex and nuanced input-output relationships.Gaussian membership functions, characterized by their bell-shaped curves, can model gradual transitions and smoothly varying phenomena.Sigmoid membership functions, on the other hand, can effectively handle scenarios with sharp transitions.
The designed FLCs have two inputs, namely, the state of charge (SOC) difference and the SOC average.The SOC difference is categorized into four sub-intervals: low (L), medium (M), high (H), and very high (VH).Meanwhile, the SOC average is categorized into four sub-intervals: very low (VL), low (L), medium (M), and high (H).The output, on the other hand, represents the duty cycle of the PWM signal, also divided into five sub-intervals: low (L), medium-low (ML), medium (M), medium-high (MH), and high (H).This division of the input/output membership functions into subintervals enhances the level of detail in representing linguistic variables, enabling a more precise modeling of the underlying phenomena.The illustrations of fuzzy membership functions are shown in the figures below.The Mamdani fuzzy rule table, formulated based on the following knowledge, is shown in Table 1: 1.If there is a significant SOC difference, a large duty cycle is required to increase the balancing current.2. If the average SOC is high, and the SOC difference is also high, a large duty cycle is applied to ensure a significant balancing current.3.If both the SOC average and difference are low, a small duty cycle is applied to reduce the balancing current.4. If both the SOC average and difference are moderate, a medium duty cycle is applied to maintain a moderate balancing current.The graph in Figure 9 illustrates surface in the FLC, visually representing the correlation between the SOC difference and SOC average as inputs, and their association with the PWM duty cycle as output.The fuzzy surface using Gaussian and sigmoid membership functions appears smoother compared to the fuzzy surface employing trapezoid and triangle membership functions.

Simulation Setup
The Matlab/Simulink software is employed for modeling and simulation to assess the performance of the designed control system.The simplified cell-to-cell balancing circuit is implemented within the simulation environment to reduce the complexity of the system, as depicted in Figure 10.By employing Matlab/Simulink, various scenarios and real-world conditions can be simulated, enabling a thorough evaluation of how the fuzzy logic controls interact with the inductor-based balancing topology in battery management system by adjusting duty cycle of PWM signal.The battery cells employed in this simulation are represented as 18650 NCM Lithium-ion cells, featuring a nominal voltage of 3.7 V and a capacity of 3000 mAh, which is scaled by a factor of 100 to reduce the computation elapse time and save memory usage.The simulation is conducted under three battery conditions: idle mode, charging mode, and discharging mode.The initial SOC for cell 1 and cell 2 is set at 70% and 66%, respectively.

RESULTS AND DISCUSSION
In figure 10, the battery cell balancing graph is shown under idle battery conditions, which means there is no voltage supply or load present.Figures 11 (a), (b), and (c) respectively represent the balancing graphs using PWM signals with a fixed duty cycle (FDC), FLC-TT, and FLC-GS methods.Simulation results indicate that balancing using the FDC method takes 5.05 seconds.Meanwhile, simulation results using the FLC-TT method take 4.30 seconds, and FLC-GS takes 4.42 seconds.The simulation results of the balancing system under charging conditions are presented in Figure 12.It can be observed that during the charging condition, the balancing process takes place for 3.16 seconds for the FDC method, 2.75 seconds for the FLC-TT method, and 2.91 seconds for the FLC-GS method.Furthermore, after the balancing process, the SOC of both battery cells remains consistent with the SOC condition that increases during the charging process.Figure 13 presents the graph of the battery cell balancing system under discharging conditions.In this condition, balancing occurs at 5.49 seconds using the FDC method, 5.15 seconds using the FLC-TT method, and 5.29 seconds using the FLC-GS method.Then, after the balancing process, the SOC of both battery cells remains consistent with the SOC condition that decreases during the discharging process.Based on the simulation results presented above, it can be observed that the designed FLC-TT and FLC-GS controllers provide better performance compared to the FDC method, as indicated by the relatively faster simulation elapsed time.However, between the FLC-TT and FLC-GS methods, there is a slight performance difference with FLC-TT being slightly faster.Thus, the FLC-TT method can be considered a candidate controller for driving the PWM signal duty cycle in the inductor-based battery cell balancing system and can be applied to battery packs with a larger number of cells.Furthermore, FLC-TT is also easier to implement in actual systems due to the use of simple membership function shapes, which makes the computation process lighter.The simulation results for each method under idle, charging, and discharging conditions are summarized in Table 2.The table shows that the balancing current and the simulation elapsed time are inversely proportional.This means that as the balancing current increases, the simulation elapsed time decreases.In other words, a higher balancing current will result in a faster balancing speed, and vice versa.Additionally, the balancing current during the charging condition is greater than that during the idle condition due to the additional current from the voltage source.On the other hand, the balancing current during the discharging condition is relatively lower than during the idle condition because some of the current is distributed to the load.
Furthermore, the fuzzy rule inference system of the designed controller indicates different duty cycle values for the same specific inputs.While the difference is relatively small, it does impact the cumulative process output, especially with a higher duty cycle, increased balancing current, and shorter elapsed time.A comparison of both rule inference systems associated with each membership function is presented in Figure 14.

CONCLUSION
This paper proposed two controllers design based on fuzzy logic for an inductor-based cell-to-cell balancing system in a battery management system.FLC-TT utilizes triangular and trapezoidal shapes in its membership functions, while FLC-GS employs Gaussian and sigmoid shapes.The designed controllers are compared with the FDC method and implemented in a simplified two-cell inductor-based balancing circuit using Matlab/Simulink software.Based on simulation results, the FLC-TT controller achieves a balancing time that is 10.95% faster, and the FLC-GS controller achieves a balancing time that is 7.88% faster compared to the conventional FDC method.These simulation results demonstrate that FLC-TT has the fastest balancing speed among the FLC-GS and FDC controllers, making it the preferred choice as a controller candidate and allowing its application to battery packs with a larger number of cells.However, this study remains limited to software simulations, experimental validation will be required in future work.

Figure 3 .
Figure 3. Simplified model of inductor based balancing topology

Figure 5 .
Figure 5. Block diagram of fuzzy logic system

Table 1 .
Fuzzy rules table

Table 2 .
Simulation results