Battery power prediction methods, devices and electronic equipment

By introducing a gated recurrent neural network for battery power prediction, and utilizing the weight adjustment of the update and reset gates combined with an attention mechanism, the problem of inaccurate battery power prediction due to performance degradation and aging is solved, achieving more accurate power prediction.

CN117171511BActive Publication Date: 2026-03-06BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310906637.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-21
Publication Date
2026-03-06
Estimated Expiration
2043-07-21

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately predict the charge level of aging batteries during discharge, as unstable discharge current and unpredictable internal chemical reactions lead to significant deviations in charge level prediction.

Method used

A battery power prediction method based on a gated recurrent neural network is adopted. By adjusting the weights of the updated and reset gates and combining an attention mechanism, the power prediction is performed by utilizing the importance of the battery's discharge characteristics at different times.

Benefits of technology

It improves the accuracy of battery power prediction, captures the discharge characteristics of the battery at different times during the discharge process, and provides more accurate power prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117171511B_ABST
    Figure CN117171511B_ABST
Patent Text Reader

Abstract

This application provides a battery power prediction method, apparatus, and electronic device. Based on the power prediction result from the previous moment and a first weight, an update gate is obtained. Using the operating parameters at the current moment and a second weight, updated operating parameters for the current moment are obtained. Based on the power prediction result from the previous moment, a reset gate, and a third weight, an updated reset gate is obtained. Based on the updated operating parameters for the current moment and the updated reset gate, an updated power prediction result is obtained. Based on the update gate, the power prediction result from the previous moment, and the updated power prediction result, the battery power prediction result for the current moment is obtained. This method, based on the update gate, the power prediction result from the previous moment, and the updated power prediction result, utilizes the varying importance of the battery's discharge characteristics at different times during discharge, thereby making the obtained battery power prediction result for the current moment more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of energy management technology, and in particular to a battery power prediction method, device and electronic device. Background Technology

[0002] With the increasing demand for energy storage, more and more batteries are being used for base station energy storage. To meet the energy storage requirements, it is necessary to predict the battery capacity.

[0003] Since batteries inevitably undergo a performance degradation and aging process during use, the discharge current of batteries that have experienced performance degradation and aging is very unstable during actual discharge. In addition, there are unpredictable chemical reactions inside the battery, making it difficult to accurately predict the battery's capacity. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a battery power prediction method, device and electronic device to solve the above-mentioned technical problems.

[0005] To achieve the above objectives, the first aspect of this application provides a battery power prediction method, comprising:

[0006] The battery power prediction result of the previous time step is obtained at the current time step, the first weight corresponding to the update gate of the pre-trained battery power prediction model, the battery operating parameters at the current time step, the second weight corresponding to the operating parameters at the current time step, the reset gate of the battery power prediction model and the third weight corresponding to the reset gate of the battery power prediction model at the current time step, wherein the power prediction result of the previous time step step is obtained through the battery power prediction model.

[0007] Based on the previous energy prediction result and the first weight, the update gate is obtained;

[0008] Using the current operating parameters and the second weight, the updated operating parameters for the current time are obtained;

[0009] Based on the previous power prediction result, the reset gate, and the third weight, the updated reset gate is obtained;

[0010] Based on the updated operating parameters at the current moment and the updated reset gate, the updated power prediction result is obtained;

[0011] Based on the update gate, the battery power prediction result from the previous time step, and the updated battery power prediction result, the battery power prediction result for the current time step is obtained.

[0012] Optionally, obtaining the updated power prediction result based on the updated operating parameters at the current time and the updated reset gate includes:

[0013] The updated current operating parameters and the updated reset gate are weighted and summed to obtain the weighted summation result.

[0014] The updated power prediction result is obtained by applying the weighted summation calculation result to the hyperbolic tangent function.

[0015] Optionally, before performing a weighted summation calculation on the updated current-time running parameters and the updated reset gate to obtain the weighted summation result, the method further includes:

[0016] Obtain the weight parameters corresponding to the updated reset gate and the battery's operating state parameters from the previous moment to the current moment;

[0017] Based on the current running state parameters and the previous running state parameters, the Euclidean distance is obtained using the Euclidean distance function.

[0018] The Euclidean distance is adjusted using an adjustment function to obtain an adjustment value;

[0019] Based on the adjusted value and the updated weight parameters of the reset gate, the weight parameters corresponding to the updated running parameters at the current moment are obtained through the attention mechanism relationship function.

[0020] The adjustment function is specifically as follows:

[0021] k h =sin((tanhρ)π)

[0022] Where, k h ρ represents the adjustment value, π represents the Euclidean distance, π represents pi, tanh represents the hyperbolic tangent function, and sin represents the tangent function.

