Battery pack coding method and device, battery pack and photovoltaic system

By using the election and voting mechanism between battery packs connected by CAN bus in the photovoltaic system, the arbitration battery pack is automatically selected and the coding is allocated for other battery packs, the problem of manual configuration is solved and the configuration efficiency and accuracy is improved.

CN119892797APending Publication Date: 2025-04-25GUANGZHOU LANGO ELECTRONICS TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411932129.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In large photovoltaic power plants, manual configuration of battery pack encoding is inefficient and errors are prone to occur, resulting in complex deployment of photovoltaic systems and high time cost.

Method used

Between the battery packs connected through the CAN bus, the election message and voting results are negotiated, and the arbitration battery packs are automatically selected, which assigns the encoding to each battery pack to avoid manual configuration.

Benefits of technology

Automatic encoding of battery packs is realized, which improves the configuration efficiency of photovoltaic systems when extending access to battery packs, and reduces manual errors and deployment time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892797A_ABST
    Figure CN119892797A_ABST
Patent Text Reader

Abstract

The invention provides a battery pack coding method and device, a battery pack and a photovoltaic system, relates to the technical field of batteries, and is used for automatically coding the battery pack in the photovoltaic system and improving the configuration efficiency when the photovoltaic system is expanded and accessed to the battery pack. The method is applied to a target battery pack, and the target battery pack is any battery pack in a photovoltaic system. The battery pack coding method comprises the steps that after a target battery pack is powered on, an election message is sent to a first battery pack through a CAN bus, and the election message sent by the first battery pack is acquired through the CAN bus; and the target battery pack generates a voting result according to the battery pack information of the target battery pack and the battery pack information of the first battery pack. And the target battery pack determines an arbitration battery pack according to the voting result generated by the target battery pack and the voting result sent by the first battery pack. And under the condition that the target battery pack is the arbitration battery pack, codes are allocated to the target battery pack and the first battery pack respectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of battery technology, and in particular to a battery pack coding method, device, battery pack and photovoltaic system. Background Art

[0002] As the energy storage unit in the photovoltaic system, each battery pack needs to have a unique code to manage the battery pack, such as charge and discharge management, during the operation of the photovoltaic system.

[0003] At present, when a battery pack is connected to a photovoltaic system, the operation and maintenance personnel usually need to manually configure it to ensure that the battery pack can be correctly identified and managed by the photovoltaic system. Especially in large photovoltaic power stations, when multiple battery packs are connected at the same time, this manual configuration method is not only inefficient, but also prone to errors, which greatly increases the complexity and time cost of photovoltaic system deployment. Summary of the invention

[0004] The present application proposes a battery pack coding method, device, battery pack and photovoltaic system, which are used to realize automatic coding of battery packs in a photovoltaic system and improve the configuration efficiency when the photovoltaic system is expanded and connected to the battery pack.

[0005] In order to achieve the above purpose, this application adopts the following technical solutions:

[0006] In a first aspect, a battery pack coding method is provided, which is applied to a target battery pack, wherein the target battery pack is any battery pack in a photovoltaic system, and multiple battery packs in the photovoltaic system are connected via a controller area network (CAN) bus. The battery pack coding method includes: after the target battery pack is powered on, the target battery pack sends an election message to the first battery pack via the CAN bus, and obtains the election message sent by the first battery pack via the CAN bus; the first battery pack is a battery pack other than the target battery pack among the multiple battery packs, and the election message includes battery pack information. Further, the target battery pack generates a voting result based on the battery pack information of the target battery pack and the battery pack information of the first battery pack, and the voting result includes the battery pack serial number of the arbitration battery pack. The target battery pack sends the voting result to the first battery pack via the CAN bus, and obtains the voting result sent by the first battery pack via the CAN bus. Further, the target battery pack determines the arbitration battery pack based on the voting result generated by the target battery pack and the voting result sent by the first battery pack. And when the target battery pack is the arbitration battery pack, codes are respectively allocated to the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack.

[0007] In the battery pack coding method provided in the present application, through the battery pack coding method provided in the present application, after any battery pack in the photovoltaic system is powered on, it negotiates with other battery packs by sending election messages, thereby obtaining the battery pack information of each battery pack in the photovoltaic system, and further voting to select an arbitration battery pack. The arbitration battery pack assigns codes to each battery pack in the photovoltaic system, without the need for manual configuration by operation and maintenance personnel, which greatly improves the configuration efficiency when the photovoltaic system is expanded and connected to the battery pack.

[0008] In one possible design, the above-mentioned battery pack coding method also includes: when the target battery pack is not an arbitration battery pack, the target battery pack obtains the code assigned to the target battery pack by the arbitration battery pack, and sends a confirmation message to the arbitration battery pack, so that the arbitration battery pack confirms that the target battery pack completes the coding allocation.

