Application of tiny machine learning (tinyML) in power management systems
INDUSTRIAL LCD DISPLAYS / IGBT MODULES DISTRIBUTOR

Infineon / Mitsubishi / Fuji / Semikron / Eupec / IXYS

Application of tiny machine learning (tinyML) in power management systems

Posted Date: 2024-01-22

Author:Paul Gorday

Today, data processing architecture exhibits a "fragmented" character. "Cloud" computing with its huge scale and computing power has become the focus of attention, while "edge" computing puts the processing process on the "front line", connecting electronic devices and the real world. In the cloud, data storage is huge, and processing requires queuing and scheduling; while at the edge, processing is done in a targeted and instantaneous manner.

This enables the system to respond quickly to local commands and application feedback while reducing data traffic to ensure safer processing. Of course, the two areas also interact, with edge nodes transmitting data back to the cloud for aggregation and analysis across devices or locations; while global instructions and firmware updates are passed back to the edge.

Both processing environments benefit from recent developments in artificial intelligence (AI) and machine learning (ML). For example, in data centers, thousands of servers containing tens of thousands of processors (mainly GPUs) perform massive parallel computing to generate and run large language models (LLM) such as ChatGPT. By some metrics, the performance of these platforms now exceeds that of humans.

At the edge, processing reacts to feedback sensors and instructions based on operating algorithms. But with the help of machine learning, algorithms can now effectively learn from feedback; thereby improving the algorithm and its calculation coefficients, making the controlled process more accurate, efficient and safe.

Differences in energy consumption between cloud and edge

There are big practical differences between cloud computing and edge computing when it comes to the scale of energy use. Energy consumption in both cases must be kept to a minimum; but data center electricity consumption is huge, estimated by the International Energy Agency (IEA) at around 240-340 terawatt hours (TWh), accounting for 1% of global demand - 1.3%. Artificial intelligence and machine learning will further accelerate energy consumption; the IEA predicts a growth of 20%-40% in the next few years, while the historical data of this figure is only about 3%.

Unlike on-demand data processing tasks such as gaming and video streaming, AI consists of two phases: learning and inference; the learning phase uses data sets to train models. ChatGPT reportedly consumed more than 1.2TWh of electricity in the process. On the other hand, according to de Vries, LLM in the inference or operational phase may consume 564MWh of electricity per day.

At the other end of the data processing architecture, edge computing power consumption in Internet of Things (IoT) nodes or wearable devices may not exceed milliwatts. Even for industrial and electric vehicle (EV) applications such as motor control and battery management, the loss budget reserved for control circuits is very small and cannot adapt to the substantial increase in energy consumption brought about by the introduction of AI and machine learning.

As a result, tiny machine learning (tinyML) has developed into an application and technology field that implements sensor data analysis on the device; at the same time, it has also been optimized to achieve extremely low power consumption.

tinyML and power management

The use of machine learning technology in specific applications is a problem involving multiple dimensions. For example, tinyML can be used for battery management, where the goal is to control discharge with minimal stress while charging as quickly, safely, and efficiently as possible. Battery management also monitors the health of the battery and proactively balances the cells to ensure they age evenly for maximum reliability and longevity.

Monitored parameters include voltage, current and temperature of individual cells; management systems often need to predict the battery's state of charge (SOC) and state of health (SOH). These parameters are dynamic quantities and have a complex and ever-changing relationship with the battery’s usage history and measurement parameters.

Despite the complexity of the task, expensive GPUs are not required to implement AI processing. Modern microcontrollers such as the ARM Cortex M0 and M4 series can easily handle machine learning tasks in battery management, their power consumption is very low, and they are now integrated into dedicated systems on a chip (SoC) for this application.

Battery management ICs are very common, but with the help of MCUs implementing machine learning algorithms, information and patterns based on historical and current data from sensors can be used to better predict SOC and SOH while ensuring a high degree of safety. As with other ML applications, this requires a learning phase based on training data; the data can come from log records containing different environmental conditions and multiple battery manufacturing tolerances; in the absence of actual data in the field, synthetic models can also be used data.