[0023] The attention mechanism relation function is specifically as follows:

[0024] α=β(k h +1)

[0025] Where α represents the weight parameter corresponding to the updated operating parameters at the current time, β represents the weight parameter corresponding to the updated reset gate, and k h This indicates the adjustment value.

[0026] Optionally, obtaining the updated reset gate based on the previous time-to-date power prediction result, the reset gate, and the third weight includes:

[0027] Based on the previous time-to-time power prediction result, the reset gate, and the third weight, the updated reset gate function is used to obtain the updated reset gate.

[0028] The updated reset gate function is specifically as follows:

[0029] r h =U h (r t ⊙h t-1 )

[0030] Where, r h This refers to the updated reset door, U h Represents the third weight, r t This refers to the reset gate, h t-1 This indicates the predicted power consumption result at the previous moment.

[0031] Optionally, obtaining the reset gate for the battery power prediction model includes:

[0032] Obtain the fourth weight of the reset gate in the battery power prediction model;

[0033] Based on the previous time-to-time energy prediction result and the fourth weight, a reset gate is obtained through a reset gate function;

[0034] The reset gate function is specifically:

[0035] r t =σ(U r h t-1 +b r )

[0036] Where, r t This represents the reset gate, σ represents the S-shaped growth curve (sigmoid function), and U... r Represents the fourth weight, h t-1 b represents the predicted power level at the previous moment. r This indicates a reset of the door deviation.

[0037] Optionally, the first training set used to pre-train the battery power prediction model includes multiple first-stage training data and multiple second-stage training data. The first-stage training data includes a first voltage, a first current, and a first temperature, and the second-stage training data includes a second voltage, a second current, and a second temperature.

[0038] Optionally, the battery power prediction model is trained based on the similarity between the multiple first-stage training data and the multiple second-stage training data, after transferring the parameters of the pre-built first initial model to the pre-built second initial model, and determining the network structure layers in the second initial model to be frozen.

[0039] Optionally, the similarity between the plurality of first-stage training data and the plurality of second-stage training data is calculated based on a similarity function, wherein the similarity function is specifically:

[0040]

[0041] Where s represents similarity, T0 represents the average operating temperature of the plurality of first-stage training data, T′0 represents the average operating temperature of the plurality of second-stage training data, Q0 represents the average rated capacity of the plurality of first-stage training data, Q′0 represents the average rated capacity of the plurality of second-stage training data, a represents the first compensation coefficient, and b represents the second compensation coefficient.

[0042] A second aspect of this application provides a battery power prediction device, comprising:

[0043] The acquisition module is configured to acquire the battery power prediction result of the previous time step at the current time step, the first weight corresponding to the update gate of the pre-trained battery power prediction model, the battery operating parameters at the current time step, the second weight corresponding to the operating parameters at the current time step, the reset gate of the battery power prediction model, and the third weight corresponding to the reset gate of the battery power prediction model at the current time step, wherein the battery power prediction result of the previous time step step is obtained through the battery power prediction model.

[0044] The update gate acquisition module is configured to obtain the update gate based on the power prediction result of the previous time step and the first weight;

[0045] The first update module is configured to use the current running parameters and the second weight to obtain the updated current running parameters.

[0046] The second update module is configured to obtain an updated reset gate based on the power prediction result of the previous time step, the reset gate, and the third weight.

[0047] The third update module is configured to obtain the updated power prediction result based on the updated operating parameters at the current time and the updated reset gate;

[0048] The power prediction result acquisition module is configured to obtain the power prediction result of the battery at the current moment based on the update gate, the power prediction result of the previous moment, and the updated power prediction result.

[0049] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.

[0050] As can be seen from the above, the battery power prediction method, apparatus, and electronic device provided in this application obtain an update gate based on the power prediction result of the previous moment and a first weight. Using the operating parameters of the current moment and a second weight, the updated operating parameters of the current moment are obtained. Based on the power prediction result of the previous moment, a reset gate, and a third weight, an updated reset gate is obtained. Based on the updated operating parameters of the current moment and the updated reset gate, an updated power prediction result is obtained. Based on the update gate, the power prediction result of the previous moment, and the updated power prediction result, the battery power prediction result at the current moment is obtained. This method, based on the update gate, the power prediction result of the previous moment, and the updated power prediction result, utilizes the importance of the discharge characteristics of the battery at different moments during discharge, thereby making the obtained battery power prediction result at the current moment more accurate. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a flowchart illustrating the battery power prediction method according to an embodiment of this application.

[0053] Figure 2A This is a schematic diagram of the battery power prediction model structure according to an embodiment of this application;

[0054] Figure 2B This is a schematic diagram of the battery power prediction model training framework according to an embodiment of this application;