[0009] In one possible design, the battery pack information includes the battery pack serial number, the battery pack model, the battery pack capacity, the battery pack state of health (SOH), the battery pack initial voltage, and the battery pack initial current.

[0010] In one possible design, the arbitration battery pack is configured to periodically send heartbeat signals to other battery packs, and the heartbeat signals are used to characterize that the arbitration battery pack is in an operating state. The above-mentioned battery pack encoding method also includes: when the target battery pack is not an arbitration battery pack, the target battery pack starts timing after obtaining the heartbeat signal. If the next heartbeat signal is not received after a preset time period, it is determined that the arbitration battery pack is offline, and a re-election request message is sent to the first battery pack, so that the target battery pack and the first battery pack re-elect the arbitration battery pack.

[0011] In a possible design, the voting result also includes the serial number of the alternative arbitration battery pack, and the alternative arbitration battery pack is used to update the arbitration battery pack in the event that the arbitration battery pack fails.

[0012] In one possible design, the target battery pack assigns codes to the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, respectively, including: sorting the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack to obtain the order of the target battery pack and the first battery pack; generating the code of the target battery pack and the code of the first battery pack according to the order of the target battery pack and the first battery pack, and sending the corresponding codes to the first battery pack, respectively.

[0013] In one possible design, the target battery packs and the first battery packs are sorted according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, including: the target battery pack determines the sorting value of the target battery pack according to the battery pack information of the target battery pack; determines the sorting value of the first battery pack according to the battery pack information of the first battery pack; and sorts the target battery pack and the first battery pack according to the sorting value of the target battery pack and the sorting value of the first battery pack.

[0014] In a second aspect, a battery pack encoding device is provided, which is deployed on a target battery pack. The target battery pack is any battery pack in a photovoltaic system. Multiple battery packs in the photovoltaic system are connected via a CAN bus. The battery pack encoding device includes a sending unit, an acquisition unit, and a processing unit. The sending unit is used to send an election message to a first battery pack via the CAN bus after the target battery pack is powered on. The first battery pack is a battery pack other than the target battery pack among the multiple battery packs, and the election message includes battery pack information. The acquisition unit is used to acquire the election message sent by the first battery pack via the CAN bus. The processing unit is used to generate a voting result based on the battery pack information of the target battery pack and the battery pack information of the first battery pack, and the voting result includes the battery pack serial number of the arbitration battery pack. The sending unit is also used to send the voting result to the first battery pack via the CAN bus. The acquisition unit is also used to acquire the voting result sent by the first battery pack via the CAN bus. The processing unit is also used to determine the arbitration battery pack based on the voting result generated by the target battery pack and the voting result sent by the first battery pack. The processing unit is further configured to, when the target battery pack is an arbitration battery pack, assign codes to the target battery pack and the first battery pack respectively according to the battery pack information of the target battery pack and the battery pack information of the first battery pack.

[0015] In a possible design, the acquisition unit is further used to acquire the code assigned by the arbitration battery pack to the target battery pack when the target battery pack is not the arbitration battery pack. The sending unit is further used to send a confirmation message to the arbitration battery pack so that the arbitration battery pack confirms that the target battery pack has completed the code assignment.

[0016] In one possible design, the battery pack information includes the battery pack serial number, the battery pack model, the battery pack capacity, the battery pack SOH, the battery pack initial voltage, and the battery pack initial current.

[0017] In one possible design, the arbitration battery pack is configured to periodically send heartbeat signals to other battery packs, and the heartbeat signals are used to indicate that the arbitration battery pack is in operation. The processing unit is also used to start timing after receiving the heartbeat signal when the target battery pack is not the arbitration battery pack. If the next heartbeat signal is not received after a preset time period, the arbitration battery pack is determined to be offline. The sending unit is also used to send a re-election request message to the first battery pack, so that the target battery pack and the first battery pack re-elect the arbitration battery pack.

[0018] In a possible design, the voting result also includes the serial number of the alternative arbitration battery pack, and the alternative arbitration battery pack is used to update the arbitration battery pack in the event that the arbitration battery pack fails.

[0019] In one possible design, the processing unit is specifically used to sort the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack to obtain the order of the target battery pack and the first battery pack; generate the code of the target battery pack and the code of the first battery pack according to the order of the target battery pack and the first battery pack, and send the corresponding codes to the first battery pack respectively.

[0020] In one possible design, the processing unit is specifically used to determine a ranking value of a target battery pack based on the battery pack information of the target battery pack; determine a ranking value of a first battery pack based on the battery pack information of the first battery pack; and sort the target battery pack and the first battery pack based on the ranking value of the target battery pack and the ranking value of the first battery pack.

