Bms calibration data storage method, bms, power consumption and energy storage device

By backing up the calibration data to the backup storage area and verifying its validity before the battery management system is powered off, the problem of calibration data backup affecting initial startup is solved, resulting in faster startup speed and higher data reliability.

CN122285380APending Publication Date: 2026-06-26CONTEMPORARY AMPEREX TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411885413.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In the prior art, the calibration data backup process of the battery management system affects the initial startup efficiency, and the reliability of the backup data is reduced during abnormal power outages or software resets.

Method used

Before the battery management system is shut down, the calibration data of the main storage area is backed up to the backup storage area. The validity of the data is checked before the backup is performed to avoid the backup operation during initialization. The reliability of the data is improved by asynchronous task execution and periodic verification.

Benefits of technology

It reduces the initial startup time of the battery management system, improves the reliability of backup data and the efficiency of processor resource utilization, and reduces the risk of system failure under abnormal conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122285380A_ABST
    Figure CN122285380A_ABST
Patent Text Reader

Abstract

This application relates to the field of batteries and discloses a BMS calibration data storage method, a battery management system (BMS), an electrical device, and an energy storage device. The BMS calibration data storage method includes: in response to the BMS receiving a shutdown command, determining whether the first calibration data stored in the main storage area is valid; if the first calibration data is valid, backing up the first calibration data to the backup storage area and then executing the shutdown command. Compared with related technologies, the BMS calibration data storage method, battery management system (BMS), electrical device, and energy storage device provided in this application have the advantages of improving the initialization startup speed of the battery management system (BMS) while simultaneously improving the reliability of the backup data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of batteries, and more specifically, to a BMS calibration data storage method, a battery management system (BMS), electrical equipment, and energy storage equipment. Background Technology

[0002] With the rapid development of new energy vehicles, new energy power stations, and other related applications, in order to improve the power and safety performance of batteries, it is necessary to continuously optimize and adjust the calibration parameters of batteries, including charge and discharge power parameters, algorithm judgment thresholds, and fault protection thresholds. Related technologies typically use a Battery Management System (BMS) to manage battery-related calibration data.

[0003] Since battery calibration data plays a crucial role in the stability and safety of the battery system, it is backed up and stored during the operation of the battery management system (BMS) to ensure its data security. However, the calibration data backup process in related technologies significantly impacts the initialization and startup efficiency of the BMS, resulting in prolonged startup times. Furthermore, if the BMS experiences an abnormal power outage or software reset, leading to incomplete or erroneous updated calibration data, the BMS may back up this incomplete or erroneous data during the restart process, thus reducing the reliability of the backup data. Summary of the Invention

[0004] The purpose of this application is to provide a BMS calibration data storage method, a battery management system (BMS), electrical equipment, and energy storage equipment, which can improve the initialization startup speed of the battery management system (BMS) while improving the reliability of backup data.

[0005] In a first aspect, embodiments of this application provide a BMS calibration data storage method, applied to a battery management system (BMS) including a main storage area and a backup storage area. The BMS calibration data storage method includes: in response to the BMS receiving a shutdown command, determining whether the first calibration data stored in the main storage area is valid; if the first calibration data is valid, backing up the first calibration data to the backup storage area and then executing the shutdown command.

[0006] Compared with related technologies, in the BMS calibration data storage method provided in this application embodiment, after the BMS receives a shutdown command and is about to execute the shutdown command, it backs up the first calibration data stored in the main storage area to the backup storage area. This eliminates the need to perform data backup operations during BMS initialization and startup, reducing the operation procedures required during BMS initialization and startup. Therefore, it can reduce the total time required for the initialization and startup of the battery management system (BMS) and improve the initialization and startup speed of the BMS. In addition, before backing up the first calibration data stored in the main storage area to the backup storage area, the validity of the first calibration data is determined. The first calibration data is backed up only if it is valid, thereby improving the reliability of the backup data.

[0007] In an optional embodiment, before executing the shutdown command after backing up the first calibration data to the backup storage area, the BMS calibration data storage method further includes: determining whether the second calibration data stored in the backup storage area is the same as the first calibration data; if the second calibration data is different from the first calibration data and the first calibration data is valid, the step of backing up the first calibration data to the backup storage area and then executing the shutdown command is performed; if the second calibration data is the same as the first calibration data, the shutdown command is executed. The system checks whether the second calibration data stored in the backup storage area is the same as the first calibration data. If the second calibration data is the same as the first calibration data, it means that the first calibration data has not been updated. In this case, the system can directly execute a shutdown command without backing up the first calibration data again. This eliminates the need to back up the first calibration data, which not only extends the lifespan of the memory but also reduces processor resource consumption and data processing time compared to the process of checking whether the second and first calibration data are the same. Removing the backup process reduces processor resource consumption and improves calibration data storage efficiency.