[0055] Figure 3 This is a schematic diagram of the battery power prediction device according to an embodiment of this application;

[0056] Figure 4 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0058] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0059] In related technologies, batteries inevitably undergo a performance degradation and aging process during use. When batteries experience performance degradation and aging, the discharge current is very unstable during actual discharge, and there are also unpredictable chemical reactions inside the battery. Therefore, this can lead to a large deviation in the prediction of battery capacity.

[0060] Embodiments of this application provide a battery power prediction method. Based on an update gate, the power prediction result from the previous time step, and the updated power prediction result, it utilizes the importance of the battery's discharge characteristics at different times during discharge, thereby making the battery power prediction result at the current time step more accurate. Figure 1 As shown, it includes:

[0061] Step 101: Obtain the battery power prediction result of the previous time step at the current time step, the first weight corresponding to the update gate of the pre-trained battery power prediction model, the battery operating parameters at the current time step, the second weight corresponding to the operating parameters at the current time step, the reset gate of the battery power prediction model, and the third weight corresponding to the reset gate of the battery power prediction model at the current time step. The battery power prediction result of the previous time step is obtained through the battery power prediction model.

[0062] In practice, the battery type can be lithium battery, storage battery, lead-acid battery, sodium-sulfur battery, flow battery, nickel-cadmium battery, or vanadium battery.

[0063] The battery can be a new battery that has not been used before, or a second-hand battery. Second-hand batteries are preferred here. Second-hand batteries are batteries whose performance has degraded and is no longer sufficient to meet the current application power requirements of the equipment, but the battery is not broken. After some repair and adjustment, they can be used in equipment that uses a downgraded battery.

[0064] Operating parameters indicate the battery's performance status during the discharge process.

[0065] The first weight represents the weight matrix corresponding to the update gate in the battery power prediction model, the second weight represents the weight matrix corresponding to the operating parameters at the current time in the battery power prediction model, and the third weight represents the weight matrix corresponding to the reset gate of the battery power prediction model at the current time in the battery power prediction model.

[0066] Step 102: Based on the power prediction result of the previous time step and the first weight, obtain the update gate.

[0067] In practice, by using the previous time-to-time prediction result and the first weight, the update gate can be quickly obtained through the update gate function.

[0068] like Figure 2A As shown, the battery power prediction model is a gated recurrent neural network (AGRU) with an attention mechanism.

[0069] The update gate is used to describe the extent to which the discharge characteristics of the previous moment are incorporated into the discharge characteristics of the current moment. The larger the threshold of the update gate, the more discharge characteristics from the previous moment will be incorporated, which helps to capture the long-term dependence of the time sequence of discharge characteristics at different moments during the discharge process of the battery.

[0070] The update gate function is as follows:

[0071] z t =σ(U z h t-1 +b z )

[0072] Among them, z t U represents the update gate, σ represents the sigmoid growth curve (sigmoid function), and U represents the sigmoid growth curve. z H represents the first weight. t-1 b represents the predicted power level at the previous moment. z Indicates updating gate bias, b z It can be 0.

[0073] Step 103: Using the current operating parameters and the second weight, obtain the updated current operating parameters.

[0074] In practice, the updated operating parameters at the current moment are calculated by multiplying the battery's current operating parameters with the second weight, which can be expressed as:

[0075] x h =W hx t

[0076] Where, x h W represents the updated runtime parameters at the current moment. h Indicates the second weight, x t This indicates the operating parameters at the current moment.

[0077] Step 104: Based on the power prediction result of the previous moment, the reset gate, and the third weight, obtain the updated reset gate.

[0078] In practice, the reset gate is used to describe the degree to which the discharge characteristics of the previous moment are ignored. The smaller the threshold of the reset gate, the more is ignored, which helps to capture the short-term dependence of the time sequence of the discharge characteristics of the battery at different moments during the discharge process.

[0079] Step 105: Based on the updated operating parameters at the current moment and the updated reset gate, obtain the updated power prediction result.

[0080] In practice, based on the updated operating parameters at the current moment and the updated reset gate, the updated power prediction result is obtained through a candidate hidden state function. Specifically, the candidate hidden state function is as follows:

[0081]

[0082] in, This represents the updated battery power prediction result, where tanh represents the hyperbolic tangent function, and x... h This represents the updated runtime parameters at the current moment, r. h This indicates the updated reset door, b h Updated reset door deviation, b h It can be 0, where α represents the weight parameter corresponding to the updated running parameters at the current time, and β represents the weight parameter corresponding to the updated reset gate.

[0083] α and β are used to represent the degree of attention paid to the battery discharge characteristics at the current moment and the battery discharge characteristics at the previous moment, α∈(0,2], β∈(0,2]. By introducing an attention mechanism through α and β, the importance of the battery discharge characteristics at different moments during discharge can be utilized.

