Disclosure of Invention
The present invention aims to solve at least one of the technical problems in the related art to some extent. Therefore, the invention aims to provide a battery health optimization method, a storage medium and electronic equipment, which are used for optimizing and correcting the battery health by adopting a recursion algorithm based on the calculation result of the battery health, so as to avoid the fluctuation problem of the battery health caused by factors such as temperature, season and the like.
To achieve the above object, an embodiment of a first aspect of the present invention provides a method for optimizing the health of a battery, the method comprising: acquiring the health degree of the battery at different moments to obtain health degree time sequence data; searching a maximum value in the health degree time sequence data to obtain maximum value time sequence data, and searching a maximum value in the maximum value time sequence data to obtain a first maximum value; and respectively carrying out recursion fitting on first time sequence data and second time sequence data, and optimizing the health degree of a corresponding time interval by utilizing a recursion fitting result of each time, wherein the first time sequence data is the first maximum value and the data before the first maximum value in the maximum value time sequence data, and the second time sequence data is the first maximum value and the data after the first maximum value in the maximum value time sequence data.
In addition, the method for optimizing the battery health degree according to the embodiment of the present invention may further have the following additional technical features:
according to one embodiment of the present invention, the searching for the maximum value in the health time series data includes: if the health degree of the first moment is greater than the health degree of the second moment in the health degree time sequence data, determining the health degree of the first moment as the maximum value; if the health degree of the last moment in the health degree time sequence data is larger than the health degree of the last moment, determining that the health degree of the last moment is the maximum value; and if the health degree at the ith moment in the health degree time sequence data is greater than the health degree at the ith-1 moment and the health degree at the (i+1) th moment, determining the health degree at the ith moment as the maximum value, wherein i is an integer greater than 2 and less than n, and n is the total number of the health degrees in the health degree time sequence data.
According to one embodiment of the present invention, the data in the first time series data are sequentially denoted as y1, y2,..ym, and the corresponding time instants are denoted as t1, t2,..tm, and the recursively fitting the first time series data includes: a1: searching a maximum value yp in a time interval [ t1, i 2), and obtaining a time tp corresponding to the yp, wherein i2 represents a lower index, and the initial value is tm; a2: performing linear fitting on the data in the time interval [ tp, i 2) to obtain a current recursive fitting result; a3: updating the lower index to tp; a4: repeating the steps A1-A3 until the lower index is t1.
According to one embodiment of the present invention, the data in the second time series data are sequentially denoted as ym+1, ym+2,..yn, and the corresponding moments are denoted as tm+1, tm+2..tn, and the recursively fitting the second time series data includes: b1: searching a maximum value yq in a time interval (i 1, tn), and obtaining a time tq corresponding to yq, wherein i1 represents an upper index, the initial value is tm, B2 is used for carrying out linear fitting on data in the time interval (i 1, tq) to obtain a current recursion fitting result, B3 is used for updating the upper index into tq, and B4 is used for repeatedly executing steps B1-B3 until the upper index is tn.
According to one embodiment of the invention, optimizing the health of the time interval [ tp, i 2) using the recursive fitting result corresponding to the time interval [ tp, i 2) comprises: for any time tp1 in the time interval [ tp, i 2), calculating and obtaining the fitting health degree y at tp1 by using the recursion fitting result corresponding to the time interval [ tp, i 2) nihep Wherein, the method comprises the steps of, wherein,if yp1>y nihep The health yp1 at tp1 is kept unchanged; if yp1.ltoreq.y nihep Then calculate tp1Optimizing the health yp1y and assigning yp1y to yp1, wherein yp1y=y nihep -0.1×(y nihep -y p1 )。
According to one embodiment of the invention, the time interval (i 1, tq]Corresponding recursive fitting results for time intervals (i 1, tq]Is optimized, comprising: for time intervals (i 1, tq]Any time tq1 in (1), a time interval (i 1, tq is used]The fitting health degree y at tq1 is calculated according to the corresponding recursion fitting result niheq Wherein, the method comprises the steps of, wherein, if yq1>y niheq The health yq1 at tq1 is kept unchanged; if yq 1.ltoreq.y niheq Then the optimal health yq1y at tq1 is calculated and yq1y is assigned to yq1, where yq1y=y niheq -0.1×(y niheq -yq1)。
According to one embodiment of the invention, the method further comprises: and if the time tn is not the last time, optimizing the health degree after the time tn by using a recursion fitting result corresponding to the time interval (i 1, tn).
According to one embodiment of the invention, the utilization time interval (i 1, tn]The corresponding recursive fitting result optimizes the health degree after the time tn, comprising: calculating the optimal health y at any time tz after the time tn nihez Wherein y is nihez =yn+k× (tz-tn), k representing the time interval [ i1, tn ]]Slope in the corresponding recursive fitting result, yn represents the health of the moment tn; if yz>y nihez The health yz at tz is kept unchanged; if yz.ltoreq.y nihez Then the optimal health yzy at tz is calculated and yzy is assigned to yz, where yzy =y nihez -0.1×(y nihez -yz)。
To achieve the above object, an embodiment of a second aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described method for optimizing the health of a battery.
To achieve the above object, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory, where the computer program, when executed by the processor, implements the above method for optimizing the health of a battery.
According to the battery health optimization method, the storage medium and the electronic equipment, based on the calculation result of the battery health, the battery health is optimized and corrected by adopting a recursion algorithm, and the problem of fluctuation of the battery health caused by factors such as temperature, seasons and the like is avoided.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
The following describes a method for optimizing the battery health according to an embodiment of the present invention with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method of optimizing battery health according to an embodiment of the present invention.
As shown in fig. 1, the method for optimizing the battery health includes:
and S11, acquiring the health degree of the battery at different moments to obtain health degree time sequence data.
Specifically, the battery comprises a plurality of single batteries, and the average value, the maximum value and the minimum value of the single battery voltage at each sampling time can be calculated by collecting the single battery voltage data at each preset sampling time; calculating to obtain the voltage dispersion of the single battery at each sampling time based on the voltage data of the single battery and the average value of the voltage of the single battery; for each sampling moment, when the difference between SOCVmax corresponding to the maximum value of the single battery voltage and SOCVmin corresponding to the minimum value of the single battery voltage is not smaller than a preset value, reversely pushing out the minimum value of the single battery voltage dispersion corresponding to the sampling moment by utilizing the maximum value of the single battery voltage and the minimum value of the single battery voltage; and comparing the voltage dispersion of the single battery at each sampling time with the minimum value of the voltage dispersion of the single battery corresponding to the sampling time, and determining the health degree of the battery at the moment. The health of each cell at different moments is thus obtained, for example: [ Battery ID (bat), time of day (time), battery health (soh) ].
S12, searching a maximum value in the health time sequence data to obtain maximum time sequence data, and searching a maximum value in the maximum time sequence data to obtain a first maximum value.
Specifically, for example: for a battery having a battery ID of 1, battery health maximum data in which the battery IDs are arranged in chronological order is acquired. The maximum value timing data includes: maximum y1, y2...yn and time instants t1, t 2..tn corresponding to the maximum, respectively; the first maximum value is ym and the corresponding time is tm.
S13, respectively carrying out recursion fitting on the first time sequence data and the second time sequence data, and optimizing the health degree of the corresponding time interval by utilizing each recursion fitting result, wherein the first time sequence data is the first maximum value in the maximum time sequence data and the data before the first maximum value, and the second time sequence data is the first maximum value in the maximum time sequence data and the data after the first maximum value.
According to the battery health degree optimization method, based on the calculation result of the battery health degree, the recursion algorithm is adopted to optimize and correct the battery health degree, and the problem of fluctuation of the battery health degree caused by factors such as temperature, seasons and the like is avoided.
In some embodiments, as shown in fig. 2, finding maxima in the health time series data includes:
and S21, if the health degree of the first moment is greater than the health degree of the second moment in the health degree time sequence data, determining that the health degree of the first moment is the maximum value.
And S22, if the health degree of the last moment in the health degree time sequence data is greater than the health degree of the last moment, determining that the health degree of the last moment is the maximum value.
S23, if the health degree at the i-th moment in the health degree time sequence data is larger than the health degree at the i-1 th moment and the health degree at the i+1-th moment, determining the health degree at the i-th moment as a maximum value, wherein i is an integer larger than 2 and smaller than n, and n is the total number of the health degrees in the health degree time sequence data.
In some embodiments, as shown in fig. 3, the data in the first time series data are sequentially denoted as y1, y2,..ym, and the corresponding times are denoted as t1, t2,..tm, and recursively fitting the first time series data includes:
a1: searching the maximum value yp in the time interval [ t1, i 2), and obtaining the time tp corresponding to yp, wherein i2 represents the lower index, and the initial value is tm.
A2: and (3) performing linear fitting on the data in the time interval [ tp, i 2) to obtain a current recursive fitting result.
A3: the lower index is updated to tp.
A4: steps A1-A3 are repeatedly performed until the lower index is t1.
In some embodiments, as shown in fig. 4, the data in the second time series data is denoted in turn as ym, ym+1,..yn, and the corresponding time instants are denoted as tm, tm+1..tn, and recursively fitting the second time series data includes:
b1: searching the maximum value yq in the time interval (i 1, tn), and obtaining the time tq corresponding to yq, wherein i1 represents an upper index, and the initial value is tm.
B2: and (3) performing linear fitting on the data in the time interval (i 1, tq) to obtain a current recursion fitting result.
B3: the upper index is updated to tq.
B4: steps B1-B3 are repeated until the upper index is tn.
In some embodiments, optimizing the health of the time interval [ tp, i 2) using the recursive fitting result corresponding to the time interval [ tp, i 2) includes: for any time tp1 in the time interval [ tp, i 2), calculating and obtaining the fitting health degree y at tp1 by using the recursion fitting result corresponding to the time interval [ tp, i 2) nihep Wherein, the method comprises the steps of, wherein, if yp1>ynihep, the health degree yp1 at tp1 is kept unchanged; if yp1+.ltoreq.ynihep, then calculate the optimal health yp1y at tp1 and assign yp1y to yp1, where yp1y=y nihep -0.1×(y nihep -y p1 )。
In some embodiments, the time interval (i 1, tq]Corresponding recursive fitting results for time intervals (i 1, tq]Is optimized, comprising: for time intervals (i 1, tq]Any time tq1 in (1), a time interval (i 1, tq is used]The fitting health degree y at tq1 is calculated according to the corresponding recursion fitting result niheq Wherein, the method comprises the steps of, wherein, if yq1>yniheq, then keep the health yq1 at tq1 unchanged; if yq1 is less than or equal to yniheq, then the optimal health yq1y at tq1 is calculated and yq1y is assigned to yq1, where yq1y=y niheq -0.1×(y niheq -yq1)。
In this embodiment, the pseudo code of the battery health optimization method is as follows:
Youhua(i1,i2):
returning if i1=tn and i2=t1;
if i1=tn, tq=i1, and if not, find the maximum tq among all maxima whose time is greater than i 1;
updating the battery health between (i 1, tq);
if i2=t1, tp=i2, if not, find the maximum tp of all maxima at a time less than i 2;
updating the battery health between tp, i 2);
Youhua(tq,tp)。
in some embodiments, the method further comprises: if the time tn is not the last time, the health degree after the time tn is optimized by using the recursion fitting result corresponding to the time interval (i 1, tn).
In some embodiments, optimizing the health after time tn using the recursive fitting result for time interval (i 1, tn), comprising:
calculating the optimal health y at any time tz after time tn nihez Wherein y is nihez =yn+k× (tz-tn), k representing the time interval [ i1, tn ]]The slope, yn, in the corresponding recursive fit result represents the health of time tn, wherein the time interval (i 1, tn) with the upper index i1 closest to tn may be used]The slope in the corresponding recursive fitting result,if yz>y nihez The health yz at tz is kept unchanged; if yz.ltoreq.y nihez Then the optimal health yzy at tz is calculated and yzy is assigned to yz, where yzy =y nihez -0.1×(y nihez -yz)。
In this embodiment, as shown in fig. 5, soh and soh are original battery health curves, and soh y and soh y are optimized health curves corresponding to soh1 and soh, respectively. The abscissa of the curve is time and the ordinate is battery health.
In summary, according to the method for optimizing the battery health degree, the maximum time sequence data of the battery health degree is obtained, and the battery health degree is optimized through a recursion algorithm, so that the problem of fluctuation of the battery health degree caused by factors such as temperature, seasons and the like is avoided.
Based on the optimization method of the battery health degree of the embodiment, the invention also provides a computer readable storage medium.
In this embodiment, a computer program is stored on a computer readable storage medium, and when the computer program is executed by a processor, the above-described method for optimizing the battery health is implemented.
Fig. 6 is a block diagram of an electronic device according to an embodiment of the invention.
As shown in fig. 6, the electronic device 600 includes: a processor 601 and a memory 603. The processor 601 is coupled to a memory 603, such as via a bus 602. Optionally, the electronic device 600 may also include a transceiver 604. It should be noted that, in practical applications, the transceiver 604 is not limited to one, and the structure of the electronic device 600 is not limited to the embodiment of the present invention.
The processor 601 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logical blocks, modules, and circuits described in connection with the present disclosure. The processor 601 may also be a combination that performs computing functions, such as including one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
Bus 602 may include a path to transfer information between the components. Bus 602 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect Standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 602 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
The memory 603 is used to store a computer program corresponding to the method of optimizing the battery health of the above-described embodiment of the present invention, which is controlled to be executed by the processor 601. The processor 601 is arranged to execute a computer program stored in the memory 603 for realizing what is shown in the foregoing method embodiments.
Among other things, electronic device 600 includes, but is not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device 600 shown in fig. 6 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered as a ordered listing of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the device or element being referred to must have a specific orientation, be configured and operated in a specific orientation, and therefore should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly, through intermediaries, or both, may be in communication with each other or in interaction with each other, unless expressly defined otherwise. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
In the present invention, unless expressly stated or limited otherwise, a first feature "up" or "down" a second feature may be the first and second features in direct contact, or the first and second features in indirect contact via an intervening medium. Moreover, a first feature being "above," "over" and "on" a second feature may be a first feature being directly above or obliquely above the second feature, or simply indicating that the first feature is level higher than the second feature. The first feature being "under", "below" and "beneath" the second feature may be the first feature being directly under or obliquely below the second feature, or simply indicating that the first feature is less level than the second feature.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.