[0008] In an optional embodiment, determining whether the second calibration data stored in the backup storage area is the same as the first calibration data includes: comparing the second calibration data and the first calibration data one by one, and determining whether the second calibration data and the first calibration data are the same based on the comparison result. Comparing the first calibration data and the second calibration data one by one can improve the reliability of the comparison result, thereby reducing the possibility that the first calibration data and the second calibration data are inconsistent but the first calibration data has not been backed up, and improving the reliability of the backup data.

[0009] In an optional embodiment, the BMS calibration data storage method further includes: in response to the BMS receiving a calibration data write instruction, erasing all data stored in the main storage area; in response to receiving target calibration data corresponding to the calibration data write instruction, storing the target calibration data in the main storage area, and calculating a first operational verification parameter based on the target calibration data; in response to receiving the target verification parameter corresponding to the calibration data write instruction, if the first operational verification parameter and the target verification parameter are different, updating the valid flag parameter of the main storage area to invalid; if the first operational verification parameter and the target verification parameter are the same, updating the valid flag parameter of the main storage area to valid. During the process of receiving a calibration data write instruction to write new calibration data to the main storage area, after storing the received target calibration data in the main storage area, the received data is also calculated to obtain the first operational verification parameter. By comparing the first operational verification parameter with the received target verification parameter, it is determined whether the target calibration data stored in the main storage area is valid, which can improve the data reliability of the data stored in the main storage area.

[0010] In an optional embodiment, storing the target calibration data into the main storage area includes: storing the target calibration data into the main storage area through asynchronous task execution. Asynchronous task execution means that different tasks are executed independently of each other, without waiting for the completion of the previous task before the execution of the next task. This method does not block task execution and can improve the system's response speed and processing efficiency. In this embodiment, storing the target calibration data into the main storage area through asynchronous task execution allows the BMS to maintain battery management during data writing, enabling the power-consuming devices connected to the battery to continue operating normally.

[0011] In an optional embodiment, the BMS calibration data storage method further includes: in response to the BMS receiving an initialization command, determining whether the first calibration data stored in the main storage area is valid; if the first calibration data is valid, executing the initialization command to copy the first calibration data to the random access memory (RAM); if the first calibration data is invalid, determining whether the second calibration data stored in the backup storage area is valid; if the second calibration data is valid, executing the initialization command to copy the second calibration data to both the RAM and the main storage area; if the second calibration data is invalid, issuing a system fault alarm. During the initialization and startup process of the BMS, if the first calibration data in the main storage area is invalid, the second calibration data is copied to the main storage area, i.e., the backup data is rolled back during the initialization and startup process of the BMS, thereby reducing the possibility of system abnormalities caused by data invalidation in the main storage area due to abnormal power loss or software reset of the BMS.

[0012] In an optional embodiment, the BMS calibration data storage method further includes: in response to the BMS receiving an initialization command, periodically performing real-time calculations on the data stored in the main storage area to obtain a second calculation verification parameter; when the second calculation verification parameter differs from the main storage area verification parameter stored in the main storage area, updating the valid flag parameter of the main storage area to invalid. During BMS operation, the second calculation verification parameter of the data stored in the main storage area is periodically calculated, and the second calculation verification parameter is compared with the main storage area verification parameter stored in the main storage area. If the second calculation verification parameter differs from the main storage area verification parameter, it indicates that the first calibration data stored in the main storage area can no longer match the latest operating state of the BMS. In this case, updating the valid flag parameter of the main storage area to invalid can avoid subsequent backups of the first calibration data that cannot match the latest operating state of the BMS, thereby improving the matching degree between the backup data and the operating state of the BMS.

[0013] Secondly, embodiments of this application provide a battery management system (BMS), including: a main storage area, a backup storage area, a communication circuit, and a processing circuit connected to the main storage area, the backup storage area, and the communication circuit; the communication circuit is used to receive a shutdown command; the processing circuit is used to determine whether the first calibration data stored in the main storage area is valid when the shutdown command is received; if the first calibration data is valid, the processing circuit is further used to back up the first calibration data to the backup storage area and then execute the shutdown command.

[0014] Compared with related technologies, in the battery management system (BMS) provided in this application embodiment, after the communication circuit receives the power-off command, the processing circuit backs up the first calibration data stored in the main storage area to the backup storage area. This eliminates the need to perform data backup operations during BMS initialization and startup, reducing the number of operations required during BMS initialization and startup. Therefore, the total time required for BMS initialization and startup can be reduced, and the initialization and startup speed of the BMS can be improved. In addition, before backing up the first calibration data stored in the main storage area to the backup storage area, the processing circuit determines whether the first calibration data is valid. The first calibration data is backed up only if it is valid, thereby improving the reliability of the backup data.