[0084] Step 106: Based on the update gate, the battery power prediction result of the previous time step, and the updated battery power prediction result, obtain the battery power prediction result at the current time step.

[0085] In practice, the battery's current charge prediction result can be either the State of Charge (SOC) or the remaining discharge capacity, with the remaining discharge capacity being preferred.

[0086] State of charge (SOC) represents the ratio of a battery's remaining capacity after a period of use or long-term storage to its capacity when fully charged, usually expressed as a percentage. Its value ranges from 0 to 1; when SOC = 0, the battery is fully discharged; when SOC = 1, the battery is fully charged.

[0087] Based on the update gate, the previous time step's power prediction result, and the updated power prediction result, the update function utilizes the importance of the battery's discharge characteristics at different times during discharge, thereby making the battery's power prediction result at the current time step more accurate.

[0088] The update gate function is as follows:

[0089]

[0090] Among them, h t This represents the predicted battery charge level at the current moment, z. t Indicates the update gate, h t-1 This indicates the predicted power consumption at the previous moment. This indicates the updated power prediction result.

[0091] The above scheme obtains an update gate based on the previous time's power prediction result and a first weight. Using the current time's operating parameters and a second weight, updated operating parameters are obtained. Based on the previous time's power prediction result, a reset gate, and a third weight, an updated reset gate is obtained. Based on the updated current time's operating parameters and the updated reset gate, an updated power prediction result is obtained. Finally, based on the update gate, the previous time's power prediction result, and the updated power prediction result, the battery's power prediction result for the current time is obtained. This method, based on the update gate, the previous time's power prediction result, and the updated power prediction result, utilizes the varying importance of the battery's discharge characteristics at different times during discharge, thus making the battery's power prediction result for the current time more accurate.

[0092] In some embodiments, step 105 includes:

[0093] Step 1051: Perform a weighted summation calculation on the updated current operating parameters and the updated reset gate to obtain the weighted summation calculation result.

[0094] Step 1052: Based on the weighted summation calculation result, the updated power prediction result is obtained through the hyperbolic tangent function.

[0095] In practice, the weighted summation result is obtained by using the weighted parameters corresponding to the updated current operating parameters and the updated reset gate weighted parameters.

[0096] Then, the weighted summation result is calculated using the hyperbolic tangent function to obtain the updated electricity prediction result, which can be expressed as:

[0097]

[0098] in, This represents the updated battery power prediction result, where tanh represents the hyperbolic tangent function, and x... h This represents the updated runtime parameters at the current moment, r. h This indicates the updated reset door, b h Updated reset door deviation, b h It can be 0, where α represents the weight parameter corresponding to the updated running parameters at the current time, and β represents the weight parameter corresponding to the updated reset gate.

[0099] In some embodiments, prior to step 1051, the method further includes:

[0100] Step A1: Obtain the weight parameters corresponding to the updated reset gate and the battery's operating state parameters from the previous moment at the current moment.

[0101] Step A2: Based on the current running status parameters and the previous running status parameters, obtain the Euclidean distance using the Euclidean distance function.

[0102] Step A3: Adjust the Euclidean distance using the adjustment function to obtain the adjustment value.

[0103] Step A4: Based on the adjusted value and the updated weight parameters of the reset gate, obtain the weight parameters corresponding to the updated running parameters at the current time through the attention mechanism relationship function.

[0104] The adjustment function is specifically as follows:

[0105] k h =sin((tanhρ)π)

[0106] Where, k h ρ represents the adjustment value, π represents the Euclidean distance, π represents pi, tanh represents the hyperbolic tangent function, and sin represents the tangent function.

[0107] The attention mechanism relation function is specifically as follows:

[0108] α=β(k h+1)

[0109] Where α represents the weight parameter corresponding to the updated operating parameters at the current time, β represents the weight parameter corresponding to the updated reset gate, and k h This indicates the adjustment value.

[0110] In practice, the Euclidean distance is obtained by using the Euclidean distance function based on the battery's operating state parameters at the current moment and the battery's operating state parameters at the previous moment.

[0111] For example, if the operating status parameters are voltage V, current I, and temperature T, the Euclidean distance function is as follows:

[0112]

[0113] Where ρ represents the Euclidean distance, V t V represents the voltage at the current moment. t-1 I represents the voltage at the previous time step. t I represents the current at the current moment. t-1 T represents the current at the previous time step. t T represents the temperature at the current moment. t-1 Let t represent the temperature of the previous time step, t represent the current time step, and t-1 represent the previous time step.

