*Proceeding Paper* **A Neuro-Fuzzy System for Power Supply Control †**

**Sergey Morozov ‡,\* and Mikhail Kupriyanov ‡**

Department of Computer Science and Engineering, Saint Petersburg Electrotechnical University, "LETI",

ul. Professora Popova 5, 197376 St. Petersburg, Russia; mikhail.kupriyanov@gmail.com


**Abstract:** Automatic control of power supply sources is considered. Different types of batteries behave differently inside a device and require specific optimal conditions to perform efficiently. Using the wrong operating mode of a battery can lead to malfunctions within it, which may affect the device's performance. Adaptive methods for optimizing power modes are presented. The adaptivity of the method is achieved by using a baseline, which is based on artificial intelligence concepts. These concepts are neural networks and fuzzy logic, which are used to create systems capable of learning and being interpretable. This method is able to execute control over a batteries state and take actions which are required to save a battery and prolong its lifespan. The adaptivity of the system is demonstrated by the ability to take information about the environment into account.

**Keywords:** neural networks; fuzzy logic; neuro-fuzzy systems; power optimization; battery management systems

### **1. Introduction**

A high-quality power supply is essential for electrical devices to work properly. All devices can use a default voltage source, while some devices also use batteries in order to be mobile. Different types of batteries can be used as a power source for devices in different areas. A bad power supply can lead to malfunctions in a device or permanently break it. Using the wrong kind of batteries can lead to devices not working properly. In addition, the quality of batteries tends to worsen over time due to different reasons.

Different methods are used within devices to save battery quality over time. Some of them involve using concepts which are based on artificial intelligence (AI). In order to optimize the power consumption of a device, it is required to monitor a battery's condition and operate it in the most efficient way. Two of the AI-based concepts are neural networks and fuzzy logic, which are used to make systems trainable and interpretable. A combination of these concepts provides a neuro-fuzzy system—a hybrid AI system—which is designed to create adaptive and interpretable systems.

A neuro-fuzzy approach for battery control is presented. An intelligent system can read and process information, which is required to save batteries and prolong their lifespan. AI-based systems can detect malfunctions and specific conditions and act accordingly, for example, by informing the user about any malfunctions or executing specific actions which are required.

#### **2. Battery Types**

Devices in different areas have different requirements for the power supply. Some devices require powerful batteries in order to provide power for high-consuming devices. Other devices require batteries which can keep their charge for long periods of time while not being used. In some cases, the battery must be able to work at temperatures below zero.

**Citation:** Morozov, S.; Kupriyanov, M. A Neuro-Fuzzy System for Power Supply Control. *Eng. Proc.* **2023**, *33*, 49. https://doi.org/10.3390/ engproc2023033049

Academic Editors: Askhat Diveev, Ivan Zelinka, Arutun Avetisyan and Alexander Ilin

Published: 17 July 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Sometimes, a rechargeable battery is the most important aspect. Some devices require that the battery provides a fixed voltage, not depending on its charge.

The most important two parameters, which tend to worsen with time, are the battery capacity and inner resistance. Both of these are the main reasons behind battery degradation. Lowering the capacity leads to keeping less charge, while increasing the inner resistance provides less current, which means less power.

#### *2.1. Lithium-Ion Batteries*

Lithium-ion (Li-ion) batteries are the most well-known type of rechargeable battery, and are used for complex devices. They are used in most types of devices: smartphones, different vehicles, power banks and others. This type of battery has many subtypes, the most well known of which are lithium polymer batteries. These batteries are common because they have small sizes, a low self-discharge and a long lifespan. However, they have many downsides, like a poor performance at low temperatures [1]. The typical cell voltage is 3.6 V, but 12 V is also common.

Li-ion batteries are rechargeable, which means that they can be reused after a charging procedure. This procedure has to be performed carefully in order to save the battery. The specifics of the power element must be taken into account. For example, it is recommended to keep the charge of a Li-ion battery in the 40–80% range in order to prevent it from losing capacity [2]. They also must never be completely discharged, or they will not work again. Other types of batteries can have other specifics.