[0021] In a third aspect, a battery pack is provided, which includes a memory and a processor; the memory and the processor are coupled, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the battery pack executes the battery pack coding method provided in the first aspect or any possible design thereof.

[0022] In a fourth aspect, a photovoltaic system is provided, comprising the battery pack provided in the third aspect.

[0023] In a fifth aspect, a computer-readable storage medium is provided, in which instructions are stored. When the instructions are executed on a battery pack, the battery pack executes the battery pack encoding method provided in the first aspect or any possible implementation thereof.

[0024] In a sixth aspect, a computer program product is provided, the computer program product comprising computer instructions, which, when executed on a battery pack, causes the battery pack to execute the battery pack encoding method provided in the first aspect or any possible implementation thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic diagram of a photovoltaic system structure provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of a battery pack encoding method flow chart provided in an embodiment of the present application;

[0027] Figure 3 A schematic diagram of the structure of a battery pack encoding device provided in an embodiment of the present application;

[0028] Figure 4 A schematic diagram of a battery pack structure provided for an embodiment of the present application. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0030] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0031] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" and "plurality" refer to two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.

[0032] As the energy storage unit in the photovoltaic system, each battery pack needs to have a unique code to manage the battery pack during the operation of the photovoltaic system, such as charge and discharge management. At present, when the battery pack is connected to the photovoltaic system, the operation and maintenance personnel usually need to manually configure it to ensure that the battery pack can be correctly identified and managed by the photovoltaic system. Especially in large photovoltaic power stations, when multiple battery packs are connected at the same time, this manual configuration method is not only inefficient, but also prone to errors, which greatly increases the complexity and time cost of photovoltaic system deployment.

[0033] To solve the above problems, the present application proposes a battery pack coding method, device, battery pack and photovoltaic system. The battery pack coding method is applied to a target battery pack, which is any battery pack in a photovoltaic system. Multiple battery packs in the photovoltaic system are connected through a CAN bus. The battery pack coding method includes: after the target battery pack is powered on, it sends an election message to the first battery pack through the CAN bus, and obtains the election message sent by the first battery pack through the CAN bus; the first battery pack is a battery pack other than the target battery pack among the multiple battery packs, and the election message includes battery pack information. Further, the target battery pack generates a voting result based on the battery pack information of the target battery pack and the battery pack information of the first battery pack, and the voting result includes the battery pack serial number of the arbitration battery pack. The target battery pack sends the voting result to the first battery pack through the CAN bus, and obtains the voting result sent by the first battery pack through the CAN bus. Further, the target battery pack determines the arbitration battery pack based on the voting result generated by the target battery pack and the voting result sent by the first battery pack. And when the target battery pack is the arbitration battery pack, codes are respectively allocated to the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack.

[0034] In this way, through the battery pack coding method provided by the present application, through the battery pack coding method provided by the present application, any battery pack in the photovoltaic system, after being powered on, can negotiate with other battery packs by sending election messages, thereby obtaining the battery pack information of each battery pack in the photovoltaic system, and further voting to select an arbitration battery pack. The arbitration battery pack assigns codes to each battery pack in the photovoltaic system, without the need for manual configuration by operation and maintenance personnel, which greatly improves the configuration efficiency when the photovoltaic system is expanded and connected to the battery pack.

[0035] Figure 1 A photovoltaic system is shown. The battery pack encoding method provided in the embodiment of the present application can be applied to Figure 1 Any battery pack in the photovoltaic system shown is used to realize automatic encoding of the battery pack after power-on, thereby improving the configuration efficiency when the photovoltaic system is connected to the battery pack. Figure 1 As shown, the photovoltaic system 10 includes a host 11 and a plurality of battery packs 12 .

[0036] The multiple battery packs 12 may be battery packs of the same specification or battery packs of different specifications, which is not specifically limited in the present embodiment. The host 11 is connected to the multiple battery packs 12 respectively, and the multiple battery packs 12 are all connected to the CAN bus in the photovoltaic system 10, and the multiple battery packs can communicate with each other through the CAN bus.

[0037] Figure 2is a flowchart of a battery pack coding method according to some exemplary embodiments. In some embodiments, the battery pack coding method can be applied to Figure 1 Any one of the multiple battery packs 12 in the photovoltaic system 10 shown. In the following, the embodiment of the present application takes the battery pack coding method applied to any one of the multiple battery packs 12 as an example to illustrate the battery pack coding method.

[0038] like Figure 2 As shown, the battery pack coding method provided in the embodiment of the present application includes the following S201-S205.

[0039] S201. After being powered on, the target battery pack sends an election message to the first battery pack through the CAN bus, and obtains the election message sent by the first battery pack through the CAN bus.