[0114] The Euclidean distance is adjusted using an adjustment function. The hyperbolic tangent function in the adjustment function is used to transform the Euclidean distance to the range (0, 1). Finally, the tangent function and π are used to modify the function trend to first increase and then decrease, thus conforming to the battery discharge characteristics.

[0115] To compensate for the batteries discarded during the update and reset gates, the current operating state x t The system adds a weight parameter α corresponding to the updated operating parameters at the current moment and a weight parameter β corresponding to the updated reset gate. Based on the battery's discharge characteristics, the relationship between α and β is as follows:

[0116] α=β(k h +1)

[0117] Where α represents the weight parameter corresponding to the updated running parameters at the current time, β represents the weight parameter corresponding to the updated reset gate, and k h This indicates the adjustment value.

[0118] α and β are used to represent the degree of attention paid to the battery discharge characteristics at the current moment and the battery discharge characteristics at the previous moment, α∈(0,2], β∈(0,2]. By introducing an attention mechanism through α and β, the importance of the battery discharge characteristics at different moments during discharge can be utilized.

[0119] In some embodiments, step 104, obtaining the updated reset gate of the pre-trained battery power prediction model, includes:

[0120] Step 1041: Based on the power prediction result of the previous time step, the reset gate, and the third weight, the updated reset gate function is used to obtain the updated reset gate.

[0121] The updated reset gate function is specifically as follows:

[0122] r h =U h (r t ⊙h t-1 )

[0123] Where, r h This refers to the updated reset door, U h Represents the third weight, r t This refers to the reset gate, h t-1 This indicates the predicted power consumption result at the previous moment.

[0124] In practice, based on the battery power prediction result of the previous moment, the reset gate, and the third weight, the updated reset gate function is used to obtain the updated reset gate, which provides a data basis for obtaining the battery power prediction result at the current moment.

[0125] The third weight is the weight matrix of the battery power prediction model corresponding to the previous time step's power prediction result and the reset gate update.

[0126] In some embodiments, step 101, obtaining the reset gate of the battery power prediction model, includes:

[0127] Step 1011: Obtain the fourth weight of the battery power prediction model.

[0128] Step 1012: Based on the previous time-of-flight energy prediction result and the fourth weight, a reset gate is obtained through a reset gate function;

[0129] The reset gate function is specifically:

[0130] r t =σ(U r h t-1 +b r )

[0131] Where, r t This represents the reset gate, σ represents the S-shaped growth curve (sigmoid function), and U... r Represents the fourth weight, h t-1b represents the predicted power level at the previous moment. r This indicates a reset of the door deviation.

[0132] In practice, the reset gate can be quickly obtained by using the previous time's power prediction result and the fourth weight through the reset gate function.

[0133] The specific reset gate function is as follows:

[0134] r t =σ(U r h t-1 +b r )

[0135] Where, r t This represents the reset gate, σ represents the S-shaped growth curve (sigmoid function), and U... r Represents the fourth weight, h t-1 b represents the predicted power level at the previous moment. r Indicates resetting the gate deviation, b r It can be 0.

[0136] The fourth weight is the weight matrix of the reset gate network structure in the battery power prediction model. The reset gate is the structure in the pre-trained battery power prediction model, such as... Figure 2A As shown, the battery power prediction model is a gated recurrent neural network (AGRU) with an attention mechanism.

[0137] The reset gate is used to describe the degree to which the discharge characteristics of the previous moment are ignored. The smaller the threshold of the reset gate, the more is ignored, which helps to capture the short-term dependence of the time sequence of the discharge characteristics of the battery at different moments during the discharge process.

[0138] In some embodiments, the first training set for pre-training the battery power prediction model includes multiple first-stage training data and multiple second-stage training data. The first-stage training data includes a first voltage, a first current, and a first temperature, and the second-stage training data includes a second voltage, a second current, and a second temperature.

[0139] In practice, the first-stage training data is the training data of the battery before it is put into use, and the second-stage training data is the training data of the battery after it is put into use. Each first-stage training data includes the first-stage training data, and each second-stage training data includes the second voltage, the second current, and the second temperature.

[0140] The first training set can be obtained through a data cleaning preprocessing procedure. Data cleaning is performed using the moving average method to reduce the impact of noise and improve the accuracy of the battery power prediction results at the current moment.

[0141] In some embodiments, the battery power prediction model is trained based on determining the network structure layers in the second initial model to be frozen according to the similarity between the plurality of first-stage training data and the plurality of second-stage training data after transferring the parameters of a pre-built first initial model to a pre-built second initial model.

[0142] In specific implementation, such as Figure 2B As shown, the feature extraction module extracts features from the first training set after the data cleaning preprocessing process, including extracting features from multiple first-stage training data (i.e., source domain data) and multiple second-stage training data (i.e., target domain data) to generate the model input array.

