Application of machine learning in power management systems
Data processing these days is exhibiting a split personality. ‘Cloud’ computing grabs the headlines for sheer scale and computing power, while ‘edge’ computing puts the processing at the ‘coal face’ where electronics interfaces with the real world. In the cloud, data is stored in vast quantities and processing is queued and scheduled, while at the edge, processing is targeted and immediate.
This enables rapid response to local commands and feedback from the application, while keeping the process more secure with reduced data flows. The two areas interact of course, with data passed back to the cloud for consolidation and analysis across devices or locations, with global commands and firmware updates passing the other way.
Both processing environments benefit from the latest developments in artificial intelligence (AI) and machine learning (ML). In data centers, for example, thousands of servers incorporating tens of thousands of processors, mainly GPUs, perform massively parallel computing to generate and operate large language models (LLMs) such as ChatGPT. By some measures, these platforms now perform better than humans.
At the edge, processing reacts to feedback sensors and commands according to an operating algorithm; however, with machine learning, algorithms can also effectively learn from the feedback now. This can then instigate changes to the algorithm and its calculation coefficients to make the controlled process more accurate, efficient, and safe.
Energy use difference between cloud and edge
A major practical difference exists between cloud and edge computing when it comes to the scale of energy used. In both cases, consumption must be minimized, but in a data center, it is huge, estimated by the International Energy Agency (IEA) at 240-340 TWh or 1% to 1.3% of global demand. Artificial intelligence and machine learning will only accelerate energy consumption, with the IEA predicting an increase of 20-40% in the coming years, compared with historical figures of around 3%.
Unlike on-demand data processing such as gaming and video streaming, AI has learning and inference phases. Learning uses datasets to train the model, and ChatGPT reportedly consumed over 1.2 TWh to do this. On the other hand, inference, or the operational phase of the LLM, might amount to 564 MWh per day, according to de Vries.
At the other end of the scale, edge computing incorporated in an Internet of Things (IoT) node or a wearable device might have to consume no more than milliwatts. Even industrial and electric vehicle (EV) applications, such as motor control and battery management, have a small budget for losses in the control circuitry and cannot afford large percentage increases to accommodate AI and machine learning.
Consequently, Tiny Machine Learning or tinyML has been developed as a field of applications and technologies to implement on-device sensor data analytics, optimized for extremely low power consumption.
TinyML and power management
Applying machine learning to an application such as battery management using tinyML techniques is a multi-dimensional problem, with goals to add charge as rapidly, safely, and efficiently as possible, while controlling discharge with minimum stress. Management also monitors battery health and might actively balance cells to ensure that they age equally for maximum reliability and service lifetime.
Monitored parameters are individual cell voltages, current and temperature, and the management system is typically required to predict state of charge (SOC) and state of health (SOH). These are dynamic quantities that have a complex and changing relationship to the history of use of the battery and the measured parameters.
Despite the complexity of the task, an expensive GPU implementation of AI processing is not necessary. Modern microcontrollers such as the ARM Cortex M0 and M4 families are easily up to the task of machine learning in battery management, consume little power, and have been incorporated into system-on-chips (SoCs) dedicated to the application.
Battery management ICs are common, but when powered by an MCU implementing machine learning, information and patterns of historical and current sensor data can be used to make better predictions about SOC and SOH, while ensuring high levels of safety. As with other ML applications, there is a learning phase from training data, and this can be logged across different environmental conditions and across multiple batteries with their manufacturing tolerances. Where field data is not available, synthetic data from modelling could be used.
As is the essence of AI, the model can then be updated as field data accumulates for scaling up or down of the application or for use in other similar systems. Although learning is typically an exercise before the application goes live, it can then be a background task using sensor data, processed off-line either locally or through the cloud for continuous performance improvement. This is set up by automated ML (AutoML) tools in conjunction with evaluation kits for battery management SoCs.
Machine learning models
A wide choice of models is available to use in machine learning and for edge applications such as battery management. A simple classification decision tree might suffice as it uses little resource, perhaps up to a few kilobytes of RAM. The approach results in a simple classification of a data collection set into ‘normal’ or ‘abnormal’, and an example is shown in Figure 1.
Figure 1 An example decision tree classifier shows Class 1 = normal and Class 0 = abnormal. Source: Qorvo
Here, two parameters are used to characterize a multi-cell battery during discharge: SOC for the strongest cell and voltage difference between the strongest and weakest cells. The blue and white cells represent normal data, and the classification areas are represented in blue (Class 0 = normal) and grey (Class 1 = abnormal).
To evaluate continuous values of output data, rather than just categories, a more complex regression decision tree could be used. Other common ML models include support for vector machines (SVM), kernel approximation classifiers, nearest neighbor classifiers, naïve Bayes classifiers, logistic regression, and isolation forests. Neural network modelling can be included in AutoML tools where improved performance is achieved but at the expense of complexity.
The whole process of development of a ML application is collectively called ML operations or ‘MLOps’ and includes data collection and curation, model training, analysis, deployment, and monitoring. The process is shown graphically in Figure 2 for a battery management application using the PAC25140 chip, which can monitor, control and balance up to 20 cells in a string using Li-ion, Li-polymer or LiFePO4 chemistries.
Figure 2 The above design example highlights the tinyML development flow. Source: Qorvo
Case study: Week battery cell detection
Part of SOH monitoring for a battery is detection of degraded cells. These cells might be characterized by an abnormally low cell voltage under load. However, the voltage is also affected by actual discharge current, state of charge and temperature as shown in Figure 3, which highlights example curves for strong and weak cells at different temperatures and load currents.
Figure 3 Cell discharge curves are shown for both strong and weak cells. Source: Qorvo
Figure 3 shows that the significant difference between strong and weak cell voltages occurs when the cells are nearly depleted. Detection of the weak cell at this point may be too late to avoid overheating and safety issues, so a solution is to implement ML to look for patterns in the data earlier in the discharge cycle.
The effectiveness of the ML approach was highlighted in an experiment performed by Qorvo where a weak cell was inserted in a 10-cell battery pack and compared with a good pack. Training data was generated for both types of cells as they were discharged at different constant current rates and temperatures. Monitored parameters were series current, temperature, difference between strongest and weakest cell voltage, and SOC for the strongest cell.
The parameters were sampled simultaneously every 10 seconds over 20 discharge cycles and analyzed using different models as listed in Table 1. Results were compared with independent test data over 20 discharge cycles, showing close agreement between the two methods, which would improve further with more training samples.
Table 1 Example results are extracted from training and test data for different ML models. Source: Qorvo
SoCs suffice for ML support
While current AI headlines focus on large-scale, high-power applications, its implementation ‘at the edge’ using MCUs and tinyML techniques for targeted applications such as battery monitoring can be part of a high-performance but low-power solution. Here, SoC solutions have all the processing power needed and can incorporate a wide variety of machine learning algorithms.
All necessary sensor and communications interfaces are built-in, and SoCs are additionally supported by a rich ecosystem of evaluation and design tools.
John Carpenter is a product development manager at Qorvo.
Related Content
Getting a Grasp on AI at the Edge
Democratizing Edge AI and ML with a No Code Approach
Pete Warden on tinyML and ‘Plug and Play’ Machine Learning
The next embedded frontier: machine learning enabled MCUs
Scalable fusion processors meld MCU, AI, wireless and security
googletag.cmd.push(function() { googletag.display(‘div-gpt-ad-native’); });
–>
The post Application of machine learning in power management systems appeared first on EDN.