[0040] As a possible implementation, the target battery pack generates an election message based on the battery pack information in response to the power-on of the photovoltaic system, reports it to the CAN bus, and sends the election message to the first battery pack via the CAN bus. In addition, the target battery pack monitors the messages on the CAN bus and obtains the election message sent by the first battery pack. Furthermore, the target battery pack obtains the battery pack information of the first battery pack from the election message sent by the first battery pack.

[0041] It can be understood that since the target battery pack is any battery pack in the photovoltaic system, that is, in the photovoltaic system, each battery pack will generate an election message and send it to other battery packs after power-on, so that each battery pack can obtain the battery pack information of all the current battery packs in the photovoltaic system, thereby realizing the identification of each battery pack in the photovoltaic system.

[0042] In some embodiments, if the target battery pack has been configured with a code, the election message also includes the code of the target battery pack.

[0043] In some embodiments, if the target battery pack fails to successfully send an election message due to CAN bus congestion or other reasons, the election message is resent after a preset time until the election message is sent. Exemplarily, the preset time may be 5 seconds.

[0044] In some embodiments, the battery pack information includes a battery pack serial number, a battery pack model, a battery pack capacity, a battery pack SOH, a battery pack initial voltage, and a battery pack initial current.

[0045] Exemplarily, the format of the election message can be <battery pack serial number><battery pack model><battery pack capacity><battery pack SOH><battery pack initial voltage><battery pack initial current>, wherein the battery pack information includes the battery pack serial number, battery pack model, battery pack capacity, battery pack SOH, battery pack initial voltage, and battery pack initial current.

[0046] S202: The target battery pack generates a voting result according to the battery pack information of the target battery pack and the battery pack information of the first battery pack.

[0047] The voting result includes the serial number of the arbitration battery pack.

[0048] As a possible implementation method, the target battery pack determines the battery pack with the highest battery pack SOH as the arbitration battery pack based on the battery pack SOH included in the battery pack information of each battery pack, and generates a voting result based on the battery pack serial number of the determined arbitration battery pack.

[0049] In some embodiments, the target battery pack may also determine the battery pack with the largest battery pack capacity as the arbitration battery pack according to the battery pack capacity included in the battery pack information of each battery pack, and generate a voting result based on the battery pack serial number of the determined arbitration battery pack.

[0050] In some embodiments, if there are at least two battery packs with the highest battery pack SOH among the multiple battery packs, the battery pack with the largest battery pack capacity is determined as the arbitration battery pack from among the at least two battery packs with the highest battery pack SOH.

[0051] Furthermore, if there are still at least two battery packs with the largest capacity, the numerical value corresponding to the battery pack serial number is calculated based on the battery pack serial number of the battery pack, and the battery pack with the largest or smallest corresponding numerical value is selected as the arbitration battery pack, and the voting result is generated based on the determined battery pack serial number of the arbitration battery pack.

[0052] Among them, the target battery pack calculates the corresponding value of the battery pack serial number as follows: directly take the values ​​of the numbers in the battery pack serial number, assign values ​​to the letters in the battery pack serial number, and further sum the number values ​​and the letter assignments to obtain the value corresponding to the battery pack serial number. Among them, when assigning values ​​to the letters in the battery pack serial number, the letters are assigned according to the order of the 26 letters. For example, the serial number is AX233B2, the target battery pack takes the values ​​of 2, 3, 3, 2 for the numbers, and assigns the values ​​of 1, 24, 2 for the letters. The further summation obtains the value corresponding to the battery pack serial number as 2+3+3+2+1+24+2=36.

[0053] In some embodiments, the voting result also includes the serial number of the candidate arbitration battery pack.

[0054] The target battery pack determines the battery pack next to the arbitration battery pack as the candidate arbitration battery pack according to the above-mentioned method of selecting the arbitration battery pack, and generates a voting result based on the battery pack serial number of the candidate arbitration battery pack. The candidate arbitration battery pack is used to update to the arbitration battery pack in the event that the arbitration battery pack fails.

[0055] S203: The target battery pack sends the voting result to the first battery pack via the CAN bus, and obtains the voting result sent by the first battery pack via the CAN bus.

[0056] As a possible implementation method, the target battery pack sends the voting results to the first battery pack through the CAN bus, so that the first battery pack obtains the arbitration battery pack selected by the target battery pack, and obtains the voting results sent by the first battery pack through the CAN bus to obtain the arbitration battery pack selected by the first battery pack.

[0057] S204: The target battery pack determines an arbitration battery pack according to the voting result generated by the target battery pack and the voting result sent by the first battery pack.

[0058] As a possible implementation method, after obtaining the voting results sent by the first battery pack, the target battery pack counts the voting results generated by the target battery pack and the voting results sent by the first battery pack to determine that the battery pack corresponding to the battery pack serial number with the most elections is the arbitration battery pack.

[0059] S205 : When the target battery pack is an arbitration battery pack, assign codes to the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack.