[0143] In the model pre-training module, the parameters of the first initial model (i.e., the source model) are transferred to the second initial model (i.e., the target model). In the model fine-tuning module, based on the similarity between multiple first-stage training data and multiple second-stage training data, it is determined which parameters in the second initial model need to be frozen. The parameters frozen in the second initial model are fine-tuned to obtain the battery power prediction model (i.e., the final model), thereby reducing the amount of training data and training time, and enabling the rapid acquisition of the battery power prediction model.

[0144] In some embodiments, the similarity between the plurality of first-stage training data and the plurality of second-stage training data is calculated based on a similarity function, wherein the similarity function is specifically:

[0145]

[0146] Where s represents similarity, T0 represents the average operating temperature of the plurality of first-stage training data, T′0 represents the average operating temperature of the plurality of second-stage training data, Q0 represents the average rated capacity of the plurality of first-stage training data, Q′0 represents the average rated capacity of the plurality of second-stage training data, a represents the first compensation coefficient, and b represents the second compensation coefficient.

[0147] In practice, the value of a can be 10 and the value of b can be 100, depending on the battery discharge characteristics. When the value of s is less than 1, only the last fully connected layer in the second initial model needs to be trained. When the value of s is greater than or equal to 1 and less than 2, all fully connected layers in the second initial model need to be trained. When the value of s is greater than or equal to 2, all fully connected layers and the last AGRU layer in the second initial model need to be trained.

[0148] During training, for example, the training data input to the second initial model each time is a model input array composed of input vectors obtained by feature extraction of the operating parameters of 20 batteries at different times, and the remaining discharge capacity corresponding to the last input vector in the output model input array is used as the output.

[0149] The weight matrix of the second initial model is optimized using the gradient descent method until the lowest loss function value is obtained, resulting in a trained second initial model. This trained second initial model is then used as the battery power prediction model.

[0150] The loss function is specifically as follows:

[0151]

[0152] MSE represents the loss function value, n represents the number of input arrays in the model, and i represents the i-th input array. y represents the predicted value of the remaining discharge capacity. i This represents the actual value of the remaining discharge capacity.

[0153] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.

[0154] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0155] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides a battery power prediction device.

[0156] refer to Figure 3 The battery power prediction device includes:

[0157] The acquisition module 301 is configured to acquire the battery power prediction result of the previous time step at the current time step, the first weight corresponding to the update gate of the pre-trained battery power prediction model, the battery operating parameters at the current time step, the second weight corresponding to the operating parameters at the current time step, the reset gate of the battery power prediction model, and the third weight corresponding to the reset gate of the battery power prediction model at the current time step, wherein the battery power prediction result of the previous time step step is obtained through the battery power prediction model.

[0158] The update gate acquisition module 302 is configured to obtain the update gate based on the power prediction result of the previous moment and the first weight;

[0159] The first update module 303 is configured to use the current running parameters and the second weight to obtain the updated current running parameters.

[0160] The second update module 304 is configured to obtain an updated reset gate based on the power prediction result of the previous moment, the reset gate, and the third weight.

[0161] The third update module 305 is configured to obtain the updated power prediction result based on the updated operating parameters at the current time and the updated reset gate;

[0162] The power prediction result acquisition module 306 is configured to obtain the power prediction result of the battery at the current moment based on the update gate, the power prediction result of the previous moment, and the updated power prediction result.

[0163] In some embodiments, the power prediction result acquisition module 306 is specifically configured as follows:

[0164] The updated current operating parameters and the updated reset gate are weighted and summed to obtain the weighted summation result.

[0165] The updated power prediction result is obtained by applying the weighted summation calculation result to the hyperbolic tangent function.

[0166] In some embodiments, the battery power prediction device further includes a weight parameter acquisition module, which performs a weighted summation calculation on the updated current operating parameters and the updated reset gate. Before obtaining the weighted summation calculation result, the weight parameter acquisition module is specifically configured as follows:

[0167] Obtain the weight parameters corresponding to the updated reset gate and the battery's operating state parameters from the previous moment to the current moment;

[0168] Based on the current running state parameters and the previous running state parameters, the Euclidean distance is obtained using the Euclidean distance function.

[0169] The Euclidean distance is adjusted using an adjustment function to obtain an adjustment value;

[0170] Based on the adjusted value and the updated weight parameters of the reset gate, the weight parameters corresponding to the updated running parameters at the current moment are obtained through the attention mechanism relationship function.

[0171] The adjustment function is specifically as follows:

[0172] k h =sin((tanhρ)π)

[0173] Where, k h ρ represents the adjustment value, π represents the Euclidean distance, π represents pi, tanh represents the hyperbolic tangent function, and sin represents the tangent function.