As is the nature of AI, models can be continuously updated as field data accumulates to scale up or down the application, or be used in other similar systems. While the learning process is typically a job before an application is put into use, it can also become a background task based on sensor data, processed offline locally or through the cloud for continuous performance improvements. Automatic machine learning (AutoML) tools combined with evaluation kits for battery management SoCs enable this functionality.

Machine learning model

In edge application areas such as machine learning and battery management, there are multiple models to choose from. A simple classification decision tree takes up very little resources, requiring only a few kilobytes of RAM at most, but can provide sufficient functionality for this type of application. This method can simply classify the collected data as "normal" or "abnormal"; an example is shown in Figure 1.


Figure 1: In this decision tree classifier example, "Category 1" = Normal, "Category 0" = Abnormal

Two parameters are used here to describe the state of a multi-cell battery pack during discharge: the SOC (state of charge) of the strongest cell, and the voltage difference between the strongest and weakest cells. Blue and white nodes represent normal data; classification areas are represented in blue ("Category 0" = normal) and gray ("Category 1" = abnormal).

To evaluate the output data for continuous values, rather than just categories, you can use a more complex regression decision tree. Other common ML models include support vector machines (SVM), kernel approximation classifiers, nearest neighbor classifiers, naive Bayes classifiers, logistic regression, and isolation forests. Neural network modeling can be included in AutoML tools to improve performance at the cost of increased complexity.

The entire development process of an ML application is called "MLOps", or "ML Operations", including data collection and organization, as well as model training, analysis, deployment and monitoring. Figure 2 graphically illustrates the battery management application development process using the PAC25140 chip, which monitors, controls, and balances series battery packs consisting of up to 20 cells for lithium-ion, lithium polymer, or lithium iron phosphate. Battery.


Figure 2: The above design example highlights the tinyML development process

Case Study: Weak Cell Detection

Degraded cell detection is part of battery SOH monitoring. One of the characteristics of these cells may be an abnormally low battery voltage under load. However, the voltage is also affected by the actual discharge current, state of charge and temperature, as shown in Figure 3, which highlights example curves of strong and weak cells at different temperatures and load currents.


Figure 3: Discharge curves of strong and weak cells

Figure 3 shows the significant difference between strong and weak cell voltages when a cell is nearing depletion; however, detecting a weak cell at this point may be too late to avoid overheating and safety issues. Therefore, implementing ML becomes a solution to find relevant patterns in the data at earlier stages of the discharge cycle.

The effectiveness of ML methods was fully demonstrated in experiments conducted by Qorvo. This experiment inserts a weak battery cell into a battery pack of 10 cells and compares it with a battery pack in good condition. Two groups of cells are discharged at different constant current rates and temperatures, and training data is generated; monitoring parameters include their current, temperature, voltage difference between the strongest and weakest cells, and the SOC of the strongest cell.

Parameters were sampled synchronously every 10 seconds during 20 discharge cycles and analyzed using different models listed in Table 1. Comparing the results with independent test data of 20 discharge cycles shows that the consistency of the two methods is very close; as the number of training samples increases, the consistency will further improve.


Figure 4: Example results extracted from training and test data for different ML models

SoC is sufficient to implement support for ML

Although the current focus of AI is on large-scale, high-power applications; however, for applications such as battery monitoring, "edge-deployed" AI using MCU and tinyML technology can also become part of high-performance, low-power solutions. In this scenario, the SoC solution has all the processing power required and can integrate various machine learning algorithms.

All necessary sensor and communication interfaces are built-in; in addition, the SoC is supported by a rich ecosystem of evaluation and design tools.

Paul Gorday is Qorvo's technical director of DSP and machine learning.


#Application #tiny #machine #learning #tinyML #power #management #systems