[0060] As a possible implementation method, the target battery pack calculates the code corresponding to each battery pack based on the battery pack information of the battery pack, and after obtaining the code corresponding to each battery pack, sends the corresponding code to each battery pack through the CAN bus.

[0061] In some embodiments, the target battery pack calculates each item of information included in the battery pack information to obtain a numerical value corresponding to each item of information, and combines the numerical values ​​to obtain the code of the battery pack.

[0062] Exemplarily, the target battery pack is calculated for the battery pack serial number, battery pack model, battery pack capacity, battery pack SOH, battery pack initial voltage, and battery pack initial current, and the corresponding values ​​of the battery pack serial number, battery pack model, battery pack capacity, battery pack SOH, battery pack initial voltage, and battery pack initial current are obtained and combined to obtain the battery pack code.

[0063] The target battery pack calculates the value of the battery pack serial number as follows: directly take the values ​​of the numbers in the battery pack serial number, assign values ​​to the letters in the battery pack serial number, and further sum the number values ​​and the letter values ​​to obtain the value corresponding to the battery pack serial number. When assigning values ​​to the letters in the battery pack serial number, the letters are assigned according to their order in the 26 letters. For example, the serial number is AX233B2, the target battery pack takes the values ​​of 2, 3, 3, 2 for the numbers, and assigns the values ​​of 1, 24, 2 for the letters. The further summation results in the value corresponding to the battery pack serial number being 2+3+3+2+1+24+2=36.

[0064] The method for calculating the value of the battery pack model by the target battery pack is the same as the method for calculating the battery pack serial number mentioned above. The numbers in the battery pack model are directly taken, and the letters in the battery pack model are assigned values. The numerical values ​​and letter assignments are further summed to obtain the value corresponding to the battery pack model. For example, if the battery pack model is XQ12, the calculated value corresponding to the battery pack model is 17+24+1+2=44.

[0065] The target battery pack calculates the value of the battery pack capacity as follows: convert the battery pack capacity into a capacity in a preset unit, and determine the capacity value as the value corresponding to the battery pack capacity. For example, if the battery pack capacity is 45Ah (ampere-hour), and the preset unit is Ah, then the value corresponding to the battery pack capacity is 45.

[0066] The target battery pack calculates the battery pack SOH to obtain a numerical value as follows: the target battery pack multiplies the battery pack SOH by 100 to obtain a value corresponding to the battery pack SOH. For example, if the battery pack SOH is 99%, then the value corresponding to the battery pack SOH is 99%×100=99.

[0067] The target battery pack calculates the value of the initial voltage of the battery pack as follows: converting the initial voltage of the battery pack into a voltage value in a preset unit, and determining the voltage value as the value corresponding to the initial voltage of the battery pack. For example, if the initial voltage of the battery pack is 60V (volts), and the preset unit is V, then the value corresponding to the initial voltage of the battery pack is 60.

[0068] The target battery pack calculates the value of the initial current of the battery pack as follows: the initial current of the battery pack is converted into a current value in a preset unit, and the current value is determined as the value corresponding to the initial current of the battery pack. For example, if the initial voltage of the battery pack is 120A (ampere), and the preset unit is A, then the value corresponding to the initial voltage of the battery pack is 120.

[0069] Based on the numerical value corresponding to each item of information in the battery pack information exemplified above, the target battery pack determines that the battery pack code is 3644459960120.

[0070] As another possible implementation, the target battery pack sorts the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack to obtain the order of the target battery pack and the first battery pack. Further, the target battery pack generates the target battery pack code and the first battery pack code according to the order of the target battery pack and the first battery pack, and sends the corresponding codes to the first battery pack respectively.

[0071] In some embodiments, the target battery pack sorts the target battery pack and the first battery pack, including the following steps S2051 - S2053 .

[0072] S2051. The target battery pack determines a ranking value of the target battery pack according to the battery pack information of the target battery pack.

[0073] The ranking value of the target battery pack may be determined based on a combination of all battery pack information included in the battery pack information, or may be determined based on partial item information.

[0074] Furthermore, the target battery pack determines the value corresponding to the item information to be determined in the battery pack information based on the above-mentioned method of calculating the value corresponding to each item of information in the battery pack information according to the item to be determined. When the item to be determined is a single item, the obtained value is determined as the ranking value, and when the item to be determined is multiple items, the multiple values ​​are summed and determined as the ranking value.

[0075] For example, based on the above example, the corresponding value of the battery pack serial number is 36, the corresponding value of the battery pack model is 44, the corresponding value of the battery pack capacity is 45, the corresponding value of the battery pack SOH is 99, the corresponding value of the battery pack initial voltage is 60, and the corresponding value of the battery pack initial current is 120. When the item to be determined is the battery pack serial number, the ranking value of the battery pack is 36, and when the items to be determined are the battery pack serial number and the battery pack model, the ranking value of the battery pack is 80.