Lithium-polymer (Li-Pol) batteries are a variety of Li-ion batteries. They are very similar in terms of their chemical processes. However, Li-Pol batteries are more versatile (they can be molded into different shapes), lightweight and portable, while having lower energy levels and being more expensive then Li-ion batteries. Therefore, they are used in different areas; Li-ion batteries are used for more heavy usages, while Li-Pol batteries are preferred for mobility purposes.

#### *2.2. Lithium Thionyl Chloride Batteries*

Lithium thionyl chloride (Li-SOCl2) batteries are commonly used in industrial devices, like systems of commercial accounting of energetic resources. The main reason for this is their high capacity, extremely low self-discharge and ability to work at low temperatures. They are unrechargeable, and therefore are used once. The most common nominal voltage for this type of battery is 3.6 V. This is the operating voltage for many low-power microcontrollers [3].

These batteries keep their charge very well due to the passivation effect, which is exhibited as a rise in the inner resistance. A passivated battery may not able to provide enough current to power up the device, while having enough charge to do it. This happens if the battery is not used for a long time. Depassivation is required to return a battery to a working state. This process provides a specific load, which is used to return the inner resistance to the normal value, while not losing too much charge. This can be achieved by connecting a positive battery contact to the ground through a transistor through a resistor. A transistor is required to turn the depassivating process on and off, while a resistor is used to control the current in the circuit. Mounting a resistor must be performed with special caution, since it will explode if a short circuit occurs. The same approach can be used in order to prevent passivation. The battery will lose some charge during the process, but it will work without problems [4].

Another feature of Li-SOCl2 batteries is providing a fixed voltage which does not depend on the charge of the battery. It is important for devices which use reference voltages. The downside of this feature is that it is difficult to monitor the real charge of the battery. Batteries' voltages can drop when a small amount of charge is left, which can be used to notify the user about battery replacement.

#### **3. Control of the Batteries**

Approaches which are dedicated to controlling batteries require reading a batteries state and interacting with it. Systems which do this are known as battery management systems (BMSs) [5]. Hardware tools are required for this. When it is necessary to check the output voltage of a battery, an ADC can be used. Special microchips, like MCP37811/2 [6], can be used as a specialized tool to control the charging process of Li-ion and Li-Pol batteries. Other tools may be required for other goals like external temperature monitoring or preventing the passivation process.

Hardware tools are required to manipulate a battery, while software is required to execute the control. The creation of a complex battery control system is required as an efficient monitoring and control tool. Artificial intelligence is used to create such systems. Using the concepts of artificial intelligence leads to creating adaptive systems. Systems for battery control should be interpretable in order to easily read the state of each battery. Since different types of batteries require specific operating conditions for better performances, machine learning can also be used. Fuzzy logic is used to create interpretable systems, while neural networks provide machine learning. A combination of these concepts provides a neuro-fuzzy system [7–9].

Control procedures are executed by monitoring the environment and modifying the system parameters. They can be used to stop the battery from operating in the wrong mode and to optimize the power consumption. For example, if a device periodically performs some tasks, and the results of some of these tasks do not change much, it is useful to reduce the frequency of executing these tasks to save power. In some cases, different features of devices can be manually turned on and off in order to save power. This can be useful to reduce the power consumption of high-power features like network connections and LCD displays. This is the purpose of sleep mode.

A neuro-fuzzy system can be used to optimize a device's power consumption. It can process information about several important elements:


Systems for battery control must be able to monitor these elements and adapt to them. Having information about processed tasks and the power consumption at the moment is essential in order to prioritize them. Tasks can be power consuming, and if these tasks are low priority, then it is required to decrease their power consumption. Processing information about the current battery state and environment is important to monitor operating conditions [10].

A neuro-fuzzy baseline can also be used for the modelling of a battery. It is essential to monitor the chemical processes in a power source to determine the optimal mode for it. Models can be used as an efficient development tool for testing a control system, since a good model is able to reproduce the required behavior of a battery.

#### **4. Structure of Neuro-Fuzzy Battery Control Systems**

Since different types of batteries require different care and operating conditions, it is impossible to create a control system for all power supply elements. However, it is possible to create a common structure for a system, which has to be trained to work with specific battery types. It can monitor every required parameter and adjust the system to them.