[0174] The attention mechanism relation function is specifically as follows:

[0175] α=β(k h +1)

[0176] Where α represents the weight parameter corresponding to the updated operating parameters at the current time, β represents the weight parameter corresponding to the updated reset gate, and k h This indicates the adjustment value.

[0177] In some embodiments, the second update module 304 is specifically configured as follows:

[0178] Based on the previous time-to-time power prediction result, the reset gate, and the third weight, the updated reset gate function is used to obtain the updated reset gate.

[0179] The updated reset gate function is specifically as follows:

[0180] r h =U h (r t ⊙h t-1 )

[0181] Where, r h This refers to the updated reset door, U h Represents the third weight, r t This refers to the reset gate, h t-1 This indicates the predicted power consumption result at the previous moment.

[0182] In some embodiments, the acquisition module 301 is specifically configured as follows:

[0183] Obtain the fourth weight of the reset gate in the battery power prediction model;

[0184] Based on the previous time-to-time energy prediction result and the fourth weight, a reset gate is obtained through a reset gate function;

[0185] The reset gate function is specifically:

[0186] r t =σ(U r h t-1 +b r )

[0187] Where, r t This represents the reset gate, σ represents the S-shaped growth curve (sigmoid function), and U... r Represents the fourth weight, h t-1 b represents the predicted power level at the previous moment. r This indicates a reset of the door deviation.

[0188] In some embodiments, the first training set for pre-training the battery power prediction model includes multiple first-stage training data and multiple second-stage training data. The first-stage training data includes a first voltage, a first current, and a first temperature, and the second-stage training data includes a second voltage, a second current, and a second temperature.

[0189] In some embodiments, the battery power prediction model is trained based on determining the network structure layers in the second initial model to be frozen according to the similarity between the plurality of first-stage training data and the plurality of second-stage training data after transferring the parameters of a pre-built first initial model to a pre-built second initial model.

[0190] In some embodiments, the similarity between the plurality of first-stage training data and the plurality of second-stage training data is calculated based on a similarity function, wherein the similarity function is specifically:

[0191]

[0192] Where s represents similarity, T0 represents the average operating temperature of the plurality of first-stage training data, T′0 represents the average operating temperature of the plurality of second-stage training data, Q0 represents the average rated capacity of the plurality of first-stage training data, Q′0 represents the average rated capacity of the plurality of second-stage training data, a represents the first compensation coefficient, and b represents the second compensation coefficient.

[0193] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this application, the functions of each module can be implemented in one or more software and / or hardware.

[0194] The apparatus of the above embodiments is used to implement the corresponding battery power prediction method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0195] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the battery power prediction method described in any of the above embodiments.

[0196] Figure 4 This illustration shows a more specific hardware structure diagram of an electronic device provided in this embodiment. The device may include: a processor 401, a memory 402, an input / output interface 403, a communication interface 404, and a bus 405. The processor 401, memory 402, input / output interface 403, and communication interface 404 are interconnected internally via the bus 405.

[0197] The processor 401 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0198] The memory 402 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 402 and is called and executed by the processor 401.

[0199] Input / output interface 403 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.

[0200] Communication interface 404 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0201] Bus 405 includes a pathway for transmitting information between various components of the device (e.g., processor 401, memory 402, input / output interface 403, and communication interface 404).

[0202] It should be noted that although the above-described device only shows the processor 401, memory 402, input / output interface 403, communication interface 404, and bus 405, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0203] The electronic devices described above are used to implement the corresponding battery power prediction methods in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0204] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the battery power prediction method as described in any of the above embodiments.

[0205] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0206] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the battery power prediction method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0207] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.

[0208] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0209] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0210] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.

Claims

1. A battery power prediction method, characterized by, The method comprises the following steps: obtaining a power prediction result of a battery at a previous time of a current time, a first weight value corresponding to an update gate of a pre-trained battery power prediction model, an operating parameter of the battery at the current time, a second weight value corresponding to the operating parameter at the current time, a reset gate of the battery power prediction model, and a third weight value corresponding to the reset gate of the battery power prediction model at the current time, wherein the power prediction result at the previous time is obtained by the battery power prediction model; obtaining an update gate based on the power prediction result at the previous time and the first weight value; obtaining an updated operating parameter at the current time by using the operating parameter at the current time and the second weight value; obtaining an updated reset gate based on the power prediction result at the previous time, the reset gate, and the third weight value; obtaining an updated power prediction result based on the updated operating parameter at the current time and the updated reset gate; obtaining the power prediction result of the battery at the current time based on the update gate, the power prediction result at the previous time, and the updated power prediction result; wherein the obtaining of the updated power prediction result based on the updated operating parameter at the current time and the updated reset gate comprises: performing weighted summation calculation on the updated operating parameter at the current time and the updated reset gate to obtain a weighted summation calculation result; obtaining the updated power prediction result by using a hyperbolic tangent function based on the weighted summation calculation result.