[0015] Thirdly, embodiments of this application provide an electrical device, including: an electrical circuit and a power supply circuit, wherein the power supply circuit includes at least one battery and a battery management system as described above connected to the at least one battery.

[0016] Fourthly, embodiments of this application provide an energy storage device, including: at least one battery, and a battery management system as described above connected to the at least one battery. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings.

[0018] Figure 1 This is a flowchart illustrating a BMS calibration data storage method provided in one embodiment of this application;

[0019] Figure 2 This is a schematic diagram of the structure of a battery management system provided in one embodiment of this application;

[0020] Figure 3 This is a flowchart illustrating a BMS calibration data storage method provided in another embodiment of this application.

[0021] Figure 4 This is a flowchart illustrating a BMS calibration data storage method provided in another embodiment of this application.

[0022] Figure 5 This application also provides a schematic flowchart of a BMS calibration data storage method according to an embodiment;

[0023] Figure 6 This is a flowchart illustrating a BMS calibration data storage method provided in another embodiment of this application;

[0024] Figure 7 This is a flowchart illustrating the BMS calibration data storage method provided in other embodiments of this application;

[0025] Figure 8 This is a schematic diagram of the battery management system provided in an embodiment of this application;

[0026] Figure 9 This is a schematic diagram of the structure of the electrical equipment provided in the embodiments of this application;

[0027] Figure 10 This is a schematic diagram of the energy storage device provided in an embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0029] Therefore, the following detailed description of embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the present application.

[0030] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0031] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0032] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.

[0033] The technical solutions described in this application are applicable to any Battery Management System (BMS) that manages batteries. The battery can be of any type, size, and purpose; for example, it can be an automotive battery used in electric vehicles, an energy storage battery in wind turbine generators, or any specific battery with a customized purpose. The battery type can include, but is not limited to, lithium batteries, such as lithium iron phosphate batteries and ternary lithium batteries. All electrical devices equipped with a battery management system can utilize the technical solutions described in this application for data storage management.

[0034] In the battery field, the battery cell, as the fundamental building block of a battery, typically consists of several components, including a positive electrode, a negative electrode, an electrolyte, and a separator. The positive electrode is one electrode in the cell, usually composed of a positive electrode active material (such as an oxide), capable of accepting electrons and participating in chemical reactions. The negative electrode is the other electrode in the cell, usually composed of a negative electrode active material (such as carbon or lithium), capable of releasing electrons and participating in chemical reactions. The electrolyte is the medium between the positive and negative electrodes, capable of transferring ions, enabling the battery to undergo chemical reactions. The separator is a material that prevents direct contact between the positive and negative electrodes while allowing ions to pass through. Through these structures, the battery cell can achieve the corresponding charging and discharging functions.

[0035] However, the discharge voltage and capacity of a single battery cell are relatively low, making it difficult to meet the high-voltage and high-capacity requirements of various applications such as electric bicycles, electric motorcycles, and electric vehicles. Therefore, existing batteries typically include a large number of cells connected in series and parallel circuits. During battery use, a large number of cells need to discharge synchronously when the battery is discharged and charge synchronously when the battery is charged. This process needs to be carried out under system control to better improve the synchronicity of the operation of different cells. Under this requirement, the Battery Management System (BMS) has emerged. In addition to controlling the synchronous discharge and charging of a large number of cells, the BMS can also realize various functions such as controlling the timing of battery charging / discharging, controlling the charging / discharging voltage, and managing damaged cells in the battery. In order to realize various functions and improve the power performance and safety performance of the battery, the BMS needs to continuously measure, optimize, and adjust the battery parameters. These battery parameters related to different functions and performance of the battery are called the battery calibration parameters. Battery calibration data may include, for example, the battery's charging and discharging power, judgment thresholds in algorithms that realize different functions, protection thresholds, etc. These calibration data play a key role in the stability and safety of the battery. To ensure the security of calibration data, the calibration data is backed up and stored during the operation of the battery management system (BMS). However, in related technologies, the calibration data backup and storage process occurs during the BMS initialization and startup process. This means that the BMS initialization and startup process can only be completed after the calibration data backup is finished. This backup process significantly impacts the initialization and startup efficiency of the BMS, resulting in a prolonged startup time. Furthermore, if the BMS experiences an abnormal power outage or software reset, leading to incomplete or erroneous updated calibration data, the BMS may back up the incomplete or erroneous calibration data during the restart process, thus reducing the reliability of the backup data.

[0036] To address the aforementioned technical problems, this application provides a BMS calibration data storage method, a battery management system (BMS), electrical equipment, and energy storage equipment. The backup process for calibration data is set during the power-down phase of the battery management system, thereby improving the startup speed. The specific implementation method is as follows.

[0037] Please refer to Figure 1 This application provides a BMS calibration data storage method in one embodiment, applicable to, for example... Figure 2 As shown, it includes a main storage area 100 and a backup storage area 200, and is a battery management system (BMS). Figure 1 As shown, the BMS calibration data storage method includes the following steps:

[0038] Step S101: The BMS receives a shutdown command.

[0039] Step S102: Determine whether the first calibration data stored in the main storage area is valid. If yes, proceed to step S103; otherwise, proceed to step S104.

[0040] Step S103: Back up the first calibration data to the backup storage area.

[0041] Step S104: Execute the shutdown command.

[0042] The main storage area 100 is used to store calibration data during the operation of the battery management system, and the backup storage area 200 is used to store backup data of the calibration data in the main storage area 100, that is, to copy the calibration data stored in the main storage area 100 to the backup storage area 200 for backup storage.

[0043] In some embodiments of this application, such as Figure 2 As shown, in addition to storing calibration data, the main storage area 100 and the backup storage area 200 can also store verification parameters and validity flag parameters for the calibration data. The verification parameters are parameters obtained by performing mathematical operations on the calibration data and are used to verify the integrity and accuracy of the calibration data. The validity flag parameters are parameters used to verify the validity of the calibration data stored in the main storage area 100 and the backup storage area 200.

[0044] In some embodiments of this application, the verification parameter can be, for example, a Cyclic Redundancy Check (CRC) parameter. This involves performing a CRC operation on the calibration data and storing the result as a verification parameter in the main storage area. Similarly, in the backup storage area, a CRC operation can be performed on the backed-up calibration data, and the result can be stored as a verification parameter in the backup storage area. Furthermore, in some embodiments of this application, after backing up the calibration data from the main storage area to the backup storage area, the verification parameters calculated in the main storage area and the verification parameters calculated in the backup storage area can be compared to determine whether the backup data in the backup storage area is consistent with the calibration data in the main storage area, thereby improving the accuracy of the backup data stored in the backup storage area.

[0045] In some embodiments of this application, the valid flag parameter corresponding to the main storage area can be, for example, the last N bytes of the calibration data stored in the main storage area. That is, the last N bytes of the calibration data stored in the main storage area are used as the valid flag parameter corresponding to the main storage area. For example, if the last 4 bytes of the calibration data contain 0x55555555, the calibration data is valid; if the last 4 bytes contain 0xAAAAAAAA, the calibration data is invalid. Similarly, the valid flag parameter corresponding to the backup storage area can be, for example, the last N bytes of the calibration data stored in the backup storage area. At the same time point and within the same battery management system, the valid flag parameters corresponding to the backup storage area and the main storage area are the same, thereby facilitating the determination of the validity of the data stored in the main storage area and the backup storage area.

[0046] In some embodiments of this application, the main storage area 100 may be located in the Dflash area of ​​the battery management system, and the backup storage area 200 may be located in the Pflash area of ​​the battery management system. Here, Dflash, or Data Flash, is a storage area primarily used for storing non-volatile data, and Pflash, or Program Flash, is a storage area primarily used for storing program code or data.

[0047] In step S101, the battery management system is in a state of real-time reception of shutdown commands issued by the host computer. Once a shutdown command is received, the subsequent step S102 is executed. If no shutdown command is received, the system continues to receive shutdown commands until one is received. The shutdown command is the command issued by the host computer to control the battery management system to shut down. It is only issued and received by the battery management system when there is an active need to shut it down, such as when the user presses the power button, the battery is depleted, or the system executes a preset automatic shutdown command. If the battery management system or the host computer experiences abnormal power loss, software reset, or other abnormal situations, no shutdown command is issued, and the battery management system cannot receive the shutdown command.

[0048] In step S102, determining whether the first calibration data stored in the main storage area is valid can be done by judging based on the valid flag parameters stored in the main storage area. If the valid flag parameters stored in the main storage area are valid, such as 0x555555555 as illustrated above, then the first calibration data stored in the main storage area is determined to be valid, and step S103 is executed. Conversely, if the valid flag parameters stored in the main storage area are invalid, such as 0Xaaaaaaa as illustrated above, then the first calibration data stored in the main storage area is determined to be invalid, and step S104 is executed.

[0049] In step S103, backing up the first calibration data to the backup storage area may specifically include: firstly, erasing the existing data in the backup storage area, and copying the first calibration data stored in the main storage area to the backup storage area; then calculating the verification parameters corresponding to the calibration data stored in the backup storage area, comparing the calculated verification parameters with the verification parameters stored in the main storage area, and if the two verification parameters are the same, updating the valid flag parameter corresponding to the backup storage area to valid; otherwise, if the two verification parameters are different, updating the valid flag parameter corresponding to the backup storage area to invalid. After updating the valid flag parameter corresponding to the backup storage area to invalid, the aforementioned steps can be repeated to back up the first calibration data to the backup storage area, or a backup failure alarm can be issued directly.