[0076] S2052: The target battery pack determines a ranking value of the first battery pack according to the battery pack information of the first battery pack.

[0077] It should be noted that the implementation method of determining the ranking value of the first battery pack according to the battery pack information of the first battery pack is the same as the implementation method of determining the ranking value of the target battery pack in the above step S2051, except that the battery pack information of the target battery pack is replaced with the battery pack information of the first battery pack, and it will not be repeated here.

[0078] S2053: The target battery packs sort the target battery packs and the first battery pack according to the sorting value of the target battery pack and the sorting value of the first battery pack.

[0079] For example, if the ranking value of the target battery pack is 80, and the ranking values ​​of battery packs A, B, C..., G, H in the first battery pack are 42, 59, 47, 133, 77, 90, 144, 121 respectively, then the target battery pack sorts the target battery pack and the first battery pack from small to large as 42, 47, 59, 77, 80, 90, 121, 133, 144.

[0080] Furthermore, based on the order of the battery packs in the above sorting, the codes of the battery packs A, B, C..., G, H and the target battery pack are 001, 003, 002, 008, 004, 006, 009, 007 and 005 respectively.

[0081] In some embodiments, if there is a battery pack that has completed encoding in the photovoltaic system, the code is generated based on the code in the election message sent by the battery pack that has completed encoding. For example, in the election message sent by the battery pack that has completed encoding, the maximum code is 032, and the codes of the target battery pack for the battery pack AH in the above example and the target battery pack are: 033, 035, 034, 040, 036, 038, 041, 039 and 037 respectively.

[0082] It can be understood that the embodiment of the present application provides a battery pack coding method, which can automatically select an arbitration battery pack after the battery pack is powered on. The arbitration battery pack completes the coding of multiple battery packs in the photovoltaic system, and no manual configuration is required by operation and maintenance personnel, which greatly improves the configuration efficiency when the photovoltaic system is expanded and connected to the battery pack.

[0083] In some embodiments, when the target battery pack is not an arbitration battery pack, the target battery pack obtains the code assigned by the arbitration battery pack to the target battery pack and sends a confirmation message to the arbitration battery pack so that the arbitration battery pack confirms that the target battery pack completes the code assignment.

[0084] Exemplarily, the confirmation message includes the battery pack model, battery pack serial number and assigned code of the target battery pack, and the message format is exemplarily <battery pack model><battery pack serial number><code>.

[0085] In some embodiments, the arbitration battery pack is configured to periodically send a heartbeat signal to other battery packs, wherein the heartbeat signal is used to indicate that the arbitration battery pack is in an operating state.

[0086] In the case where the target battery pack is not the arbitration battery pack, the target battery pack starts timing after receiving the heartbeat signal. Furthermore, if the next heartbeat signal is not received after a preset time, the target battery pack determines that the arbitration battery pack is offline and sends a re-election request message to the first battery pack, so that the target battery pack and the first battery pack re-elect the arbitration battery pack.

[0087] In some embodiments, after obtaining the battery pack information of the first battery pack, the target battery pack verifies the first battery pack to confirm whether the first battery pack is an abnormal device. If the first battery pack is an abnormal device, a warning message is sent to prevent the abnormal device from participating in the election and causing abnormalities in the photovoltaic system.

[0088] In some embodiments, multiple battery packs in a photovoltaic system use encrypted transmission when sending messages to prevent the sent data from being tampered with by attacks.

[0089] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0090] The embodiment of the present application can divide the functional modules of the user equipment according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0091] Figure 3 Schematic diagram of the structure of a battery pack encoding device provided in an embodiment of the present application. The battery pack encoding device is used to execute the above-mentioned battery pack encoding method. Figure 3 As shown, the battery pack encoding device 30 includes a sending unit 301 , an acquiring unit 302 and a processing unit 303 .

[0092] The sending unit 301 is used to send an election message to the first battery pack through the CAN bus after the target battery pack is powered on; the first battery pack is other battery packs among the multiple battery packs except the target battery pack, and the election message includes battery pack information.

[0093] The acquisition unit 302 is used to acquire the election message sent by the first battery pack through the CAN bus.

[0094] The processing unit 303 is used to generate a voting result according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, where the voting result includes the battery pack serial number of the arbitration battery pack.

[0095] The sending unit 301 is further used to send the voting result to the first battery pack via the CAN bus.

[0096] The acquisition unit 302 is further configured to acquire the voting result sent by the first battery pack via the CAN bus.

[0097] The processing unit 303 is further configured to determine an arbitration battery pack according to the voting result generated by the target battery pack and the voting result sent by the first battery pack.

[0098] The processing unit 303 is further configured to, when the target battery pack is an arbitration battery pack, assign codes to the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack.