2. The method of claim 1, wherein, Before the weighted summation calculation on the updated operating parameter at the current time and the updated reset gate to obtain the weighted summation calculation result, the method further comprises: obtaining a weight parameter corresponding to the updated reset gate and an operating state parameter of the battery at a previous time of the current time; obtaining a Euclidean distance based on the operating state parameter at the current time and the operating state parameter at the previous time by using a Euclidean distance function; obtaining an adjustment value by adjusting the Euclidean distance by using an adjustment function; obtaining a weight parameter corresponding to the updated operating parameter at the current time by using an attention mechanism relationship function based on the adjustment value and the weight parameter of the updated reset gate; the adjustment function is specifically: ; wherein, denotes an adjustment value, denotes the Euclidean distance, denotes the circle constant, denotes the hyperbolic tangent function, denotes the sine function; the attention mechanism relationship function is specifically: ; wherein, denotes a weight parameter corresponding to the updated current time of operation parameter, denotes a weight parameter corresponding to the updated reset gate, denotes an adjustment value.

3. The method of claim 1, wherein, the obtaining of the updated reset gate based on the power prediction result at the previous time, the reset gate, and the third weight value comprises: obtaining the updated reset gate by using an updated reset gate function based on the power prediction result at the previous time, the reset gate, and the third weight value; the updated reset gate function is specifically: ; wherein, denotes the updated reset gate, denotes the third weight, denotes the reset gate, denotes the power prediction result of the last time.

4. The method of claim 1, wherein, the obtaining of the reset gate of the battery power prediction model comprises: obtaining a fourth weight value of the reset gate of the battery power prediction model; obtaining the reset gate by using a reset gate function based on the power prediction result at the previous time and the fourth weight value; the reset gate function is specifically: ; wherein, denotes a reset gate, denotes an S-shaped growth curve, a sigmod function, denotes a fourth weight, denotes a power prediction result at a previous time, denotes a reset gate bias.

5. The method of claim 1, wherein, The first training set for pre-training the battery power prediction model includes a plurality of first-stage training data and a plurality of second-stage training data, the first-stage training data including a first voltage, a first current and a first temperature, and the second-stage training data including a second voltage, a second current and a second temperature.

6. The method of claim 5, wherein, The battery power prediction model is trained based on similarity of the plurality of first-stage training data and the plurality of second-stage training data after migrating parameters of a pre-constructed first initial model to a pre-constructed second initial model and determining network structure layers to be frozen in the second initial model.

7. The method of claim 5, wherein, The similarity of the plurality of first-stage training data and the plurality of second-stage training data is calculated according to a similarity function, and the similarity function is specifically: ; wherein, represents a similarity, represents an average operating temperature of the plurality of first stage training data, represents an average operating temperature of the plurality of second stage training data, represents an average rated capacity of the plurality of first stage training data, represents an average rated capacity of the plurality of second stage training data, represents a first compensation coefficient, represents a second compensation coefficient.

8. A battery power prediction device, characterized by comprising: comprises: The acquisition module is configured to acquire a power prediction result of a battery at a previous time of a current time, a first weight corresponding to an update gate of a pre-trained battery power prediction model, an operating parameter of the battery at the current time, a second weight corresponding to the operating parameter at the current time, a reset gate of the battery power prediction model, and a third weight corresponding to the reset gate of the battery power prediction model at the current time, the power prediction result at the previous time being obtained by the battery power prediction model; The update gate acquisition module is configured to obtain an update gate based on the power prediction result at the previous time and the first weight; The first update module is configured to obtain an updated operating parameter at the current time by using the operating parameter at the current time and the second weight; The second update module is configured to obtain an updated reset gate based on the power prediction result at the previous time, the reset gate and the third weight; The third update module is configured to obtain an updated power prediction result based on the updated operating parameter at the current time and the updated reset gate; The power prediction result acquisition module is configured to obtain the power prediction result of the battery at the current time based on the update gate, the power prediction result at the previous time and the updated power prediction result; The third update module is further configured to: perform weighted summation calculation on the updated operating parameter at the current time and the updated reset gate to obtain a weighted summation calculation result; obtain the updated power prediction result by using a hyperbolic tangent function according to the weighted summation calculation result.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method of any one of claims 1 to 7 when executing the program.

Citation Information

Patent Citations

  • Attention mechanism-based natural language generating method for remote sensing images

    CN108764303A

  • Ultra-short-term wind power prediction method based on DCCSO optimization deep learning model

    CN113537566A