[0050] In step S104, executing the power-off command completes the subsequent power-off actions and shuts down the battery management system.

[0051] Compared with related technologies, in the BMS calibration data storage method provided in one embodiment of this application, after the BMS receives a shutdown command and is about to execute the shutdown command, it backs up the first calibration data stored in the main storage area to the backup storage area. This eliminates the need to perform data backup operations during BMS initialization and startup, reducing the operation procedures required during BMS initialization and startup. Therefore, it can reduce the total time required for the initialization and startup of the battery management system (BMS) and improve the initialization and startup speed of the BMS. In addition, before backing up the first calibration data stored in the main storage area to the backup storage area, it is determined whether the first calibration data is valid. The first calibration data is backed up only if it is valid, thereby improving the reliability of the backup data.

[0052] Please refer to Figure 3 In another embodiment of this application, a BMS calibration data storage method is provided, which also includes steps S101 to S104 provided in the aforementioned embodiments. The difference is that the BMS calibration data storage method provided in this embodiment further includes:

[0053] Step S105: Determine whether the second calibration data stored in the backup storage area is the same as the first calibration data. If yes, proceed to step S102; otherwise, proceed to step S104.

[0054] It is understood that executing step S105 first and then step S102 is merely an illustrative example in this embodiment. In another embodiment of this application, it could also be as follows: Figure 4As shown, step S102 is executed first, followed by step S105. There is no fixed or necessary order between the two. Only both judgment steps need to be executed. Finally, when the second calibration data is different from the first calibration data and the first calibration data is valid, steps S102 and S103 are executed. When the second calibration data is the same as the first calibration data, step S104 is executed.

[0055] Compared with related technologies, the BMS calibration data storage method provided in this embodiment determines whether the second calibration data stored in the backup storage area is the same as the first calibration data. If the second calibration data is the same as the first calibration data, it means that the first calibration data has not been updated. In this case, the shutdown command is executed directly without backing up the first calibration data again. The backup operation of the first calibration data can be eliminated. Compared with the process of determining whether the second calibration data and the first calibration data are the same, the process of backing up the first calibration data requires more processor resources and consumes more data processing time. Eliminating the backup operation of the first calibration data can reduce processor resource consumption and improve calibration data storage efficiency.

[0056] In the aforementioned step S105, determining whether the second calibration data stored in the backup storage area is the same as the first calibration data can be specifically done by comparing the second calibration data and the first calibration data one by one, and determining whether the second calibration data is the same as the first calibration data based on the comparison results.

[0057] Specifically, the second calibration data and the first calibration data are compared one by one. This means that each bit of the second calibration data and the first calibration data are compared and mapped to each other. Specifically, the data with the same number of bits in the first calibration data and the second calibration data are compared one by one. If all the data with the same number of bits in the first calibration data and the second calibration data are the same, then the second calibration data and the first calibration data are the same. Otherwise, if at least one bit of the data with the same number of bits in the first calibration data and the second calibration data are different, then the second calibration data and the first calibration data are different.

[0058] Understandably, in practical applications, due to the extremely large amount of data in both the first and second calibration data sets, the probability that all data with the same number of digits in both sets are identical is low. Therefore, in the practical application of this embodiment, a difference threshold can be preset. If the data deviation between the first and second calibration data sets does not exceed the preset difference threshold, the second calibration data and the first calibration data are considered identical. For example, if the preset difference threshold is 100, even if there are M different data with the same number of digits in the first and second calibration data sets, as long as M is less than or equal to 100, the second calibration data and the first calibration data are considered identical; conversely, if M is greater than 100, the second calibration data and the first calibration data are considered different.

[0059] Compared to comparing the verification parameters corresponding to the first and second calibration data, comparing the first and second calibration data one by one can avoid the situation where verification parameters collide (two or more different data blocks generate the same verification parameters after calculation, such as the CRC parameters illustrated in the previous embodiment, which may collide). This improves the reliability of the comparison results between the first and second calibration data, thereby reducing the possibility that the first and second calibration data are inconsistent but the first calibration data has not been backed up, and improving the reliability of the backup data.

[0060] Please refer to Figure 5 In another embodiment of this application, a BMS calibration data storage method is provided, which also includes steps S101 to S104 provided in the aforementioned embodiments. The difference is that the BMS calibration data storage method provided in this embodiment further includes:

[0061] Step S106: In response to the BMS receiving the calibration data flush command, erase all data stored in the main storage area.

[0062] Step S107: In response to receiving the target calibration data corresponding to the calibration data write command, store the target calibration data into the main storage area.

[0063] Step S108: Calculate the first operation verification parameter based on the target calibration data.

[0064] Step S109: In response to receiving the target verification parameter corresponding to the calibration data writing instruction, determine whether the first operation verification parameter is the same as the target verification parameter. If they are the same, execute step S110; if they are not the same, execute step S111.