Hardware and software must be designed to create a control system. Battery circuits must be created in order to interact with the battery. These circuits must read the information from the environment and about the battery. The state of the environment is read by specific sensors which interact with a CPU by using a defined interface. A structure which demonstrates how sensors can be used to read data about the environment is shown in Figure 1. It shows how the device should utilize circuits with sensors and how to connect

an ADC to interact with a battery. Power is connected both as a supply and as an analog signal, which can be read either by an external ADC or by microcontrollers. A fuse is used as a protection tool. A power management system is implemented within a CPU.

**Figure 1.** Hardware structure of battery optimization system.

Specialized microchips exist to control the power. They can be used to monitor malfunctions within a battery and switch between power modes. An example circuit for battery switching is shown in Figure 2. It uses a switch, which can generate fault signals, a linear regulator and a charge management controller. This circuit can be used to switch between an external USB source and a rechargeable Li-Pol battery. A power management controller is used to charge the battery and is not required if a non-rechargeable battery is used. A linear regulator is used as a tool to obtain the required voltage levels. If the protection of circuits is required, isolated DC/DC converters can be used, since they use galvanic isolation. A switch is used as a tool to select a power source.

**Figure 2.** Battery management circuit.

Software is required to carry out the calculation processes of the neuro-fuzzy system. An adaptive neuro-fuzzy inference system (ANFIS) [11] is used. The ANFIS obtains values of the required parameters and transforms them into fuzzy values (obtains values of defined

membership functions), which are processed by a neural network, which provides a fuzzy output value. The output value can be defuzzified if required. The structure of a neurofuzzy system for processing multiple parameters (for example, charge, temperature and external humidity) is shown in Figure 3. The neuro-fuzzy system can be implemented in a single CPU or in multiple microchips. This intellectual system is able to process multiple parameters and provide the required management accordingly. It can notify users about malfunctions, place microchips in an idle mode or reduce the amount of calculations in order to optimize the power consumption. A battery controller can also be used in this circuit. Some of the CPUs periphery can be used (for example, an ADC). Every power source can be connected to an ADC in order to detect malfunctions or change the device's operating mode. Connections to the ground and battery protection components (fuses) are omitted. The control of a single battery is demonstrated. The interaction of cells must be considered if a multiple number of them are used. Multiple subsystems for single battery control can be used, but it is important to determine how one battery can affect another.

**Figure 3.** Circuit structure for a neuro-fuzzy system.

Fuzzy sets for the control system can be defined manually. Every fuzzy set must represent the conditions which the battery works in. Fitting and unfitting conditions must be described. A step into developing self-organization can be taken by developing an algorithm for automating the generation of fuzzy sets. A neural network for the system must be trained with parameters from the environment. Training is important for taking every parameter into account, while also looking at how their interaction can affect the system. If many parameters are considered, then the neural network can be an essential component. The demonstrated system is shown to produce a single result, but it can produce multiple decisions depending on the cell number and the monitored parameters. It can be changed by modifying the neural network.

The system is easily adjustable to process more parameters or change them. Using ANFIS-based control systems allows for a simple interpretation of a model for any type of battery. If some common aspects are found in the battery models, then this knowledge can be used in other systems for optimizing purposes. This can be reasonable if multiple types of batteries are used in a system.

#### **5. Conclusions**

The presented neuro-fuzzy approach allows creating adaptive subsystems to control batteries. The system is able to process information about the current environment and power consumption. A neuro-fuzzy baseline can be implemented within a device as a power control module. The intelligent system is able to monitor a battery and take actions in order to prolong the lifespan of a battery. If taking actions is impossible, the system can give recommendations about what to do with a specific battery. Each type of battery has to be taken care of individually, since each of them have different specifics and features.

Advanced approaches for creating intelligent BMSs are to be inspected in future works. Multiple batteries can be used in a system, and it is essential for them not to introduce errors into the work of another. Thus, the protection of batteries from each other must be considered.

**Author Contributions:** Conceptualization, S.M. and M.K.; methodology, S.M.; validation, M.K.; formal analysis, S.M.; investigation, S.M.; resources, S.M.; data curation, M.K.; writing—original draft preparation, S.M.; writing—review and editing, M.K.; visualization, S.M.; supervision, M.K.; project administration, M.K. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Data sharing not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