[0099] Optional, such as Figure 3 As shown, in the battery pack coding device 30 provided in the embodiment of the present application, the acquisition unit 302 is further used to acquire the code assigned by the arbitration battery pack to the target battery pack when the target battery pack is not the arbitration battery pack. The sending unit 301 is also used to send a confirmation message to the arbitration battery pack so that the arbitration battery pack confirms that the target battery pack has completed the code assignment.

[0100] Optional, such as Figure 3 As shown, in the battery pack encoding device 30 provided in the embodiment of the present application, the battery pack information includes the battery pack serial number, the battery pack model, the battery pack capacity, the battery pack SOH, the battery pack initial voltage and the battery pack initial current.

[0101] Optional, such as Figure 3 As shown, in the battery pack encoding device 30 provided in the embodiment of the present application, the arbitration battery pack is configured to periodically send a heartbeat signal to other battery packs, and the heartbeat signal is used to indicate that the arbitration battery pack is in an operating state.

[0102] The processing unit 303 is further configured to start timing after receiving a heartbeat signal when the target battery pack is not an arbitration battery pack, and determine that the arbitration battery pack is offline if the next heartbeat signal is not received after a preset time period.

[0103] The sending unit 301 is further configured to send a re-election request message to the first battery pack, so that the target battery pack and the first battery pack re-elect an arbitration battery pack.

[0104] Optional, such as Figure 3 As shown, in the battery pack encoding device 30 provided in the embodiment of the present application, the voting result also includes the serial number of the alternative arbitration battery pack, and the alternative arbitration battery pack is used to update the arbitration battery pack when the arbitration battery pack fails.

[0105] Optional, such as Figure 3 As shown, in the battery pack encoding device 30 provided in the embodiment of the present application, the processing unit 303 is specifically used to sort the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack to obtain the order of the target battery pack and the first battery pack; generate the code of the target battery pack and the code of the first battery pack according to the order of the target battery pack and the first battery pack, and send the corresponding codes to the first battery pack respectively.

[0106] Optional, such as Figure 3 As shown, in the battery pack encoding device 30 provided in the embodiment of the present application, the processing unit 303 is specifically used to determine the ranking value of the target battery pack according to the battery pack information of the target battery pack; determine the ranking value of the first battery pack according to the battery pack information of the first battery pack; and sort the target battery pack and the first battery pack according to the ranking value of the target battery pack and the ranking value of the first battery pack.

[0107] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the present application embodiment provides a possible structural diagram of a battery pack. The battery pack is used to execute the battery pack encoding method executed by the battery pack encoding device in the above-mentioned embodiment. Figure 4 As shown, the battery pack 40 includes a processor 401, a memory 402 and a bus 403. The processor 401 and the memory 402 may be connected via the bus 403.

[0108] The processor 401 is the control center of the battery pack, which can be a processor or a general term for multiple processing elements. For example, the processor 401 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.

[0109] As an embodiment, the processor 401 may include one or more CPUs, such as Figure 4 CPU 0 and CPU 1 are shown in .

[0110] The memory 402 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0111] As a possible implementation, the memory 402 may exist independently of the processor 401, and the memory 402 may be connected to the processor 401 via a bus 403 to store instructions or program codes. When the processor 401 calls and executes the instructions or program codes stored in the memory 402, the battery pack encoding method provided in the embodiment of the present application can be implemented.

[0112] In another possible implementation, the memory 402 may also be integrated with the processor 401 .

[0113] The bus 403 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0114] It should be pointed out that Figure 4 The structure shown does not constitute a limitation on the battery pack 40. Figure 4 In addition to the components shown, the battery pack 40 may include Figure 4 More or fewer components, or combinations of certain components, or different arrangements of components may be shown.

[0115] As an example, combining Figure 3The functions implemented by the sending unit 301, the acquiring unit 302 and the processing unit 303 in the battery pack encoding device 30 are similar to those Figure 4 The function of processor 401 in is the same.

[0116] Optional, such as Figure 4 As shown, the battery pack provided in the embodiment of the present application may further include a communication interface 404 .

[0117] The communication interface 404 is used to connect with other devices through a communication network. The communication network may be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 404 may include an acquisition unit for receiving data and a sending unit for sending data.

[0118] In one design, in the battery pack provided in an embodiment of the present application, the communication interface can also be integrated into the processor.

[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional units is used as an example. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the device can be divided into different functional units to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0120] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When a computer executes the instructions, the computer executes each step in the method flow shown in the above method embodiment.

[0121] An embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the battery pack encoding method in the above method embodiment.

