Device address allocation method, battery energy storage system and related equipment
Through the automated equipment address allocation method, the problem of cumbersome address allocation and security risks in the battery energy storage system is solved, efficient and accurate address allocation is achieved, and the security and efficiency of the system are improved.
Patent Information
- Application Number
- CN202311315153.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-10
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-10-10
AI Technical Summary
In the existing battery energy storage system, manual allocation of equipment addresses is complicated and easy to cause errors, affecting the normal operation of the system, and poses safety risks.
An automated device address allocation method is adopted to send unassigned address information to the communication bus through the first device, and the address is gradually allocated through the trigger signal source mechanism to ensure that each device obtains a unique address and reduce manual intervention.
Improve the accuracy and efficiency of address allocation, reduce maintenance costs, reduce security risks, and avoid manual live operations.
Smart Images

Figure CN117439974B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of device control, and in particular, relates to a device address allocation method, a battery energy storage system and related devices. Background Art
[0002] Battery energy storage system is an energy storage technology that converts electrical energy into chemical energy and stores it in batteries so that it can be released as electrical energy when needed. This system is widely used in various application fields, including households, industry, commerce and the power industry.
[0003] The key to battery energy storage systems lies in battery energy storage management controller technology. Especially in industrial and power applications, battery energy storage systems usually adopt multi-level local area networking and communication structures. For example, large-scale battery energy storage systems are usually locally networked according to a three-layer structure. The top-level battery energy storage management controller is called the master controller, which communicates with the master controller on the second layer. A master controller is usually responsible for managing more than 10 master controllers. The master controller communicates with the slave controllers of multiple battery packs on the third layer. Each master controller usually manages more than 10 slave controllers. Therefore, the number of battery energy storage management controllers in large-scale battery energy storage systems may exceed 100, requiring effective local area networking and address allocation methods.
[0004] At present, the existing technology usually requires the operator to perform live operation while the battery energy storage system is running, and input different binary numbers for the multi-digit dip switches on the operation panel of each battery pack to assign the networking address. However, manually entering a large number of binary numbers is prone to input errors, which may cause address confusion or errors in the battery energy storage system, thus affecting the normal operation of the system. And manually entering binary numbers for each battery pack is a tedious and time-consuming task. For large battery energy storage systems, this may require a lot of time and human resources, thereby reducing the installation and maintenance efficiency of the system. Finally, entering binary numbers requires live operation, which means that the operator must enter them while the battery system is still running. This may lead to electric shock or other safety risks. Summary of the invention
[0005] The purpose of the present invention is to provide an address allocation method, which aims to solve the problems of poor accuracy, low efficiency and insecurity of existing manual address allocation. The address allocation method provided by the present application includes:
[0006] A first aspect of an embodiment of the present application provides a device address allocation method, including: the method is applied to a battery energy storage system, the battery energy storage system includes a first device and N second devices, N is a positive integer greater than or equal to 2,
[0007] The first device and the N second devices respectively have a bus interface and a data interface;
[0008] The bus interfaces of the first device and the N second devices are respectively connected to a communication bus;
[0009] The first device and the N second devices are connected in series in sequence through the data interface;
[0010] The method comprises:
[0011] S1. The first device sends unassigned address information to the communication bus, wherein the unassigned address information consists of N address information, and sets the first device as a trigger signal source;
[0012] S2. The trigger signal source sends a trigger signal to the next second device connected in series with the trigger signal source through the data interface;
[0013] S3. The next second device reads the unallocated address information from the communication bus according to the trigger signal, and determines an address information from the unallocated address information as its own allocated address information according to a preset rule, and the next second device sends the allocated address information to the communication bus;
[0014] S4. The first device reads the allocated address information, deletes the allocated address information from the unallocated address information, and sends the updated unallocated address information to the communication bus;
[0015] S5. After the next second device reads the updated unassigned address information, the trigger signal source sets itself as a non-trigger signal source, and the next second device sets itself as a trigger signal source;
[0016] S6. The trigger signal source determines whether the number of addresses in the unallocated address information is zero. If the number of addresses in the unallocated address information is zero, execute step S7. If the number of addresses in the unallocated address information is not zero, return to execute step S2.
[0017] S7. End the process.
[0018] Based on the device address allocation method provided in the first aspect of the embodiment of the present application, optionally, determining an address information from the unallocated address information as the allocated address information of the device according to a preset rule includes:
[0019] Randomly determine an address information from the unallocated address information as its own allocated address information; or, determine the first address information in the unallocated address information as its own allocated address information, or, determine the last address information in the unallocated address information as its own allocated address information.
[0020] Based on the device address allocation method provided in the first aspect of the embodiment of the present application, optionally, the method further includes:
[0021] The first device includes a power supply interface, the N second devices each include a power supply interface, and the power supply interfaces are connected to each other via a power supply line;
[0022] Before the first device sends unallocated address information to the communication bus, the method further includes:
[0023] The first device supplies power to the N second devices through the power supply line.
[0024] Based on the device address allocation method provided by the first aspect of the embodiment of the present application, optionally, the data interface of the first device includes an output interface, and the data interface of the second device includes an input interface and an output interface.
[0025] The first device and the N second devices are sequentially connected in series through the data interface, including:
[0026] The output interface of the first device is connected to an input interface of the second device through an IO line, and the output interface of the second device is connected to the input interface of the next second device through an IO line, and the two are connected to the Nth second device in sequence.
[0027] The data interfaces of the N second devices are connected in series in sequence via IO lines.
[0028] Based on the device address allocation method provided in the first aspect of the embodiment of the present application, optionally, the first device also includes a display device, and the display device is used to display the unallocated address information or address allocation progress information.
[0029] Based on the device address allocation method provided in the first aspect of the embodiment of the present application, optionally, the next second device reads the unallocated address information from the communication bus according to the trigger signal, and before that, the method also includes: the next second device opens the bus interface according to the trigger signal.
[0030] A second aspect of an embodiment of the present application provides a battery energy storage system, the battery energy storage system comprising a first device and N second devices, where N is a positive integer greater than or equal to 2.
[0031] The first device and the N second devices respectively have a bus interface and a data interface;
[0032] The bus interfaces of the first device and the N second devices are respectively connected to a communication bus;
[0033] The first device and the N second devices are connected in series in sequence through the data interface;
[0034] The first device comprises:
[0035] a sending unit, configured for the first device to send unallocated address information to the communication bus, wherein the unallocated address information is composed of N address information, and to set the first device as a trigger signal source;
[0036] A trigger unit, used for the trigger signal source to send a trigger signal to the next second device connected in series with the trigger signal source through the data interface;
[0037] An updating unit, configured for the first device to read the allocated address information, delete the allocated address information from the unallocated address information, and send the updated unallocated address information to the communication bus;
[0038] The second device comprises:
[0039] a reading unit, configured for the next second device to read the unallocated address information from the communication bus according to the trigger signal, and to determine an address information from the unallocated address information as its own allocated address information according to a preset rule, and the next second device to send the allocated address information to the communication bus;
[0040] A setting unit, configured to set the trigger signal source to be a non-trigger signal source after the next second device reads the updated unallocated address information, and the next second device sets itself to be a trigger signal source;
[0041] A trigger unit, used for triggering a signal source to send a trigger signal to a next second device connected in series with the trigger signal source through the data interface;
[0042] a judgment unit, used for the trigger signal source to judge whether the number of addresses in the unallocated address information is zero, and if the number of addresses in the unallocated address information is zero, triggering the end unit; if the number of addresses in the unallocated address information is not zero, triggering the trigger unit of the trigger signal source;
[0043] End unit, used to end the process.
[0044] A third aspect of an embodiment of the present application provides a first device, the first device having a bus interface and a data interface, the bus interfaces of the first device and N second devices are respectively connected to a communication bus; the first device and the N second devices are connected in series in sequence through the data interface;
[0045] The first device is capable of executing the steps performed by the first device in the method described in any one of the first aspects of the embodiments of the present application.
[0046] A fourth aspect of the embodiment of the present application provides a second device, characterized in that the second device has a bus interface and a data interface, the bus interface of the second device is connected to a communication bus; the second device is connected in series with the first device and other second devices in sequence through the data interface;
[0047] The second device is capable of executing the steps performed by the second device in the method described in any one of the first aspects of the embodiments of the present application.
[0048] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, characterized in that it includes instructions, which, when executed on a battery energy storage system, enable the battery energy storage system to execute a method as described in any one of the first aspects of the embodiment of the present application.
[0049] It can be seen from the above technical solution that the embodiment of the present application has the following advantages: the embodiment of the present application provides a device address allocation method, the method is applied to a battery energy storage system, the battery energy storage system includes a first device and N second devices, the method includes: the first device sends unallocated address information to the communication bus, the unallocated address information consists of N address information, and the first device is set as a trigger signal source; the trigger signal source sends a trigger signal to the next second device connected in series with the trigger signal source through the data interface; the next second device reads the unallocated address information from the communication bus according to the trigger signal, and determines an address information from the unallocated address information as itself according to a preset rule. The allocated address information of the next second device sends the allocated address information to the communication bus; the first device reads the allocated address information, deletes the allocated address information from the unallocated address information, and sends the updated unallocated address information to the communication bus; after the next second device reads the updated unallocated address information, the trigger signal source sets itself as a non-trigger signal source, and the next second device sets itself as a trigger signal source; the trigger signal source determines whether the number of addresses in the unallocated address information is zero, if the number of addresses in the unallocated address information is zero, then the process ends, if the number of addresses in the unallocated address information is not zero, then the step of the trigger signal source sending a trigger signal is returned. Based on the above method, it can be seen that the present application provides an automated address allocation system. First, it eliminates the risk of address allocation errors caused by human operation and ensures the accuracy of system configuration and communication. Secondly, the automation system greatly improves efficiency and can handle a large number of address allocation requests in a shorter time, especially for large-scale battery energy storage systems. In addition, the automation system also reduces maintenance costs, reduces the need for manual intervention, reduces the frequency of system maintenance, and eliminates the need for live operation, thereby reducing the risk of electric shock and other hazards to operators and improving the safety of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work. It is understood that the drawings provided in this section are only used to better understand the present solution and do not constitute a limitation of the present application.
[0051] Figure 1 A schematic diagram of the structure of a battery energy storage system embodiment provided in this application.
[0052] Figure 2 A flowchart of an embodiment of a method for allocating device addresses provided in this application.
[0053] Figure 3 This is another structural schematic diagram of a battery energy storage system embodiment provided in this application.
[0054] Figure 4 Another flowchart of an embodiment of the device address allocation method provided in the present application.
[0055] Figure 5 This is another structural schematic diagram of a battery energy storage system embodiment provided in this application.
[0056] Figure 6 A structural schematic diagram of the first device embodiment provided in this application.
[0057] Figure 7 A structural schematic diagram of the second device embodiment provided in this application. DETAILED DESCRIPTION
[0058] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application are clearly and completely described below. Obviously, the described embodiments are only embodiments of a part of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should belong to the scope of protection of the present application. At the same time, for the sake of clarity and simplicity, the description of well-known functions and structures is omitted in the following description.
[0059] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0060] The key to battery energy storage systems lies in battery energy storage management controller technology. Especially in industrial and power applications, battery energy storage systems usually adopt multi-level local area networking and communication structures. For example, large-scale battery energy storage systems usually use a three-layer structure for local area networking. The top-level battery energy storage management controller is called the master controller, which communicates with the master controller of the second layer. A master controller is usually responsible for managing more than 10 master controllers. The master controller communicates with the slave controllers of multiple battery packs in the third layer. Each master controller usually manages more than 10 slave controllers. At present, the existing technology usually requires operators to perform live operation when the battery energy storage system is running, and input different binary numbers for the multi-bit dial switches on the operation panel of each battery pack to assign the network address. However, manually entering a large number of binary numbers is prone to input errors, which may cause confusion or errors in the address in the battery energy storage system, thereby affecting the normal operation of the system. And manually entering binary numbers for each battery pack is a tedious and time-consuming task. For large-scale battery energy storage systems, this may require a lot of time and human resources, thereby reducing the installation and maintenance efficiency of the system. Finally, entering binary numbers requires live operation, which means that the operator must enter them while the battery system is still running. This may result in electric shock or other safety risks.
[0061] Before introducing this solution, it is necessary to introduce the implementation environment of this solution. Specifically, the implementation environment applicable to this application method can refer to Figure 1 , Figure 1 That is, an environmental schematic diagram of the battery energy storage system provided in the present application, including a first device 101 and second devices 102 to 104, wherein the first device may be a general controller for controlling the overall system, and the second device may be a main controller for controlling a battery cluster, or the first device may be a main controller for controlling a battery cluster, and the second device may be a slave controller for controlling a battery pack. The specific number may be determined according to actual conditions and is not limited here. The number of second devices is N, where N is a positive integer greater than or equal to 2. This figure takes three second devices as an example for illustration. It can be understood that in the actual implementation process, the number of second devices may be adjusted according to actual conditions and is not limited here.
[0062] The first device and the second device are respectively connected to the communication bus 105, and the communication bus 105 is used to transmit data and control information between different components. So that the first device and the second device can work together to transmit data and control information, thereby realizing communication and collaboration between the devices. In the actual implementation process, different bus types and standards are suitable for different application scenarios, and can be selected and configured according to needs.
[0063] The first device and the second device are connected in series in sequence through a data interface, that is, using data transmission lines 106 to 108 to be connected in series in sequence, wherein the first device is arranged at one end of the series relationship, so that the first device sends a control signal to the second device, and the second device transmits it to the next second device in series in sequence, thereby completing the overall control process.
[0064] Based on the above Figure 1 The implementation environment described is described in Figure 2 An implementation of the device address allocation method proposed in this application includes: steps 201 to 207.
[0065] 201. A first device sends unallocated address information to the communication bus, where the unallocated address information consists of N address information, and sets the first device as a trigger signal source.
[0066] Specifically, the first device sends unassigned address information to the communication bus, the unassigned address information consists of N address information, and the first device is set as a trigger signal source. In the actual implementation process, the staff can press the corresponding button of the first device or control the first device to trigger, and the first device can also have a power supply function, and the first device performs this step after supplying power to other second devices, which is not limited here.
[0067] The unallocated address information can be pre-set by the staff, or generated by the first device according to preset rules. The specific generation method can be determined according to the actual situation and is not limited here. The number of addresses in the unallocated address information is consistent with the number of second devices connected to the first device, so as to ensure that addresses are allocated to each second device in the system. The trigger signal source is used to send a trigger signal. After each trigger signal source sends a trigger signal, the device that serves as the trigger signal source will change and become a device that receives the trigger signal, that is, from the first device to the next second device, and then changes to the last second device.
[0068] 202. The trigger signal source sends a trigger signal to the next second device connected in series to the trigger signal source through the data interface.
[0069] That is, the device that acts as the trigger signal source sends a trigger signal to the next second device connected in series with the trigger signal source through the data interface. During the first execution, the first device acts as the trigger signal source, and during subsequent executions, the subsequent second devices act as the trigger signal source in turn, sending a trigger signal to the next second device connected in series, so that the next second device executes subsequent steps.
[0070] 203. The next second device reads the unallocated address information from the communication bus according to the trigger signal, and determines an address information from the unallocated address information as its own allocated address information according to a preset rule, and the next second device sends the allocated address information to the communication bus.
[0071] Specifically, the second device that receives the trigger signal reads the unallocated address information from the communication bus according to the trigger signal, and determines an address information from the unallocated address information as its own allocated address information according to the preset rule. If the next second device referred to in this step is the first second device in the series sequence, the second device can obtain N unallocated addresses from the communication bus, and can determine a certain address information from them as its own allocated address information according to the preset rule. In the actual implementation process, the preset rule can be a random rule or a sequential rule, that is, the first address or the last address read is set as its own address. After setting its own address, the second device sends the allocated address information to the first device through the communication bus. The allocated address information means that the address information has been allocated to the second device. When other second devices obtain addresses later, they should not obtain the allocated address information. In the actual implementation process, when the second device sends the allocated address through the bus, it can add an identifier with a specific meaning, so that the first device can determine which address is the allocated address according to the identifier, and execute the subsequent process based on the information.
[0072] 204. The first device reads the allocated address information, deletes the allocated address information from the unallocated address information, and sends updated unallocated address information to the communication bus.
[0073] Specifically, when the first device obtains the allocated address information sent by the second device, the allocated address information is deleted from the unallocated address information, and the updated unallocated address information is sent to the communication bus. That is, the allocated address information is deleted, and the unallocated address information with a reduced amount is resent. If this allocation is the first completed address allocation process, the number of address information sent is changed from N to N-1, and if this allocation is the last address allocation process, the number of address information sent is changed from 1 to 0.
[0074] 205. After the next second device reads the updated unallocated address information, the trigger signal source sets itself as a non-trigger signal source, and the next second device sets itself as a trigger signal source.
[0075] Specifically, after the next second device reads the updated unassigned address information, the trigger signal source sets itself as a non-trigger signal source. Taking the first execution of this step as an example, before executing this step, the identity of the trigger signal source is 101, and the identity of the corresponding next second device is 102. During the execution of this step, the original trigger signal source 101 sets itself not as a trigger signal source, and the corresponding next second device 102 sets itself as a trigger signal source, that is, the device serving as the trigger signal source changes from the first device 101 to the second device 102, and the signal source identity changes from the original device to the second device that has been assigned an address and obtained its own address, so as to assign an address to the next second device. During the loop execution, the trigger signal source will change to 103 and 104 successively until the process ends.
[0076] 206. The trigger signal source determines whether the number of addresses in the unallocated address information is zero.
[0077] The trigger signal source determines whether the number of addresses in the unallocated address information is zero. If the number of addresses in the unallocated address information is zero, step 207 is executed to end the process. If the number of addresses in the unallocated address information is not zero, the process returns to step 202, that is, the trigger signal source sends a trigger signal to the next second device.
[0078] Specifically, if the number of addresses is zero, it means that the N addresses prepared in advance have been allocated to different second devices, and each second device in the system has a corresponding address. The address allocation process has been completed and the process ends. If there are still unallocated addresses, it means that there are still second devices that have not been allocated addresses, and the process starts again from step 202. Since step 205 has reallocated the trigger signal source, at this time, starting again from step 202 will allocate the address to the next second device of the transmitting signal source, and allocate addresses to each second device one by one in the order in which the devices are connected. For the above Figure 1 In the corresponding embodiment, addresses are allocated to 102, 103, and 104 one by one, and the process ends after the allocation is completed.
[0079] 207. End process
[0080] Specifically, if the number of addresses is zero, it means that the N addresses prepared in advance have been allocated to different second devices, each second device in the system has a corresponding address, the address allocation process has been completed, and the process ends.
[0081] It can be seen from the above technical solution that the embodiment of the present application has the following advantages: the embodiment of the present application provides a device address allocation method, the method is applied to a battery energy storage system, the battery energy storage system includes a first device and N second devices, the method includes: the first device sends unallocated address information to the communication bus, the unallocated address information consists of N address information, and the first device is set as a trigger signal source; the trigger signal source sends a trigger signal to the next second device connected in series with the trigger signal source through the data interface; the next second device reads the unallocated address information from the communication bus according to the trigger signal, and determines an address information from the unallocated address information as itself according to a preset rule. The allocated address information of the next second device sends the allocated address information to the communication bus; the first device reads the allocated address information, deletes the allocated address information from the unallocated address information, and sends the updated unallocated address information to the communication bus; after the next second device reads the updated unallocated address information, the trigger signal source sets itself as a non-trigger signal source, and the next second device sets itself as a trigger signal source; the trigger signal source determines whether the number of addresses in the unallocated address information is zero, if the number of addresses in the unallocated address information is zero, then the process ends, if the number of addresses in the unallocated address information is not zero, then the step of the trigger signal source sending a trigger signal is returned. Based on the above method, it can be seen that the present application provides an automated address allocation system. First, it eliminates the risk of address allocation errors caused by human operation and ensures the accuracy of system configuration and communication. Secondly, the automation system greatly improves efficiency and can handle a large number of address allocation requests in a shorter time, especially for large-scale battery energy storage systems. In addition, the automation system also reduces maintenance costs, reduces the need for manual intervention, reduces the frequency of system maintenance, and eliminates the need for live operation, thereby reducing the risk of electric shock and other hazards to operators and improving the safety of the system.
[0082] To facilitate the use of this method in actual implementation, this application also provides a more detailed embodiment that can be optionally implemented, please refer to Figure 3 , an implementation background of the embodiment provided in this application includes:
[0083] Figure 3 It is a structural diagram of the battery energy storage system, including a first device 10, four second devices 21 to 24, a communication bus 30, multiple IO lines 41 to 44, and a power supply line 50. It can be understood that in different implementation environments, the number of second devices can be determined according to actual conditions. In a large-scale energy storage system, the number of second devices is usually greater than 10.
[0084] The first device 10 includes a bus interface AC, and the second devices 21 to 24 include a bus interface BC. The bus interfaces AC and BC are connected by the communication bus 30 .
[0085] The first device 10 includes an output interface AT, and the second devices 21 to 24 include an input interface BR and an output interface BT, and the input interface BR and the output interface BT together constitute a data interface.
[0086] The output interface AT of the first device 10 is connected to the input interface BR of the first and closest second device 21 by the first IO line 41; the output interface BT of the first second device 21 is connected to the input interface BR of the second and closest second device 22 by the second IO line 42. And so on: the output interface BT of the N-1th (i.e., the third) second device 23 is connected to the input interface BR of the Nth (i.e., the fourth) second device 24 by the Nth (i.e., the fourth) IO line 44. The first device 10 further includes a power supply interface, and the second devices 21 to 24 include power supply interfaces, and the power supply interfaces are connected to each other by the power supply line 50. The first device further includes a display, which is used to display the process and results of address allocation.
[0087] This embodiment includes: step 401 to step 409.
[0088] 401. A first device supplies power to the N second devices through the power line.
[0089] Specifically, the first device 10 starts, opens the output interface AT and the bus interface AC, and controls the power supply interface to supply power to all N (i.e., 4 in this embodiment) second devices 21 to 24. The second devices 21 to 24 are powered on and start, open their respective input interfaces BR, and close their respective output interfaces BT and bus interfaces BC, so as to ensure the accuracy of the address allocation process.
[0090] 402. A first device sends unallocated address information to the communication bus, where the unallocated address information consists of N address information, and sets the first device as a trigger signal source.
[0091] Specifically, the first device 10 sets itself as a trigger signal source, and its bus interface AC sends a group of addresses to be allocated to the communication bus 30, wherein the number of unallocated addresses is N (N=4 in this embodiment).
[0092] 403. The trigger signal source sends a trigger signal to the next second device connected in series to the trigger signal source through the data interface.
[0093] The output interface (now the output interface AT) of the trigger signal source (now the first device 10) sends a trigger signal to the input interface BR of the next second device (now the second device 21) connected to the IO line (now the IO line 41).
[0094] 404. The next second device opens the bus interface according to the trigger signal.
[0095] 405. The next second device reads the unallocated address information from the communication bus according to the trigger signal, and determines an address information from the unallocated address information as its own allocated address information according to a preset rule, and the next second device sends the allocated address information to the communication bus.
[0096] Specifically, the next second device (i.e., the second device 21 at this time) receives the trigger signal, opens its bus interface BC and reads the group of addresses to be allocated from the communication bus 30, reads an address to be allocated from the group of addresses to be allocated as its own allocated address according to a predetermined rule, and sends the information of the allocated address to the communication bus 30 through its bus interface BC. Specifically, reading according to the predetermined rule can be sequential reading or random reading. In the actual implementation process, the predetermined rule can be set according to actual needs, and is not specifically limited here.
[0097] 406. The first device reads the allocated address information, deletes the allocated address information from the unallocated address information, and sends updated unallocated address information to the communication bus.
[0098] Specifically, the bus interface AT of the first device 10 reads the information of the allocated address from the communication bus 30, deletes and updates the allocated address from the set of addresses to be allocated (i.e., the number of addresses is reduced by one), and then sends the updated set of addresses to be allocated to the communication bus 30.
[0099] 407. After the next second device reads the updated unallocated address information, the trigger signal source sets itself as a non-trigger signal source, and the next second device sets itself as a trigger signal source.
[0100] Specifically, the bus interface BC of the next second device (the second device 21 at this time) reads the updated set of addresses to be assigned from the communication bus 30, stops sending the information of the assigned addresses to the communication bus, sets itself as a new trigger signal source, and the first device 10 sets itself as a non-trigger signal source, that is, the identity of the signal source changes, and at the same time, the second device 21 opens its output interface BT.
[0101] 408. The trigger signal source determines whether the number of addresses in the unallocated address information is zero.
[0102] Specifically, the trigger signal source determines whether the number of addresses in the unallocated address information is zero. At this time, if the number of addresses in the unallocated address information is zero and there are 3 unallocated addresses, the determination is false, and the process goes to step 403.
[0103] That is, re-execute each step from step 403 to step 408, including:
[0104] The output interface (currently the output interface BT) of the trigger signal source (currently the second device 21) sends a trigger signal to the input interface BR of the next second device (currently the second device 22) connected to the IO line (currently the IO line 42).
[0105] The next second device (the second device 22 at this time) receives the trigger signal, opens its bus interface BC and reads the group of addresses to be allocated from the communication bus 30, reads an address to be allocated from the group of addresses to be allocated as its own allocated address according to a predetermined rule, and sends the information of the allocated address to the communication bus 30 through its bus interface BC.
[0106] The bus interface AT of the first device 10 reads the information of the allocated address from the communication bus 30, deletes and updates the allocated address from the set of addresses to be allocated (i.e., the number of addresses is reduced by one), and then sends the updated set of addresses to be allocated to the communication bus 30.
[0107] The bus interface BC of the next second device (i.e., the second device 22 at this time) reads the updated set of addresses to be assigned from the communication bus 30, stops sending the information of the assigned addresses to the communication bus, and the second device 21 sets itself as a non-trigger signal source. The second device 22 sets itself as a new trigger signal source and opens its output interface BT, continues to make judgments and returns to execute the step of sending a trigger signal or ends the process based on the judgment results.
[0108] Repeat the above steps until it is determined that the number of addresses in the group of addresses to be allocated is reduced to zero. If the determination is true, the automatic address allocation is completed and ends. At this time, the last second device sets itself not as a trigger signal source, that is, after the address allocation is completed, there is no trigger signal source in the system.
[0109] It is understandable that each time the bus interface AC of the first device 10 reads the information that an allocated address has been occupied from the communication bus 30, it controls the display to update the display of the address allocation progress, thereby allowing the management personnel to intuitively understand the execution status of the address allocation process.
[0110] It can be seen from the above technical solution that the embodiment of the present application has the following advantages: the embodiment of the present application provides a device address allocation method, the method is applied to a battery energy storage system, the battery energy storage system includes a first device and N second devices, the method includes: the first device sends unallocated address information to the communication bus, the unallocated address information consists of N address information, and the first device is set as a trigger signal source; the trigger signal source sends a trigger signal to the next second device connected in series with the trigger signal source through the data interface; the next second device reads the unallocated address information from the communication bus according to the trigger signal, and determines an address information from the unallocated address information as itself according to a preset rule. The allocated address information of the next second device sends the allocated address information to the communication bus; the first device reads the allocated address information, deletes the allocated address information from the unallocated address information, and sends the updated unallocated address information to the communication bus; after the next second device reads the updated unallocated address information, the trigger signal source sets itself as a non-trigger signal source, and the next second device sets itself as a trigger signal source; the trigger signal source determines whether the number of addresses in the unallocated address information is zero, if the number of addresses in the unallocated address information is zero, then the process ends, if the number of addresses in the unallocated address information is not zero, then the step of the trigger signal source sending a trigger signal is returned. Based on the above method, it can be seen that the present application provides an automated address allocation system. First, it eliminates the risk of address allocation errors caused by human operation and ensures the accuracy of system configuration and communication. Secondly, the automation system greatly improves efficiency and can handle a large number of address allocation requests in a shorter time, especially for large-scale battery energy storage systems. In addition, the automation system also reduces maintenance costs, reduces the need for manual intervention, reduces the frequency of system maintenance, and eliminates the need for live operation, thereby reducing the risk of electric shock and other hazards to operators and improving the safety of the system.
[0111] The above content describes the device address allocation method provided by the present application. To support the implementation of the above embodiment, the present application also provides a device address allocation system. Figure 5 , an embodiment of the device address allocation system provided by the present application includes:
[0112] The battery energy storage system includes a first device 501 and second devices 502 and 503. It can be understood that in the actual implementation process, there may be N second devices, where N is a positive integer greater than or equal to 2.
[0113] The first device 501 and the second device 502, 503 respectively have a bus interface and a data interface;
[0114] The bus interfaces of the first device 501 and the second devices 502 and 503 are respectively connected to a communication bus 504;
[0115] The first device and the second device are connected in series in sequence via the data interfaces of the IO lines or data connection lines 505 and 506;
[0116] The first device comprises:
[0117] a sending unit, configured for the first device to send unallocated address information to the communication bus, wherein the unallocated address information is composed of N address information, and to set the first device as a trigger signal source;
[0118] A trigger unit, used for the trigger signal source to send a trigger signal to the next second device connected in series with the trigger signal source through the data interface;
[0119] An updating unit, configured for the first device to read the allocated address information, delete the allocated address information from the unallocated address information, and send the updated unallocated address information to the communication bus;
[0120] The second device comprises:
[0121] a reading unit, configured for the next second device to read the unallocated address information from the communication bus according to the trigger signal, and to determine an address information from the unallocated address information as its own allocated address information according to a preset rule, and the next second device to send the allocated address information to the communication bus;
[0122] A setting unit, configured to set the trigger signal source to be a non-trigger signal source after the next second device reads the updated unallocated address information, and the next second device sets itself to be a trigger signal source;
[0123] A trigger unit, used for triggering a signal source to send a trigger signal to a next second device connected in series with the trigger signal source through the data interface;
[0124] a judgment unit, used for the trigger signal source to judge whether the number of addresses in the unallocated address information is zero, and if the number of addresses in the unallocated address information is zero, triggering the end unit; if the number of addresses in the unallocated address information is not zero, triggering the trigger unit of the trigger signal source;
[0125] End unit, used to end the process.
[0126] In this embodiment, the processes performed by each unit in the first device and the second device are the same as those described above. Figure 2 , Figure 4 The method flow described in the corresponding embodiment is similar and will not be repeated here.
[0127] Figure 6 is a schematic diagram of a first device provided in the present application, wherein the first device has a bus interface and a data interface, the bus interfaces of the first device and N second devices are respectively connected to a communication bus; the first device and the N second devices are connected in series in sequence through the data interface;
[0128] The first device is capable of performing Figure 2 or Figure 4 The steps performed by the first device in the method described in any one of the corresponding embodiments.
[0129] Figure 7 is a schematic diagram of a second device provided in the present application, wherein the second device has a bus interface and a data interface, and the bus interface of the second device is connected to a communication bus; the second device is connected in series with the first device and other second devices in sequence through the data interface;
[0130] The second device is capable of performing the following operations: Figure 2 or Figure 4 The steps performed by the second device in the method described in any one of the corresponding embodiments.
[0131] An embodiment of the present application also provides a computer storage medium, which is used to store computer software instructions used for the above-mentioned device address allocation method, including a program designed for executing the device address allocation method.
[0132] The device address allocation method can be as described above Figure 2 or Figure 4 The device address assignment method described in .
[0133] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the equivalent transformation of the circuit, the division of the unit, is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0134] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0135] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0136] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent substitution or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for allocating device addresses, characterized in that: The method is applied to a battery energy storage system, wherein the battery energy storage system comprises a first device and N second devices, where N is a positive integer greater than or equal to 2. The first device and the N second devices respectively have a bus interface and a data interface, the data interface of the first device includes an output interface, and the data interface of the second device includes an input interface and an output interface; The bus interfaces of the first device and the N second devices are respectively connected to a communication bus; The output interface of the first device is connected to an input interface of the second device through an IO line, the output interface of the second device is connected to the input interface of the next second device through an IO line, and the first device is connected to the Nth second device in sequence; The method comprises: S1. The first device sends unassigned address information to the communication bus, wherein the unassigned address information consists of N address information, and sets the first device as a trigger signal source; S2. The trigger signal source sends a trigger signal to the next second device connected in series with the trigger signal source through the data interface; S3. The next second device reads the unallocated address information from the communication bus according to the trigger signal, and determines an address information from the unallocated address information as its own allocated address information according to a preset rule, and the next second device sends the allocated address information to the communication bus; S4. The first device reads the allocated address information, deletes the allocated address information from the unallocated address information, and sends the updated unallocated address information to the communication bus; S5. After the next second device reads the updated unassigned address information, the trigger signal source sets itself as a non-trigger signal source, and the next second device sets itself as a trigger signal source; S6. The trigger signal source determines whether the number of addresses in the unallocated address information is zero. If the number of addresses in the unallocated address information is zero, execute step S7. If the number of addresses in the unallocated address information is not zero, return to execute step S2. S7. End the process.
2. The device address allocation method according to claim 1, characterized in that: The step of determining a piece of address information from the unallocated address information as the allocated address information of the user according to a preset rule comprises: Randomly determine an address information from the unallocated address information as its own allocated address information; or, determine the first address information in the unallocated address information as its own allocated address information, or, determine the last address information in the unallocated address information as its own allocated address information.
3. The device address allocation method according to claim 1, characterized in that: The method further comprises: The first device includes a power supply interface, the N second devices each include a power supply interface, and the power supply interfaces are connected to each other via a power supply line; Before the first device sends unallocated address information to the communication bus, the method further includes: The first device supplies power to the N second devices through the power supply line.
4. The device address allocation method according to claim 1, characterized in that: The first device further includes a display device, and the display device is used to display the unallocated address information or the address allocation progress information.
5. The device address allocation method according to claim 1, characterized in that: Before the next second device reads the unallocated address information from the communication bus according to the trigger signal, the method further includes: the next second device opens the bus interface according to the trigger signal.
6. A battery energy storage system, characterized in that: The battery energy storage system includes a first device and N second devices, where N is a positive integer greater than or equal to 2. The first device and the N second devices respectively have a bus interface and a data interface, the data interface of the first device includes an output interface, and the data interface of the second device includes an input interface and an output interface; The bus interfaces of the first device and the N second devices are respectively connected to a communication bus; The output interface of the first device is connected to an input interface of the second device through an IO line, the output interface of the second device is connected to the input interface of the next second device through an IO line, and the first device is connected to the Nth second device in sequence; The first device comprises: a sending unit, configured for the first device to send unallocated address information to the communication bus, wherein the unallocated address information is composed of N address information, and to set the first device as a trigger signal source; A trigger unit, used for the trigger signal source to send a trigger signal to the next second device connected in series with the trigger signal source through the data interface; An updating unit, configured for the first device to read the allocated address information, delete the allocated address information from the unallocated address information, and send the updated unallocated address information to the communication bus; The second device comprises: a reading unit, configured for the next second device to read the unallocated address information from the communication bus according to the trigger signal, and to determine an address information from the unallocated address information as its own allocated address information according to a preset rule, and the next second device to send the allocated address information to the communication bus; A setting unit, configured to set the trigger signal source to be a non-trigger signal source after the next second device reads the updated unallocated address information, and the next second device sets itself to be a trigger signal source; A trigger unit, used for triggering a signal source to send a trigger signal to a next second device connected in series with the trigger signal source through the data interface; a judgment unit, used for the trigger signal source to judge whether the number of addresses in the unallocated address information is zero, and if the number of addresses in the unallocated address information is zero, triggering the end unit; if the number of addresses in the unallocated address information is not zero, triggering the trigger unit of the trigger signal source; End unit, used to end the process.
7. A first device, characterized in that: The first device has a bus interface and a data interface, and the bus interfaces of the first device and the N second devices are respectively connected to a communication bus; the first device and the N second devices are connected in series in sequence through the data interface; The first device is capable of executing the steps executed by the first device in the method according to any one of claims 1 to 5.
8. A second device, characterized in that: The second device has a bus interface and a data interface, the bus interface of the second device is connected to the communication bus; the second device is connected in series with the first device and other second devices in sequence through the data interface; The second device is capable of executing the steps executed by the second device in the method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a battery energy storage system, cause the battery energy storage system to execute the method according to any one of claims 1 to 5.