[0065] Step S110: Update the valid flag parameter of the main storage area to valid.

[0066] Step S111: Update the valid flag parameter of the main storage area to invalid.

[0067] Specifically, in the embodiments of this application, the battery management system generates new calibration data during operation. This new calibration data needs to be written into the main storage area for storage. This process is called the calibration data writing process.

[0068] In step S106, the calibration data writing process begins with the host computer or other device that generates new calibration data sending a calibration data writing instruction to the battery management system, instructing the battery management system to write the calibration data. After receiving the calibration data writing instruction, the battery management system erases all data stored in the main storage area, freeing up the main storage area to store new calibration data.

[0069] In step S107, after the host computer or other device that generates new calibration data sends a calibration data write command to the battery management system, it will continue to send the target calibration data corresponding to the calibration data write command. The target calibration data is the new calibration data that needs to be stored in the main storage area. After receiving the target calibration data, the battery management system will store the target calibration data in the main storage area where all stored data has been erased.

[0070] In subsequent step S108, the battery management system also calculates the target calibration data already stored in the main storage area and uses the calculation result as the first operation verification parameter.

[0071] In step S109, after the host computer or other device generating new calibration data sends the calibration data write command and the corresponding target calibration data to the battery management system, it will also continue to send the corresponding target verification parameters. The target verification parameters are the verification parameters calculated by the host computer or other device generating new calibration data based on the target calibration data. It is understandable that due to potential transmission deviations during data transmission, the target calibration data may differ between the sending end (host computer, etc.) and the receiving end (battery management system). The target calibration data is the verification parameter calculated by the sending end (host computer, etc.) based on the target calibration data at the time of transmission, while the first calculation verification parameter is the verification parameter calculated by the receiving end (battery management system) based on the actual received target calibration data. In step S109, it is determined whether the first operation verification parameter is the same as the target verification parameter, that is, the first operation verification parameter is compared with the target verification parameter. If the comparison result is the same, it means that the target calibration data has not deviated significantly during transmission and the reliability of the target calibration data received by the battery management system is high, and step S110 is executed. If the comparison result is different, it means that the target calibration data may have deviated significantly during transmission and the reliability of the target calibration data received by the battery management system is low, and step S111 is executed.

[0072] Compared with related technologies, in the BMS calibration data storage method provided in this embodiment, when the battery management system receives the calibration data writing instruction to write new calibration data to the main storage area, after storing the received target calibration data into the main storage area, it also calculates the received data to obtain the first operation verification parameter. By comparing the first operation verification parameter with the received target verification parameter, it determines whether the target calibration data stored in the main storage area is valid, which can improve the data reliability of the data stored in the main storage area.

[0073] In some embodiments of this application, storing the target calibration data into the main storage area in step S107 can specifically be done by storing the target calibration data into the main storage area through asynchronous task execution.

[0074] Asynchronous task execution is a task execution method, as opposed to synchronous task execution. Asynchronous task execution means that when two or more tasks need to be executed at the same time, there is no sequential relationship between the tasks. Each task can begin execution as soon as its execution conditions are met, without waiting for the previous task to complete. Conversely, synchronous task execution means that when two or more tasks need to be executed at the same time, there is a sequential relationship between them. Even if each task meets its execution conditions, it must wait for the other tasks in its execution order to complete before it can begin execution.

[0075] Asynchronous task execution and the independent execution of different tasks do not require waiting for the completion of the previous task before the execution of the next task can begin. This method does not block the execution of tasks and can improve the system's response speed and processing efficiency. In this embodiment, the target calibration data is stored in the main storage area by executing tasks asynchronously. During the data writing process, the BMS can still maintain battery management, so that the electrical equipment connected to the battery can continue to operate normally.

[0076] Please refer to Figure 6 In another embodiment of this application, a BMS calibration data storage method is provided, which also includes steps S101 to S104 provided in the foregoing embodiments. The difference is that the BMS calibration data storage method provided in this embodiment further includes:

[0077] Step S112: In response to the BMS receiving the initialization command, determine whether the first calibration data stored in the main memory area is valid. If yes, proceed to step S113; otherwise, proceed to step S114.

[0078] Step S113: Execute the initialization instruction to copy the first calibration data to the random access memory (RAM).

[0079] Step S114: Determine whether the second calibration data stored in the backup storage area is valid. If yes, proceed to step S115; otherwise, proceed to step S116.

[0080] Step S115: Execute the initialization instruction to copy the second calibration data to the random access memory (RAM) and the main memory area.

[0081] Step S116: Issue a system fault alarm.

