Battery pack, electronic combination, battery management system, power tool system, and control method for power tool

By introducing machine learning programs and neural network models into the battery pack and combining them with sensor data to achieve intelligent management and fault prediction, the charging and discharging efficiency of the battery pack under different environments has been solved, and the intelligent management and fault diagnosis capabilities of the battery pack have been improved.

WO2024255730A1PCT designated stage expired Publication Date: 2024-12-19NANJING CHERVON IND

Patent Information

Application Number
PCT/CN2024/098409
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-24
Filing Date
2024-06-11
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

Existing battery packs and battery management systems cannot optimize charging and discharging efficiency under different environments, and fault analysis requires on-site handling by battery suppliers, making intelligent management impossible.

Method used

It employs machine learning programs and neural network models, combined with sensor data, to generate battery status indicators, enabling intelligent management and fault prediction, and supporting remote communication and dynamic adjustment of power tools.

Benefits of technology

It improves the charging and discharging efficiency of the battery pack, enables intelligent management and remote fault diagnosis, and enhances user experience and battery life prediction capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024098409_19122024_PF_FP_ABST
    Figure CN2024098409_19122024_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a battery pack for supplying power to a power tool, comprising: a sensor for generating sensor data indicating operation parameters of a battery pack; and an electronic control unit comprising a machine learning program. The electronic control unit is configured to: receive the sensor data, use the machine learning program to process the sensor data, and use the machine learning program to generate an output on the basis of the sensor data, wherein the machine learning program comprises a trained neural network model, and the output at least indicates at least one of a state of charge (SoC), a state of temperature (SoT), a state of health (SoH), and a state of power (SoP) of a battery cell. The effective utilization rate of a battery is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Battery pack, electronic assembly, battery management system, power tool system, and power tool control method

[0001] This application claims priority to Chinese patent applications filed with the China Patent Office on June 15, 2023, with application number 202310713474.X, filed with the China Patent Office on July 3, 2023, with application number 202310812819.7, filed with the China Patent Office on August 17, 2023, with application number 202311041440.7, and filed with the China Patent Office on May 24, 2024, with application number 202410658068.2. The entire contents of the above applications are incorporated by reference into this application. Technical Field

[0002] The present application relates to a battery pack, an electronic assembly, a battery management system, an electric tool system and a control method for an electric tool, and belongs to the field of electric tools. Background Art

[0003] Battery packs and battery management systems are core technologies in the power tool field. They are crucial to the lifespan, operating performance, and user experience of DC power tools. Battery packs or power management systems typically generate battery charge and discharge strategies based on laboratory data, then embed these strategies into internal embedded hardware and software systems to manage and protect the batteries. Once a battery pack leaves the battery assembly plant and fails, the battery supplier must visit the site to obtain battery data and perform fault analysis. Furthermore, pre-defined battery charge and discharge strategies cannot optimize the battery's charge and discharge efficiency under different conditions.

[0004] This section provides background information related to the present application which is not necessarily prior art.

[0005] Summary of the Invention

[0006] The purpose of this application is to provide a battery pack, electronic combination and battery management system with higher charging and discharging efficiency and greater intelligence.

[0007] To achieve the above objectives, this application adopts the following technical solutions:

[0008] A battery pack for powering an electric tool comprises: a housing; a battery cell accommodated in the housing; a sensor electrically connected to the battery cell, the sensor being configured to generate sensor data indicating operating parameters of the battery pack; and an electronic controller electrically connected to the sensor, the electronic controller comprising an electronic processor and a memory, the memory comprising a machine learning program for execution by the electronic processor, the electronic controller being configured to: receive the sensor data, process the sensor data using the machine learning program, the machine learning program comprising a trained neural network model, and generate an output based on the sensor data using the machine learning program, the output indicating at least one of the state of charge (SoC), state of temperature (SoT), state of health (SoH), and state of power (SoP) of the battery cell.

[0009] In some embodiments, the neural network model is a physical embedded neural network model (PINN).

[0010] In some embodiments, the physics-embedded neural network (PINN) model uses the heat conduction partial differential equation as a constraint of the neural network.

[0011] In some embodiments, the sensor data includes at least one of current data, voltage data, temperature data, and time data.

[0012] In some embodiments, the neural network model is a deep neural network.

[0013] In some embodiments, the electronic controller resamples a preset original data set to create enhanced samples and trains a series of extreme learning machines based on the samples.

[0014] In some embodiments, the neural network model is a recurrent neural network.

[0015] In some embodiments, a communication module is further included, and a machine learning control program is generated outside the battery pack through training based on preset sensor data and related outputs and is received by the communication module.

[0016] In some embodiments, the battery pack is a detachable battery pack.

[0017] In some embodiments, the battery pack is a rechargeable battery pack.

[0018] A battery pack for powering an electric tool comprises: a housing; a battery cell accommodated in the housing; a power tool interface disposed on the housing and configured to couple with the power tool; a discharge circuit electrically connected to the battery cell and the power tool interface, respectively, the discharge circuit being configured to transmit electric energy to the power tool via the power tool interface; a sensor electrically connected to the battery cell, the sensor being configured to generate sensor data indicating operating parameters of the battery pack; and a first electronic controller, the first electronic controller being used at least to control the discharge circuit, the electronic controller comprising an electronic processor and a memory, the memory comprising a machine learning program for execution by the electronic processor, the electronic controller being configured to: receive sensor data, process the sensor data using the machine learning program, generate output based on the sensor data using the machine learning program, and adjust a protection threshold of the battery pack based on the generated output.

[0019] In some embodiments, the first electronic controller further includes a second machine learning program, and the second machine learning program controls the discharge circuit based on a protection threshold of the battery pack.

[0020] In some embodiments, the sensor data includes current data, voltage data, temperature data, and time data.

[0021] In some embodiments, the protection threshold includes at least one of an over-temperature protection threshold, an under-temperature protection threshold, an over-voltage protection threshold, an under-voltage protection threshold, and an over-current protection threshold.

[0022] In some embodiments, the electronic controller controls the power supply from the battery pack to the power tool based on a protection threshold.

[0023] In some embodiments, the protection threshold is sent to the power tool via the power tool interface, and the power tool controls power usage of the power tool based on the protection threshold.

[0024] In some embodiments, the second electronic controller is configured to at least control the discharge circuit, and the second electronic controller controls the discharge circuit based on a protection threshold of the battery pack.

[0025] In some embodiments, the second electronic controller includes a machine learning program.

[0026] In some embodiments, the second electronic controller and the first electronic controller are disposed on the same circuit board.

[0027] In some embodiments, the second electronic controller and the first electronic controller are disposed on different circuit boards.

[0028] A battery pack for powering an electric tool comprises: a housing; a battery cell accommodated in the housing; a power tool interface disposed in the housing and configured to couple to and communicate with the power tool; a discharge circuit electrically connected to the battery cell and the power tool interface, respectively, the discharge circuit being configured to transmit electrical energy to the power tool via the power tool interface; and an electronic controller, the electronic controller comprising an electronic processor and a memory, the memory comprising a machine learning program for execution by the electronic processor, the electronic controller being configured to: collect working data from the power tool through the power tool interface, process the working data using the machine learning program, generate output based on the working data using the machine learning program, and select a discharge mode and control the discharge circuit based on the generated output.

[0029] In some embodiments, the discharge mode includes a performance mode, a power consumption mode, and a balance mode.

[0030] In some embodiments, the discharge mode includes a series mode and a parallel mode.

[0031] In some embodiments, a machine learning program identifies the type of power tool based on the operating data.

[0032] In some embodiments, a machine learning program identifies usage habits of a user of a power tool based on the work data.

[0033] In some embodiments, the electronic controller controls the power supply from the battery pack to the power tool based on the discharge pattern.

[0034] In some embodiments, the discharge pattern is sent to the power tool via a power tool interface, and the power tool controls power usage of the power tool based on the discharge pattern.

[0035] In some embodiments, a communication module is further included, and a machine learning control program is generated outside the battery pack through training based on preset sensor data and related outputs and is received by the communication module.

[0036] In some embodiments, the machine learning control program is generated outside the battery pack by training based on preset sensor data and related outputs, and is sent to the battery pack by the power tool via the power tool interface.

[0037] In some embodiments, each discharge mode predefines parameter information such as discharge voltage, discharge current, maximum discharge current, and discharge cut-off voltage, and combinations thereof.

[0038] A battery pack comprises: a shell; a battery cell group accommodated in the shell, the battery cell group including a plurality of battery cells; a display device disposed in the shell and configured to indicate a status of the battery pack; a sensor electrically connected to the battery cell group, the sensor being configured to generate sensor data indicating operating parameters of the battery pack; a circuit board electrically connected to the battery cell group and the sensor, the circuit board being provided with a plurality of electronic components; an electronic controller disposed on the circuit board, the electronic controller being electrically connected to the sensor, the electronic controller including an electronic processor and a memory, the memory including a machine learning program for execution by the electronic processor, the electronic controller being configured to: receive sensor data, process the sensor data using the machine learning program, generate output based on the sensor data using the machine learning program, the generated output indicating a fault of the plurality of battery cells or the plurality of electronic components, and control the display device to display an abnormal status according to the generated output.

[0039] In some embodiments, the battery pack further includes a communication module configured to establish a communication connection with a remote device, and the electronic controller is further configured to control the communication module to send the fault to the remote device based on the generated output.

[0040] In some embodiments, the remote device is at least one selected from the group consisting of: a server, a smartphone, a tablet, and a laptop.

[0041] In some embodiments, the communication module includes at least one device selected from the following group: Bluetooth, local area network, wireless, and cellular network.

[0042] In some embodiments, the output includes cell impedance, cell temperature data, life warning, aging warning, or installation fault warning.

[0043] In some embodiments, the display device receives control signals and conveys status information to the user via a device that generates visual signals or auditory signals.

[0044] In some embodiments, the display device includes an indicator light, a buzzer, or a display screen.

[0045] In some embodiments, the battery pack further includes: a power tool interface disposed on the housing, configured to couple to and communicate with the power tool, and the electronic controller is further configured to: send a fault to the power tool through the power tool interface based on the generated output.

[0046] In some embodiments, the battery pack further includes: a charging power tool interface, disposed on the housing, configured to couple with the charger and enable the charger to charge the battery pack, and the electronic controller is further configured to: send a fault to the charger through the power tool interface based on the generated output.

[0047] In some embodiments, the electronic controller predicts battery lithiation, folding, and structural changes by implementing a neural network.

[0048] A battery pack comprises: a shell; a battery cell group accommodated in the shell, the battery cell group including a plurality of battery cells; a communication module configured to establish a communication connection with a remote device; a sensor electrically connected to the battery cell group, the sensor configured to generate sensor data indicating operating parameters of the battery pack; a circuit board electrically connected to the battery cell group and the sensor, a plurality of electronic components being provided on the circuit board; an electronic controller provided on the circuit board, the electronic controller being electrically connected to the sensor, the electronic controller including an electronic processor and a memory, the memory including a machine learning program for execution by the electronic processor, the electronic controller being configured to: receive sensor data, process the sensor data using the machine learning program, generate output based on the sensor data using the machine learning program, the generated output indicating a fault of the plurality of battery cells or the plurality of electronic components, and control the communication module to send the fault to the remote device according to the generated output.

[0049] In some embodiments, the remote device is at least one selected from the group consisting of: a server, a smartphone, a tablet, and a laptop.

[0050] In some embodiments, the communication module includes at least one device selected from the following group: Bluetooth, local area network, wireless, and cellular network.

[0051] An electronic combination includes: a battery pack, including: a shell, a cell group accommodated in the shell, the cell group including a plurality of cell units; and a sensor supported by the shell and configured to generate sensor data indicative of operating parameters of the battery pack; a switching element for controlling an input current or an output current of the battery pack; and an electronic controller, the electronic controller being communicatively connected to the sensor, the electronic controller including an electronic processor and a memory, the memory including a first machine learning program and a second machine learning program for execution by the electronic processor, the electronic controller being configured to: receive sensor data, process the sensor data using the first machine learning program, and generate a first output based on the sensor data, process the sensor data using the second machine learning program, and generate a second output based on the sensor data, generate a third output based on the first output and the second output, and control the switching element based on the generated third output.

[0052] In some embodiments, the electronic controller is further configured to: adjust a protection threshold based on the first output, and determine whether to charge the battery cell pack based on a comparison result between the second output and the protection threshold.

[0053] In some embodiments, the electronic controller is further configured to: adjust a protection threshold based on the first output, and adjust a state of charge of the battery cell group based on a calculation result of the second output and the protection threshold.

[0054] In some embodiments, the electronic controller is further configured to: adjust a protection threshold based on the first output, and determine whether to discharge the battery cell pack based on a comparison result between the second output and the protection threshold.

[0055] In some embodiments, the electronic controller is further configured to: adjust a protection threshold based on the first output, and adjust a discharge state of the battery cell group based on a calculation result of the second output and the protection threshold.

[0056] In some embodiments, the protection threshold is at least one of an overvoltage protection threshold, an undervoltage protection threshold, an overcurrent protection threshold, or an overtemperature protection threshold.

[0057] In some embodiments, the switching element and the electronic controller are disposed within the battery pack.

[0058] In some embodiments, the electronic controller is disposed within the battery pack.

[0059] In some embodiments, the switching element and the electronic controller are disposed outside the battery pack.

[0060] In some embodiments, the electronic controller is disposed outside the battery pack.

[0061] A battery management system comprises: a wireless communication device configured to support at least one wireless communication protocol; an electronic controller electrically connected to the wireless communication device, comprising an electronic processor and a memory, the memory comprising a machine learning program for execution by the electronic processor; a plurality of battery cell modules, each battery cell module comprising at least one battery cell, a slave controller, a sensor, a wireless communication module and a bypass circuit; wherein the slave controller is electrically connected to the sensor and the wireless communication module, respectively, and the slave controller is configured to: receive sensor data indicating an operating parameter of at least one battery cell generated by the sensor, and send the sensor data to the electronic controller via the wireless communication module; and obtain return information from the electronic controller via the wireless communication module, and control the bypass circuit based on the return information; the electronic controller is configured to: receive sensor data of the plurality of battery cell modules from the plurality of battery cell modules via the wireless communication device; use a machine learning program to process the sensor data of the plurality of battery cell modules, wherein the machine learning program is a trained machine learning model, and the machine learning program is used to generate return information based on the sensor data of the plurality of battery cell modules; and send the return information to the slave controller via the wireless communication device.

[0062] In some embodiments, the on / off state of the bypass circuit controls whether current flows through the battery cell module.

[0063] In some embodiments, the wireless communication device and the wireless communication module support Bluetooth communication protocol, infrared or NFC communication.

[0064] In some embodiments, the wireless communication device also supports Wi-Fi or cellular networks.

[0065] In some embodiments, the machine learning control program is generated outside the battery pack through training based on preset sensor data and related outputs and received by the wireless communication device.

[0066] In some embodiments, the wireless communication device is configured to wirelessly receive machine learning program updates from the external system device, the machine learning program is an adjustable machine learning program, and the machine learning controller is configured to update the machine learning program based on the updates to the machine learning program.

[0067] In some embodiments, the wireless communication device, the electronic controller, and the plurality of battery cell modules are disposed in a housing of a battery pack.

[0068] In some embodiments, the wireless communication device and the electronic controller are disposed in a housing of an electric tool, and multiple groups of battery modules are disposed in a housing of a battery pack, which supplies power to the electric tool.

[0069] In some embodiments, multiple groups of battery cell modules are disposed in a housing of a battery pack, and the wireless communication device and the electronic controller are disposed in a housing of a charger, which charges the battery pack.

[0070] In some embodiments, multiple groups of battery cell modules are disposed in a housing of a battery pack, and the wireless communication device and the electronic controller are disposed in an external device, which is communicatively connected to the battery pack.

[0071] A charger comprises: a housing; a battery pack interface disposed on the housing, the battery pack interface being used to couple with a battery pack; a charging circuit configured to be electrically connected to the battery pack interface and to charge the battery pack; and an electronic controller comprising an electronic processor and a memory, the memory storing a machine learning program executable by the electronic processor, the machine learning program comprising a vector model and a plurality of reference vectors; wherein the electronic controller is configured to: record charging data of the battery pack charged by the charging circuit; vectorize the charging data using the vector model to obtain a charging feature vector of the battery pack; respectively calculate the distance between the charging feature vector and each reference vector; and select an aging parameter corresponding to a reference vector having the smallest distance as an aging assessment value of the battery pack.

[0072] In some embodiments, the charging data includes charging time, ambient temperature, charging voltage, charging current, charging temperature, state of charge (SoC) of the battery pack, single cell voltage, single cell voltage mean, single cell voltage standard deviation, maximum single cell voltage, minimum single cell voltage, maximum-minimum single cell voltage difference of each battery cell in the battery pack, and at least one of the measured temperature, measured temperature mean, measured temperature standard deviation, maximum measured temperature, minimum measured temperature, and maximum-minimum measured temperature difference at each temperature measurement point in the battery pack.

[0073] In some embodiments, the aging parameter is the state of health (SoH) of the battery pack.

[0074] In some embodiments, the electronic controller is further configured to use an average of a plurality of charging characteristic vectors in the same SoH interval as a reference vector corresponding to the SoH interval.

[0075] In some embodiments, the aging parameter is the remaining maximum capacity and / or the DC internal resistance of the battery pack.

[0076] In some embodiments, the battery pack interface includes a positive terminal, a negative terminal, and a communication terminal.

[0077] In some embodiments, the electronic controller is further configured to transmit the aging assessment value of the battery pack to the battery pack via the communication terminal.

[0078] In some embodiments, the battery pack is detachably connected to the power tool and provides power to the power tool.

[0079] In some embodiments, the charger further includes a communication module that is communicatively connected to the remote device and electrically connected to the electronic controller; the electronic controller is further configured to transmit the aging assessment value of the battery pack to the remote device or power tool via the communication module.

[0080] In some embodiments, the vector model includes a Siamese network model.

[0081] A battery pack for powering an electric tool comprises: a housing; a battery cell housed in the housing; a sensor assembly electrically connected to the battery cell and configured to generate sensor data indicating operating parameters of the battery pack; and an electronic controller electrically connected to the sensor assembly, comprising an electronic processor and a memory, the memory storing a machine learning program executable by the electronic processor; wherein the electronic controller is configured to: receive sensor data, wherein the sensor data comprises first-category sensor data and second-category sensor data; generate a predicted temperature change rate of the battery pack based on the first-category sensor data using the machine learning program; calculate a measured temperature change rate of the battery pack based on the second-category sensor data; and provide a prompt for a thermal runaway risk of the battery pack when the measured temperature change rate is greater than the predicted temperature change rate.

[0082] In some embodiments, the electronic controller is configured to indicate that the thermal runaway risk level of the battery pack is high when the difference between the real-time temperature change rate and the predicted temperature change rate is greater than or equal to a first temperature difference threshold.

[0083] In some embodiments, the electronic controller is configured to indicate that the thermal runaway risk level of the battery pack is medium when the difference between the real-time temperature change rate and the predicted temperature change rate is less than a first temperature difference threshold but greater than or equal to a second temperature difference threshold.

[0084] In some embodiments, the electronic controller is configured to indicate that the thermal runaway risk level of the battery pack is low when the difference between the real-time temperature change rate and the predicted temperature change rate is less than a second temperature difference threshold.

[0085] In some embodiments, the first type of sensor data includes the voltage, current, temperature, state of charge (SoC) of the battery pack and at least one of the working status, operating time, motor speed, and output power of the power tool.

[0086] In some embodiments, the second type of sensor data includes measured temperatures at one or more temperature measurement points within the battery pack.

[0087] In some embodiments, the first type of sensor data partially overlaps with the second type of sensor data.

[0088] In some embodiments, the machine learning program includes a random forest model.

[0089] In some embodiments, the battery pack also includes one or more risk indicator lights; the electronic controller is also electrically connected to the risk indicator lights and is configured to: based on the current thermal runaway risk level of the battery pack, light up the risk indicator light corresponding to the thermal runaway risk level.

[0090] In some embodiments, the battery pack further includes a communication module that is communicatively connected to the remote device and electrically connected to the electronic controller; the electronic controller is further configured to transmit the current thermal runaway risk level of the battery pack to the remote device via the communication module.

[0091] A method for constructing a battery pack fault prediction model, wherein the battery pack is used to power an electric tool, and the construction method includes: data acquisition, which is to acquire usage data of the battery pack and operating data of the electric tool; data preprocessing, which is to perform at least one of data cleaning, data integration, and data correction on the usage data and operating data to obtain streaming data based on time series; feature extraction, which is to extract and reprocess the streaming data using a sliding window to obtain corresponding feature data; model construction, which is to select a corresponding machine learning model based on the fault prediction target to establish a corresponding battery pack fault prediction model; training and verification, which is to use the feature data to train the battery pack fault prediction model, and to verify, evaluate, and optimize the trained battery pack fault prediction model.

[0092] In some embodiments, before data preprocessing, the method further includes: data analysis, performing feature analysis on usage data and working data before and after the battery pack failure, determining potential factors related to the battery pack failure, and subsequent data preprocessing and feature extraction are performed based on the potential factors.

[0093] In some embodiments, model building includes: when the fault prediction goal is to predict the duration of a battery pack failure, selecting a regression model to establish a battery pack failure prediction model.

[0094] In some embodiments, model building includes: when the fault prediction goal is to predict the category of a battery pack failure to occur, selecting a classification model to establish a battery pack failure prediction model.

[0095] In some embodiments, model building includes: when the fault prediction goal is to predict the probability of a battery pack failure, selecting a regression model to establish a battery pack failure prediction model.

[0096] In some embodiments, the classification models include logistic regression models, boosted decision trees, decision forests, neural network models, support vector machines, and K-nearest neighbor models; the regression models include Poisson regression models, boosted decision tree regression models, decision forest regression models, and neural network regression models.

[0097] In some embodiments, the training validation includes: cross-validating the battery pack failure prediction model using feature data to optimize the battery pack failure prediction model.

[0098] In some embodiments, training verification includes: determining the accuracy, error rate and recall rate of each battery pack fault prediction model, and determining the best battery pack fault prediction model based on the accuracy, error rate and recall rate, so as to select the best battery pack fault prediction model in the future.

[0099] In some embodiments, the battery pack usage data includes at least one of the battery pack voltage, current, state of charge (SoC), full voltage difference, single cell voltage of each battery cell in the battery pack, and measured temperature at each temperature measurement point in the battery pack.

[0100] In some embodiments, the operating data of the power tool includes at least one of the operating status, operating time, motor speed, and output power of the power tool.

[0101] A method for constructing a battery pack life assessment model, wherein the battery pack is used to power an electric tool, the construction method comprising: data acquisition, obtaining usage data of the battery pack; data preprocessing, performing at least one of data cleaning, data integration, and data correction on the usage data; feature engineering, extracting and reprocessing the preprocessed usage data using a sliding window to obtain a relevant feature sequence; and model construction, selecting a suitable machine learning model to fit the relevant feature sequence to a target state of health (SoH), setting evaluation indicators, and predicting the current and future state of health (SoH).

[0102] In some embodiments, the machine learning model includes a linear model, a decision tree model, a support vector machine model, a Bayesian model, a clustering model, a neural network model, dimensionality reduction and metric learning, ensemble learning, reinforcement learning, and a deep learning model.

[0103] In some embodiments, the battery pack usage data includes at least one of the voltage, current, state of charge (SoC) of the battery pack, the single cell voltage of each battery cell in the battery pack, and the measured temperature at each temperature measurement point in the battery pack.

[0104] In some embodiments, data cleaning includes data deduplication, outlier removal, missing value filling, noise reduction, and transformation.

[0105] In some embodiments, the feature engineering process further includes: dividing the usage data into multiple charging processes; using the ampere-hour integration method to calculate the capacity change process of the battery pack in each charging process for a fixed voltage range; converting the capacity change process into a target SoH change process, and determining the correspondence between the usage data and the target SoH.

[0106] In some embodiments, model construction includes: selecting a linear regression model to fit the relevant feature sequence with the corresponding target SoH to obtain a machine learning model for predicting the current SoH of the battery pack.

[0107] In some embodiments, model construction includes: determining a historical SoH sequence and a future SoH sequence based on a change process of a target SoH; and selecting an LSTM model to fit the historical SoH sequence and the future SoH sequence to obtain a machine learning model for predicting the future SoH of a battery pack.

[0108] In some embodiments, feature engineering processing includes: generating a temperature difference sequence of temperature measurement points based on the measured temperature at the same temperature measurement point; generating a temperature difference sequence between temperature measurement points based on the measured temperatures at different temperature measurement points; and generating a temperature increment sequence corresponding to a unit SoC based on the measured temperatures at each temperature measurement point.

[0109] In some embodiments, model construction includes: selecting an LSTM model or an XGBoost model to fit at least one of the temperature difference sequence of the temperature measurement points, the temperature difference sequence between the temperature points, and the temperature increment sequence with the target SoH to obtain a machine learning model for predicting the current SoH of the battery pack.

[0110] In some embodiments, the construction method further includes: verifying, evaluating, and optimizing the battery pack life assessment model based on the evaluation index and at least one of the accuracy, precision, and recall rate of the model.

[0111] A power tool system comprises: a first power tool including a motor; an electronic controller, the electronic controller including an electronic processor and a memory, the memory including a first machine learning control program for execution by the electronic processor, the first machine learning control program being a trained first machine learning model; the electronic controller being configured to control the motor through the first machine learning control program;

[0112] A second power tool comprises: a motor; an electronic controller, the electronic controller comprising an electronic processor and a memory, the memory comprising a second machine learning control program for execution by the electronic processor, the second machine learning control program being a trained second machine learning model; the electronic controller being configured to control the motor through the second machine learning control program; wherein the first machine learning model is generated based on a first data set training related to the operation of the first power tool; and the second machine learning model is generated based on the first machine learning model and a second data set training related to the operation of the second power tool.