[0122] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, and a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), registers, hard disks, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any other form of computer-readable storage medium in a suitable combination of the above, or numerical values ​​in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an Application Specific Integrated Circuit (ASIC). In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0123] Since the apparatus, device computer-readable storage medium, and computer program product in the embodiments of the present application can be applied to the above-mentioned method, the technical effects that can be obtained can also refer to the above-mentioned method embodiments, and the embodiments of the present application will not be described in detail here.

[0124] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A battery pack coding method, characterized in that: Applied to a target battery pack, the target battery pack is any battery pack in a photovoltaic system, and multiple battery packs in the photovoltaic system are connected via a CAN bus. The method includes: After the target battery pack is powered on, an election message is sent to the first battery pack through the CAN bus, and the election message sent by the first battery pack is obtained through the CAN bus; the first battery pack is a battery pack other than the target battery pack among the multiple battery packs, and the election message includes battery pack information; generating a voting result according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, wherein the voting result includes a battery pack serial number of the arbitration battery pack; Sending the voting result to the first battery pack through the CAN bus, and obtaining the voting result sent by the first battery pack through the CAN bus; Determine an arbitration battery pack according to the voting result generated by the target battery pack and the voting result sent by the first battery pack; In the case that the target battery pack is the arbitration battery pack, codes are respectively allocated to the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack.

2. The battery pack coding method according to claim 1, characterized in that: The method further comprises: In the case that the target battery pack is not the arbitration battery pack, the code allocated by the arbitration battery pack to the target battery pack is obtained, and a confirmation message is sent to the arbitration battery pack, so that the arbitration battery pack confirms that the code allocation of the target battery pack is completed.

3. The battery pack encoding method according to claim 1, characterized in that: The battery pack information includes the battery pack serial number, battery pack model, battery pack capacity, battery pack state of health SOH, battery pack initial voltage and battery pack initial current.

4. The battery pack coding method according to claim 1, characterized in that: The arbitration battery pack is configured to periodically send a heartbeat signal to other battery packs, wherein the heartbeat signal is used to indicate that the arbitration battery pack is in a running state. The method further includes: In the case that the target battery pack is not the arbitration battery pack, timing starts after the heartbeat signal is obtained. If the next heartbeat signal is not received after the preset time period, it is determined that the arbitration battery pack is offline, and a re-election request message is sent to the first battery pack, so that the target battery pack and the first battery pack re-elect the arbitration battery pack.

5. The battery pack encoding method according to claim 1, characterized in that: The voting result also includes the serial number of the candidate arbitration battery pack, and the candidate arbitration battery pack is used to be updated to the arbitration battery pack when the arbitration battery pack fails.

6. The battery pack encoding method according to any one of claims 1 to 5, characterized in that: The assigning codes to the target battery pack and the first battery pack respectively according to the battery pack information of the target battery pack and the battery pack information of the first battery pack includes: Sorting the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack to obtain the order of the target battery pack and the first battery pack; According to the order of the target battery pack and the first battery pack, a code of the target battery pack and a code of the first battery pack are generated, and corresponding codes are sent to the first battery pack respectively.

7. The battery pack coding method according to claim 6, characterized in that: The step of sorting the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack includes: Determining a ranking value of the target battery pack according to the battery pack information of the target battery pack; determining a ranking value of the first battery pack according to the battery pack information of the first battery pack; The target battery pack and the first battery pack are sorted according to the sorting value of the target battery pack and the sorting value of the first battery pack.

8. A battery pack encoding device, characterized in that: Deployed on a target battery pack, the target battery pack is any battery pack in a photovoltaic system, multiple battery packs in the photovoltaic system are connected via a CAN bus, and the battery pack encoding device includes a sending unit, an acquiring unit, and a processing unit; The sending unit is used to send an election message to a first battery pack through the CAN bus after the target battery pack is powered on; the first battery pack is a battery pack other than the target battery pack among the multiple battery packs, and the election message includes battery pack information; The acquiring unit is used to acquire the election message sent by the first battery pack through the CAN bus; The processing unit is configured to generate a voting result according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, wherein the voting result includes a battery pack serial number of the arbitration battery pack; The sending unit is further used to send the voting result to the first battery pack through the CAN bus; The acquisition unit is further used to acquire the voting result sent by the first battery pack through the CAN bus; The processing unit is further configured to determine an arbitration battery pack according to a voting result generated by the target battery pack and a voting result sent by the first battery pack; The processing unit is further configured to, when the target battery pack is the arbitration battery pack, assign codes to the target battery pack and the first battery pack according to the battery pack information of the target battery pack and the battery pack information of the first battery pack, respectively.

9. A battery pack, characterized in that: including memory and processor; The memory is coupled to the processor; The memory is used to store computer program code, wherein the computer program code includes computer instructions; When the processor executes the computer instructions, the battery pack executes the battery pack encoding method as described in any one of claims 1-7.

10. A photovoltaic system, characterized in that: Comprising the battery pack as claimed in claim 9.