[0082] In step S112, the initialization command is the start command for the battery management system. When the battery management system is in the off state, receiving the initialization command will start the battery management system. Determining whether the first calibration data stored in the main storage area is valid can also be done based on the valid flag parameters stored in the main storage area. If the valid flag parameters stored in the main storage area are valid (e.g., 0x555555555 as illustrated in the previous example), then the first calibration data stored in the main storage area is determined to be valid, and step S113 is executed. Conversely, if the valid flag parameters stored in the main storage area are invalid (e.g., 0Xaaaaaaa as illustrated in the previous example), then the first calibration data stored in the main storage area is determined to be invalid, and step S114 is executed.

[0083] In step S113, the initialization command is executed, i.e., the battery management system starts up. At this time, the first calibration data is copied to the random access memory (RAM) for the software in the battery management system to call during runtime. Random access memory (RAM) is a type of running memory used to temporarily store data. Unlike Dflash and Pflash, which are used to set the main and backup storage areas, RAM operations do not involve the complex process of erasing and writing to specific states. It directly supports random access and fast read / write. RAM is volatile, meaning that data is lost after power failure. The data in RAM is dynamically stored; it is lost after each power-off and refreshed upon power-on.

[0084] In step S114, determining whether the second calibration data stored in the backup storage area is valid is largely the same as determining whether the first calibration data stored in the main storage area is valid. That is, the determination is made based on the valid flag parameters stored in the backup storage area. For details, please refer to the specific explanation of determining whether the first calibration data stored in the main storage area is valid. It will not be repeated here.

[0085] During the initial startup of the BMS, if the first calibration data in the main storage area is invalid, the second calibration data is copied to the main storage area. This means that the backup data is rolled back during the initial startup of the BMS, thereby reducing the possibility of system failures caused by data invalidation in the main storage area due to special events such as abnormal power outages or software resets.

[0086] Please refer to Figure 7 Other embodiments of this application provide a BMS calibration data storage method, which also includes steps S101 to S104 and steps S112 to S116 provided in the aforementioned embodiments. The difference is that the BMS calibration data storage method provided in this embodiment further includes:

[0087] Step S117: In response to the BMS receiving the initialization command, periodically perform real-time calculations on the data stored in the main storage area to obtain the second calculation verification parameter.

[0088] Step S118: When the second operation verification parameter is different from the main storage area verification parameter stored in the main storage area, update the valid flag parameter of the main storage area to invalid.

[0089] Specifically, the periodic real-time calculation of the data stored in the main storage area can be performed at preset intervals. The calculation yields a second calculation verification parameter corresponding to that time. This second calculation verification parameter is then compared with the main storage area verification parameter stored in the main storage area. If they are the same, it indicates that the battery management system's calibration data has not changed, and the real-time calculation continues after another preset interval. If they are different, it indicates that the battery management system's calibration data has changed. In this case, the first calibration data stored in the main storage area no longer matches the latest operating state of the battery management system, and the first calibration data in the main storage area has become invalid. Therefore, the valid flag parameter in the main storage area is updated to invalid to avoid subsequent backups of the first calibration data that does not match the latest operating state of the BMS.

[0090] During BMS operation, the second operation verification parameter of the data stored in the main storage area is periodically calculated and compared with the main storage area verification parameter stored in the main storage area. If the second operation verification parameter is different from the main storage area verification parameter, it means that the first calibration data stored in the main storage area can no longer match the latest operating state of the BMS. At this time, the valid flag parameter of the main storage area is updated to invalid, which can avoid the need to back up the first calibration data that cannot match the latest operating state of the BMS, and improve the matching degree between the backup data and the operating state of the BMS.

[0091] Please refer to Figure 8 This application embodiment also provides a battery management system (BMS), including a main storage area 100, a backup storage area 200, a communication circuit 300, and a processing circuit 400 connected to the main storage area 100, the backup storage area 200, and the communication circuit 300; the communication circuit 300 is used to receive a shutdown command; the processing circuit 400 is used to determine whether the first calibration data stored in the main storage area 100 is valid when the shutdown command is received. If the first calibration data is valid, the processing circuit 400 is also used to back up the first calibration data to the backup storage area 200 and then execute the shutdown command.

[0092] It is understood that this embodiment is an embodiment of a battery management system corresponding to the BMS calibration data storage method provided in the foregoing embodiments. Therefore, the battery management system provided in this embodiment can execute all the BMS calibration data storage methods provided in the foregoing embodiments, and the BMS calibration data storage method provided in any of the foregoing embodiments can also be applied to the battery management system provided in this embodiment. That is, the communication circuit 300 provided in this embodiment can also be used to receive the initialization command, calibration data writing command, target calibration data, and target verification parameters disclosed in the foregoing embodiments, and the processing circuit 400 can also execute the data storage methods disclosed in the foregoing embodiments, which will not be described in detail here.