[0113] In some embodiments, the first machine learning model and the second machine learning model are one or more combinations of linear models, decision tree models, neural network models, support vector machine models, Bayesian classification, ensemble learning, clustering, dimensionality reduction and metric learning, reinforcement learning, and deep learning models.

[0114] In some embodiments, the sample size of the first data set is greater than or equal to N times the sample size of the second data set; wherein N is greater than or equal to 2.

[0115] In some embodiments, the first power tool and the second power tool act on the same object.

[0116] In some embodiments, the first power tool and the second power tool act on different objects.

[0117] In some embodiments, the first power tool is an electric drill, and the second power tool is an electric screwdriver.

[0118] In some embodiments, the first power tool is a handheld sander, and the second power tool is a sanding robot.

[0119] In some embodiments, the first power tool is a handheld construction power tool, and the second power tool is a construction robot.

[0120] In some embodiments, the motor of the first power tool and the motor of the second power tool are the same.

[0121] In some embodiments, the motor of the first power tool and the motor of the second power tool are different.

[0122] A power tool system comprises: a first power tool comprising: a motor; a wireless communication module configured to wirelessly transmit data to another device; an electronic controller, the electronic controller comprising an electronic processor and a memory, the memory comprising a first machine learning control program for execution by the electronic processor, the electronic controller configured to control the motor via the first machine learning control program;

[0123] A second electric tool comprises: a motor; a wireless communication module configured to wirelessly transmit data to other devices; and an electronic controller, wherein the electronic controller comprises an electronic processor and a memory, and the electronic controller is at least used to control the motor; wherein the wireless communication module of the first electric tool sends the first machine learning control program to the wireless communication module of the second electric tool; the electronic controller of the second electric tool is configured to generate a second machine learning control program based on the first machine learning model and data training related to the operation of the second electric tool, and store the second machine learning control program in the memory.

[0124] In some embodiments, the first machine learning model and the second machine learning model are one or more combinations of linear models, decision tree models, neural network models, support vector machine models, Bayesian classification, ensemble learning, clustering, dimensionality reduction and metric learning, reinforcement learning, and deep learning models.

[0125] In some embodiments, the electronic controller of the second power tool is further configured to control the motor via the second machine learning control program.

[0126] In some embodiments, the first power tool and the second power tool act on the same object.

[0127] In some embodiments, the first power tool and the second power tool act on different objects.

[0128] In some embodiments, the first power tool is an electric drill, and the second power tool is an electric screwdriver.

[0129] In some embodiments, the first power tool is a push lawn mower, and the second power tool is a riding lawn mower or a robotic lawn mower.

[0130] In some embodiments, the first power tool is a lawn mower and the second power tool is a snow blower.

[0131] In some embodiments, the motor of the first power tool and the motor of the second power tool are the same.

[0132] In some embodiments, the motor of the first power tool and the motor of the second power tool are different.

[0133] A method for controlling an electric tool, comprising:

[0134] a sampling step of collecting raw data related to operating parameters of the power tool through a plurality of sensors while the power tool operates based on the initial machine learning model;

[0135] a processing step of clipping or compressing the original data to obtain processed target data;

[0136] a transmitting step of transmitting the target data to a cloud server so as to train and update the initial machine learning model based on the target data via the cloud server;

[0137] The acquisition step is to obtain the updated machine learning model on the cloud server and control the operation of the power tool based on the updated machine learning model.

[0138] In some embodiments, collecting raw data related to the operating parameters of the power tool through multiple sensors includes:

[0139] Determining a sampling phase corresponding to the sensor according to the current operating state of the electric tool;

[0140] During the sampling phase, raw data related to the working parameters of the power tool are collected by multiple sensors.

[0141] In some embodiments, the clipping or compressing the original data to obtain processed target data includes:

[0142] Identifying and extracting similar sampled data, sampled data with missing values, and abnormal sampled data from the original data;

[0143] Performing a trimming operation on the similar sampled data, the sampled data with missing values, and the abnormal sampled data to obtain corresponding candidate data;

[0144] Identifying and extracting associated sampled data and sampled data whose current bytes exceed a byte threshold from the candidate data;

[0145] A compression operation is performed on the associated sampled data and the sampled data whose current byte exceeds the byte threshold to obtain corresponding target data.

[0146] In some embodiments, the present invention further comprises:

[0147] A monitoring step of monitoring a current error rate of the machine learning model;

[0148] A retraining step, when the current error rate reaches a first error rate threshold, issuing a model warning prompt and synchronously triggering a retraining operation of the machine learning model;

[0149] A switching step, switching to a new machine learning model when the current error rate reaches a second error rate threshold; wherein the second error rate threshold is greater than the first error rate threshold.

[0150] In some embodiments, the actual distance difference between the similar sampled data is less than a first distance difference threshold.

[0151] In some embodiments, the main memory capacity of the power tool is at least 16M bytes.

[0152] In some embodiments, the machine learning model is a linear model, a decision tree model, a neural network model, a support vector machine model, Bayesian classification, ensemble learning, clustering, dimensionality reduction and metric learning, reinforcement learning, or a deep learning model.

[0153] In some embodiments, the sensor includes a temperature sensor and a current detection element.

[0154] In some embodiments, the sensor includes an image acquisition device.

[0155] A method for controlling an electric tool, comprising:

[0156] Collecting working data of power tools to form a training data set;

[0157] Select a machine learning model;

[0158] Using the training data set, training the machine learning model to generate a machine learning control program;

[0159] storing the machine learning control program in a memory of the power tool;

[0160] executing the machine learning control program and controlling the motor of the power tool according to an output of the machine learning control program;

[0161] The operating condition distribution of the data samples in the training data set is consistent with the operating condition proportion actually required by the power tool.

[0162] In some embodiments, the sample size of the training data set is greater than or equal to 10,000.

[0163] In some embodiments, the working mode of the power tool includes at least a first working mode and a second working mode; the control method also includes: using data of m dimensions in the training data set to generate a first machine learning control program, and the first working mode is controlled by the first machine learning control program; using data of n dimensions in the training data set to generate a second machine learning control program, and the second working mode is controlled by the second machine learning control program; m is less than n, and both m and n are positive integers.

[0164] In some embodiments, in the second operating mode, at least one feature in the working environment of the power tool is used as an input parameter of the second operating mode.

[0165] In some embodiments, the at least one characteristic of the working environment includes one of the following: humidity, temperature, and environmental image.

[0166] In some embodiments, the penalty coefficient of the first machine learning control program is smaller than the penalty coefficient of the second machine learning control program.

[0167] In some embodiments, the penalty coefficient model includes one of the following: an SVM model, a neural network model, a clustering model, a deep learning model, or a reinforcement learning model.

[0168] In some embodiments, the complexity of the operating condition distribution of the power tool is proportional to the penalty coefficient.

[0169] In some embodiments, the sample size in the training data set of the power tool is proportional to the penalty coefficient.

[0170] In some embodiments, the complexity of the environment in which the power tool is located is proportional to the penalty coefficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0171] FIG1 is an exemplary diagram of a controlled device in an exemplary embodiment of the present application;

[0172] FIG2 is a schematic diagram of an exemplary battery management system in the present application;

[0173] FIG3 is a schematic diagram of a structure of a battery management system in this application;

[0174] 4a-4c are schematic diagrams of a second structure of a battery management system in this application;

[0175] 5a-5c are schematic diagrams of a third structure of a battery management system in this application;

[0176] FIG6 is a schematic diagram of a fourth structure of a battery management system in this application;

[0177] FIG7 is a schematic diagram of the fifth structure of the battery management system in this application;

[0178] FIG8 is a schematic diagram of a sixth structure of a battery management system in this application;

[0179] FIG9 is a schematic diagram of the structure of the battery pack in this application;

[0180] FIG10 is a schematic diagram of the structure of a cell group of a battery pack in the present application;

[0181] FIG11 is a schematic diagram of the structure of the charger in this application;

[0182] FIG12 is a schematic diagram of another structure of a charger in the present application;

[0183] FIG13 is a schematic diagram of another structure of a battery pack in the present application;

[0184] FIG14 is a schematic diagram of a third structure of a charger in this application;

[0185] FIG15 is a control framework diagram of a cell module as a controlled device;

[0186] FIG16 is a schematic diagram of a cell module structure;

[0187] FIG17 a is a schematic diagram showing the state of the half-bridge output terminals when the bypass circuit is inserted;

[0188] FIG17 b is a schematic diagram showing the state of the half-bridge output terminals when the bypass circuit is bypassed;

[0189] Figure 18 is a method for establishing and implementing a machine learning program;

[0190] FIG19 is an exemplary block diagram of a power management system;

[0191] FIG20 is an exemplary block diagram of a control component;

[0192] 21 is a flow chart showing the control of the output of the battery pack usage status using a machine learning program using a battery management system;

[0193] FIG22 is a diagram of a PINN framework for estimating battery temperature distribution;

[0194] Figure 23 shows the general framework of data cleaning, partial charge separation, feature extraction, SOH estimation, post-processing, and SOH and RUL prediction;

[0195] FIG24 is a flow chart showing the control of battery pack charge and discharge management using a battery management system using a machine learning program;

[0196] FIG25 is a block diagram of discharge management;

[0197] FIG26 is a block diagram of charging management;

[0198] FIG27 is a flow chart of a method for constructing a battery pack life assessment model;

[0199] FIG28 is a flow chart illustrating control of battery pack aging management using a battery management system using a machine learning program;

[0200] FIG29 is a block diagram of aging management;

[0201] FIG30 is a flow chart of a method for constructing a battery pack failure prediction model;

[0202] FIG31 is a flow chart of controlling the risk management of thermal runaway of a battery pack using a battery management system using a machine learning program;

[0203] FIG32 is a block diagram of thermal runaway risk management;

[0204] FIG33 is a structural block diagram of an electric tool system provided in an embodiment of the present application;

[0205] FIG34 is a structural block diagram of another electric tool system provided in an embodiment of the present application;

[0206] FIG35 is a block diagram of an implementation of a traditional machine learning model provided in an embodiment of the present application;

[0207] FIG36 is a block diagram of an implementation of a machine learning model based on transfer learning technology provided in an embodiment of the present application;

[0208] FIG37 is a flow chart of a method for controlling a power tool provided in an embodiment of the present application;

[0209] Figure 38 is a flowchart of another power tool control method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0210] Before any embodiments of the present application are explained in detail, it is to be understood that the application is not limited in its application to the details of construction and the arrangement of components set forth in the following description or illustrated in the foregoing drawings.

[0211] In this application, the terms "comprises," "includes," "has," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0212] In this application, the term "and / or" describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " in this application generally indicates that the related objects are in an "and / or" relationship.

[0213] In this application, the terms "connect," "combine," "couple," and "install" may refer to direct connection, combination, coupling, or installation, or indirect connection, combination, coupling, or installation. For example, a direct connection refers to two parts or components being connected together without an intermediary, and an indirect connection refers to two parts or components being connected to at least one intermediary, with the two parts or components being connected via the intermediary. Furthermore, "connect" and "couple" are not limited to physical or mechanical connections or couplings and may include electrical connections or couplings.

[0214] In this application, it will be understood by those skilled in the art that relative terms (e.g., "about," "approximately," "substantially," etc.) used in conjunction with quantities or conditions include the values ​​and have the meaning indicated by the context. For example, the relative terms include at least the degree of error associated with the measurement of a specific value, the tolerance caused by manufacturing, assembly, use, etc. associated with a specific value. Such terms should also be considered to disclose a range defined by the absolute values ​​of the two endpoints. Relative terms may refer to plus or minus a certain percentage (e.g., 1%, 5%, 10% or more) of the indicated value. Numerical values ​​that do not use relative terms should also be disclosed as specific values ​​with tolerances. In addition, "substantially" may refer to plus or minus a certain degree (e.g., 1 degree, 5 degrees, 10 degrees or more) on the basis of the indicated angle when expressing a relative angular position relationship (e.g., substantially parallel, substantially perpendicular).

[0215] In this application, it will be understood by those skilled in the art that the function performed by an assembly can be performed by one assembly, multiple assemblies, one part, or multiple parts. Similarly, the function performed by a part can also be performed by one part, one assembly, or a combination of multiple parts.

[0216] In the present application, the terms "upper", "lower", "left", "right", "front", "back" and other directional words are described based on the orientation and positional relationship shown in the accompanying drawings, and should not be understood as limiting the embodiments of the present application. In addition, in the context, it is also necessary to understand that when it is mentioned that an element is connected to another element "upper" or "lower", it can not only be directly connected to the other element "upper" or "lower", but also be indirectly connected to the other element "upper" or "lower" through an intermediate element. It should also be understood that directional words such as upper side, lower side, left side, right side, front side, back side, etc. not only represent the positive orientation, but can also be understood as the lateral orientation. For example, below can include directly below, lower left, lower right, lower front and lower back, etc.

[0217] In this application, the terms "controller," "processor," "central processing unit," "CPU," and "MCU" are used interchangeably. Where a unit "controller," "processor," "central processing unit," "CPU," or "MCU" is used to perform a particular function, unless otherwise specified, the function may be performed by a single unit or multiple units.

[0218] In this application, the terms "device", "module" or "unit" can be implemented in the form of hardware or software to achieve specific functions.

[0219] In this application, the terms "calculate", "judge", "control", "determine", "identify", etc. refer to the operations and processes of a computer system or similar electronic computing device (e.g., controller, processor, etc.).

[0220] As shown in Figures 1-2, a battery management system 100 is provided for use in power tools and non-road vehicles. The battery management system 100 is used to manage the discharge of a battery pack 11 when it is powering the power tool or vehicle using the battery pack 11, and to manage the charging of the battery pack 11 by a charging device when the battery pack 11 is being charged.

[0221] In this embodiment, the power tool is a chain saw 12. In some embodiments, the power tool can also be a garden tool, such as a pruner, a hair dryer, a lawn mower, a snow blower, a cleaning machine, etc. Alternatively, the power tool can also be a decoration tool, such as a screwdriver, a wrench, an electric hammer, a nail gun, a sander, etc. Alternatively, the power tool can also be a saw tool, such as a reciprocating saw, a jigsaw, etc. Alternatively, the power tool can also be other bench-type tools, such as a table saw, a metal cutter, an electric milling machine, etc. Alternatively, the power tool can also be a grinding tool, such as an angle grinder, a sander, etc. Alternatively, the power tool can also be other power tools, such as a lamp, a fan, etc. It can be understood that the power tool can also be a power head, which includes a motor. The power head is used to adapt some output components to realize the functions of the tool.

[0222] In some embodiments, the battery pack 11 supplies power to a walking device 13 that uses the battery pack. The walking device 13 is a riding lawn mower that can walk outdoors and mow grass. It is understandable that the walking device 13 can also be other vehicles that only walk outdoors, such as multi-purpose vehicles, and can also be beach cars, utility vehicles (UTV), golf carts, and all-terrain vehicles (ATV). The walking device 13 can also be a vehicle that can realize another function in addition to the function of walking, like the riding lawn mower shown in this embodiment, such as a snowplow that can walk outdoors and also realize the function of clearing snow. It can also be an agricultural machinery vehicle, such as a harvester, a sprayer, etc. Of course, it is understandable that for the walking device, it can also be a cleaning machine.

[0223] As shown in Figure 11, the charging device is a charger 14 that can charge different types of rechargeable battery packs. The charger 14 includes: a housing 141, a battery pack interface 146, a power interface 142, a communication module 143, a communication protection module 144 and a power conversion circuit 145. Among them, the battery pack interface 146 includes: a charging terminal 1461 and a communication terminal 1462. Among them, the battery pack interface 146, the power interface 142, the communication module 143, the communication protection module and the power conversion circuit are arranged in the housing 141. The battery pack interface 142 is used to couple with the battery pack 11. The communication module is coupled with the communication terminal 1462 and is arranged in the housing to receive, analyze and process the communication information of the battery pack sent by the battery pack. In this embodiment, the communication terminal of the charger and the communication terminal of the battery pack are connected via a single bus.

[0224] The power interface 142 is used to connect to a power source. In this embodiment, the power source can be an AC power source, and the power interface 142 can connect to 120V or 220V AC mains electricity. The power interface 142 is connected to a power conversion circuit to convert the incoming AC power into charging energy suitable for charging the battery pack 11 and auxiliary energy for powering the internal components of the charger 14, such as the communication module. It is understood that the power conversion circuit may include at least an AC / DC module. In an alternative implementation, the power interface can be connected to a photovoltaic panel, and the power conversion circuit can convert solar energy into charging energy suitable for charging the battery pack and auxiliary energy for powering the internal components of the charger. It is understood that the power conversion circuit can include a solar controller (Maximum Power Point Tracking, MPPT) module, which converts solar energy into electrical energy. In this embodiment, the housing 141 is connected to a power cord plug as the power interface 142. In alternative implementations, the power interface can also be other types of interfaces, which are not limited here.

[0225] The charging terminal 1462 is provided on the housing and is detachably connected to a terminal of the battery pack 11. The communication terminal 1462 may be provided adjacent to the charging port 1461 and is detachably connected to a communication terminal of the battery pack 11.

[0226] As shown in FIG12 , the charger 14B includes multiple battery pack interfaces 146 b , which means that the charger 14B can charge multiple battery packs 11 simultaneously.

[0227] As shown in Figures 9 and 10, the battery pack 11 includes a housing 111, a cell group 112a, a sensor 18a, a display device 114, an interface, and a battery pack controller 181. The housing 111 is assembled to form a housing to secure the cell group 112a. The cell group 112a includes one or more cell units 1121, which are used to store energy. The interface is used to achieve electrical connection to an external circuit. In this embodiment, the interface includes a battery pack positive terminal 115 and a battery pack negative terminal 116 for achieving electrical connection. The battery pack 11 is coupled to the power tool via the interface to power the power tool. The battery pack 11 is coupled to the charger via the interface to enable the charger to charge the battery pack.

[0228] The battery pack 11 also includes a communication terminal 117 for communicating with the power tool. This terminal is connected to a communication module 118. The battery pack 11 is removably connected to the power tool to provide power. When the battery pack needs to be charged, it is removably connected to a charger. The battery pack's positive terminal 115, negative terminal 116, and communication terminal 117 are each coupled to the battery pack interface 146 of the charger 14, allowing the battery pack to be charged via the charging circuit.

[0229] As shown in FIG2 , the battery management system 100 manages the battery pack 11 itself, the operation between the battery pack 11 and the power tool 12 or the walking device 13, and the operation between the battery pack 11 and the charger 14 based on a machine learning program. In the battery management system, the battery pack and the components coupled thereto constitute a controlled device 10. Optionally, the controlled device 10 includes a battery pack 11, a power tool powered by the battery pack 11, such as a chain saw 12 or a walking device 13, and a charger 14 for charging the battery pack 11. Optionally, the battery pack 11 and the electronic circuits or electrical components that cooperate with the battery pack 11 constitute an electronic combination, for example, the battery pack and the battery pack charging and discharging circuits, or the battery pack and the switching element that controls the battery pack.

[0230] The sensor data includes sensor data collected by one or more sensors 18 provided in the controlled device 10. The sensors 18 include voltage sensors, current sensors, temperature sensors, inertial sensors, and position sensors.