[0093] Compared with related technologies, in the battery management system (BMS) provided in this embodiment, after the communication circuit receives the power-off command, the processing circuit backs up the first calibration data stored in the main storage area to the backup storage area. This eliminates the need for data backup during BMS initialization and startup, reducing the number of operations required during the BMS initialization and startup process. Therefore, it can reduce the total time required for the initialization and startup of the battery management system (BMS) and improve the initialization and startup speed of the BMS. In addition, before backing up the first calibration data stored in the main storage area to the backup storage area, the processing circuit determines whether the first calibration data is valid. The first calibration data is backed up only if it is valid, thereby improving the reliability of the backup data.

[0094] Please refer to Figure 9 This application also provides an electrical device, including: an electrical circuit 10 and a power supply circuit 20, wherein the power supply circuit 20 includes at least one battery 201 and a battery management system 202 as provided in the foregoing embodiments connected to the at least one battery 201.

[0095] Specifically, in this embodiment, the electrical equipment can be, for example, an electric vehicle, a laptop computer, or other such devices, and the corresponding electrical circuit 10 can be, for example, the relevant circuit of a car motor, a computer processor, or other such devices.

[0096] Please refer to Figure 10 This application also provides an energy storage device, including: at least one battery 201 and a battery management system 202 as provided in the foregoing embodiments connected to the at least one battery 201.

[0097] Specifically, in this embodiment, the energy storage device can be, for example, an energy storage power station in a wind power station or a tidal power station.

[0098] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method embodiments.

[0099] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0100] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A BMS calibration data storage method, characterized in that, The battery management system (BMS) that includes a main storage area and a backup storage area is used to calibrate the data storage method, which includes: In response to the BMS receiving a shutdown command, it determines whether the first calibration data stored in the main storage area is valid; If the first calibration data is valid, back up the first calibration data to the backup storage area and then execute the shutdown command.

2. The BMS calibration data storage method according to claim 1, characterized in that, Before executing the shutdown command after backing up the first calibration data to the backup storage area, the BMS calibration data storage method further includes: Determine whether the second calibration data stored in the backup storage area is the same as the first calibration data; If the second calibration data is different from the first calibration data and the first calibration data is valid, the following steps are executed: back up the first calibration data to the backup storage area and then execute the shutdown command; If the second calibration data is the same as the first calibration data, execute the shutdown command.

3. The BMS calibration data storage method according to claim 2, characterized in that, The step of determining whether the second calibration data stored in the backup storage area is the same as the first calibration data includes: Compare the second calibration data with the first calibration data one by one, and determine whether the second calibration data and the first calibration data are the same based on the comparison results.

4. The BMS calibration data storage method according to claim 1, characterized in that, The BMS calibration data storage method further includes: In response to the BMS receiving a calibration data write command, all data stored in the main storage area is erased; In response to receiving target calibration data corresponding to the calibration data write instruction, the target calibration data is stored in the main storage area, and the first operation verification parameter is calculated based on the target calibration data; In response to receiving the target verification parameter corresponding to the calibration data write instruction, if the first operation verification parameter and the target verification parameter are different, the valid flag parameter of the main storage area is updated to invalid; if the first operation verification parameter and the target verification parameter are the same, the valid flag parameter of the main storage area is updated to valid.

5. The BMS calibration data storage method according to claim 4, characterized in that, The step of storing the target calibration data into the main storage area includes: The target calibration data is stored in the main storage area by executing tasks asynchronously.

6. The BMS calibration data storage method according to claim 1, characterized in that, The BMS calibration data storage method further includes: In response to the BMS receiving an initialization command, it is determined whether the first calibration data stored in the main storage area is valid; If the first calibration data is valid, execute the initialization instruction to copy the first calibration data to the random access memory (RAM); If the first calibration data is invalid, determine whether the second calibration data stored in the backup storage area is valid; If the second calibration data is valid, execute the initialization instruction to copy the second calibration data to the random access memory RAM and the main memory area; If the second calibration data is invalid, a system fault alarm will be issued.

7. The BMS calibration data storage method according to claim 1, characterized in that, The BMS calibration data storage method further includes: In response to the BMS receiving an initialization command, it periodically performs real-time calculations on the data stored in the main storage area to obtain the second calculation verification parameter; When the second operation verification parameter is different from the main storage area verification parameter stored in the main storage area, the valid flag parameter of the main storage area is updated to be invalid.

8. A battery management system (BMS), characterized in that, include: The main storage area, the backup storage area, the communication circuit, and the processing circuit connected to the main storage area, the backup storage area, and the communication circuit; The communication circuit is used to receive power-off commands; The processing circuit is used to execute the BMS calibration data storage method as described in any one of claims 1 to 7.

9. An electrical appliance, characterized in that, include: The power supply circuit and the power consumption circuit, the power supply circuit including at least one battery and a battery management system as described in claim 8 connected to the at least one battery.

10. An energy storage device, characterized in that, include: At least one battery, and a battery management system as described in claim 8 connected to said at least one battery.