[0231] Sensor data includes: operating parameters of the battery pack, including, for example, battery pack performance parameters such as current data, voltage data, temperature data, or internal resistance data. It also includes, for example, the current charge capacity of the battery pack (e.g., the battery pack's state of charge), the number of charge cycles the battery pack has undergone, the estimated remaining service life of the battery pack, the re-access time (e.g., the time associated with how quickly the battery pack can be removed from the power tool battery charger), and the operating time associated with the battery pack.

[0232] The state of charge of a battery pack may be, for example, a one-dimensional state of charge (eg, percentage of charge, voltage, coulombs, ampere-hours ("Ah"), etc.).

[0233] This also includes, for example, the operating time of the battery pack, for example, how long the battery pack is used in each usage cycle, the amount of time between two operating uses of the battery pack, etc. This also includes, for example, how often the battery pack is used, how often the battery pack is used with a specific power tool or type of power tool, how often the battery pack is charged on a specific charger or type of charger.

[0234] In some embodiments, the operating parameters may include data indicating the use of a particular battery. Other parameters of the battery pack may also be included, such as maintenance data of the battery pack.

[0235] In some embodiments, the sensor data also includes charging power input type data, such as AC power, DC power, or battery power. Examples include: 120V wall socket, 220V power socket, solar power, gas inverter, wireless charger, another power tool battery pack, another power tool battery charger, internal battery, supercapacitor, internal energy storage device, and vehicle. Sensor 18 data may also include data on the electrical characteristics of the power grid or circuit associated with the charging power source, such as frequent tripping or intermittent power outages.

[0236] Sensor data also includes environmental data. Environmental data includes data indicating characteristics or aspects of the environment in which the charger, battery pack, power tool, or mobile device is located. For example, environmental data may include data related to weather, ambient temperature (e.g., outside temperature), ambient humidity, etc.

[0237] Sensor data also includes: Operator data. Operator data can include data indicating the operator and / or owner of the charger, battery pack, power tool, or walking device. For example, operator data can include an operator identifier (ID), an owner ID, or both.

[0238] The sensor data also includes: location data. The location data may include data indicating the location of the charger, battery pack, power tool, or walking device. In some embodiments, the location data may indicate the physical location of the charger, battery pack, power tool, or walking device. For example, the physical location may be represented using geospatial coordinates, such as those determined via a Global Navigation Satellite System (GNSS), etc. As another example, the physical location may be represented as a worksite location (e.g., an address, an identification of the worksite location) and may include a location within the worksite (e.g., a specific floor in a skyscraper or other building under construction). In some other embodiments, the location data may indicate the location of the power tool battery charger, battery pack, and / or power tool for inventory management and tracking.

[0239] In some embodiments, the battery management system includes a cell module 112. The cell module 112 includes a sensor 18b. The sensor 18b is configured to collect operating parameters of the cell module 112 during use. The sensor 18b generates sensor data indicating the operating parameters of the cell module 112. This will be described in detail below.

[0240] Figure 2 shows an exemplary battery management system 100. Battery management system 100 includes a controlled device 10, a remote device 15, and a wireless communication device 16. For example, the controlled device is a battery pack 11. Battery pack 11 includes a sensor 18a. Sensor 18a is used to collect operating parameter data of the battery pack during use. Sensor 18a generates sensor data indicating the operating parameters of the battery pack.

[0241] In some embodiments, the remote device 15 includes, for example, a server 151 and a smart device 152. The smart device 152 includes a smart phone, a tablet computer, a cellular phone, a laptop computer, a smart watch, etc.

[0242] The wireless communication device 16 can be a long-range wireless network, or the wireless communication device 16 can communicate on different types of wireless networks using other protocols (e.g., Wi-Fi, cellular protocols, proprietary protocols, etc.). For example, the wireless communication device 16 can be configured to communicate via Wi-Fi over a network such as the Internet, a local area network ("LAN"), a wide area network ("WAN"), or a combination thereof, or to communicate via a piconet (e.g., using infrared or NFC communications). In other embodiments, the wireless communication device 16 can be a short-range communication protocol (such as Bluetooth), and in other embodiments, the wireless communication device 16 can be a wired network using, for example, a serial protocol (e.g., USB, USB-C, FireWire, etc.).

[0243] In some embodiments, the server 151 can send information to the smart device 152 for forwarding to the battery pack 11. In some embodiments, the communication module 118 of the battery pack 11 is equipped with a long-range transceiver instead of or in addition to a short-range transceiver. In such embodiments, the battery pack 11 communicates directly with the server 151. In some embodiments, the battery pack 11 can communicate directly with the server 151 and the smart device 152. In such embodiments, the smart device 152 can, for example, generate a graphical user interface to facilitate the control and programming of the battery pack 11, while the server 151 can store and analyze larger amounts of operating parameter data for future programming or operation of the battery pack 11. However, in other embodiments, the battery pack 11 can communicate directly with the server 151 without utilizing a short-range communication protocol with the smart device 152.

[0244] An electronic controller 17 implementing a machine learning program is provided within the battery management system 100. The electronic controller 17 includes an electronic processor 171 and a memory 172. The memory 172 includes a machine learning program for execution by the electronic processor 171.

[0245] The electronic controller 17 is configured to provide the required output from a given set of input data or data sets. Optionally, the machine learning program is trained by the data set and provides output for the test data. The learning information in the machine learning program is provided by the existing data. As the number of data samples increases, the accuracy of the machine learning program will increase. The machine learning program can be configured to use different types of methods to perform machine learning. For example, the electronic controller 17 can use decision tree learning, association rule learning, artificial neural networks, recurrent artificial neural networks, long short-term memory neural networks, inductive logic programming, support vector machines, clustering, Bayesian networks, reinforcement learning, representation learning, similarity and metric learning, sparse dictionary learning, genetic algorithms, k-nearest neighbors (KNN), attention networks / transformers and others to implement the machine learning program.

[0246] The electronic controller 17 is programmed and trained to perform specific tasks. The electronic controller 17 can be trained to predict battery characteristic data based on multiple operating parameters of different types. The electronic controller can be trained to generate an ideal charge and discharge strategy based on multiple operating parameters of different types and environmental data. The electronic controller 17 can be trained to generate an optimal battery protection control strategy based on multiple operating parameters of different types and other data. The electronic controller 17 can be trained to generate an optimal cell balancing control strategy based on multiple operating parameters of different types and other data.

[0247] A plurality of different training example data is provided to the electronic controller 17. The electronic controller 17 uses these training examples to generate a model (e.g., rules, a system of equations, etc.) that helps classify or estimate outputs based on new input data. The electronic controller 17 can weigh different training examples differently, for example, to prioritize different conditions or outputs from the electronic controller. In some embodiments, the training examples are weighted differently by associating different cost functions or values ​​with specific training examples or types of training examples.

[0248] In one embodiment, the electronic controller 17 implements an artificial neural network. An artificial neural network typically includes an input layer, multiple hidden layers or nodes, and an output layer. Typically, the input layer includes as many nodes as the inputs provided to the electronic controller 17. As mentioned above, the number (and type) of inputs provided to the electronic controller 17 can vary based on the specific task of the electronic controller 17. Therefore, the input layer of the artificial neural network of the electronic controller 17 can have different numbers of nodes based on the specific task of the electronic controller 17. The input layer is connected to the hidden layers. The number of hidden layers can vary and depend on the specific task of the electronic controller 17. Furthermore, each hidden layer can have a different number of nodes and different connections to the next layer. For example, each node in the input layer can be connected to each node in the first hidden layer. The connection between each node in the input layer and each node in the first hidden layer can be assigned a weight parameter. In addition, each node in the artificial neural network can also be assigned a bias value. However, each node in the first hidden layer may not be connected to every node in the second hidden layer. In other words, some nodes in the first hidden layer may not be connected to all nodes in the second hidden layer. The connections between nodes in the first and second hidden layers are each assigned different weight parameters. Each node in a hidden layer is associated with an activation function. The activation function defines how the hidden layer processes the input received from the input layer or previous input layer. These activation functions can vary and can vary based not only on the type of task associated with the electronic controller 17, but also on the specific type of hidden layer implemented. Each hidden layer can perform a different function. For example, some hidden layers can be convolutional hidden layers, which can reduce the dimensionality of the input in some cases, while other hidden layers can perform more statistical functions, such as max pooling, which can reduce groups of inputs to a maximum value, averaging layers, etc. In some hidden layers (also called "dense layers"), each node is connected to every node in the next hidden layer. Some artificial neural networks that include more than, for example, three hidden layers can be considered deep neural networks. The last hidden layer is connected to the output layer. Similar to the input layer, the output layer typically has the same number of nodes as possible outputs.

[0249] The electronic controller 17 and the electronic processor 171 can implement different methods for combining the outputs from the electronic controller 17. During training, the artificial neural network receives inputs of training examples and generates outputs using the bias of each node and the connection between each node and the corresponding weights. The artificial neural network then compares the generated outputs with the actual outputs of the training examples. Based on the generated outputs and the actual outputs of the training examples, the neural network modifies the weights and / or biases associated with each node connection. In some embodiments, the neural network also modifies the weights associated with each node during training. Training continues until training conditions are met. Training conditions can correspond to, for example, using a predetermined number of training examples, achieving a minimum accuracy threshold during training and validation, completing a predetermined number of validation iterations, optimizing training compared to test-and-test, etc. Based on the training examples, different types of training algorithms can be used to adjust the bias values ​​and weights of the node connections. Training algorithms can include, for example, gradient descent, Newton's method, conjugate gradient, quasi-Newton, Levenberg-Marquardt, etc.

[0250] In another embodiment, the electronic controller 17 implements a support vector machine to perform classification. For example, the electronic controller 17 can classify whether a battery cell or interface is aging. In such an embodiment, the electronic controller 17 may receive any two or more of the following: battery voltage V, battery current I, battery temperature T, battery internal resistance R, or usage time. The battery voltage V and battery current I can be, for example, discharge voltage and discharge current or charge voltage and charge current. The electronic controller 17 then uses combinations of input variables as support vectors to define a margin to maximize the margin. In some embodiments, the electronic controller 17 uses the sum of more than one similar input variable to define the margin. The margin corresponds to the distance between two closest vectors for different classifications. In some embodiments, the electronic controller 17 uses more than one support vector machine to perform a single classification. For example, when the electronic controller 17 classifies whether a battery cell or interface is aging, a first support vector machine may determine whether the battery cell or interface is aging based on the battery voltage V and battery current I, while a second support vector machine may determine whether the battery cell or interface is aging based on the battery internal resistance R and usage time. Then, when both support vector machines classify a cell or interface as aged, the electronic controller 17 can determine that it is aged. In other embodiments, a single support vector machine can use more than two input variables and define a hyperplane that separates cells or interfaces that are aging from cells or interfaces that are not aged.

[0251] A training example for a support vector machine includes: an input vector that includes values ​​for the input variables; and an output classification that indicates whether the cell or interface is aging. During training, the support vector machine selects the support vector (e.g., a subset of the input vector) that maximizes the margin. In some embodiments, the support vector machine can define a line or hyperplane that accurately separates aging cells or interfaces from non-aging cells or interfaces. However, in other embodiments (e.g., in the case of non-separability), the support vector machine can define a line or hyperplane that maximizes the margin and minimizes the slack variable, which measures the error in the support vector machine's classification. After the support vector machine is trained, new input data can be compared to the line or hyperplane to determine how to classify the new input data. In other embodiments, as described above, the electronic controller 17 can implement different machine learning algorithms to make estimates or classifications based on a set of input data.

[0252] As shown in Figure 3, in the battery management system 200, the electronic controller 17a is set on the remote device 25. The transceiver of the remote device 25 communicates with the controlled device 20. The remote device 25 takes a server 251 as an example. The server 251 also includes a server processor 2511 and a server storage 2512. The electronic processor of the electronic controller 17a receives data or data sets from the sensors (18a, 18b) of the battery pack or battery cell module, the sensors of the power tool or walking device, or the sensors of the charger. In some embodiments, the server 251 uses the received data or data sets as additional training examples. In other embodiments, the server 251 sends the received data or data sets to the trained electronic controller 17a. The electronic controller 17a then generates an estimate or classification based on the input data or data sets. The server processor 2511 then generates recommendations for future operations of the battery pack or battery cell module.

[0253] The server 251 may send the suggested operating parameters to the smart device 252. The smart device 252 may display the suggested changes to the operating parameters and request confirmation from the user to implement the suggested changes before forwarding the changes to the controlled device 20 (battery pack or electronic assembly). In other embodiments, the smart device 252 forwards the suggested changes to the controlled device 20 and displays the suggested changes to inform the user of the changes implemented by the controlled device 20.

[0254] In some embodiments, the electronic controller 17a located on the server 251 communicates the generated required output data to the battery pack 21. Specifically, the battery pack 21 controls the charging and discharging of the battery pack 17a based on the received output data from the electronic controller 17a. In some embodiments, the electronic controller 17a located on the server 251 communicates the generated required output data to the power tool 22 or walking device. The controller on the power tool or walking device controls the discharge of the battery pack based on the output data. In some embodiments, the electronic controller 17a located on the server 251 communicates the generated required output data to the charger 23. The controller on the charger 23 controls the charging of the battery pack 21 based on the output data.

[0255] As shown in Figures 4a-4c, in a battery management system 300, an electronic controller 17b is located in a controlled device 30. The battery management system 300 includes the controlled device 30, a remote device 35, and a wireless communication device 16. In some embodiments, as shown in Figure 4a, the electronic controller 17b is located in a battery pack 31. The battery pack 31 includes the electronic controller 17b, which is configured with an offline-trained machine learning program. In this embodiment, the communication module 118 of the battery pack 31 receives the offline-trained machine learning program from a server 351, or the communication module 118 of the battery pack 31 receives the offline-trained machine learning program from the server 351 via the wireless communication device 16. In some embodiments, the battery pack 31 receives the offline-trained machine learning program during manufacturing, while in other embodiments, the user of the battery pack 31 can choose to receive the offline-trained machine learning program after manufacturing and after operation of the battery pack 31. The offline-trained machine learning program is also a trained machine learning program similar to the electronic controller 17a located in the server 251. An offline trained machine learning program has been trained using different training examples and is configured to receive new input data and generate an estimate or classification for the new input data.

[0256] The controlled device 30 communicates with the server 351. The smart device 152 can also provide additional functionality to the controlled device 30 (e.g., generating a graphical user interface). The server 351 for offline training of a machine learning program can utilize operating parameter data from a battery pack similar to the battery pack 31 and use training examples of the operating parameter data of the battery pack 31 received from the battery pack 31 to train the offline trained machine learning program. The server 351 then sends the trained offline trained machine learning program to the controlled device, such as the electronic controller 17b of the battery pack 31, for execution during future operation of the battery pack 31.

[0257] Thus, the offline-trained machine learning program includes, for example, a trained machine learning program provided at the time of manufacture. During future operation of the battery pack 31, the offline-trained machine learning program analyzes new operating parameter data of the battery pack 31 from the controlled device and generates recommendations or actions based on the new operating parameter data. The offline-trained machine learning program has one or more specific tasks. In other embodiments, the tasks of the offline-trained machine learning program may be different. In some embodiments, a user may select a task for the offline-trained machine learning program using, for example, a graphical user interface generated by the smart device 152. The smart device 152 may then send a target task for the offline-trained machine learning program to the server 351. The server 351 then sends the trained machine learning program, which has been trained for the target task, to the offline-trained machine learning program. Based on the estimates or classifications from the offline-trained machine learning program, the controlled device 30 may change its operation, adjust one of the operating modes of the battery pack 31, and / or adjust different aspects of the battery pack 31. In some embodiments, the controlled device 30 may include more than one offline-trained machine learning program, each with a different target task. This is described in detail below.

[0258] In this embodiment, the electronic controller 17b is disposed in the battery pack 31. The battery pack 31 includes a sensor 38a and a communication module 118, which receives an offline-trained machine learning program via the communication module 118. The training process of the offline-trained machine learning program is completed on the server 351. The battery pack 31 receives the offline-trained machine learning program from the server 351. In some embodiments, the training process of the offline-trained machine learning program can be completed on another smart device 152. The battery pack 31 receives the offline-trained machine learning program from the smart device 152. In some embodiments, the training process of the offline-trained machine learning program is completed on the remote device 35 (server 351 and / or smart device 152). The external device 35 transmits the offline-trained machine learning program to the power tool 32 or charger 33 via the wireless communication device 16. Then, when the battery pack 31 is connected to the power tool 32 or charger 33 via an interface, the offline-trained machine learning program is transmitted to the electronic controller 17b of the battery pack 31. The battery pack 31 controls the charging and discharging of the battery pack 31 based on the output data generated by the electronic controller 17b.

[0259] As shown in Figure 4b, the electronic controller 17b is located in the charger 34. The charger 34 receives the offline-trained machine learning program via the communication module 143. The training process of the offline-trained machine learning program is completed on the remote device 143 (server 351 and / or smart device). The remote device 35 transmits the offline-trained machine learning program to the electronic controller 17b in the charger 33 via the wireless communication device 16. The charger receives operating parameter data of the battery pack 31 input from the battery pack 31 or cell module sensors through an interface, and controls the charging status of the battery pack 31 based on the data output by the machine learning program of the electronic controller 17b in the charger.

[0260] As shown in Figure 4c, the electronic controller 17b is set in the power tool 32 or the walking device. The power tool 32 or the walking device receives the offline trained machine learning program through an internal communication module (not shown). The training process of the offline trained machine learning program is completed in the remote device 35 (server 351 and / or smart device), and the remote device 35 sends the offline trained machine learning program to the electronic controller 17b in the power tool or the walking device through the wireless communication device 16. The power tool or the walking device receives the working parameter data of the battery pack 31 input by the battery pack 31 or the battery module sensor through the interface, and controls the discharge of the battery pack 31 through the data output by the machine learning program of the electronic controller 17b in the power tool 32 or the walking device.

[0261] Optionally, the data received by the electronic controller 17b includes current data, voltage data, temperature data, or internal resistance data, as well as the battery's charge status, the type of power source connected, the power cost of the connected power source, overheating of the battery and / or charger, and whether the circuit breaker on the connected circuit has tripped. The data received by the electronic controller 17b includes power tool equipment data, including other usage data, maintenance data, user feedback data, power source data, environmental data, operator data, location data, and other data. The data received by the electronic controller 17b includes the charger's operating mode, such as pre-charging mode, constant current regulation mode, constant voltage regulation mode, fast charging mode, the operating time of each mode, and the operating frequency of each mode.

[0262] As shown in Figures 5a-5c, in a battery management system 400, an electronic controller 17c is provided in a controlled device 40 and is equipped with a dynamic machine learning program. The electronic controller 17c receives the machine learning program from a server 251 via a wireless communication device 16. Unlike machine learning programs trained offline, the server 251 can send updated versions of the machine learning program to the electronic controller 17c of the dynamic machine learning program to replace the previous version.

[0263] The controlled device 40 sends feedback about the operation of the dynamic machine learning program to the server 251. Taking the battery pack 41 as an example, the electronic controller 17c is set in the battery pack 41, and the battery pack 41 can send an indication of the number of operations incorrectly classified by the dynamic machine learning program to the server 251. The server 251 receives feedback from the battery pack 41, updates the machine learning program, and provides the updated program to the dynamic machine learning program to reduce the number of operations incorrectly classified. Therefore, the server 351 updates or retrains the dynamic machine learning program based on the feedback received from the battery pack 41. In some embodiments, the server 251 also uses feedback received from other similar battery packs to adjust the dynamic machine learning program. In some embodiments, the server 251 updates the dynamic machine learning program periodically (for example, every month). In other embodiments, when the server 251 receives a predetermined number of feedback indications (for example, after the server receives two feedback indications), the server 251 updates the dynamic machine learning program. The feedback indication may be positive (e.g., indicating that the dynamic machine learning program correctly classified the condition, event, action, or combination thereof), or the feedback may be negative (e.g., indicating that the dynamic machine learning program incorrectly classified the condition, event, action, or combination thereof). In some examples, the feedback indication may be numerical (e.g., a cell's State of Health (SoH)) or categorical.

[0264] In some embodiments, the server 251 also updates the dynamic machine learning program using usage data and / or sensor data (raw or processed) received from the battery pack 41 and other similar battery packs. For example, the server 251 can periodically retrain the dynamic machine learning program (or adjust the training) based on newly received usage data. The server 251 then sends the updated version of the dynamic machine learning program to the controlled device (e.g., battery pack).

[0265] When the controlled device 40 receives an updated version of the dynamic machine learning program (e.g., when the updated machine learning program is provided to and stored on the electronic controller), the controlled device 40 replaces the current version of the dynamic machine learning program with the updated version. In some embodiments, the controlled device 40 is equipped with a first version of the dynamic machine learning program during manufacturing. In such an embodiment, a user can request a newer version of the dynamic machine learning program. In some embodiments, the implementation of the update and / or the use of the machine learning functionality can be provided by subscription, purchase and / or lease. In some embodiments, the user can select the frequency with which the dynamic machine learning program is sent to the electronic controller. In other examples, operation or mode use of the controlled device 40 can be disabled until a newer version of the electronic controller 17c is established on the controlled device 40 and / or a calibration step of the electronic controller 17c and / or the controlled device is performed.

[0266] As shown in Figure 5b, the electronic controller 17c is disposed in the charger 44. The charger 44 receives operating parameter data of the battery pack 31 input by the battery pack 31 or the battery module sensor through an interface, and controls the charging status of the battery pack 41 based on the data output by the machine learning program of the electronic controller 17c in the charger.

[0267] As shown in Figure 5c, the electronic controller 17c is disposed in a power tool 42 or a walking device. The power tool 44 or walking device receives operating parameter data of the battery pack 41 from the battery pack 31 or cell module sensors via an interface, and controls the discharge of the battery pack 31 using data output by the machine learning program of the electronic controller 17b within the power tool 32 or walking device.

[0268] As shown in FIG6 , the dynamic machine learning program of the electronic controller 17 d provided in the controlled device 40 can self-update. The self-updating dynamic machine learning program receives operating parameter data of a new battery pack from sensors of the controlled device 40 (e.g., the battery pack 41), feedback information indicating a desired change in the operating parameter data (e.g., a user wants to increase the charge rate), feedback information indicating whether the classification made by the electronic controller 17 d is incorrect, or a combination thereof. The self-updating dynamic machine learning program then uses the received information to retrain the self-updating dynamic machine learning program.

[0269] In some embodiments, the controlled device 40 retrains the self-updating dynamic machine learning program when the battery pack 41 finishes charging and discharging. Training the self-updating dynamic machine learning program at the end of the battery pack charging and discharging allows for more processing power to be used during the retraining period without competing for computing resources normally used to manage the battery pack charging and discharging.

[0270] In some embodiments, the controlled device 40 also communicates with a smart device 152 and a server 251. Taking the battery pack 41 as an example, the smart device 152 communicates with the battery pack 41. The smart device 152, such as a smartphone, generates a graphical user interface to facilitate adjustment of the operating parameter data of the battery pack 41. The smart device 152 can also bridge communications between the battery pack 41 and the server 251. In some embodiments, the smart device 152 receives a selection of a target task for the electronic controller 17d. The smart device 152 can then request a corresponding machine learning program from the server 251 for transmission to the electronic controller 17d. The battery pack also communicates with the server 251 (e.g., via the smart device). In some embodiments, the server 251 can also retrain the self-updating machine learning program. The server 251 can use additional training examples from other similar battery packs. Using these additional training examples can provide greater variability and ultimately make the electronic controller 17d more reliable. In some embodiments, the battery pack retrains the self-updating machine learning program when it is not charging or discharging, and the server 251 can retrain the machine learning program when the battery pack enters a charging or discharging state. Thus, in some embodiments, the self-updating machine learning program can be retrained on the battery pack, by a server, or by a combination thereof.

[0271] In some embodiments, the server 251 does not retrain the self-updating machine learning program, but still exchanges information with the battery pack. For example, the server 251 can provide other functions for the battery pack, such as sending information about various operating modes of the battery pack.

[0272] Each of the battery management systems in Figures 1 to 6, wherein the controlled device communicates with a server and a smart device. The smart device can bridge the communication between the controlled device, such as a battery pack, and the server. That is, the battery pack can communicate directly with the smart device. The smart device can then forward the information received from the battery pack to the server. Similarly, the server can send information to the smart device, which forwards it to the battery pack. In such an embodiment, the battery pack may include a communication module to communicate with the smart device via, for example, a short-range communication protocol (such as Bluetooth(R)). The smart device may include short-range communication to communicate with the battery pack, and may also include a long-range transceiver to communicate with the server. In some embodiments, a wired connection is provided between the battery pack and the power tool (e.g., via a USB data cable) to enable direct communication between the external device and the battery pack. Providing a wired connection can provide a faster and more reliable communication method between the external device and the battery pack.

[0273] As shown in Figure 7, in the battery management system 500, the controlled device 10 can directly communicate with the smart device 552. The electronic controller 17 is set in the smart device 552, wherein the electronic controller 17 can be any one of the electronic controllers 17a, 17b, 17c and 17d.

[0274] The server includes at least a server electronic processor, a server memory, and a transceiver to communicate with the controlled device via a wireless communication device. The server electronic processor receives the operating parameter data of the battery pack, stores the operating parameter data of the battery pack in the server memory, and in some embodiments, uses the received operating parameter data of the battery pack to establish or adjust the electronic controller. Each of the remote devices is located outside the controlled device. In addition, in some embodiments, the remote device is a wireless hub, such as a beacon device placed at a work site to monitor tools, a gateway network device (for example, to provide a Wi-Fi network), or both. The remote device includes at least an input / output unit for communication (for example, a wireless or wired transceiver), a memory for storing instructions, and an electronic processor that executes the instructions stored in the memory to perform functions attributed to the external system device.

[0275] As shown in FIG8 , when a dynamic machine learning program is self-updating, controlled device 40b in battery management system 400b may not communicate with a smart device or server. Instead, because electronic controller 17d in controlled device 40b includes a self-updating machine learning program, electronic controller 17d can implement the machine learning program, receive user feedback, and update the electronic controller without communicating with a smart device or server.

[0276] As an embodiment of the present application, the battery management system includes a cell module 112. That is, the controlled device also includes a cell module 112. Optionally, the battery management system includes multiple groups of cell modules 112. As shown in Figures 15-16, each group of cell modules includes at least one cell 1121, a slave controller 1122, a sensor 18b, a wireless communication module 1123 and a bypass circuit 1124. The slave controller 1122 is electrically connected to the sensor 18b and the wireless communication module 1123, respectively. The slave controller 1122 is configured to receive sensor data generated by the sensor 18b indicating the operating parameters of at least one cell 1121, and send the sensor data to the electronic controller 17 through the wireless communication module 1123. The electronic controller 17 includes a program that can implement machine learning. The slave controller 1122 can also obtain return information from the electronic controller 17 through the wireless communication module 1123, and control the bypass circuit 1124 based on the return information.

[0277] In this embodiment, the electronic controller 17 is configured to: receive sensor data of multiple groups of battery cell modules 112 from multiple groups of battery cell modules 112 through the wireless communication module 1123, use a machine learning program to process the sensor data of the multiple groups of battery cell modules 112, use a machine learning program to generate return information based on the sensor data of the multiple groups of battery cell modules 112, and send the return information to the slave controller 1122 through the wireless communication module 1123.

[0278] In some embodiments, the electronic controller 17 is located on a remote device. The electronic controller 17 communicates the generated required output data to the wireless communication device 16 and outputs it to the wireless communication module 1123 of the battery module 112. The battery module 112 controls the charging and discharging of the battery module 112 based on the received output data from the electronic controller 17. In some embodiments, the electronic controller 17 located on the remote device communicates the generated required output data to the power tool 12 or walking device. The controller on the power tool or walking device controls the discharge of the battery module 112 based on the output data. In some embodiments, the electronic controller 17 located on the remote device communicates the generated required output data to the charger 13. The controller on the charger 13 controls the charging of the battery module 112 based on the output data.

[0279] In some embodiments, the electronic controller 17 is disposed within the battery pack 11, and the slave controller 1122 is disposed within the battery module 112. The electronic controller 17 communicates with the slave controller 1122 via a wireless communication module 1123. Alternatively, the electronic controller 17 is disposed within the power tool 12 or walking device. When the battery pack is connected to the power tool 12, the battery controller 17 communicates with the slave controller 1122 via the wireless communication module 1123. The wireless communication module 1123 includes a transmitter disposed within the power tool and a receiver disposed within the battery module. Alternatively, the electronic controller 17 is disposed within the charger 14. The battery controller 17 communicates with the slave controller 1122 via the wireless communication module 1123. The wireless communication module 1123 includes a transmitter disposed within the charger 14 and a receiver disposed within the battery module.

[0280] Optionally, the machine learning program can be located on a remote device and can be an offline trained machine learning program, a dynamic machine learning program, or a self-updating dynamic machine learning program. It will be appreciated that the location of the electronic controller and the specific form of the machine learning program can be any one or a combination of the above-disclosed embodiments.

[0281] Regarding cell modules and battery packs equipped with cell modules. In this embodiment, the cell module 112 is electrically coupled to the slave controller 1122 via a half-bridge circuit. The half-bridge circuit includes switching elements. The control signal of the electronic controller 17 is output to the slave controller 1122, which controls the switching elements to control the charging and discharging of the cell units. The switching elements control the on and off of the bypass circuit. As shown in Figure 17a, when the bypass circuit of the cell module is on, current flows through the cell within it, i.e., the cell is connected to the circuit. As shown in Figure 17b, when the bypass circuit of the cell module is off, current bypasses the cell within it, i.e., bypasses the cell. By connecting one or more cell units to the bypass circuit, the control of the battery pack is improved for safety. During the battery pack charge and discharge control process, each cell unit 1121 has differences. To reduce the impact of the differences in cell units 1121 on the overall safety of the battery pack, it is necessary to balance the cell units. In this embodiment, active balancing is achieved through bypass circuits. This bypass circuit balancing method eliminates the need for a bidirectional DC-DC converter. Because active balancing does not require additional inductors or capacitors, it offers improved efficiency. Battery pack control and protection can be performed from within the individual cells. A slave controller uses control signals from the electronic controller to determine which bypass circuit, and therefore which cell, to control. This results in more efficient control, improving safety and reliability.

[0282] In this embodiment, the switching element includes a controllable semiconductor power device (e.g., a field effect transistor (FET), a bipolar junction transistor (BJT), an insulated gate bipolar transistor (IGBT), etc.). It can also be any other type of solid-state switch, such as an insulated gate bipolar transistor (IGBT), a bipolar junction transistor (BJT), etc. Sensor 18b monitors the cell voltage, current, and temperature.

[0283] In some embodiments, different types of electronic controllers are used in conjunction with controlled devices (battery packs, power tools or walking equipment, chargers, battery modules). In some embodiments, the controlled device may include more than one electronic controller, and each electronic controller may be of a different type. In some embodiments, for example, two electronic controllers are included in the battery pack, or both the battery pack and the power tool are provided with electronic controllers. The battery pack may include an electronic controller 17b for setting an offline trained machine learning program, which may be set as a first electronic controller, and may also include an electronic controller 17d for setting a self-updating machine learning program, which may be set as a third electronic controller. Optionally, the battery pack may include a first electronic controller, but the offline trained machine learning program may be subsequently removed and replaced by, for example, a self-updating machine learning program.

[0284] In some embodiments, the electronic controller 17 includes a reinforcement learning program that allows the electronic controller 17 to continuously integrate feedback received from the user to optimize the performance of the electronic controller 17. In some embodiments, the reinforcement learning program controls the periodic evaluation of a reward function based on the performance of the machine learning control. In such embodiments, training the electronic controller includes increasing the operating time of the discharge or charge of the battery pack so that the reinforcement learning control receives sufficient feedback to optimize the execution of the machine learning program. In some embodiments, when reinforcement learning is implemented by the electronic controller, a first phase of operation (e.g., training) is performed during or before manufacturing so that the machine learning program can achieve a predetermined minimum performance (e.g., accuracy) when the user uses the battery pack. The machine learning program, once the user uses the battery pack, can continue to learn and evaluate the reward function to further improve its performance. Thus, the battery management system can be initially equipped with a stable and predictable algorithm that can be adjusted over time. In some embodiments, reinforcement learning is limited to a portion of the machine learning program. For example, in some embodiments, instead of potentially updating weights / biases of all or most of a machine learning program, which may take up a lot of processing power and memory, the actual model remains frozen or mostly frozen (e.g., except for the last layer or output), and one or a few output parameters or output features of the machine learning program (e.g., a final scaling or threshold) are updated based on the feedback.

[0285] As shown in FIG18 , a method 1000 for establishing and implementing a machine learning program is provided. The machine learning program may be established and operated by a server. Alternatively, the machine learning program may be established by a server but implemented by a controlled device. Alternatively, the controlled device establishes and implements the machine learning program.

[0286] 1010 , access exemplary sensor data collected by sensors. The server or the controlled device receives battery pack usage data from various controlled devices.

[0287] 1020, establish and train a machine learning program, which can be performed in a server or in a controlled device.

[0288] 1030, storing the machine learning program, that is, storing it in the electronic controller.

[0289] 1040, controlling the power management system according to a machine learning program, discharging management when the battery pack supplies power to an electric tool or walking equipment using the battery pack, and charging management when the charging device charges the battery pack.

[0290] 1050, receiving user feedback.

[0291] 1060, adjusting a machine learning program based on user feedback.

[0292] When the electronic processor adjusts the machine learning program based on user feedback, the electronic processor can adjust the machine learning program based on feedback from different users. In embodiments where the electronic controller is fully implemented in the battery management system, the electronic processor can use feedback instructions from only the battery pack to adjust the electronic controller of the battery management system. Using feedback information from a specific user can help customize the operation of the battery management system for the user of that specific battery management system.

[0293] 1070, controlling a power management system according to the adjusted machine learning program.

[0294] In some embodiments, the user can also select a learning rate for the electronic controller 17. Adjusting the learning rate of the electronic controller 17 affects the speed at which the electronic controller adjusts based on received user feedback. For example, when the learning rate is high, even a small number of feedback indications from a user (or multiple users) can affect the performance of the electronic controller. On the other hand, when the learning rate is lower, more feedback indications from the user are used to produce the same performance change of the electronic controller. Using a learning rate that is too high may cause the electronic controller to change unnecessarily due to abnormal operation of the battery pack. On the other hand, using a learning rate that is too low may cause the electronic controller to remain unchanged until a large number of feedback indications requesting similar changes are received. In some embodiments, the battery management system includes a dedicated actuator to adjust the learning rate of the electronic controller.

[0295] As shown in Figure 19, in another embodiment, activation switch 185 is used to enable or disable the electronic controller and can also be used to adjust the learning rate of the electronic controller. In other embodiments, an external device (e.g., a smart phone, a tablet computer, a laptop computer, an ASIC, etc.) can be coupled with, for example, a battery pack communication and provide a user interface, for example, to select a learning rate. In some embodiments, the selection of the learning rate can include the selection of a low, medium or high learning rate. In other embodiments, more or fewer options can be used to set the learning rate and can include the ability to turn off learning (i.e., setting the learning rate to zero).

[0296] When an electronic controller implements a recurrent neural network, the learning rate (or sometimes called the "switching rate") affects how previous inputs or training examples affect the output of the current input or training example. For example, when the switching rate is high, the previous input has the least effect on the output associated with the current input. That is, when the switching rate is high, each input is treated more as an independent input. On the other hand, when the switching rate is low, the output of the previous input is highly correlated with the output of the current input. That is, the output of the current input is highly dependent on the output determined for the previous input. In some embodiments, the user can select a switching rate that is related to the learning rate (for example, using the same actuator). However, in other embodiments, a separate actuator (or graphical user interface element) is generated to change the switching rate independently of the learning rate. The methods or components for setting the switching rate are similar to those described above for setting the learning rate.

[0297] The electronic controller 17 may be configured with any one or more of the machine learning programs described above. The electronic controller 17 is electrically and / or communicatively connected to various modules or components of the battery management system 100. The electronic controller 17 controls the battery pack based on outputs and determinations from the machine learning programs.

[0298] As shown in Figures 19-20, the battery management system also includes a general controller 181. Taking the battery pack 11 as an example, the general controller 181 and the electronic controller 17 form a control assembly. The general controller 181 includes a general processor 1811, which includes multiple electrical and electronic components that provide power, operational control, and protection for the general processor and / or components and modules within the battery management system. Both the general controller 181 and the electronic controller 17 are equipped with corresponding activation switches 185 that selectively enable and disable the machine learning controller. The general processor 1811 includes a processing unit 1831 (e.g., a microprocessor, microcontroller, or other suitable programmable device), general memory 1832, an input unit 1833, and an output unit 1834. The general processing unit 1831 includes a control unit 1831a, an arithmetic logic unit 1831b ("ALU"), and multiple registers 1831c. In some embodiments, the electronic processor is partially or entirely included in a single-chip microcomputer or microcontroller unit (MCU).

[0299] In this embodiment, the electronic controller 17 is provided in the battery pack, and the universal controller 181 is also provided in the battery pack. The electronic controller 17 includes a first processor 171 and a first memory 172, and the electronic controller 17 is supported by the housing of the battery pack and coupled to the sensor. The electronic controller is configured to: receive sensor data, use a machine learning program to process the sensor data, wherein the machine learning program is a trained machine learning model, and use the machine learning program to generate an output based on the sensor data. The switching element is used to control the input current or output current of the battery pack. The universal controller 181 includes a second processor and a second memory, and the universal controller is also supported by the housing and is electrically connected to the switching element and the electronic controller. The universal controller is configured to: receive output from the electronic controller, and control the switching element based on the output.

[0300] Optionally, the electronic controller 17 is provided in the battery pack, and the universal controller 182 is provided in the power tool or walking device powered by the battery pack. Optionally, the electronic controller 17 is provided in the battery pack, and the universal controller 183 is provided in the charger that powers the battery pack. Optionally, the universal controller is provided in the battery pack, and the electronic controller is provided in the power tool or walking device powered by the battery pack. Optionally, the universal controller is provided in the battery pack, and the electronic controller is provided in the charger that powers the battery pack.

[0301] The electronic processor is configured to retrieve and execute instructions related to the control processes and methods described herein from the memory, among other things. The electronic processor is also configured to store battery pack information on the memory, including battery pack usage information, information identifying the battery pack type, a unique identifier for a specific battery pack, user characteristics (e.g., identity, industry type, skill level), and other information related to operating or maintaining the battery management system. Battery pack usage information, such as current level, voltage level, usage time, and battery life, can be captured or inferred from data output by the sensors.

[0302] The electronic controller 17 is located on a separate printed circuit board (PCB). The PCB for the general-purpose processor 181 and the PCB for the electronic controller 17 are coupled, for example, using wires or cables, to enable the general-purpose processor of the battery management system to control battery pack charging and discharging based on outputs and determinations from the electronic controller. However, in other embodiments, the machine learning program may be stored and implemented in the general-purpose memory of the general-purpose processor. In such embodiments, the electronic controller comprises a single electronic processor. In still other embodiments, the machine learning program is implemented in a separate electronic processor, but located on the same PCB as the general-purpose processor of the battery management system. Embodiments in which the machine learning control is implemented as a processing unit separate from the general-purpose processor, either on the same or a different PCB, allow the processing unit to be selected to implement each of the machine learning control and the general-purpose electronic processor, with its capabilities (e.g., processing power and memory capacity) tailored to the specific needs of each unit. This customization can reduce costs and improve the efficiency of the power tool. In some embodiments, the electronic controller is implemented in a plug-in chip or controller that can be easily added to the battery management system. For example, the machine learning controller may comprise a plug-in chip. In this embodiment, the machine learning controller is provided on a Renesas chip.

[0303] As shown in FIG21 , a flowchart of controlling the output of the battery pack usage status using a machine learning program using a battery management system is shown.

[0304] 1110, receiving a start switch signal and starting the power management system.

[0305] 1120 , receiving sensor data, including, for example, current data, voltage data, temperature data or internal resistance data, power tool equipment data, maintenance data, user feedback data, power data, environmental data, operator data, location data, and the like.

[0306] 1130 , input the sensor data to the electronic controller.

[0307] 1140. Calculate and estimate battery pack usage status information based on sensor data, where the battery pack usage status information includes at least one of state of charge (SoC), state of temperature (SoT), state of health (SoH), and state of power (SoP).

[0308] 1150, receiving a charging and / or discharging mode, a connected power source type, a power supply cost of the connected power source, a circuit breaker on the connected circuit, a pre-charging mode, a constant current regulation mode, a constant voltage regulation mode, and a fast charging mode.

[0309] At 1160, a component failure in a battery management system is predicted based on an electronic controller, and estimated battery pack usage status information is compared with a threshold.

[0310] 1170, component failure, if yes, go to 1180, otherwise return to 1120.

[0311] 1180, alarm or change charging and / or discharging mode.

[0312] As shown in Figures 9-10, battery pack 21 can be a lithium battery pack, a solid-state battery pack, or a soft-pack battery pack. In some embodiments, the nominal voltage of the battery pack can be greater than or equal to 10V and less than or equal to 20V. For example, the nominal voltage of the battery pack can be 12V, 18V, 20V, etc. As shown in Figure 13, the nominal voltage of battery pack 11B can be greater than or equal to 20V and less than or equal to 100V. For example, the nominal voltage of the battery pack can be 24V, 40V, 56V, 80V, etc. As shown in Figure 14B', charger 14B' charges 11B.

[0313] In one embodiment, the positive terminal 115 can be divided into a discharge positive terminal and a charge positive terminal, wherein the discharge positive terminal is two terminals connected in parallel, and the charge positive terminal is one terminal. The negative terminal 116 is two terminals connected in parallel. The communication terminal is one terminal. In one embodiment, the battery pack output terminal will display 6 interfaces corresponding to the output terminals on the battery pack housing. In an optional embodiment, the housing can be provided with more or fewer interfaces according to the electrical characteristics of the battery pack. It is understandable that the interfaces corresponding to the output terminals on the battery pack housing correspond to the interfaces corresponding to the input terminals of the power tool.

[0314] In some embodiments, the number of battery cells 1121 included in a battery cell group 112a can be greater than or equal to 3 and less than or equal to 5. For example, the number of battery cells 1121 included in a battery cell group 112a can be 3, 4, or 5. In some embodiments, the number of battery cells 1121 included in a battery cell group 112a can be greater than or equal to 6 and less than or equal to 25. For example, the number of battery cells 1121 included in a battery cell group 112a can be 6, 10, 14, 20, etc. In some embodiments, the battery pack 11 can include only one battery cell group 112a, which can reduce the size of the battery pack. In some embodiments, the battery pack 11B can also include three or four battery cell groups 112a, which can increase the capacity of the battery pack and extend the battery pack's battery life. The battery cell group 112a is composed of multiple battery cells 1121 connected in series, in parallel, or a combination of series and parallel. In some embodiments, the battery cells 1121 are arranged in a flat, pouch-like structure, with multiple cells stacked vertically. The battery cells 1121 can also be curved. In other embodiments, the battery cells 1121 are cylindrical. It should be understood that this application is not limited to the disclosed embodiments, and there are no restrictions on the battery cell structure.

[0315] In this embodiment, the capacity of the battery pack is greater than or equal to 1.5Ah and less than or equal to 20Ah. The battery cell 1121 is a cylindrical battery cell. Further, the battery cell 1121 is a cylindrical lithium battery cell. The weight of each battery cell unit is greater than or equal to 35g and less than or equal to 55g, and the capacity of each battery cell 1121 is greater than or equal to 1200mAh and less than or equal to 3600mAh. In some other embodiments, the weight of each battery cell 1121 is greater than or equal to 60g and less than or equal to 75g, and the capacity of each battery cell 1121 is greater than or equal to 3000mAh and less than or equal to 5000mAh.

[0316] In some embodiments, the battery pack's communication module 118 can be integrated into the battery pack controller 181 or provided separately. The communication module 118 is used for remote device connection. In some embodiments, the battery pack's communication terminals and communication module can also be integrated. The communication module can also include an Internet of Things (IoT) communication module to share various battery pack parameters and control instructions with other devices in the IoT network.

[0317] In some embodiments, the battery pack also includes a human-computer interaction component, such as a display device 114, for displaying or providing feedback on battery pack information. For example, this includes operating status information, fault alarms / indications, and other information required for user notification. In some embodiments, external devices are used to implement human-computer interaction. For example, a smart device may be used to communicate with the battery pack communication module 118 to input and provide feedback on relevant information.

[0318] As an embodiment of the present application, a lithium battery pack is taken as an example. Lithium-ion batteries have been widely used in electric vehicles, portable electronic products and smart grid systems due to their high energy / power density, long cycle life and high efficiency. However, there are technical bottlenecks related to heat. This bottleneck stems from the complex impact of temperature on the safety, performance and life of lithium-ion batteries. Therefore, temperature monitoring is the basis of battery management systems. In related technologies, battery temperature can be monitored by placing temperature sensors on the surface of the battery cell. However, in real-life battery packs, due to cost and complexity considerations, it is impractical to place temperature sensors on the surface of each battery cell 1121. Therefore, in this embodiment, a machine learning program is used to estimate the temperature state (SoT).

[0319] The machine learning program includes a trained neural network model, a physics-embedded neural network (PINN). PINN can quickly solve the underlying nonlinear heat transfer partial differential equation (PDE) using a small amount of data and provide an output indicating the temperature distribution within the battery cell. PINN mimics the data pattern governed by the heat transfer PDE, thereby estimating the temperature distribution within the battery cell. The PINN framework for estimating battery temperature distribution is shown in Figure 22, using a cylindrical battery cell as an example. When collecting training data, current, voltage, surface, and core temperatures can be measured (by inserting sensors into the battery cell). The measured data is treated as training data for the deep neural network, and losses are calculated based on the predicted and measured temperatures. Furthermore, the temperatures at any point within the core, surface, and domain are subject to the heat transfer PDE and its initial and boundary conditions. The temperature differences with respect to time and location are calculated through automatic differentiation to obtain the corresponding physical losses based on the heat transfer PDE. In PINN, the loss function consists of the training data loss and the physical loss. By minimizing the total loss, the weights and bias of the neural network are adjusted, and unknown coefficients in the PDE are identified. For the trained PINN, the predictions can be made with high accuracy while also obeying the heat transfer laws so that they can be used to estimate the internal temperature distribution under other operating conditions.

[0320] A framework for temperature distribution estimation using PINN includes: measuring temperature data at the surface and core of the battery for training a recurrent neural network (e.g., based on a deep neural network). A physical part is then added as a regularization term to further train the deep neural network so that the estimated temperature not only follows the data pattern in the training set, but also obeys the spatiotemporal physical laws in the physical part. The network is trained by minimizing the loss of measured data and the loss of the physical part for a certain number (e.g., 10,000) or more, where an appropriate λ should be selected to adjust the relative importance between data loss and physical loss. The training process can adjust the weights and biases in the neural network, as well as simultaneously identify unknown parameters in the partial differential equation (where T represents temperature, t represents time, I represents current, V represents voltage, r represents spatial distribution, Q represents heat generation, C represents the relative importance between data loss and physical loss). p represents specific heat capacity, V b represents the volume of the battery, MSE represents the mean square error, MSE data Represents the mean square error of temperature estimation based on measured data, MSE physics represents the mean square error of the temperature estimation of the physical part, k t represents the thermal conductivity of the pixel, and λ represents the coefficient between data loss and physical loss). Accurate SoT estimation using PINN is the first step to achieve the goal of long-term (e.g., 10 minutes in advance) temperature prediction, which will lead to optimal operation and reduce safety issues of smart batteries.

[0321] As an embodiment of the present application, a lithium battery pack is taken as an example. As the battery is used over time, the battery will age, resulting in different battery characteristics at different times, which is specifically reflected in the size of the battery's state of health (SOH) value. Therefore, the state of health (SOH) value intuitively reflects the overall performance of the battery and its ability to release electrical energy under certain conditions. Although empirical methods such as direct measurement of charge throughput or indirect analysis of incremental capacity have been used to quantify the SOH mechanism, their stability severely limits their use in practical applications. Therefore, in this embodiment, a machine learning program is used to estimate the state of health (SOH). Among them, the machine learning program includes methods such as support vector machines, artificial neural networks, deep learning (DL), and random forests.

[0322] Deep neural networks are capable of extracting global features from raw multidimensional data. However, due to the latent nature of SOH, it is often impossible to obtain the amount of SOH information required to train such neural networks in practical applications. To improve estimation accuracy with small data sets, an ensemble method based on bagging (bootstrap aggregating) is proposed. Bagging creates augmented samples by resampling an exemplary raw dataset and training a series of extreme learning machines based on these samples. The bagging extreme learning machine (ELM) method offers many advantages of deep learning (DL), such as automatic feature extraction, while requiring less data to train and performing well in estimating SOH. In addition to using fuzzy entropy-based features and an ensemble of extreme learning machines, data augmentation is used to increase the amount of useful information extracted from individual partial charges of a battery. Augmentation allows extraction of not only the charge voltage, but also every sequence of partial charge voltages found in any charge, no matter how large. Figure 23 shows the general framework for data cleaning, partial charge separation, feature extraction, and SOH estimation.

[0323] The goal of any remaining useful life (RUL) algorithm is to predict the end of a battery's useful life (EOL). However, before predicting the end of useful life (EOL), it is necessary to predict the SOH. Given a mission profile and a short-term SOH prediction method, the long-term behavior of the SOH can be predicted until the end of useful life (EOL). While physics-based lifetime models can account for the nonlinear and time-varying characteristics of electrochemical systems, it is difficult to identify the parameters of these models because they rely on destructive testing methods. Therefore, the development of physics-based models requires time and resources and is not necessarily a viable option for real-time predictions.

[0324] In this embodiment, a deep learning lifetime model can be built based on the collected data and continuously updated using gradient optimization. That is, a relationship can be established between features (i.e., health indicators such as voltage, current, and temperature) and the cycle and calendar life of the battery cell. Alternatively, deep neural networks, convolutional neural networks, and recurrent neural networks (RNNs) can be used as algorithms for remaining useful life (RUL) prediction, as they inherently model parameters that vary over time. The biggest challenge with the aforementioned SOH and RUL prediction methods is that they require SOH measurements to function. Obtaining SOH measurements means stopping the battery and running a full cycle, i.e., fully charging and discharging the battery. Furthermore, for these prediction methods to be effective, they need to be performed regularly and as often as possible. SOH and RUL predictions are based on an SOH estimation model that provides an estimated SOH for each partial charge of the battery. Given the estimated SOH, post-processing is required to eliminate the effects of dependencies (such as temperature and C-rate) (if this cannot be eliminated by constructing invariant features). Using the estimated SOH should stabilize the uncertainty of SOH and RUL predictions when predicting future SOH. Furthermore, as new SOH measurements are made, the difference between the predicted and measured SOH will be used to update the SOH estimation model, ultimately leading to better SOH predictions. Figure 23 shows the general framework for post-processing and SOH and RUL prediction.

[0325] Accordingly, a method 1300 for constructing a battery pack life assessment model for powering an electric tool is described. FIG27 is a flow chart of the method 1300 for constructing a battery pack life assessment model.

[0326] 1310, data acquisition, acquiring battery pack usage data.

[0327] 1320, data preprocessing, performing at least one of data cleaning, data integration, and data correction on the usage data.

[0328] 1330, feature engineering processing, uses a sliding window to extract and reprocess the preprocessed usage data to obtain relevant feature sequences.

[0329] 1340, model construction, selects a suitable machine learning model to fit the relevant feature sequence with the target health state (SoH), sets evaluation indicators and predicts the current health state (SoH) and future health state (SoH).

[0330] The above-mentioned model construction method can be executed by remote devices such as cloud platforms and servers, or by electronic controllers in controlled devices such as chargers, battery packs, and power tools. When the model is constructed by a remote device, it will be transmitted to the controlled device for implementation after the model construction is completed. The relevant architecture and interaction process can be referred to the previous description and will not be repeated here.

[0331] When constructing the battery pack life assessment model, first, it is necessary to obtain the usage data of the battery pack to be evaluated. In some cases, the recorded relevant data can be read locally. In other cases, the above data can be requested from the battery pack or the controlled device related to the battery pack, as well as the database that has collected relevant data. Among them, the battery pack usage data may include the battery pack model, usage time, cumulative charge and discharge times, full voltage difference, the voltage, current, state of charge (SoC), temperature and other data of the battery pack during each charge and discharge process. The voltage data can also be derived from the single cell voltage of each battery cell in the battery pack during each charge and discharge process, as well as other data related to the single cell voltage obtained by analysis and conversion. The temperature data can also be derived from the measured temperature at each temperature measuring point in the battery pack during each charge and discharge process, as well as other data related to the measured temperature at each temperature measuring point obtained by analysis and conversion. It can be understood that, depending on the actual scenario requirements, other types of battery pack usage data not shown above can also be used when constructing the battery pack life assessment model.

[0332] The raw battery pack usage data obtained may be redundant and contain errors, and the usage data provided by different controlled devices may be multi-source heterogeneous data. To ensure smooth and efficient model construction, the obtained usage data needs to be preprocessed through data cleaning, data integration, and data correction. After preprocessing, the usage data needs to be feature-engineered to meet the requirements of the machine learning model. Specifically, the preprocessed usage data should be time series data, and at least a sliding window can be used to perform sliding extraction on it. The extraction target can be the mean, extreme value, difference, etc. of each data within the window, and the window size and sliding step size can be determined according to the actual scenario requirements. After feature engineering processing, the original usage data can be transformed into a related feature sequence. For example, the original temperature data includes the measured temperatures at different temperature measurement points and different times. Their arrangement is messy, contains outliers, duplicate values, and missing values. After preprocessing and feature engineering processing, taking 25 temperature measurement points and 2000 times as an example, we can get 2000*25 measured temperatures corresponding to time 0 to 1999 and temperature measurement points 1 to 25 represented by matrix data. The data matrix is ​​the related feature sequence corresponding to the temperature data. Alternatively, we can take the average of the measured temperatures at the 25 temperature measurement points at the same time, and the average of the 2000*1 measured temperatures corresponding to time 0 to 1999 is the related feature sequence corresponding to the temperature data.

[0333] The above-mentioned related feature sequences can be used to construct and train a battery pack lifespan assessment model. In some cases, this can yield a model capable of assessing the current SoH of a battery pack; in other cases, it can also yield a model capable of predicting the future SoH of a battery pack. This battery pack lifespan assessment model has multiple possible implementation algorithms, including but not limited to linear models, decision tree models, support vector machine models, Bayesian models, clustering models, neural network models, dimensionality reduction and metric learning, ensemble learning, reinforcement learning, and deep learning models.

[0334] When using a supervised model, in order to train the original battery pack life assessment model using relevant feature sequences, first, a target SoH is required for sample identification, and second, the correspondence between the battery pack usage data / relevant feature sequence and the target SoH needs to be clarified. For these two issues, during feature engineering, first, the battery pack usage data can be divided into multiple different charging and discharging processes. Taking the charging process data as an example, the battery pack voltage, current, and other data at each moment in a charging process can be used to calculate the battery pack capacity at each moment in the charging process for a fixed voltage range using the ampere-hour integration method. Then, combined with data such as SoC, the battery pack capacity can be converted into the battery pack target SoH at each moment. At the same time, based on the time when the usage data was collected, the correspondence between it and the target SoH can be determined.

[0335] In some embodiments, a linear regression model can be used to construct a battery pack life assessment model that evaluates the current SoH of the battery pack. The model uses feature sequences corresponding to various types of usage data as input parameters, and its loss function aims to ensure that the output SoH is close to the target SoH at that moment. In some cases, the battery pack life assessment model can be trained separately using each feature sequence corresponding to different types of usage data, and the resulting multiple battery pack life assessment models can be fused to ensure that the resulting battery pack life assessment model can take into account multiple influences. For example, linear regression models with outputs close to the target SoH are trained separately using usage time, cumulative charge and discharge times, maximum charging voltage, and maximum measured temperature to obtain four battery pack life assessment models. The average of the SoH output by these four battery pack life assessment models can be taken as the predicted current SoH of the battery pack. In addition, joint training can also be performed during the model training process, with the average of the SoH output by the four models being close to the target SoH as the goal of the joint loss function for training.

[0336] In some embodiments, an LSTM (Long Short-Term Memory) model can be used to construct a battery pack life assessment model that predicts the future SoH of the battery pack. First, the historical SoH sequence and the future SoH sequence must be determined based on the target SoH. For example, the target SoH of the first three months can be used to form the historical SoH sequence, and the target SoH of the last three months can be used to form the future SoH sequence. The LSTM model takes the historical SoH sequence as an input parameter, and its loss function aims to output a SoH sequence that is close to the future SoH sequence. When implementing this model, the controlled device can first calculate and record the SoH sequence of the battery pack using the method described above, and use the battery pack life assessment model to obtain the future SoH sequence of the battery pack from the recorded SoH sequence to understand the development trend of the future SoH of the battery pack.

[0337] In some embodiments, multiple feature sequences related to temperature data can be constructed based on the measured temperatures at different times at multiple temperature measurement points. At least one of these feature sequences can be used to train a battery pack lifespan assessment model capable of predicting the current SoH of the battery pack. Similar to the previous description, the model uses the temperature-related feature sequence as input, and the loss function aims to ensure that the output SoH is close to the target SoH. This battery pack lifespan assessment model can be an LSTM model or an XGBoost model. The feature sequence constructed based on the measured temperatures at different moments of multiple temperature measuring points includes: a temperature difference sequence of the same temperature measuring point generated based on the measured temperature at the same temperature measuring point, for example, a sequence of rising rates of the measured temperature at the central temperature measuring point; a temperature difference sequence between temperature measuring points generated based on the measured temperatures at different temperature measuring points, for example, a sequence consisting of the highest-lowest measured temperature difference at each moment; a temperature increment sequence corresponding to a unit SoC, etc. For example, every time the SoC increases by 1 percentage, the measured temperatures at all temperature measuring points are obtained once and the average is taken to form a sequence. Taking the SoC rising from 25% to 80% and 25 temperature measuring points as an example, a temperature increment sequence corresponding to a unit SoC consisting of 56*1 measured temperature mean differences is obtained.

[0338] In addition, evaluation criteria for data quality or model quality can be set based on actual scenario requirements. For example, model evaluation indicators such as accuracy, error rate, recall rate, or a combination of the three can be set to verify, evaluate, and optimize the constructed battery pack life evaluation model. Specific verification, evaluation, and optimization methods include but are not limited to cross-validation and verification set parameter adjustment.

[0339] As an embodiment, in the charger 14 or an electronic combination consisting of the charger 14 and electronic circuits or electrical components that cooperate with the charger 14, the electronic controller 17 in the charger 14 includes a machine learning program for processing the charging data of the battery pack 11 when it is charged by the charger 14 to perform an aging assessment on the battery pack 11. The machine learning program includes at least a vector model and reference vectors corresponding to multiple aging parameters. The electronic controller 17 will record the charging data when the charging circuit of the charger 14 charges the battery pack 11 through the battery pack interface, and use the vector model to convert the charging data into a charging feature vector of the battery pack 11 for this charging. It then calculates the Euclidean distance between the charging feature vector and each reference vector, and selects the aging parameter corresponding to the reference vector with the smallest distance as the aging assessment value of the battery pack 11 to determine the aging condition of the battery pack 11. For the specific component composition of the charger 14, please refer to the relevant description above.

[0340] FIG28 is a flow chart 1400 of the control scheme of the above electronic combination.

[0341] 1410, the electronic controller records charging data of the battery pack during charging.

[0342] At 1420 , the charging data is vectorized using a vector model to obtain a charging feature vector of the battery pack.

[0343] 1430 , calculate the distance between the charging vector and each reference vector.

[0344] 1440 , select the aging parameter corresponding to the reference vector with the smallest distance as the aging evaluation value of the battery pack.

[0345] The electronic controller records charging data for the battery pack 11, including data recorded by the controller itself during the charging process, data received from the battery pack 11 via communication terminals, and data transmitted by sensors. This charging data includes charging time, ambient temperature, charging voltage, charging current, charging temperature, and state of charge (SoC) when the battery pack 11 is charged using the charger 14. Voltage data also includes the cell voltage of each battery cell within the battery pack 11, as well as the cell voltage mean, cell voltage standard deviation, maximum cell voltage, minimum cell voltage, and maximum-minimum cell voltage difference, calculated from the cell voltage analysis of each cell. Temperature data also includes the measured temperature at each temperature measurement point within the battery pack 11, as well as the measured temperature mean, measured temperature standard deviation, maximum measured temperature, minimum measured temperature, and maximum-minimum temperature difference, calculated from the measured temperature analysis of each temperature measurement point. It is understandable that, depending on actual scenario requirements, the charging data may also include other types of charging data not shown above, such as location information, model information, maintenance information, user information, etc.

[0346] The machine learning program used by the electronic controller can be implemented using any one or a combination of the machine learning algorithms described above. The machine learning program includes a vector model that vectorizes the data. The model uses the recorded charging data as a model input parameter. Based on the output, the electronic controller can obtain a charging feature vector corresponding to the battery pack charging data. In some embodiments, the vector model can be a Siamese network model that uses unsupervised contrastive learning, with the loss function targeting high similarity between pairs of input samples after conversion to feature vectors. Taking into account that the above-mentioned charging data such as charging time, SoC, charging voltage, charging current, etc. are actually in a changing state during charging, multiple values ​​of the same type of data can be collected during one charging process. In some cases, the charging data of the same charging process can be divided into a group in the sample set. For the same type of charging data in the same process, the initial value, maximum value or average value of the charging data of this type can be taken together with the original charging data to form a sample pair for model training. For example, the charging time and SoC can take the initial value, the maximum single cell voltage, the lowest measured temperature, etc. can take the maximum value, and other types can take the average value. In addition, the charging data taken can be mapped to the interval [0, 1] through machine learning feature engineering related methods to improve the training efficiency and effect of the model.

[0347] Aging parameters are used to characterize the degree of battery pack aging and other related conditions. In some embodiments, the aging parameter may be the battery pack's state of health (SoH), which is generally represented by the ratio of the battery pack's remaining maximum capacity to its original maximum capacity. In other embodiments, the aging parameter may also be other parameters that can reflect the battery pack's aging condition, such as the battery pack's remaining maximum capacity or DC internal resistance.

[0348] Based on the different aging parameters of the battery pack corresponding to each charging process, multiple aging intervals can be divided. Using the trained vector model mentioned above, each charging data in the sample set can be converted into a corresponding charging feature vector, and the average of the charging feature vectors converted from multiple charging data belonging to the same aging interval can be used as the reference vector corresponding to the aging interval, and then the reference vectors corresponding to each aging interval can be obtained. The subsequent electronic controller can use the trained vector model to convert the current charging data into a charging feature vector, calculate the Euclidean distance between it and each reference vector, and select the aging parameter value of the aging interval corresponding to the nearest reference vector as the aging evaluation value of the battery pack, and then determine the aging condition of the battery pack based on the aging evaluation value.

[0349] Figure 29 shows a block diagram of aging management. Referring to Figures 11, 12, and 29, the charger 14 includes a battery pack interface 146 consisting of a charging terminal 1461 and a communication terminal 1462. The battery pack 11 is coupled to the battery pack interface 146 to be charged by the charger 14. Electrical energy is transferred between the positive and negative terminals 115, 116 of the battery pack 11 and the charging terminals 1461 of the charger 14, and data is transferred between the communication terminal 117 of the battery pack 11 and the communication terminal 1462 of the charger 14. Furthermore, the battery pack 11 charged by the charger 14 can also be detachably connected to a power tool, providing power and / or transmitting data to the power tool when connected. In some embodiments, after generating a charging feature vector, calculating the Euclidean distance, and determining the aging parameters of the battery pack 11, the electronic controller in the charger 14 can transmit the aging parameters and related information to the battery pack 11 via the communication terminal, enabling the battery pack 11 to be informed of its aging status and to initiate corresponding display prompts and warning alerts. In some cases, the battery pack 11 can also transmit the aging parameters and related information to a detachably connected power tool, or to a remote device such as a user device. In some other embodiments, the charger 14 also includes indicators, display screens, and other devices. The electronic controller in the charger 14 can use these indicators, display screens, and other devices to provide prompts or warnings when analyzing and determining that the current aging parameters pose a risk.

[0350] In other embodiments, the charger 14 includes a communication module 143, which is communicatively connected to the power tool and / or remote device 15 and electrically connected to the electronic controller. After generating the charging feature vector, calculating the Euclidean distance, and determining the aging parameters of the battery pack 11, the electronic controller can transmit the aging parameters and related information to the power tool and / or remote device through the communication module. In some cases, the electronic controller in the charger 14 can contact the power tool through the communication module to make it clear about the aging status of each battery pack and avoid using aged battery packs for power supply. In other cases, the electronic controller contacts the user device of the user of the power tool and / or contacts management devices such as cloud platforms and servers through the communication module to enable the user or administrator to manage and handle the aging of the battery pack.

[0351] It is understandable that the above solution may not be executed by the charger. The electronic controller in the battery pack or power tool may also try to obtain the charging data of the battery pack during charging and use a machine learning program containing a vector model and a reference vector to determine the aging parameters of the battery pack to understand the aging status of the battery pack and perform corresponding management and processing.

[0352] As one embodiment of the present application, accurate estimation of a battery pack's State of Charge (SOC) is crucial for controlling battery charge and discharge in power tools, directly impacting the battery pack's service life and power tool performance, and enabling prediction of the battery pack's battery life. Related art methods for estimating battery pack SOC often employ ampere-hour integration and model-based closed-loop estimation methods, such as Kalman filtering, sliding mode state observers, and particle filtering. These methods place high demands on the accuracy of current measurements. Large current measurement errors can lead to inaccurate estimation results, potentially causing serious safety issues.

[0353] Therefore, in this embodiment, a machine learning program is used to estimate the state of charge (SoC). The machine learning program includes a trained neural network model. Neural network models include feedforward neural networks (FNN), radial basis function (RBF) neural networks, extreme learning machines (ELM), support vector machines (SVM), and recurrent neural networks (RNN). These methods and techniques use measurable signals such as battery terminal voltage, current, and temperature. Among them, a recurrent neural network (RNN) is used as an example. A recurrent neural network is a neural network that uses past information in a closed-loop manner.

[0354] Taking a lithium-ion battery pack as an example, the steps for estimating the state of charge (SoC) using a recurrent neural network (RNN) include: conducting multiple charge-discharge cycles on the lithium-ion battery, measuring the battery's operating parameters, such as current I, voltage V, internal resistance R, temperature T, power P, and capacity Q, at each moment during each cycle. The SOC value for the lithium-ion battery at each moment is calculated by dividing the battery's actual capacity by its rated capacity. The battery's external characteristic parameters serve as input to an improved recurrent neural network (RNN), namely a long short-term memory (LSTM) model, and the lithium-ion battery's SOC is used as the network's output. The collected input data is preprocessed to remove redundant data and normalize the data for better model training. A sliding window algorithm is used to transform the multivariate time series problem into a supervised learning problem, using the battery's charge and discharge states as input labels to create an input data sequence that is more amenable to model learning. A fully connected LSTM network structure is established based on the input and output characteristics, and the number of hidden layer nodes is determined. Preprocessed battery external characteristic data is input into the initialized LSTM network structure, and the network is trained using a forward propagation algorithm. Network parameters and bias values ​​are then adjusted using backpropagation based on the actual SOC value, ultimately determining the final LSTM network structure suitable for accurately predicting SOC values. Test samples are then input into the trained neural network for verification, and the prediction error is calculated.

[0355] The process of estimating SOC using LSTM network structure is as follows: The input of this network structure is as follows:

[0356] (1) Current and past input values: V(t), V(t-1), V(t-2), I(t), I(t-1), I(t-2) and T, P, R. Among them, V(t), I(t) and T(t) are external inputs from sensors outside the network, and the delayed values ​​of the previous moment are stored in the external memory. (2) The delayed values ​​corresponding to the output of each network: SOC(t), SOC(t-1) and SOC(t-2) of the SOC estimator and the estimated value of SOC. Therefore, the output SOC(t+1) of the network is always one step ahead of all inputs. The dynamic behavior of each network structure can be expressed by the formula:

[0357] After analyzing battery dynamic test data and identifying five factors influencing SOC, the LSTM model was designed with five input layer nodes, 50 hidden layer nodes, and one output layer node. The mean absolute error (MAE) was used as the loss function, and the tangent function (than) was used as the activation function. Simulation training was performed with 200 epochs, using different learning rates of α = 0.05 and α = 0.005 to verify the model's effectiveness. To ensure this training epoch, the target error was set to 0 to prevent premature termination of training due to reaching the target error.

[0358] The electronic controller 17 detects the occurrence of harmful battery conditions in the battery pack, generates other faults indicating multiple battery cells, or generates faults indicating multiple electronic components through the implementation of a neural network. Based on the generated output, it controls the indicator device 184 to display abnormal conditions. The indicator device 184 may include a display device 114 provided on the battery pack, or a human-computer interaction device provided on a power tool or walking device, or a human-computer interaction device provided on a charger. In some embodiments, based on the generated output, the communication module is controlled to transmit the fault to a remote device, which then controls the indicator device to display the abnormal condition. The indicator device receives the control signal via a device that generates visual or auditory signals and communicates the status information to the user. Optionally, the display device includes an indicator light, a buzzer, a light-emitting diode (LED), or a display screen. The generated output includes cell impedance data, cell temperature data, etc. Optionally, electronic component faults include lifespan warnings, aging warnings, or installation fault warnings for the battery pack, cells, and battery pack accessories. Harmful battery conditions include overtemperature, undertemperature, overvoltage, undervoltage, overcurrent, cell charge and discharge imbalance, overcharge, overdischarge, abnormal internal resistance, and internal or external circuit problems. Other cell failures include, for example, component failures (connection failures, insulation failures, thermal runaway and other thermal management system failures) and sensor failures (voltage, current, temperature). Optionally, when the power management system is equipped with energy recovery, whether the battery pack implements energy recovery and the energy recovery efficiency are also indicated. When the sensor data includes cell impedance data, the electronic controller predicts battery lithium deposition, folding, and structural changes by implementing a neural network.

[0359] In some embodiments, the electronic controller may combine the battery pack mode, battery pack type, and the type of components connected to the battery pack when detecting anomalies. The electronic controller may perform the above classification and identification work by using one of the aforementioned machine learning algorithms.

[0360] Accordingly, a method 1500 for constructing a fault prediction model for a battery pack that powers an electric tool is described. FIG30 is a flow chart of the method 1500 for constructing a fault prediction model for a battery pack.

[0361] 1510, data acquisition, acquiring the usage data of the battery pack and the working data of the power tool.

[0362] 1520 , data preprocessing, performing at least one of data cleaning, data integration, and data correction on the usage data and the working data to obtain streaming data based on time series.

[0363] 1530, feature extraction, uses a sliding window to extract and reprocess the streaming data to obtain corresponding feature data.

[0364] 1540, model construction, based on the fault prediction target, select the corresponding machine learning model to establish the corresponding battery pack fault prediction model.

[0365] 1550, training and verification, uses feature data to train the battery pack failure prediction model, and evaluates, verifies and optimizes the trained battery pack failure prediction model.

[0366] Similar to the construction of the battery pack life assessment model described above, the above-mentioned method of constructing the battery pack fault prediction model can also be executed by a remote device or a controlled device, which will not be repeated here.

[0367] When constructing the battery pack fault prediction model, first, it is necessary to obtain the usage data of the battery pack for which fault prediction is to be performed and the working data of the power tool powered by the battery pack. The relevant data can be read locally or requested from the battery pack, the power tool or the controlled device or database related thereto. Among them, the battery pack usage data may include the battery pack model, usage time, cumulative charge and discharge times, full voltage difference, voltage, current, charge state, temperature during each charge and discharge process, and derivative data related to these data. The working data of the power tool includes the model of the power tool, usage time, maintenance history, and working status, operating time, motor speed, output power, etc. during the use of the battery pack for power supply. It can be understood that, depending on the actual scenario requirements, other types of usage data and working data not shown above can also be used when constructing the battery pack fault prediction model.

[0368] Considering that battery pack usage data and power tool operating data are mostly time-varying, with the same type of data having different values ​​at different times and being multi-source, heterogeneous data collected or recorded by different controlled devices, data preprocessing and feature extraction are required after obtaining the above usage and operating data. Data preprocessing includes at least one of data cleaning, data integration, and data correction. Data cleaning includes data deduplication, outlier removal, missing value filling, and noise filtering. Data deduplication can remove redundant data with low variance from the usage and operating data. For example, if the battery pack is fully charged but the power tool is not using it for power, the battery pack's voltage and SoC remain unchanged at multiple time points, and the data at the time the battery pack is fully charged can be retained. Outlier removal can remove erroneous data from the usage and operating data that deviates from the fitted curve or exceeds the numerical range. For example, voltage and current data with values ​​significantly outside the numerical range, or data with months not between 1 and 12, can be removed. To ensure data comparability and consistency, missing values ​​can be filled using data fitting, averaging, or adjacent values. For example, the missing voltage value at the current moment can be filled using the mean of the voltage values ​​at the previous and next moments. Noise filtering can remove white noise from the data.

[0369] Data integration involves integrating heterogeneous data from multiple sources to achieve uniformity in data encoding, data structure, numerical range, and expression. For example, different data sources may use JSON documents and XML documents, or may express the same field in Chinese and English. These data need to be integrated into the same format and expression. Data correction addresses situations where analysis and conversion are required to obtain accurate data. For example, the battery pack temperature must be subtracted by 10 and then multiplied by 1000 to obtain the actual battery pack temperature.

[0370] After completing the data preprocessing, the original different types of battery pack usage data and power tool working data at different times can be converted into time series-based streaming data with the same expression and consistent format. The streaming data corresponds to multiple different types of data at the same time. The data lasts for a long time and contains many types of data. In some cases, the streaming data is real-time updated and the data volume is constantly growing. In order to further improve the computing efficiency and effect, a sliding window can also be used to extract and reprocess the above streaming data to obtain the corresponding feature data. Taking a sliding window with a window size of 5 and a sliding step size of 3 as an example, 30 days of streaming data can be converted into 11 5-day data averages. Specifically, it can be the average of the data from days 1 to 5 recorded on the 3rd day, the average of the data from days 4 to 8 recorded on the 6th day, and so on.

[0371] In some embodiments, before preprocessing and feature extraction of usage data and working data, data mining and analysis may be performed on them to determine potential factors related to whether each type of battery pack failure occurs or how long each type of battery pack failure takes to occur. Subsequent data preprocessing and feature extraction may be performed only on data related to potential factors. In some cases, the usage data and / or working data before and after the battery pack failure occurs may be compared, or the usage data and / or working data under non-fault conditions and under fault conditions may be compared, and the potential factors and their numerical ranges may be determined by jump data, discontinuity point data, etc. In other cases, the above data may also be converted into visual charts for data mining and analysis to determine potential factors related to battery pack failure.

[0372] After obtaining the feature data after preprocessing and feature extraction, a fault prediction model for the battery pack can be constructed and trained using this feature data. First, it is necessary to select the corresponding machine learning model based on the fault prediction goal. Although the various machine learning algorithms described above can be used for battery pack fault prediction, selecting the appropriate algorithm for different prediction problems and achieving different prediction goals can improve model efficiency and accuracy. Second, the feature data used when training different fault prediction models must also correspond to them. For example, temperature data is required in the fault prediction model for thermal runaway, and current data is required in the fault prediction model for overcurrent.

[0373] In some embodiments, the model is used to detect a single category of battery pack failures, and the fault prediction target is whether the battery pack will experience this category of failure. A binary classification model can be used to establish the battery pack failure prediction model. In other embodiments, the model is used to detect multiple different categories of battery pack failures, and the fault prediction target is whether the battery pack will experience failures and what type of failure will occur. A multivariate classification model can be used to establish the battery pack failure prediction model. Optional classification models in the above two cases include logistic regression models, boosted decision trees, decision forests, neural network models, support vector machines, and K-nearest neighbor models.

[0374] In some other embodiments, the fault detection objective is to determine when a battery pack will fail. A regression model can be used to establish a battery pack fault prediction model. In still other embodiments, the fault prediction objective is the probability of battery pack failure or a score of the battery pack's current operating status. A high probability or low score indicates a high likelihood of battery pack failure. Regression models can also be used to establish a battery pack fault prediction model. Optional regression models in these two scenarios include Poisson regression models, boosted decision tree regression models, decision forest regression models, and neural network regression models.

[0375] After the original machine learning model is selected and established based on the fault prediction target, the original model can be trained using the feature data after preprocessing and feature extraction. The model training method should be adapted to the specific algorithm and fault prediction target implemented by the model. In some cases, the battery pack fault prediction models with different fault prediction targets mentioned above can be jointly trained. For example, the battery pack fault prediction models with category as the fault prediction target and duration as the fault prediction target are jointly trained. The joint loss function aims to output the fault category as the actual fault category and the output fault duration close to the actual duration of the fault of this category. The specific process of using feature data to train the model will not be described in detail.

[0376] The method for establishing a battery pack fault prediction model also includes validating and optimizing the model after training. In some embodiments, the feature data can be used to cross-validate the battery pack fault prediction model to optimize model parameters. Specifically, the feature data can be divided into K parts, and any one of the K parts is selected as a test set, and the remaining (K-1) parts are used as training sets. The model is trained K times and the models obtained from the K training times are evaluated using K different test sets. The model with the best performance is selected as the final battery pack fault prediction model for subsequent use. In other embodiments, the feature data can be divided into a sample set, a validation set, and a test set based on a preset ratio. The battery pack fault prediction model is trained using the feature data in the sample set, and the model obtained from this training is validated on the validation set. At the same time, the values ​​of hyperparameters in the battery pack fault detection model, such as the number of training rounds and the learning rate, are adjusted. After the hyperparameters are adjusted, a new round of training is performed using the sample set. The new model obtained is validated again on the validation set, and the hyperparameters are continuously optimized. The above process is repeated to optimize the model and improve related issues such as overfitting.

[0377] In some other embodiments, feature data can be used to train multiple battery pack fault prediction models, and a test set can be used to determine the accuracy, error rate, and recall rate of each trained battery pack fault prediction model. Accuracy is the ratio of correct predictions among all samples, error rate is the ratio of samples predicted to be faulty to samples that are actually faulty, and recall is the ratio of correct predictions among samples that are actually faulty. Then, any one of accuracy, error rate, or recall rate can be used as an evaluation criterion, or a combination of these three can be used to establish an evaluation criterion. The best-performing model can be determined from the multiple battery pack fault prediction models, and the best-performing model can be selected as the final battery pack fault prediction model for subsequent use.

[0378] As an embodiment, in the battery pack 11 or an electronic combination consisting of the battery pack 11 and electronic circuits or electrical components that cooperate with the battery pack 11, the electronic controller 17 in the battery pack 11 includes a machine learning program for processing sensor data to obtain the temperature change rate. The electronic controller 17 will receive the first type of sensor data and the second type of sensor data transmitted by one or more sensors 18, and use the machine learning program to generate the predicted temperature change rate of the battery pack 11 with the first type of sensor data as input. At the same time, the measured temperature change rate of the battery pack 11 is calculated based on the second type of sensor data. Then, the predicted temperature change rate is compared with the measured temperature change rate. When the measured temperature change rate is greater than the predicted temperature change rate, a warning prompt is issued for the thermal runaway risk of the battery pack 11. For the specific component composition of the battery pack 11, please refer to the relevant description above.

[0379] FIG31 is a flow chart 1600 of the control scheme of the above electronic combination.

[0380] At 1610 , the electronic controller receives first-type sensor data and second-type sensor data from the sensor assembly.

[0381] 1621, using a machine learning program to obtain a predicted temperature change rate of the battery pack from the first type of sensor data.

[0382] 1622, calculate the measured temperature change rate of the battery pack based on the second type of sensor data. 1621 and 1622 are performed substantially simultaneously, and there is no mandatory requirement for their execution order.

[0383] 1630, compare the predicted temperature change rate with the measured temperature change rate. When the predicted temperature change rate is greater than the measured temperature change rate, it indicates the risk of thermal runaway of the battery pack.

[0384] Among them, the first category of sensor data may include the second category of sensor data, or may not include the second category of sensor data, or the first category of sensor data may partially overlap with the second category of sensor data. In some embodiments, the first category of sensor data may include data such as the voltage, current, temperature, internal resistance of the battery pack, as well as data such as the working status, operating time, motor speed and output power of the power tool powered by the battery pack. In some cases, the first category of sensor data may further include more metadata such as the current capacity, number of cycles, charge and discharge frequency, and maintenance history of the battery pack. The second category of sensor data includes the measured temperature at one or more temperature measuring points in the battery pack. The location of the temperature measuring point can be on the inner surface of the battery pack shell, the battery cell holder, the battery cell connector, or on the outer surface of the battery cell. It can be understood that the first category of sensor data and the second category of sensor data can also include other types of sensor data not shown above, and the sensor data described above can be used as a reference.

[0385] The machine learning program used by the electronic controller can be implemented using any one or a combination of the machine learning algorithms described above. The electronic controller uses the currently received first-category sensor data as input to the machine learning program and, based on the output of the machine learning program, determines the predicted temperature change rate of the battery pack. In some embodiments, the machine learning program used to generate the predicted temperature change rate may be a random forest model. In some cases, the original machine learning program is trained in a supervised manner with a sample set containing the same data type as the first-category sensor data. Its loss function aims to output a temperature change rate at a specific moment that is close to the maximum value of the measured temperature change rate at each temperature measurement point at that moment. Therefore, the predicted temperature change rate subsequently obtained by the machine learning program based on the current first-category sensor data can be considered the maximum temperature change rate within the battery pack at that moment in the battery pack's temperature change history. Therefore, if the measured temperature change rate calculated based on the second-category sensor data is greater than the predicted temperature change rate derived from the first-category sensor data, the battery pack is at risk of thermal runaway.

[0386] When calculating the measured temperature change rate based on the second-category sensor data, the electronic controller may calculate the temperature change rate for each measured temperature at each temperature measurement point and use the average of the multiple temperature change rates as the measured temperature change rate of the battery pack, or use the maximum of the multiple temperature change rates as the measured temperature change rate of the battery pack. In some embodiments, the electronic controller may also use other machine learning programs when calculating the measured temperature change rate of the battery pack. That is, a new machine learning program may be used, using a sample set with the same data type as the second-category sensor data, but with a loss function whose objective is different from the aforementioned machine learning program. For example, the objective may be to output a temperature change rate at a specific moment that is close to the measured temperature change rate at the center temperature measurement point of the battery pack at that moment.

[0387] When comparing the predicted temperature change rate with the measured temperature change rate to determine the battery pack's thermal runaway risk, the electronic controller can subtract the predicted and measured temperature change rates. If the predicted temperature change rate is greater than the measured temperature change rate, and the difference between the two is greater than a first temperature difference threshold, the electronic controller can determine that the battery pack's thermal runaway risk level is high. If the difference between the two is less than or equal to the first temperature difference threshold but greater than a second temperature difference threshold, the electronic controller can determine that the battery pack's thermal runaway risk level is medium. If the difference between the two is less than or equal to the second temperature difference threshold, the electronic controller can determine that the battery pack's thermal runaway risk level is low. If the predicted temperature change rate is less than or equal to the measured temperature change rate, the electronic controller can determine that the battery pack currently has no thermal runaway risk.

[0388] Figure 32 is a block diagram of thermal runaway risk management. Referring to Figures 8, 9, and 32, in the event of a thermal runaway risk, the electronic controller can call relevant components to issue an alarm to the user. In some embodiments, the battery pack 11 includes one or more risk indicator lights, for example, including indicator lights indicating high, medium, and low thermal runaway risk levels, respectively. The one or more risk indicator lights are electrically connected to the electronic controller, and the electronic controller can light up the risk indicator lights of the corresponding levels after comparing the temperature change rate and determining the thermal runaway risk level. In some cases, the battery pack 11 may also include visual components such as a display screen, to which the electronic controller is electrically connected and displays information related to the thermal runaway risk in a visual manner. In other cases, an alarm may also be issued in the form of sound.

[0389] In other embodiments, the battery pack 11 includes a communication module 118, which is communicatively connected to the remote device 15 and electrically connected to the electronic controller. After comparing the temperature change rate and determining the thermal runaway risk level, the electronic controller can transmit information related to the thermal runaway risk to the remote device through the communication module. In some cases, the electronic controller can directly contact the smartphone, tablet computer, laptop or other user device of the user of the battery pack or power tool through the communication module, so that the individual user can quickly respond to the thermal runaway risk of the battery pack. In other cases, the electronic controller can also contact the cloud platform, central server, third-party server and other devices through the communication module, so that it can uniformly manage and efficiently respond to the thermal runaway risks of multiple battery packs.

[0390] As one embodiment, an electronic assembly includes a battery pack 11 and a switching element 191 for controlling the input current or output current of the battery pack. The electronic controller includes a first machine learning program and a second machine learning program. The electronic controller processes sensor data using the first machine learning program and generates a first output based on the sensor data. The electronic controller processes the sensor data using the second machine learning program and generates a second output based on real-time parameters of the sensor data. A third output is generated based on the first and second outputs. The electronic controller controls the switching element based on the generated third output.

[0391] FIG24 is a flow chart 1200 of the control scheme of the above electronic combination.

[0392] 1210 , the electronic controller receives sensor data from the sensor, the sensor data including, for example, current data, voltage data, temperature data or internal resistance data, power tool equipment data, maintenance data, user feedback data, power data, environmental data, operator data, position data, and the like.

[0393] At 1221, a first machine learning program processes the sensor data.

[0394] At 1222, a second machine learning program processes the sensor data. Steps 1221 and 1222 are performed substantially simultaneously.

[0395] At 1231 , a first machine learning program generates a first output based on the sensor data.

[0396] At 1232, the second machine learning program generates a second output based on the sensor data. Steps 1231 and 1232 are performed substantially simultaneously. The second machine learning program receives real-time data.

[0397] 1240 , the first output and the second output generate a third output.

[0398] 1250, based on the generated third output, the switching element is controlled, so that the charging and discharging process can be controlled.

[0399] Figure 25 shows a block diagram of discharge management. The battery pack is electrically coupled to a switching element 191, which is used to control the input or output current of the battery pack. Switching element 191 can be installed in the power pack. Alternatively, the switching element can be installed in a power tool or walking device to control the discharge of the battery pack. Alternatively, the switching element can be installed in a charger to control the charging of the battery pack.

[0400] The battery pack includes a discharge circuit 192. The discharge circuit 192 includes a switching element 191, and the discharge circuit 192 is electrically connected to the battery cell or battery cell group 112a and the terminals of the battery pack interface (battery pack positive terminal 115, battery pack negative terminal 116, and communication terminal 117). When the battery pack is connected to a power tool or walking device, the discharge circuit 192 is configured to transmit electrical energy to the power tool via the terminals of the battery pack. The battery pack can be detachably connected to the above-mentioned power tool or fixedly set in the above-mentioned power tool.

[0401] The electronic controller 17 is configured to control the discharge circuit 192. The electronic controller 17 is configured to control the on / off switching of the switching element 191. The electronic controller 17 includes an electronic processor and memory, the memory including a machine learning program for execution by the electronic processor. The electronic controller 17 is configured to receive sensor data from the battery pack and / or cell modules, process the sensor data using the machine learning program, generate an output based on the sensor data using the machine learning program, and adjust the battery pack's protection threshold based on the generated output. The protection threshold includes at least one of an over-temperature protection threshold, an under-temperature protection threshold, an overvoltage protection threshold, an under-voltage protection threshold, and an over-current protection threshold. The sensor data includes current data, voltage data, or temperature data. The electronic controller 17 controls current flow between the battery pack and the power tool based on the adjusted protection threshold. Optionally, the electronic controller 17 is located in the battery pack and controls power supply from the battery pack to the power tool based on the protection threshold. Alternatively, the electronic controller 17 is located in the power tool or mobile device and the protection threshold is transmitted to the power tool or mobile device via the battery pack terminals. The power tool or mobile device controls power consumption based on the protection threshold.

[0402] The electronic controller may implement a neural network (e.g., a feedforward neural network, a recurrent neural network, etc.) to detect battery conditions that are detrimental to the battery pack. The electronic controller generates and / or utilizes various thresholds to detect battery conditions that are detrimental to the battery pack. For example, when the battery pack or cell temperature continuously increases above a threshold, the electronic controller is more likely to detect a problem with the battery pack's state of temperature (SoT) and a poor discharge state of the battery pack. During discharge of the battery pack, when the electronic controller detects that the battery pack is in a poor discharge state, the electronic controller limits (disconnects) the discharge circuit.

[0403] A third party can provide feedback to the electronic controller regarding the accuracy of the electronic controller's detection feedback. For example, the electronic controller may receive a first type of negative feedback indicating that the electronic controller did not detect that the battery pack was overheating. The electronic controller may also receive a second type of negative feedback indicating that the machine learning controller was overly sensitive in detecting battery pack overheating. For example, a detection sensor may be installed within the battery pack, or ambient temperature detection may be added.

[0404] The electronic controller may adjust thresholds generated or used by the electronic controller in response to the received feedback, or may adjust the machine learning control itself. For example, an increase in a threshold value may result in a delay in detecting a battery condition that is harmful to a battery pack in a power tool. In other embodiments, the feedback does not directly change the threshold value generated or used by the electronic controller, but rather allows the machine learning control to be retrained based on the received feedback. Because the occurrence of a battery condition that is harmful to a battery pack may not be obvious to the user or may require instrumentation, feedback and threshold updates for the battery management system are more likely to occur during manufacturing or under laboratory conditions.

[0405] As mentioned above, the learning rate can affect how new information with feedback is used to retrain the machine learning control, as well as how feedback is used to more directly adjust the thresholds generated or used by the electronic controller.

[0406] A first machine learning program is used to process sensor data and generate a first output based on the sensor data, and a protection threshold is adjusted based on the first output. A second machine learning program is used to process the sensor data and generate a second output based on real-time parameters of the sensor data. A comparison between the second output and the protection threshold is used to determine whether to discharge the battery cell module. A discharge mode of the battery pack is adjusted based on the difference between the second output and the protection threshold or a value calculated by a first-order or multi-order equation.

[0407] The machine learning program may be any one or more of the above-mentioned machine learning programs according to the classification of one of the aforementioned machine learning algorithms.

[0408] Since the discharge mode of the battery pack 11 has a strong correspondence with the user's usage scenario, this has a great impact on the usage status of the battery pack. Manually adjusting the discharge mode requires the user to have sufficient experience. An electronic controller is used to collect working data from the power tool through the battery pack output terminal, and a machine learning program is used to generate output based on the working data, and a discharge mode is selected and the discharge circuit is controlled based on the generated output. Among them, the discharge mode includes a performance mode, a power consumption mode and a balance mode. Optionally, the discharge mode includes a series mode and a parallel mode. The machine learning program identifies the type of the power tool based on the working data. The machine learning program identifies the usage habits of the user of the power tool based on the working data.

[0409] Discharge mode settings specify the cell discharge parameters and protection thresholds for a battery pack or cell module during discharge in a specific mode. For example, each discharge mode can define parameters such as discharge voltage, discharge current, maximum discharge current, and discharge cutoff voltage, as well as their combinations. The combination of two or more discharge parameters and protection thresholds defines a battery pack's usage profile or mode.

[0410] The electronic controller distinguishes between several discharge modes. Training examples for the electronic controller include input vectors indicating discharge voltage, discharge current, cell temperature, maximum discharge current, and discharge cutoff voltage, and output labels indicating the type of discharge mode. The electronic controller implements an artificial neural network to perform the classification. The artificial neural network includes, for example, five input nodes, and, for example, one hundred output nodes. Each output node corresponds to, for example, a different type of discharge mode recognizable by the electronic controller, as well as an additional output that indicates the battery pack when the discharge mode does not correspond to any recognizable discharge mode type. The artificial neural network can include more or fewer output nodes based on the number of fasteners that can be distinguished. In some embodiments, the neural network includes an additional layer that includes a single node. The additional layer can determine which output node has the highest value (which can correspond to the probability that the discharge mode type is identified as the discharge mode type corresponding to the output node) and output (for example, one, two, three, or four) values ​​associated with the output node. The value of the output node can correspond to the discharge mode type recognized by the electronic controller. When the electronic controller selects a discharge mode, the electronic processor controls the battery pack or the power tool according to discharge parameters and protection thresholds specified by the selected mode, which may be stored in a memory.

[0411] The electronic controller also receives information about the operating mode of the power tool (e.g., speed associated with the mode, mode torque, mode slope, etc.). The electronic controller also receives sensor information indicating operating parameters of the power tool (e.g., motor current, motor voltage, trigger activation or feedback from the trigger, movement of the power tool, motor speed, output shaft speed, etc.). The electronic controller distinguishes between several types of power tools. In some embodiments, the electronic controller distinguishes between types of usage habits of users of several power tools. The electronic controller implements an artificial neural network to perform this classification.

[0412] In this embodiment, the charger also includes a charging circuit 194. This circuit is used to control the charger to output a voltage that matches the battery pack to charge the battery pack, thereby ensuring that the output voltage of the battery pack interface is the same as the nominal voltage of the battery pack. In some embodiments, the charging circuit 194 is disposed within the charger housing and is disposed on a circuit board assembly. In other embodiments, the charging circuit 194 may also be disposed within the battery pack.

[0413] When the battery pack is connected to the charger, the charging circuit 194 is configured to electrically connect to the battery pack interface (battery pack positive terminal 115, battery pack negative terminal 116, and communication terminal 117) and charge the battery pack. The charger also includes a clock module that is used to detect charging time. The charging time data includes a charging timestamp or charging duration. The clock module can enable a safety function, wherein when the time of the clock module exceeds a user-determined lockout time, the battery pack is disabled (e.g., locked and cannot be charged).

[0414] The electronic controller 17 is used to control the charging circuit. The charging circuit 194 includes a switching element 191, and the electronic controller is configured to control the on and off of the switching element. The electronic controller includes an electronic processor and a memory, and the memory includes a machine learning program for execution by the electronic processor. The electronic controller is configured to: obtain charging time data of the charging circuit charging the battery pack through the clock module 147, process the charging time data using the machine learning program, generate an output based on the charging time data using the machine learning program, output an indication of a parameter value associated with the charging operation of the charger, and control the charging circuit according to the generated output. The parameter value includes a charging rate or a pulse charging interval. In some embodiments, the parameter value also includes a full charge rate. When the charge state of the battery pack is greater than or equal to the full charge rate, the charging circuit stops charging the battery pack.

[0415] The machine learning program is generated on the external system device through training based on example data and related outputs, and is received by the charger from the external system device. Optionally, the charger obtains operating data of the battery pack via the battery pack interface, and the machine learning program adjusts the output based on the operating data.

[0416] Optionally, the electronic controller is provided in the battery pack, and receives charging time data through a port, and generates an output parameter value based on the charging time data to control the amount of power charged into the battery cells of the battery pack. Optionally, the electronic controller is provided in the charger, and the electronic controller controls the power supply of the charger to the battery pack based on the output parameter value based on the charging time data.

[0417] In one embodiment, the electronic controller includes a first machine learning program and a second machine learning program. The first machine learning program processes sensor data and generates a first output based on the sensor data, and a protection threshold is adjusted based on the first output. The second machine learning program processes the sensor data and generates a second output based on real-time parameters of the sensor data. A comparison between the second output and the protection threshold determines whether to charge the battery module. The battery pack charging mode is adjusted based on the difference between the second output and the protection threshold or a value calculated by a first-order or multi-order equation.

[0418] The machine learning program is classified according to one of the aforementioned machine learning algorithms and can be any one or more of the aforementioned machine learning programs.

[0419] Because the battery pack's charging mode closely corresponds to the user's usage scenarios and habits, this has a significant impact on the battery pack's charging state. An electronic controller collects charging data from the power tool through the battery pack's output terminals. A machine learning program generates output based on the operating data, selects a charging mode based on the generated output, and controls the charging circuit. Charging modes include night mode and fast charge mode. The machine learning program identifies different scenarios based on the charging data, such as different charging depths, different charging frequencies, and different charging times.

[0420] Charging mode settings specify parameter values ​​and protection thresholds associated with cell charging operations for a battery pack or cell module when charging in a specific mode. For example, each operating mode can define parameters such as charge rate, charge timestamp, and full charge rate, as well as their combinations. The combination of two or more charging parameters and protection thresholds defines a battery pack usage profile or mode.

[0421] The electronic controller distinguishes between several charging modes. Training examples for the electronic controller include input vectors indicating charging current, charging time, nighttime or daytime charging, timely power failure, and remaining charge at the time of charging, and output labels indicating the type of charging mode. The electronic controller implements an artificial neural network to perform this classification. The artificial neural network includes, for example, five input nodes and, for example, one hundred output nodes. Each output node corresponds to, for example, a different type of charging mode recognizable by the electronic controller, as well as an additional output indicating the battery pack when the charging mode does not correspond to any recognizable charging mode type. The artificial neural network may include more or fewer output nodes based on the number of fasteners that can be distinguished. In some embodiments, the neural network includes an additional layer comprising a single node. This additional layer may determine which output node has the highest value (which may correspond to the probability that the charging mode type is identified as the charging mode type corresponding to that output node) and output values ​​associated with the output node (e.g., one, two, three, or four). The value of the output node may correspond to the charging mode type recognized by the electronic controller. When the electronic controller selects a charging mode, the electronic processor controls the battery pack or the power tool according to charging parameters and protection thresholds specified by the selected mode, which may be stored in a memory.

[0422] The electronic controller also receives information regarding the operating mode of the power tool. The electronic controller also receives sensor information indicating operating parameters of the power tool. The electronic controller distinguishes between several types of power tools. In some embodiments, the electronic controller distinguishes between several types of user habits of the power tools. The electronic controller implements an artificial neural network to perform this classification.

[0423] As shown in Figures 33 to 38, the present application also provides an electric tool system and an electric tool control method. In the related art, when training a machine learning model, a large amount of training data is required, but in the actual operation process, there are certain difficulties in collecting training data. In addition, when the amount of training data is too large, if the machine learning model is trained on a cloud server, the training data needs to be transmitted to the cloud server, resulting in a heavy data transmission burden; if the machine learning model is trained on a local terminal, due to the limited computing power of the local terminal, it is impossible to train a model with too much data. In addition, when training a machine learning model, if the degree of fitting of the training data is too high, an overfitting problem will occur; if the degree of fitting of the training data is too low, an underfitting problem will occur.

[0424] As an embodiment, FIG33 is a structural block diagram of an electric tool system provided by an embodiment of the present application. As shown in FIG33 , the electric tool system 1c in this embodiment includes: a first electric tool 10c and a second electric tool 20c. The first electric tool 10c includes: a housing 101c; a motor 102c disposed in the housing 101c; an electronic controller 103c disposed in the housing 101c, the electronic controller 103c includes an electronic processor 1031c and a memory 1032c, the memory 1032c includes a first machine learning control program for execution by the electronic processor 1031c, the first machine learning control program being a trained first machine learning model; the electronic controller 103c is configured to control the motor 102c through the first machine learning control program;

[0425] A second power tool 20c includes a housing 201c; a motor 202c disposed in the housing 201c; an electronic controller 203c disposed in the housing 201c, the electronic controller 203c including an electronic processor 2031c and a memory 2032c, the memory 2032c including a second machine learning control program for execution by the electronic processor 2031c, the second machine learning control program being a trained second machine learning model; the electronic controller 203c is configured to control the motor 202c using the second machine learning control program.

[0426] The first machine learning model is generated based on a first data set training related to the operation of the first power tool 10c; the second machine learning model is generated based on the first machine learning model and a second data set training related to the operation of the second power tool 20c.

[0427] In an embodiment, if the first power tool 10c and the second power tool 20c have similar features, the first machine learning model already established in the first power tool 10c can be used to generate a second machine learning model for the second power tool 20c. In actual operation, transfer learning technology can be used before the second power tool 20c leaves the factory, that is, the first machine learning model already established in the first power tool 10c can be used to establish a second machine learning model corresponding to the second power tool 20c. Transfer learning technology can also be used during the actual use of the second power tool 20c after it leaves the factory, that is, the first machine learning model already established in the first power tool 10c can be used to establish a second machine learning model corresponding to the second power tool 20c.

[0428] In one embodiment, the first machine learning model of the first power tool 10c can be sent to a training device, such as a computer or a server. At the same time, the second data set of the second power tool 20c is also sent to the training device, so that the training device retrains the first machine learning model based on the second data set to obtain a second machine learning model adapted to the second power tool 20c itself, and then stores the second machine learning model in the memory 2032c of the second power tool 20c.

[0429] In one embodiment, the first machine learning model and the second machine learning model are both neural network models. In an embodiment, the first machine learning model and the second machine learning model may both be neural network models. Specifically, the first machine learning model and the second machine learning model may both be convolutional neural network models. In an embodiment, the first machine learning model and the second machine learning model may also be one or more combinations of linear models, decision tree models, support vector machine models, Bayesian classification, ensemble learning, clustering, dimensionality reduction and metric learning, reinforcement learning, and deep learning models.

[0430] In one embodiment, the sample size of the first data set is greater than or equal to N times the sample size of the second data set; wherein N is greater than or equal to 2. It should be noted that the transfer learning technology uses an already generated machine learning model in combination with a small amount of training data to generate a new machine learning model. In an embodiment, in order to reduce the collection of training data in the second data set corresponding to the second power tool, the transfer learning technology can be used, and combined with the first machine learning model to generate a second machine learning model adapted for the second power tool. Accordingly, the sample size of the second data set is smaller than the sample size of the first data set. For example, the number of samples in the first data set is at least greater than or equal to 2 times the sample size of the second data set. In one embodiment, the number of samples in the first data set is at least greater than or equal to 3 times the sample size of the second data set. The number of samples in the first data set is at least greater than or equal to 5 times the sample size of the second data set. The number of samples in the first data set is at least greater than or equal to 10 times the sample size of the second data set.

[0431] With the help of transfer learning, the following pain points can be solved:

[0432] The amount of data (labeled) at new locations is small, and the results of direct training are unreliable. For a new location, it often takes several months of data collection to run the established method at the location. However, some locations have not had the need to collect data in the past, or because the business has not been deployed before, there is very little historical data, so the verification results may not be ideal. At this time, it is necessary to use transfer learning to solve the problem of insufficient data. For example, if the first machine learning model is a new location, the second machine learning model does not need to search for too much training data, and on the basis of the first machine learning model, obtains a second data set containing a small amount of data related to the operation of the second power tool. The first machine learning model is trained based on the second data set to obtain a second machine learning model that matches the second power tool, thereby solving the problem of the small amount of data in the second data set corresponding to the second power tool.

[0433] The data distribution between the old and new sites is different, so the previously trained model cannot be used directly. For a certain business, a relatively reliable model can be trained using data constructed in historical sites or laboratories. However, when the model is used in a new site, there will be a problem. The data distribution between the old and new sites is different, resulting in a certain deviation in the prediction results. If you want to use a previously trained model, you need to use some transfer learning techniques to solve it. For example, if the sample size of the first data set corresponding to the first power tool is greater than or equal to N times the sample size of the second data set corresponding to the second power tool, the machine learning model of the first power tool can be directly trained using the first data set to obtain a relatively reliable first machine learning model; but since the sample size in the second data set is small, there may be a certain deviation in the prediction results. In this case, transfer learning can be used to train the first machine learning model based on the second data set to obtain a second machine learning model suitable for the second power tool.

[0434] In addition, new locations may also result in changes in feature space or classification labels. Sometimes, the features of the same service at different locations are different, with each location having both common and unique features. Sometimes, even with the same classification problem, the classification categories may change. These changes can significantly reduce the results, which requires transfer learning to assist in improving performance. For example, a first power tool and a second power tool may have the same target, but different motors. The first power tool and the second power tool share the common feature of having the same target and the unique feature of having different motors. In this case, transfer learning technology can be used to train the first machine learning model corresponding to the first power tool using the second dataset corresponding to the second power tool to obtain a second machine learning model adapted for the second power tool.

[0435] In one embodiment, the first and second power tools operate on the same object. In one embodiment, the first and second power tools need to have similar features. For example, the first and second power tools operate on the same object, such as grass. In one embodiment, the first power tool is a lawn mower and the second power tool is a lawn trimmer. In one embodiment, the first power tool is a push lawn mower and the second power tool is a riding lawn mower or a robotic lawn mower. The first and second power tools can also operate on building materials. In one embodiment, the first power tool is a handheld sander and the second power tool is a robotic sander. In one embodiment, the first power tool is a handheld construction power tool and the second power tool is a construction robot. In one embodiment, the first and second power tools operate on different objects. In one embodiment, the first and second power tools can also operate on different objects, but the first and second power tools need to have other similar features, such as similar operating conditions or operating principles. In one embodiment, the first power tool is an electric drill and the second power tool is an electric screwdriver.

[0436] In one embodiment, the first power tool and the second power tool have the same or similar structures. For example, the first power tool is a lawn mower and the second power tool is a snow blower. Both power tools have a travel function, which is provided by travel wheels and a travel motor.

[0437] In one embodiment, the motor of the first power tool is the same as the motor of the second power tool. In one embodiment, the first power tool and the second power tool need to have similar features, for example, the motors of the first power tool and the second power tool are the same.

[0438] In one embodiment, the motor of the first power tool is different from the motor of the second power tool. In another embodiment, the motors of the first power tool and the second power tool may also be different, but the first power tool and the second power tool have other similar features, such as having the same working object.

[0439] Methods for implementing transfer learning include: instance based transfer learning method; feature based transfer learning method; model based transfer learning method.

[0440] Instance-based migration is to directly assign different weights to different samples. For example, similar samples can be assigned higher weights, thus completing the migration.

[0441] Feature-based migration involves transforming features. If the features of the source and target domains are not originally in the same space, or if they are not similar in the original space, they can be transformed into the same space for migration.

[0442] Model-based migration involves reusing model parameters. For example, the structure of a neural network can be directly migrated, and fine-tuning is a good example of model parameter migration.

[0443] It should be noted that the core issue of transfer learning lies in distribution alignment, which aims to reduce the direct difference between the data distribution of the target domain and the data distribution of the source domain, thereby enabling seamless model transfer. Common methods for distribution alignment include data distribution adaptation, feature selection, and subspace learning.

[0444] In one embodiment, transfer learning is implemented using a data distribution adaptation method. The basic idea of ​​this method is that since the data probability distributions of the source domain and the target domain are different, the most direct way is to shorten the distance between the different data distributions through some transformations. According to the nature of the data distribution, this type of method can be divided into marginal distribution adaptation, conditional distribution adaptation, and joint distribution adaptation. For example, the source domain is the usage data of the travel motor of a lawn mower, and the target domain is the usage data of the travel motor of a snow blower. The same functional modules of two different garden tools have different data probability distributions due to different applicable working conditions.

[0445] In one embodiment, transfer learning is implemented using a feature selection method. The basic assumption of feature selection methods is that both the source domain and the target domain contain a portion of common features, and the data distribution of the source and target domains for these common features is consistent. Therefore, the goal of this type of method is to select these shared features through machine learning methods, so that a model can be constructed based on these features. For example, the source domain is the usage data of the mowing motor of a push lawn mower, and the target domain is the usage data of the mowing motor of a riding lawn mower. The target domain can also be the usage data of the mowing motor of a lawn mower robot. Because the mowing motors of these three types of lawn mowers have the same target, the data distribution of at least some common features in their usage data is consistent, such as load data. Since push lawn mowers are traditional mowing tools, they have accumulated a large amount of user usage data, which can serve as a transfer learning source for the machine learning programs of the other two newer lawn mowers.

[0446] In one embodiment, transfer learning is implemented using a subspace learning approach. Subspace learning methods generally assume that the source and target domain data have similar distributions in the transformed subspace. Based on the form of feature transformation, subspace learning methods are categorized into two types: statistical feature alignment methods based on statistical feature transformation, and manifold learning methods based on manifold transformation. For example, the source domain is data on the use of electric drills, and the target domain is data on the use of electric screwdrivers.

[0447] In one embodiment, FIG34 is a block diagram of another power tool system provided by an embodiment of the present application. As shown in FIG34 , the power tool system 2c in this embodiment includes: a first power tool 30c, including: a housing 301c; a motor 302c disposed within the housing 301c; a wireless communication module 303c configured to wirelessly transmit data to other devices; an electronic controller 304c disposed within the housing 301c; the electronic controller 304c includes an electronic processor 3041c and a memory 3042c, the memory 3042c including a first machine learning control program for execution by the electronic processor 3041c, and the electronic controller 304c is configured to control the motor 302c via the first machine learning control program;

[0448] The second power tool 40c includes a housing 401c; a motor 402c disposed within the housing 401c; a wireless communication module 403c configured to wirelessly transmit data to another device; and an electronic controller 404c disposed within the housing 401c. The electronic controller 404c includes an electronic processor 4041c and a memory 4042c, and is configured to control at least the motor 402c.

[0449] The wireless communication module 303c of the first power tool 30c sends the first machine learning control program to the wireless communication module 403c of the second power tool 40c; the electronic controller 404c of the second power tool 40c is configured to: generate a second machine learning control program based on the first machine learning model and data training related to the operation of the second power tool 40c, and store the second machine learning control program in the memory 4042c.

[0450] In an embodiment, the first machine learning control program of the first power tool 30c can be sent to the second power tool 40c, so that the second power tool 40c retrains the first machine learning control program based on the second data set to obtain a second machine learning control program adapted for the second power tool 40c. In one embodiment, the first machine learning control program of the first power tool 30c can be sent to a cloud server via the wireless communication module 303c. Simultaneously, the second data set of the second power tool 40c can also be sent to the cloud server via the wireless communication module 403c, so that the cloud server retrains the first machine learning control program based on the second data set to obtain a second machine learning control program adapted for the second power tool 40c. The second machine learning control program is then sent to the second power tool 40c via the cloud server and stored in the memory 4042c of the second power tool 40c.

[0451] In one embodiment, the first machine learning model and the second machine learning model are both one or more combinations of linear models, decision tree models, neural network models, support vector machine models, Bayesian classification, ensemble learning, clustering, dimensionality reduction and metric learning, reinforcement learning, and deep learning models.

[0452] In one embodiment, the electronic controller of the second power tool is further configured to control the motor using a second machine learning control program. In this embodiment, after the second power tool generates the second machine learning control program based on the first machine learning control program and data related to the operation of the second power tool, the electronic controller of the second power tool can control the motor of the second power tool using the second machine learning control program.

[0453] In one embodiment, the first electric tool and the second electric tool act on the same object.

[0454] In one embodiment, the first electric tool and the second electric tool act on different objects.

[0455] In one embodiment, the first power tool is an electric drill, and the second power tool is an electric screwdriver.

[0456] In one embodiment, the first power tool is a lawn mower, and the second power tool is a lawn trimmer.

[0457] In one embodiment, the first power tool is a lawn mower and the second power tool is a snow blower.

[0458] In one embodiment, the first power tool is a handheld sander and the second power tool is a sanding robot.

[0459] In one embodiment, the first power tool is a handheld construction power tool, and the second power tool is a construction robot.

[0460] In one embodiment, the first power tool is a push lawn mower, and the second power tool is a riding lawn mower or a lawn mowing robot.

[0461] In one embodiment, the motor of the first power tool and the motor of the second power tool are the same.

[0462] In one embodiment, the motor of the first power tool and the motor of the second power tool are different.

[0463] It should be noted that the explanation of the parameters such as the first machine learning model, the second machine learning model, the first data set, and the second data set in the power tool system shown in Figure 34 can be found in the description of the corresponding parameters in the power tool system shown in Figure 33 above, and will not be repeated here. The relationship between the housing, the motor, and the electronic controller in Figures 33 and 34 is only for illustrating two different power tools and does not limit the specific style and structure of the first or second power tool. In particular, the motor and the electronic controller may not be located in the same housing.

[0464] Figure 35 is a block diagram of an implementation of a traditional machine learning model provided in an embodiment of the present application. As shown in Figure 35, the first machine learning model is trained using the training data in the first dataset, and the second machine learning model is trained using the training data in the second dataset.

[0465] Figure 36 is a block diagram of an implementation of a machine learning model based on transfer learning technology provided in an embodiment of the present application. As shown in Figure 36, a first machine learning model is trained using training data from a first dataset; then, a second machine learning model is trained using the knowledge (e.g., features, weights, etc.) in the first machine learning model and training data from a second dataset.

[0466] In one embodiment, FIG37 is a flow chart of a control method for a power tool provided by an embodiment of the present application. This embodiment is applicable to the case of training and updating a model. The method can be executed by a control device of the power tool. The control device of the power tool can be implemented in the form of hardware and / or software and can be configured in the power tool. As shown in FIG37 , the method includes:

[0467] S310. While the power tool is working based on the initial machine learning model, raw data related to the working parameters of the power tool are collected through multiple sensors.

[0468] In one embodiment, the sensor may include, but is not limited to, at least one of the following: a temperature sensor, a humidity sensor, a voltage detection element, a current detection element, a Hall effect sensor, a torque sensor, and an image acquisition device. The temperature sensor is used to detect the temperature of the motor in the power tool; the Hall effect sensor can be used to estimate the speed of the motor in the power tool; the current detection element is used to detect the phase current or bus current of the motor in the power tool, or the excitation current id and torque current iq of the space vector pulse width modulation (SVPWM); and the image acquisition device is used to capture images of the environment in which the power tool is located. In one embodiment, a multidimensional Gibbs sampling method may be used for sampling, with the sampling frequency being at least twice the signal frequency.

[0469] Raw data refers to unprocessed data related to the power tool's operating parameters collected by multiple sensors. In embodiments, raw data may also be unprocessed sampled data. For example, raw data may include current; voltage; speed; load torque; motor temperature; known velocity loop (PI) loop parameters and duty cycle parameters, or the Id and Iq parameters of SVPWM; and output velocity loop parameters and duty cycle parameters, or the Id and Iq parameters of SVPWM.

[0470] S320: Crop or compress the original data to obtain processed target data.

[0471] In an embodiment, the original data may be cropped or compressed to obtain processed target data, so as to reduce the amount of data transmission.

[0472] In one embodiment, S320 includes S3201 to S3204:

[0473] S3201. Identify and extract similar sampled data, sampled data with missing values, and abnormal sampled data from the original data.

[0474] The actual distance difference between similar sampled data is less than a first distance difference threshold. In an embodiment, the sampled data includes vector data. The actual distance between two vector data items can be calculated to determine whether the actual distance is less than a first distance threshold. If so, the two vector data items are considered similar. Sampled data with missing values ​​refers to incomplete sampled data. Abnormal sampled data refers to sampled data that exhibits anomalies.

[0475] S3202: Perform a trimming operation on similar sampled data, sampled data with missing values, and abnormal sampled data to obtain corresponding candidate data.

[0476] In this embodiment, similar sampled data can be considered duplicate data, and a deletion operation can be performed on one of the sampled data. Sampled data with missing values ​​can be omitted from processing and storage, or directly deleted. For abnormal sampled data representing core parameters of power tools, such as current and speed, preliminary screening can be performed to delete the abnormal sampled data. Specifically, clustering or K-nearest neighbor methods can be used to eliminate useless samples and eliminate related features, thereby reducing the amount of data transmitted.

[0477] After trimming similar sampled data, sampled data with missing values, and abnormal sampled data, the corresponding candidate data can be obtained.

[0478] S3203: Identify and extract the associated sampled data and the sampled data whose current bytes exceed the byte threshold in the candidate data.

[0479] The associated sampling data refers to a plurality of sampling values ​​having a corresponding relationship. For example, there is a linear relationship between current and load torque. The sampling data whose current byte exceeds the byte threshold can be understood as data with a longer byte.

[0480] S3204: Perform compression operations on the associated sampled data and the sampled data whose current bytes exceed the byte threshold to obtain corresponding target data.

[0481] In this embodiment, associated data can be compressed. For example, if there is a linear relationship between current and load torque, it can be simplified to a single load torque or current, which is equivalent to dimensionality reduction. For sampled data whose current bytes exceed the byte threshold, mapping and table compression can be performed. For example, a current mapping is established, where 0x1 represents 10A and 0x02 represents 20A, to reduce the number of transmitted bytes.

[0482] S330. Transmit the target data to the cloud server so that the cloud server can train and update the initial machine learning model based on the target data.

[0483] In an embodiment, the power tool transmits the target data to a cloud server so that the cloud server trains and updates the initial machine learning model based on the target data.

[0484] S340. Obtain an updated machine learning model on the cloud server, and control the operation of the power tool based on the updated machine learning model.

[0485] In an embodiment, after the cloud server trains and obtains the updated machine learning model, the cloud server can actively send the updated machine learning model to the power tool, and the power tool can also actively pull the updated machine learning model from the cloud server and control the operation of the power tool based on the updated machine learning model.

[0486] In one embodiment, raw data related to the operating parameters of the power tool are collected by multiple sensors, including:

[0487] Determine the sampling phase corresponding to the sensor according to the current operating state of the power tool;

[0488] During the sampling phase, multiple sensors are used to collect raw data related to the operating parameters of the power tool. In an embodiment, the sampling phase corresponding to the sensor device can be specified based on the current operating state of the power tool. For example, only data from the power tool in the machine operating state can be sampled to avoid the impact of data from the startup state, braking state, or shutdown state on the training data corresponding to the operating state. Of course, the data from any of the startup state, braking state, or shutdown state can be used as a separate sampling phase. Then, the operating parameters of the power tool in this sampling phase are collected by multiple sensors to obtain the corresponding raw data.

[0489] In one embodiment, the control method of the power tool further includes:

[0490] Monitor the current error rate of the machine learning model;

[0491] When the current error rate reaches the first error rate threshold, a model warning prompt is issued and the retraining operation of the machine learning model is triggered simultaneously;

[0492] When the current error rate reaches a second error rate threshold, switch to a new machine learning model; wherein the second error rate threshold is greater than the first error rate threshold.

[0493] Among them, the current error rate refers to the deviation rate between the actual parameters output by the machine learning model and the pre-configured benchmark parameters. It can be understood that the higher the current error rate, the worse the prediction effect of the machine learning model. In an embodiment, the current error rate of the machine learning model currently used by the power tool is monitored periodically or in real time. When it is monitored that the current error rate reaches the first error rate threshold, a model early warning prompt can be issued to remind the user that the prediction effect of the machine learning model in the power tool is poor. At this time, the retraining operation of the machine learning model can be triggered to retrain the machine learning model; when it is monitored that the current error rate reaches the second error rate threshold, it indicates that the prediction effect of the machine learning model is very poor. Even if retraining is performed, a better prediction effect cannot be achieved. At this time, it can be directly replaced with a new machine learning model.

[0494] In another embodiment, the power tool may also trigger a retraining operation of the machine learning model by collecting user feedback or tool feedback. For example, the user may provide feedback on the control effect of the current machine learning model through a display screen or a remote device. Alternatively, the power tool comprehensively judges the control effect of the current machine learning model based on at least three of the actual speed, power, gear, current, operating time, efficiency, load, mode, and other information accumulated by the power tool under multiple operations. When it is judged based on the above data that the control of the power tool is not effective enough, that is, when the prediction effect of the machine learning model in the power tool is poor, a retraining operation of the machine learning model is triggered.

[0495] In one embodiment, the main memory capacity of the power tool is at least 16M bytes. In the embodiment, in order to ensure the data processing capability and data storage capability of the power tool, the main memory capacity of the power tool is at least 16M bytes. Of course, in actual operation, in order to ensure that the power tool can implement relevant algorithms such as environmental perception, deep learning, human-computer interaction, and decision control, and to avoid problems such as poor computing power, high power consumption, and high cost, the power tool needs to meet a computing rate greater than 600MIPS and power consumption less than 100mA. When the power tool itself has a high configuration, the operation of retraining the machine learning model can also be performed locally on the power tool, and does not necessarily have to be performed on a cloud server.

[0496] In one embodiment, the machine learning model is a neural network model. In an embodiment, when the initial machine learning model is a neural network model, the updated machine learning model is still a neural network model.

[0497] In one embodiment, the machine learning model is a support vector machine model. In an embodiment, when the initial machine learning model is a support vector machine model, the updated machine learning model is still a support vector machine model.

[0498] The machine learning model can also be one or more combinations of linear models, decision tree models, Bayesian classification, ensemble learning, clustering, dimensionality reduction and metric learning, reinforcement learning, and deep learning models.

[0499] In one embodiment, FIG38 is a flow chart of another method for controlling a power tool provided by an embodiment of the present application. As shown in FIG38 , the method includes:

[0500] S410: Collect working data of the power tool to form a training data set; the working condition distribution of data samples in the training data set is consistent with the working condition proportion actually required by the power tool.

[0501] S420. Select a machine learning model.

[0502] S430. Use the training data set to train the machine learning model and generate a machine learning control program.

[0503] S440: Store the machine learning control program in the memory of the power tool.

[0504] S450: Execute a machine learning control program, and control the motor of the power tool according to the output of the machine learning control program.

[0505] In order to solve the problem of overfitting or underfitting of machine learning control programs, it can be controlled from two perspectives: sample selection and training parameter restriction. Sample selection can be divided into horizontal record selection of samples (selecting which rows of samples) and vertical parameter selection (selecting which columns of samples). In an embodiment, the proportion of working conditions actually required by the power tool can be counted, and the working condition distribution of the data samples of the training data set can be determined based on the proportion of working conditions. Among them, the working condition is used to reflect the complexity of the actual scene in which the power tool is used. For example, the power tool is a lawn mower, and its working condition can be a flat road surface or a bumpy road surface; for another example, the power tool is an electric screwdriver, and its working condition can be a plane or a corner. For example, for different flat roads, bumpy roads, corners, planes, edge areas, and middle areas, the complexity of the corresponding functional requirements is different. For example, for different practical application scenarios, record entries corresponding to different working conditions such as starting, braking, sudden acceleration, constant speed, deceleration, and bumps can be selected proportionally from a large number of sample records according to the proportion of actual working condition requirements; for different functional requirements, different longitudinal parameter dimensions can be selected from parameters such as current, voltage, speed, load torque, motor temperature, or ambient temperature and humidity. For single functional requirements such as high power, high speed, heavy load, or long battery life, the input dimension is reduced, and the focus is on improving and maintaining the speed; for complex and comprehensive requirements, such as those that need to be combined with user habits, including the need to know the time or spatial scene, scene-based inputs such as temperature and humidity, acceleration, or video graphics scene judgment input, time input, and correspondingly increase the complexity of the model and the dimension of the sample. Among them, the time scene can refer to the time when the power tool is currently used, such as morning, noon, or night. The matching of data sample size, data input dimension, and training model, especially for offline or semi-offline training, is to achieve the best training effect (minimum generalization error) with the minimum training cost (minimum time, model, sample size, and input dimension).

[0506] Table 1 Relationship between functional requirements and dimension selection

[0507] For example, as shown in Table 1, when a power tool uses a single high-power function, the current and voltage of the power tool can be directly considered without considering parameters of other dimensions. For another example, when a power tool uses a single high-speed function, the speed of the power tool can be directly analyzed without analyzing parameters of other dimensions. For another example, when the power tool comprehensively considers user habits, such as meeting a certain level of comfort, various parameters such as ambient temperature and humidity, speed, and motor temperature can be considered. Of course, the various functions and analyzed dimensional parameters in Table 1 are only illustrative examples, and other possible combinations are also possible.

[0508] In one embodiment, the sample size of the training dataset is greater than or equal to 10,000. In this embodiment, to ensure the prediction effect of the machine learning model, the sample size of the training dataset used to train the machine learning model is at least greater than or equal to 10,000. Of course, in actual operation, the sample size of the training dataset can also be reconfigured according to the complexity of the power tool, and this is not limited to this.

[0509] In one embodiment, the operating mode of the power tool includes at least a first operating mode and a second operating mode;

[0510] The control method further includes: using data of m dimensions in the training dataset to generate a first machine learning control program, and controlling the first operating mode using the first machine learning control program; and using data of n dimensions in the training dataset to generate a second machine learning control program, and controlling the second operating mode using the second machine learning control program; m is less than n, and both m and n are positive integers. In an embodiment, the first operating mode can be understood as corresponding to a single functional requirement; the second operating mode can be understood as corresponding to a complex and comprehensive requirement. In an embodiment, the first operating mode can generate the first machine learning control program using data of fewer dimensions in the training dataset to meet the single functional requirement of the power tool; and the second operating mode can generate the second machine learning control program using data of more dimensions in the training dataset to meet the complex and comprehensive requirement.

[0511] In one embodiment, in the second operating mode, at least one characteristic of the power tool's operating environment is used as an input parameter for the second operating mode. In this embodiment, the second operating mode addresses complex and comprehensive needs. To ensure the user habits of the second power tool, one or more characteristics of the power tool's current actual operating environment may be used as input parameters for the second operating mode. A second machine learning control program may be generated using the one or more characteristics of the actual operating environment, and the second machine learning control program may then be used to control the second operating mode.

[0512] In one embodiment, the at least one characteristic of the working environment includes one of the following: humidity, temperature, and an environmental image. In this embodiment, the at least one characteristic of the working environment refers to an environmental parameter of the actual application scenario of the power tool. For example, it may be humidity, temperature, or an environmental image of the actual application scenario. The environmental image is used to represent parameters such as weather and usage location of the actual application scenario of the power tool.

[0513] In one embodiment, the penalty coefficient of the first machine learning control program is smaller than the penalty coefficient of the second machine learning control program. The penalty coefficient refers to the degree of penalty for classification errors. A larger penalty coefficient results in a better classifier, but is more prone to overfitting and poorer generalization. A smaller penalty coefficient results in enhanced generalization but slightly reduced accuracy. In this embodiment, for power tools with a single functional requirement controlled by the first machine learning control program, the penalty coefficient may be slightly smaller to ensure the generalization capability of the first machine learning control program. For power tools with complex, comprehensive requirements controlled by the second machine learning control program, the penalty coefficient may be slightly larger to ensure the classification effectiveness of the second machine learning control program.

[0514] In one embodiment, the penalty coefficient model includes one of the following: a support vector machine (SVM) model, a neural network model, a clustering model, a deep learning model, or a reinforcement learning model.

[0515] In one embodiment, the complexity of the power tool's operating condition distribution is proportional to the penalty coefficient. In this embodiment, the more complex the power tool's operating condition distribution, the greater the penalty coefficient. In this embodiment, when the power tool's operating condition distribution is more complex, the penalty coefficient is larger, which can ensure that the classification effect of the first machine learning model corresponding to the power tool is better; correspondingly, when the power tool's operating condition distribution is less complex, the penalty coefficient is smaller, which can ensure that the generalization ability of the second machine learning model corresponding to the power tool is better.

[0516] In one embodiment, the sample size in the power tool training dataset is proportional to the penalty coefficient. In one embodiment, the larger the sample size in the power tool training dataset, the larger the penalty coefficient. In one embodiment, the larger the sample size in the power tool training dataset, the more complex the distribution of operating conditions corresponding to the power tool, and accordingly, the larger the penalty coefficient.

[0517] In one embodiment, the complexity of the environment in which the power tool is located is proportional to the penalty coefficient. In one embodiment, the more complex the environment in which the power tool is located, the greater the penalty coefficient.

[0518] In the embodiment, assuming that the power tool uses M sample data and N-dimensional data, the loss function combined with the Elastic Net formula is as follows:

[0519] In an embodiment, different working conditions can be trained separately according to the working condition distribution of the power tool, and different penalty coefficients α and λ can be used; LOST represents loss, wherein α is the penalty coefficient corresponding to the working condition, and λ is the penalty coefficient corresponding to the sample size, and the thresholds of the two are [0,1]. For example, for complex and comprehensive requirements, the penalty proportional coefficient α is high, such as α>0.5; for single functional requirements, the penalty proportional coefficient α is low, such as α<0.5. For a small sample size, the penalty proportional coefficient λ is low, such as λ<0.5. Among them, the penalty proportional coefficient λ of the sample size has an optimal value, which minimizes LOST, and LOST increases from the minimum on both sides of the optimal value.

[0520] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of this application can be achieved. This is not limited herein.

[0521] The above specific embodiments do not constitute a limitation on the scope of protection of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors.

[0522] The above shows and describes the basic principles, main features and advantages of this application. Those skilled in the art should understand that the above embodiments do not limit this application in any form, and any technical solutions obtained by equivalent replacement or equivalent transformation fall within the scope of protection of this application.

Claims

1. A battery pack for powering an electric tool, comprising: case; A battery cell, contained in the housing; a sensor electrically connected to the battery cell, the sensor being configured to generate sensor data indicative of an operating parameter of the battery pack; and an electronic controller electrically connected to the sensor, the electronic controller comprising an electronic processor and a memory, the memory comprising a machine learning program for execution by the electronic processor, the electronic controller being configured to: receiving the sensor data, processing the sensor data using the machine learning program, the machine learning program comprising a trained neural network model, The machine learning program is used to generate an output based on the sensor data, the output indicating at least one of a state of charge (SoC), a state of temperature (SoT), a state of health (SoH), and a state of power (SoP) of the battery cell.

2. The battery pack for powering an electric tool according to claim 1, wherein: The neural network model is a physical knowledge embedded neural network model (PINN).

3. The battery pack for powering an electric tool according to claim 2, wherein: The physical embedded neural network (PINN) model uses the heat conduction partial differential equation as a constraint condition of the neural network.

4. The battery pack for powering an electric tool according to claim 1, wherein: The sensor data includes at least one of current data, voltage data, temperature data, and time data.

5. The battery pack for powering an electric tool according to claim 1, wherein: The neural network model is a deep neural network.

6. The battery pack for powering an electric tool according to claim 5, wherein: The electronic controller resamples a preset original data set to create enhanced samples and trains a series of extreme learning machines based on the samples.

7. The battery pack for powering an electric tool according to claim 1, wherein: The neural network model is a recurrent neural network.

8. The battery pack for powering an electric tool according to claim 1, wherein: Also included is a communication module, in which a machine learning control program is generated outside the battery pack through training based on preset sensor data and related outputs and is received by the communication module.

9. The battery pack for powering an electric tool according to claim 1, wherein: The battery pack is a detachable battery pack.

10. The battery pack for powering an electric tool according to claim 1, wherein: The battery pack is a rechargeable battery pack.

11. A battery pack for powering an electric tool, comprising: case; A battery cell, contained in the housing; A power tool interface, disposed on the housing and configured to be coupled to the power tool; a discharge circuit, electrically connected to the battery cell and the power tool interface, respectively, the discharge circuit being configured to transmit electric energy to the power tool via the power tool interface; a sensor electrically connected to the battery cell, the sensor being configured to generate sensor data indicative of an operating parameter of the battery pack; and a first electronic controller, the first electronic controller being used at least to control the discharge circuit, the electronic controller comprising an electronic processor and a memory, the memory comprising a machine learning program for execution by the electronic processor, the electronic controller being configured to: receiving the sensor data, Processing the sensor data using the machine learning program, An output is generated based on the sensor data using the machine learning program, and a protection threshold of the battery pack is adjusted based on the generated output.

12. The battery pack for powering an electric tool according to claim 11, wherein: The first electronic controller also includes a second machine learning program, which controls the discharge circuit based on a protection threshold of the battery pack.

13. The battery pack for powering an electric tool according to claim 11, wherein: The sensor data includes current data, voltage data, temperature data and time data.

14. The battery pack for powering an electric tool according to claim 11, wherein: The protection threshold includes at least one of an over-temperature protection threshold, an under-temperature protection threshold, an over-voltage protection threshold, an under-voltage protection threshold, and an over-current protection threshold.

15. The battery pack for powering an electric tool according to claim 11, wherein: The electronic controller controls the power supply from the battery pack to the power tool based on the protection threshold.

16. The battery pack for powering an electric tool according to claim 11, wherein: The protection threshold is sent to the power tool via the power tool interface, and the power tool controls power consumption of the power tool based on the protection threshold.

17. The battery pack for powering an electric tool according to claim 11, wherein: It also includes a second electronic controller, which is at least used to control the discharge circuit. The second electronic controller controls the discharge circuit based on a protection threshold of the battery pack.

18. The battery pack for supplying power to an electric tool according to claim 17, wherein: The second electronic controller includes a machine learning program.

19. The battery pack for powering an electric tool according to claim 17, wherein: The second electronic controller and the first electronic controller are arranged on the same circuit board.

20. The battery pack for powering an electric tool according to claim 17, wherein: The second electronic controller and the first electronic controller are arranged on different circuit boards.

21. A battery pack for powering an electric tool, comprising: case; A battery cell, contained in the housing; a power tool interface, disposed on the housing and configured to couple with and communicate with the power tool; a discharge circuit, electrically connected to the battery cell and the power tool interface, respectively, the discharge circuit being configured to transmit electric energy to the power tool via the power tool interface; and An electronic controller comprising an electronic processor and a memory, the memory comprising a machine learning program for execution by the electronic processor, the electronic controller being configured to: collecting working data from the power tool through the power tool interface, Processing the working data using the machine learning program, An output is generated based on the operating data using the machine learning program, and a discharge mode is selected and the discharge circuit is controlled based on the generated output.

22. The battery pack for powering an electric tool according to claim 21, wherein: The discharge modes include a performance mode, a power consumption mode and a balance mode.

23. The battery pack for powering an electric tool according to claim 21, wherein: The discharge mode includes a series mode and a parallel mode.

24. The battery pack for powering an electric tool according to claim 21, wherein: The machine learning program identifies the type of the power tool based on the operating data.

25. The battery pack for powering an electric tool according to claim 21, wherein: The machine learning program identifies usage habits of a user of the power tool based on the work data.

26. The battery pack for supplying power to an electric tool according to claim 21, wherein: The electronic controller controls the power supply from the battery pack to the power tool based on the discharge mode.

27. The battery pack for powering an electric tool according to claim 21, wherein: The discharge mode is sent to the power tool via the power tool interface, and the power tool controls power usage of the power tool based on the discharge mode.

28. The battery pack for powering an electric tool according to claim 21, wherein: Also included is a communication module, in which a machine learning control program is generated outside the battery pack through training based on preset sensor data and related outputs and is received by the communication module.

29. The battery pack for powering an electric tool according to claim 21, wherein: The machine learning control program is generated outside the battery pack by training based on preset sensor data and related outputs, and is sent to the battery pack by the power tool via the power tool interface.

30. The battery pack for powering an electric tool according to claim 21, wherein: Each discharge mode predefines parameter information such as discharge voltage, discharge current, maximum discharge current and discharge cut-off voltage and their combinations.

31. A battery pack comprising: case; A battery cell group, contained in the housing, the battery cell group comprising a plurality of battery cell monomers; a display device, disposed on the housing and configured to indicate a status of the battery pack; a sensor electrically connected to the battery cell group, the sensor being configured to generate sensor data indicative of an operating parameter of the battery pack; A circuit board, electrically connected to the battery cell group and the sensor, and having a plurality of electronic components arranged on the circuit board; an electronic controller, disposed on the circuit board, the electronic controller being electrically connected to the sensor, the electronic controller comprising an electronic processor and a memory, the memory comprising a machine learning program for execution by the electronic processor, the electronic controller being configured as follows: receiving the sensor data, Processing the sensor data using the machine learning program, generating an output based on the sensor data using the machine learning program, the generated output indicating a failure of the plurality of battery cells or the plurality of electronic components, and The display device is controlled to display an abnormal state according to the generated output.

32. The battery pack according to claim 31, wherein: The battery pack further includes a communication module, which is configured to establish a communication connection with a remote device. The electronic controller is further configured to: control the communication module to send the fault to the remote device based on the generated output.

33. The battery pack according to claim 32, wherein: The remote device is at least one selected from the group consisting of: a server, a smart phone, a tablet computer, and a laptop computer.

34. The battery pack according to claim 32, wherein: The communication module includes at least one device selected from the following group: Bluetooth, local area network, wireless, and cellular network.

35. The battery pack according to claim 31, wherein: The output includes cell impedance, cell temperature data, life warning, aging warning or installation fault warning.

36. The battery pack according to claim 31, wherein: The display device receives the control signal and conveys the status information to the user through a device that generates a visual signal or an auditory signal.

37. The battery pack according to claim 34, wherein: The display device includes an indicator light, a buzzer or a display screen.

38. The battery pack according to claim 31, wherein: The battery pack also includes: a power tool interface, which is arranged on the shell and is configured to couple with the power tool and communicate with the power tool. The electronic controller is also configured to: send the fault to the power tool through the power tool interface according to the generated output.

39. The battery pack according to claim 31, wherein: The battery pack also includes: a charging power tool interface, which is arranged on the shell and is configured to couple with a charger and enable the charger to charge the battery pack. The electronic controller is also configured to: send the fault to the charger through the power tool interface based on the generated output.

40. The battery pack according to claim 31, wherein: The electronic controller predicts battery lithium deposition, folding, and structural changes by implementing a neural network.

41. A battery pack comprising: case; A battery cell group, contained in the housing, the battery cell group comprising a plurality of battery cell monomers; A communication module, the communication module is configured to establish a communication connection with a remote device; a sensor electrically connected to the battery cell group, the sensor being configured to generate sensor data indicative of an operating parameter of the battery pack; A circuit board, electrically connected to the battery cell group and the sensor, and having a plurality of electronic components arranged on the circuit board; An electronic controller is arranged on the circuit board, the electronic controller is electrically connected to the sensor, the electronic controller includes an electronic processor and a memory, the memory includes a The electronic controller is configured to: receiving the sensor data, Processing the sensor data using the machine learning program, generating an output based on the sensor data using the machine learning program, the generated output indicating a failure of the plurality of battery cells or the plurality of electronic components, and The communication module is controlled according to the generated output to send the fault to the remote device.

42. The battery pack according to claim 41, wherein: The remote device is at least one selected from the group consisting of: a server, a smart phone, a tablet computer, and a laptop computer.

43. The battery pack according to claim 41, wherein: The communication module includes at least one device selected from the following group: Bluetooth, local area network, wireless, and cellular network.

44. An electronic combination comprising: Battery pack, including: case, A battery cell group, contained in the housing, the battery cell group comprising a plurality of battery cell units; and a sensor supported by the housing and configured to generate sensor data indicative of an operating parameter of the battery pack; A switch element, used to control an input current or an output current of the battery pack; and an electronic controller, the electronic controller being communicatively connected to the sensor, the electronic controller comprising an electronic processor and a memory, the memory comprising a first machine learning program and a second machine learning program for execution by the electronic processor, the electronic controller being configured to: receiving the sensor data, processing the sensor data using the first machine learning program and generating a first output based on the sensor data, processing the sensor data using the second machine learning program and generating a second output based on the sensor data, A third output is generated based on the first output and the second output, and the switch element is controlled based on the generated third output.

45. An electronic combination according to claim 44, wherein: The electronic controller is further configured to adjust a protection threshold based on the first output, and determine whether to charge the battery pack based on a comparison result between the second output and the protection threshold.

46. ​​The electronic combination of claim 44, wherein: The electronic controller is further configured to adjust a protection threshold based on the first output, and adjust a charging state of the battery cell group based on a calculation result of the second output and the protection threshold.

47. The electronic combination of claim 44, wherein: The electronic controller is further configured to adjust a protection threshold based on the first output, and determine whether to discharge the battery cell group based on a comparison result between the second output and the protection threshold.

48. The electronic combination of claim 44, wherein: The electronic controller is further configured to adjust a protection threshold based on the first output, and adjust a discharge state of the battery cell group based on a calculation result of the second output and the protection threshold.

49. The electronic combination of claim 45, wherein: The protection threshold is at least one of an overvoltage protection threshold, an undervoltage protection threshold, an overcurrent protection threshold, or an overtemperature protection threshold.

50. The electronic combination of claim 44, wherein: The switch element and the electronic controller are arranged in a battery pack.

51. The electronic combination of claim 44, wherein: The electronic controller is arranged in the battery pack.

52. The electronic combination of claim 44, wherein: The switch element and the electronic controller are arranged outside the battery pack.

53. The electronic combination of claim 44, wherein: The electronic controller is arranged outside the battery pack.

54. A battery management system comprising: a wireless communication device configured to support at least one wireless communication protocol; an electronic controller electrically connected to the wireless communication device, comprising an electronic processor and a memory, the memory comprising a machine learning program for execution by the electronic processor; A plurality of groups of battery cell modules, each group of battery cell modules comprising at least one battery cell, a slave controller, a sensor, a wireless communication module and a bypass circuit; Wherein, the slave controller is electrically connected to the sensor and the wireless communication module respectively, and the slave controller is configured as follows: receiving sensor data generated by the sensor indicating an operating parameter of the at least one battery cell, and sending the sensor data to the electronic controller via the wireless communication module; and Acquiring return information from the electronic controller through the wireless communication module, and controlling the bypass circuit based on the return information; The electronic controller is configured to: Receiving the sensor data of the multiple groups of battery cell modules from the multiple groups of battery cell modules through the wireless communication device; The machine learning program is used to process the sensor data of the plurality of battery cell modules, wherein the machine learning program is a trained machine learning model, Based on the sensor data of the plurality of battery cell modules, using the machine learning program to generate the return information; and The return information is sent to the slave controller via the wireless communication device.

55. The battery management system according to claim 54, wherein: The on / off of the bypass circuit controls whether current flows through the battery cell module.

56. The battery management system according to claim 54, wherein: The wireless communication device and the wireless communication module support Bluetooth communication protocol, infrared or NFC communication.

57. The battery management system according to claim 54, wherein: The wireless communication device also supports wifi or cellular network.

58. The battery management system according to claim 54, wherein: The machine learning control program is generated outside the battery pack through training based on preset sensor data and related outputs, and is received by the wireless communication device.

59. The battery management system according to claim 54, wherein: The wireless communication device is configured to wirelessly receive machine learning program updates from an external system device, the machine learning program is an adjustable machine learning program, and the machine learning controller is configured to update the machine learning program based on the updates to the machine learning program.

60. The battery management system according to claim 54, wherein: The wireless communication device, the electronic controller, and the multiple battery cell modules are arranged in a shell of a battery pack.

61. The battery management system according to claim 54, wherein: The wireless communication device and the electronic controller are arranged in a housing of an electric tool, and the multiple groups of battery cell modules are arranged in a housing of a battery pack, and the battery pack supplies power to the electric tool.

62. The battery management system according to claim 54, wherein: The multiple groups of battery cell modules are arranged in a shell of a battery pack, the wireless communication device and the electronic controller are arranged in a shell of a charger, and the charger charges the battery pack.

63. The battery management system according to claim 54, wherein: The multiple groups of battery cell modules are arranged in a shell of a battery pack, the wireless communication device and the electronic controller are arranged in an external device, and the external device is communicatively connected with the battery pack.

64. A charger, comprising: case; A battery pack interface, disposed on the housing, and used for coupling with a battery pack; a charging circuit, configured to be electrically connected to the battery pack interface and charge the battery pack; and An electronic controller, comprising an electronic processor and a memory, wherein the memory stores a machine learning program executable by the electronic processor, the machine learning program comprising a vector model and a plurality of reference vectors; Wherein, the electronic controller is configured as follows: Recording charging data of the battery pack charged by the charging circuit; Vectorize the charging data using the vector model to obtain a charging feature vector of the battery pack; Calculating the distance between the charging characteristic vector and each reference vector respectively; An aging parameter corresponding to a reference vector with the smallest distance is selected as an aging evaluation value of the battery pack.

65. The charger according to claim 64, wherein: The charging data includes charging time, ambient temperature, charging voltage, charging current, charging temperature, state of charge (SoC) of the battery pack, single cell voltage, single cell voltage mean, single cell voltage standard deviation, maximum single cell voltage, minimum single cell voltage, maximum-minimum single cell voltage difference of each battery cell in the battery pack, and at least one of the measured temperature, measured temperature mean, measured temperature standard deviation, maximum measured temperature, minimum measured temperature, and maximum-minimum measured temperature difference at each temperature measurement point in the battery pack.

66. The charger according to claim 64, wherein: The aging parameter is the state of health (SoH) of the battery pack.

67. The charger according to claim 66, wherein: The electronic controller is further configured to: use an average value of a plurality of the charging characteristic vectors in the same SoH interval as a reference vector corresponding to the SoH interval.

68. The charger according to claim 64, wherein: The aging parameter is the remaining maximum capacity and / or the DC internal resistance of the battery pack.

69. The charger according to claim 64, wherein: The battery pack interface includes a positive terminal, a negative terminal and a communication terminal.

70. The charger according to claim 69, wherein: The electronic controller is further configured to transmit the aging assessment value of the battery pack to the battery pack through the communication terminal.

71. The charger according to claim 64, wherein: The battery pack is detachably connected to the electric tool and supplies power to the electric tool.

72. A charger according to claim 64 or 71, wherein: The charger also includes a communication module, which is communicatively connected to the remote device and electrically connected to the electronic controller; the electronic controller is also configured to transmit the aging assessment value of the battery pack to the remote device or the electric tool via the communication module.

73. The charger according to claim 64, wherein: The vector model includes a twin network model.

74. A battery pack for powering an electric tool, comprising: case; A battery cell, contained in the housing; a sensor assembly electrically connected to the battery cell and configured to generate sensor data indicative of an operating parameter of the battery pack; and an electronic controller, electrically connected to the sensor assembly, comprising an electronic processor and a memory, wherein the memory stores a machine learning program executable by the electronic processor; Wherein, the electronic controller is configured as follows: receiving the sensor data, wherein the sensor data includes first-category sensor data and second-category sensor data; generating a predicted temperature rate of change of the battery pack based on the first type of sensor data using the machine learning program; Calculating a measured temperature change rate of the battery pack based on the second type of sensor data; When the measured temperature change rate is greater than the predicted temperature change rate, a thermal runaway risk of the battery pack is prompted.

75. The battery pack according to claim 74, wherein: The electronic controller is configured to indicate that the thermal runaway risk level of the battery pack is high when the difference between the real-time temperature change rate and the predicted temperature change rate is greater than or equal to a first temperature difference threshold.

76. The battery pack according to claim 75, wherein: The electronic controller is configured to indicate that the thermal runaway risk level of the battery pack is medium when the difference between the real-time temperature change rate and the predicted temperature change rate is less than the first temperature difference threshold but greater than or equal to the second temperature difference threshold.

77. The battery pack according to claim 76, wherein: The electronic controller is configured to indicate that the thermal runaway risk level of the battery pack is low when the difference between the real-time temperature change rate and the predicted temperature change rate is less than the second temperature difference threshold.

78. The battery pack according to claim 74, wherein: The first category of sensor data includes the voltage, current, temperature, state of charge (SoC) of the battery pack and at least one of the working state, operating time, motor speed, and output power of the power tool.

79. The battery pack according to claim 74, wherein: The second type of sensor data includes the measured temperature at one or more temperature measurement points in the battery pack.

80. The battery pack according to claim 74, wherein: The first category of sensor data partially overlaps with the second category of sensor data.

81. The battery pack according to claim 74, wherein: The machine learning program includes a random forest model.

82. The battery pack according to claim 74, wherein: The battery pack also includes one or more risk indicator lights; the electronic controller is also electrically connected to the risk indicator lights and is configured to: based on the current thermal runaway risk level of the battery pack, light up the risk indicator lights corresponding to the thermal runaway risk level.

83. The battery pack according to claim 74, wherein: The battery pack also includes a communication module, which is communicatively connected to a remote device and electrically connected to the electronic controller; the electronic controller is further configured to transmit a current thermal runaway risk level of the battery pack to the remote device via the communication module.

84. A method for constructing a battery pack failure prediction model, wherein: The battery pack is used to power an electric tool, and the construction method includes: Data acquisition, acquiring usage data of the battery pack and working data of the electric tool; Data preprocessing, performing at least one of data cleaning, data integration and data correction on the usage data and the working data to obtain streaming data based on time series; Feature extraction, using a sliding window to extract and reprocess the streaming data to obtain corresponding feature data; Model construction: Based on the fault prediction target, the corresponding machine learning model is selected to establish the corresponding battery pack fault prediction model; Training and verification: using the characteristic data to train the battery pack fault prediction model, and verifying, evaluating and optimizing the trained battery pack fault prediction model.

85. The method of claim 84, wherein: Before data preprocessing, the method also includes: data analysis, performing feature analysis on the usage data and the working data before and after the battery pack failure occurs, determining potential factors related to the battery pack failure, and subsequent data preprocessing and feature extraction are performed based on the potential factors.

86. The method of claim 84, wherein: The model construction includes: when the fault prediction target is to predict the duration of the battery pack to fail, selecting a regression model to establish the battery pack fault prediction model.

87. The method of claim 84, wherein: The model construction includes: when the fault prediction target is to predict the type of the battery pack failure to occur, selecting a classification model to establish the battery pack failure prediction model.

88. The method of claim 84, wherein: The model construction includes: when the fault prediction target is to predict the probability of the battery pack to fail, selecting a regression model to establish the battery pack fault prediction model.

89. The method according to any one of claims 86 to 88, wherein The classification models include logistic regression models, boosted decision trees, decision forests, neural network models, support vector machines and K nearest neighbor models; the regression models include Poisson regression models, boosted decision tree regression models, decision forest regression models and neural network regression models.

90. The method of claim 84, wherein: The training validation includes: using the feature data to cross-validate the battery pack failure prediction model to optimize the battery pack failure prediction model.

91. The method of claim 84, wherein: The training verification includes: determining the accuracy, error rate and recall rate of each battery pack fault prediction model, and determining the best battery pack fault prediction model based on the accuracy, error rate and recall rate, so as to select the best battery pack fault prediction model in the subsequent selection.

92. The method of claim 84, wherein: The usage data of the battery pack includes at least one of the voltage, current, state of charge (SoC), full voltage difference of the battery pack, the single cell voltage of each battery cell in the battery pack, and the measured temperature at each temperature measuring point in the battery pack.

93. The method of claim 84, wherein: The working data of the electric tool includes at least one of the working state, operating time, motor speed, and output power of the electric tool.

94. A method for constructing a battery pack life assessment model, wherein: The battery pack is used to power an electric tool, and the construction method includes: Data acquisition, acquiring usage data of the battery pack; Data preprocessing, performing at least one of data cleaning, data integration and data correction on the usage data; Feature engineering processing, using a sliding window to extract and reprocess the pre-processed usage data to obtain a relevant feature sequence; Model construction, select a suitable machine learning model to fit the relevant feature sequence with the target health state (SoH), set evaluation indicators and evaluate the current health state (SoH) and future health state (SoH) Make predictions.

95. The method of claim 94, wherein: The machine learning models include linear models, decision tree models, support vector machine models, Bayesian models, clustering models, neural network models, dimensionality reduction and metric learning, ensemble learning, reinforcement learning, and deep learning models.

96. The method of claim 94, wherein: The usage data of the battery pack includes at least one of the voltage, current, state of charge (SoC) of the battery pack, the single cell voltage of each battery cell in the battery pack, and the measured temperature at each temperature measurement point in the battery pack.

97. The method of claim 94, wherein: The data cleaning includes data deduplication, outlier removal, missing value filling, noise reduction and conversion.

98. The method of claim 94, wherein: The feature engineering process also includes: dividing the usage data into multiple charging processes; using the ampere-hour integration method to calculate the capacity change process of the battery pack in each charging process for a fixed voltage range; converting the capacity change process into the change process of the target SoH, and determining the corresponding relationship between the usage data and the target SoH.

99. The method of claim 98, wherein: The model construction includes: selecting a linear regression model to fit the relevant feature sequence with the corresponding target SoH to obtain a machine learning model for predicting the current SoH of the battery pack.

100. The method of claim 98, wherein: The model construction includes: determining a historical SoH sequence and a future SoH sequence according to the change process of the target SoH; selecting an LSTM model to fit the historical SoH sequence with the future SoH sequence to obtain a machine learning model for predicting the future SoH of the battery pack.

101. The method of claim 94, wherein: The feature engineering processing includes: generating a temperature difference sequence of the same temperature measuring point based on the measured temperature at the same temperature measuring point; generating a temperature difference sequence between temperature measuring points based on the measured temperatures at different temperature measuring points; and generating a temperature increment sequence corresponding to a unit SoC based on the measured temperatures at each temperature measuring point.

102. The method according to claim 101, wherein: The model construction includes: selecting an LSTM model or an XGBoost model to fit at least one of the temperature difference sequence of the temperature measurement points, the temperature difference sequence between the temperature points, and the temperature increment sequence with the target SoH to obtain a machine learning model for predicting the current SoH of the battery pack.

103. The method of claim 94, wherein: The construction method also includes: verifying, evaluating and optimizing the battery pack life assessment model based on the evaluation index and at least one of the accuracy, precision and recall rate of the model.

104. An electric tool system, comprising: The first electric tool, including: Motor; an electronic controller, the electronic controller comprising an electronic processor and a memory, the memory comprising a first machine learning control program for execution by the electronic processor, the first machine learning control program being a trained first machine learning model; the electronic controller being configured to control the motor through the first machine learning control program; The second electric tool comprises: Motor; an electronic controller, the electronic controller comprising an electronic processor and a memory, the memory comprising a second machine learning control program for execution by the electronic processor, the second machine learning control program being a trained second machine learning model; the electronic controller being configured to control the motor via the second machine learning control program; Among them, the first machine learning model is generated based on a first data set training related to the operation of the first power tool; the second machine learning model is generated based on the first machine learning model and a second data set training related to the operation of the second power tool.

105. The system of claim 104, wherein: The first machine learning model and the second machine learning model are one or more combinations of linear models, decision tree models, neural network models, support vector machine models, Bayesian classification, ensemble learning, clustering, dimensionality reduction and metric learning, reinforcement learning, and deep learning models.

106. The system of claim 104, wherein: The sample size of the first data set is greater than or equal to N times the sample size of the second data set; wherein N is greater than or equal to 2.

107. The system of claim 104, wherein: The first electric tool and the second electric tool act on the same object.

108. The system of claim 104, wherein: The first electric tool and the second electric tool act on different objects.

109. The system of claim 104, wherein: The first electric tool is an electric drill, and the second electric tool is an electric screwdriver.

110. The system of claim 104, wherein: The first electric tool is a handheld sander, and the second electric tool is a sanding robot.

111. The system of claim 104, wherein: The first electric tool is a handheld construction electric tool, and the second electric tool is a construction robot.

112. The system of claim 104, wherein: The motor of the first electric tool is the same as the motor of the second electric tool.

113. The system of claim 104, wherein: The motor of the first electric tool is different from the motor of the second electric tool.

114. An electric tool system, comprising: The first electric tool, including: Motor; A wireless communication module is configured to wirelessly transmit data with other devices, an electronic controller, the electronic controller comprising an electronic processor and a memory, the memory comprising a first machine learning control program for execution by the electronic processor, the electronic controller being configured to control the motor via the first machine learning control program; The second electric tool comprises: Motor; A wireless communication module is configured to wirelessly transmit data with other devices, An electronic controller, the electronic controller comprising an electronic processor and a memory, the electronic controller being used at least to control the motor; Among them, the wireless communication module of the first electric tool sends the first machine learning control program to the wireless communication module of the second electric tool; the electronic controller of the second electric tool is configured to: generate a second machine learning control program based on the first machine learning model and data training related to the operation of the second electric tool, and store the second machine learning control program in the memory.

115. The system of claim 114, wherein: The first machine learning model and the second machine learning model are one or more combinations of linear models, decision tree models, neural network models, support vector machine models, Bayesian classification, ensemble learning, clustering, dimensionality reduction and metric learning, reinforcement learning, and deep learning models.

116. The system of claim 114, wherein: The electronic controller of the second power tool is also configured to control the motor through the second machine learning control program.

117. The system of claim 114, wherein: The first electric tool and the second electric tool act on the same object.

118. The system of claim 114, wherein: The first electric tool and the second electric tool act on different objects.

119. The system of claim 114, wherein: The first electric tool is an electric drill, and the second electric tool is an electric screwdriver.

120. The system of claim 114, wherein: The first electric tool is a push lawn mower, and the second electric tool is a riding lawn mower or a lawn mowing robot.

121. The system of claim 114, wherein: The first electric tool is a lawn mower, and the second electric tool is a snow blower.

122. The system of claim 114, wherein: The motor of the first electric tool is the same as the motor of the second electric tool.

123. The system of claim 114, wherein: The motor of the first electric tool is different from the motor of the second electric tool.

124. A method for controlling an electric tool, wherein: include: a sampling step of collecting raw data related to working parameters of the power tool through a plurality of sensors while the power tool is working based on the initial machine learning model; A processing step of cutting or compressing the original data to obtain processed target data; A transmission step, transmitting the target data to a cloud server, so as to train and update the initial machine learning model based on the target data through the cloud server; The step of obtaining is to obtain the updated machine learning model on the cloud server and control the operation of the power tool based on the updated machine learning model.

125. The control method according to claim 124, wherein: The collecting of raw data related to the working parameters of the electric tool by multiple sensors includes: Determining a sampling phase corresponding to the sensor according to the current operating state of the electric tool; During the sampling phase, raw data related to the working parameters of the electric tool are collected by multiple sensors.

126. The control method according to claim 124, wherein: The clipping or compressing of the original data to obtain processed target data comprises: Identify and extract similar sampled data, sampled data with missing values, and abnormal sampled data from the original data; Performing a trimming operation on the similar sampled data, the sampled data with missing values, and the abnormal sampled data to obtain corresponding candidate data; Identify and extract the associated sampled data and the sampled data whose current byte exceeds the byte threshold in the candidate data; The associated sampled data and the sampled data whose current byte exceeds the byte threshold are compressed. to obtain the corresponding target data.

127. The control method according to claim 124, wherein: Also includes: A monitoring step, monitoring a current error rate of the machine learning model; A retraining step, when the current error rate reaches a first error rate threshold, a model early warning prompt is issued, and a retraining operation of the machine learning model is simultaneously triggered; A switching step, when the current error rate reaches a second error rate threshold, switching to a new machine learning model; wherein the second error rate threshold is greater than the first error rate threshold.

128. The control method according to claim 126, wherein: The actual distance difference value of the similar sampled data is less than the first distance difference threshold.

129. The control method according to claim 126, wherein: The main memory capacity of the electric tool is at least 16M bytes.

130. The control method according to claim 124, wherein: The machine learning model is a linear model, a decision tree model, a neural network model, a support vector machine model, a Bayesian classification, an integrated learning, a clustering, a dimensionality reduction and metric learning, a reinforcement learning, and a deep learning model.

131. The control method according to claim 124, wherein: The sensor includes a temperature sensor and a current detection element.

132. The control method according to claim 124, wherein: The sensor includes an image acquisition device.

133. A method for controlling an electric tool, comprising: Collecting working data of the power tool to form a training data set; Select a machine learning model; Using the training data set, training the machine learning model to generate a machine learning control program; storing the machine learning control program in a memory of the power tool; executing the machine learning control program and controlling the motor of the power tool according to the output of the machine learning control program; The operating condition distribution of the data samples of the training data set is consistent with the operating condition proportion actually required by the electric tool.

134. The control method according to claim 133, wherein: The sample size of the training data set is greater than or equal to 10,000.

135. The control method according to claim 133, wherein: The working mode of the electric tool includes at least a first working mode and a second working mode; The control method also includes: using the data of m dimensions in the training data set to generate a first machine learning control program, and the first working mode is controlled by the first machine learning control program; using the data of n dimensions in the training data set to generate a second machine learning control program, and the second working mode is controlled by the second machine learning control program; m is less than n, and both m and n are positive integers.

136. The control method according to claim 135, wherein: In the second working mode, at least one feature in the working environment of the power tool is used as an input parameter of the second working mode.

137. The control method according to claim 136, wherein: The at least one characteristic of the working environment includes one of the following options: humidity, temperature, and environmental image.

138. The control method according to claim 135, wherein: The penalty coefficient of the first machine learning control program is smaller than the penalty coefficient of the second machine learning control program.

139. The control method according to claim 135, wherein: The penalty coefficient model includes one of the following: SVM model, neural network model, clustering model, deep learning or reinforcement learning model.

140. The control method according to claim 135, wherein: The complexity of the operating condition distribution of the electric tool is proportional to the penalty coefficient.

141. The control method according to claim 135, wherein: The sample size in the training data set of the power tool is proportional to the penalty coefficient.

142. The control method according to claim 135, wherein: The complexity of the environment in which the electric tool is located is proportional to the penalty coefficient.

Citation Information

Patent Citations

  • Battery pack

    CN119153812A

  • Power battery aging degree judgment method

    CN112345952A

  • Power tool including a machine learning block for

    CN114423568A

  • Battery health state information determination method and device and battery system

    CN114675188A

  • Power tool including a machine learning block for controlling field weaken of a permanent magnet motor

    WO2022232434A1

Cited By

  • Fast charging optimization method of FFC connector and related device

    CN119727054A

  • Lithium ion battery thermal runaway early warning method for fast charging scene

    CN119783545A

  • Sodium-ion battery dynamic discharge strategy optimization system and method based on reinforcement learning

    CN119805252A

  • Charger with battery heating function

    CN119966045A

  • AI-based business system data violation operation behavior identification method and system

    CN120086578A