Charging pile gun address dynamic allocation method and system based on power topology identification
By adopting a dynamic address allocation method for charging pile guns based on power topology identification, the problem of low efficiency in traditional manual configuration is solved, and the automatic allocation of charging pile gun addresses is realized, which improves the deployment efficiency and operation and maintenance reliability of large-scale group charging systems and ensures the long-term stable operation of the system.
Patent Information
- Application Number
- CN202511365627.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional charging station guns are inefficient and prone to errors in address configuration, leading to complex after-sales maintenance and failing to meet the high-efficiency operation requirements of large-scale group charging systems.
The dynamic address allocation method for charging guns based on power topology identification constructs the system's physical power topology through the hardware connection relationship between the host and the terminal, uses a stepped voltage algorithm to identify the topological relationship between the charging gun and the module, combines an intelligent address allocation module to achieve automated address allocation, and persistently stores the official address through EEPROM to support plug-and-play functionality for the terminal.
It has enabled automated and precise allocation of charging station gun addresses, improved the deployment efficiency and operational reliability of large-scale group charging systems, reduced operational costs, and ensured the long-term stable operation of the system.
Smart Images

Figure CN120980063A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy vehicle charging technology, specifically to a method and system for dynamic allocation of charging station gun addresses based on power topology identification. Background Technology
[0002] In recent years, my country's new energy vehicle industry has experienced rapid development, greatly promoting the large-scale deployment of mass charging infrastructure. With the continuous improvement of charging pile power and the significant increase in the number of terminals, communication between modules within the system has become increasingly frequent. Regarding the communication method between the host and terminal devices, the traditional CAN communication method has gradually revealed its limitations. Meanwhile, network-based communication technology, with its significant advantages such as high bandwidth, long-distance coverage, protocol flexibility, and good standardization and compatibility, has become the preferred solution for next-generation charging systems and has been widely adopted.
[0003] However, the large-scale application of network communication has also brought new technical challenges, especially in address allocation for terminal devices (charging guns). Traditional solutions typically rely on manual configuration of a unique identifier address for each sub-device. This manual configuration method is not only inefficient, but also highly susceptible to address conflicts or configuration errors due to human error as the scale of the group charging system continues to expand. This significantly increases the complexity and cost of after-sales maintenance, causing numerous inconveniences to the stable operation and efficient maintenance of the system.
[0004] Therefore, in order to solve the above-mentioned problems in the existing technology, this invention proposes a dynamic address allocation method and system for charging pile guns based on power topology identification. It aims to achieve plug-and-play and automatic identification of terminal devices through an intelligent address allocation mechanism, thereby significantly improving system deployment efficiency and operation and maintenance reliability, and providing strong technical support for the efficient operation of new energy vehicle charging facilities. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method and system for dynamic address allocation of charging pile guns based on power topology identification. It has the advantages of high efficiency, automation and reliability, and solves the problems of low efficiency, error-proneness and complex after-sales maintenance of traditional manual address configuration.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for dynamic allocation of charging pile gun addresses based on power topology identification, comprising the following steps: Step 1: System Topology Construction and Initialization: In the system architecture design phase, establish the host control module, terminal device module, charging gun access module, power transmission detection module, network communication interaction module, address intelligent allocation module, fault diagnosis and isolation module, and data persistent storage module. The host control module connects to the charging gun access module, power transmission detection module, and other subsequent functional modules through power lines. Each module connects to the terminal and charging gun respectively. Based on the hardware connection relationship, the system physical power topology and multi-terminal network communication topology are constructed. The host and terminal complete power-on initialization respectively. The host starts the address allocation preparation process, and the terminal starts network initialization and address request preparation. Step 2: Host Initialization Detection: The host detects the emergency stop, door sensor, terminal emergency stop, and the sticking status of the door sensor and output contactor. If any abnormality is found, automatic allocation is paused. At the same time, the host control module is checked for offline and parallel contactor sticking faults, and the module is marked as not participating in the allocation. If the requirements are met, the module startup process is entered. Step 3, Host Control Module Startup and Power Detection: The host uses a stepped voltage algorithm to sequentially start the charging gun access module and the power transmission detection module, delays to verify the startup status, and marks and shuts down modules that fail to start. The terminal collects the output voltage and its own status at a period of 1 to 2 seconds and sends them to the host. The host compares the module output voltage with the sampled value reported by the terminal and calculates the power topology relationship between the charging gun and the module. Step 4: Intelligent Address Allocation on the Host Side: The host selects the allocation mode based on the storage status. When it is in initialization mode, it allocates addresses linearly from the base address in the order of requests. When it is in update mode, it prioritizes reusing historical addresses. If no match is found, it searches for the first free address. It then performs address conflict verification to generate a unique legal address. Step 5, Address Result Feedback and Terminal Writing: The host sends the allocation result to the terminal and enters standby mode; after receiving the formal address, the terminal immediately writes it to the EEPROM for persistent storage and switches to normal communication mode. Step Six: System Dynamic Maintenance and Fault Tolerance: The host listens for new address requests at set intervals and re-executes the entire process when triggered; the terminal responds to the host address update command, switches to the new address in real time, and logs in again; the host automatically isolates faulty modules to ensure the stability of the allocation process, and completes the address configuration of all request guns in a single process; Step 7: Terminal Address Persistence and Communication Switching: The terminal first reads the historical address from the EEPROM. If no address is available, a virtual address is generated for temporary communication. After receiving the host's official address, it is written into the EEPROM for power-off retention. The terminal then switches to the official address for TCP long-connection communication, achieving plug-and-play functionality. Step 8: Closed-loop process and continuous response: After allocation, the host enters standby after 9-10 seconds and continues to listen for new requests at a set period; the terminal displays address information through LED light panels according to the host's instructions; when a new address is available, the request is triggered, and the host re-executes the entire process of initialization detection - module startup - address allocation, realizing dynamic cyclic allocation.
[0007] Preferably, the charging gun address dynamic allocation system based on power topology identification includes a host control module, a terminal equipment module, a charging gun access module, a power transmission detection module, a network communication interaction module, an address intelligent allocation module, a fault diagnosis and isolation module, and a data persistent storage module. The host control module serves as the core scheduling component of the system, integrating address allocation logic, power module control, and fault diagnosis algorithms to coordinate the entire process execution. The terminal device module is equipped with a voltage sampling circuit, a network communication unit, and an EEPROM storage, and is responsible for data acquisition and address status management. The charging gun access module provides a physical interface that conforms to national standards and provides feedback on the charging gun status and voltage sampling point data. The power transmission detection module consists of N independent power modules and supports stepped voltage output and power topology identification. The network communication interaction module establishes a host-terminal Ethernet connection to realize the real-time transmission of address requests and allocation results; The address intelligent allocation module runs a dual-mode allocation algorithm and conflict verification logic to generate legal addresses; The fault diagnosis and isolation module monitors emergency stop, door magnetic and module offline signals, and marks and blocks the process. The persistent data storage module stores historical address mapping tables, system parameters, and fault logs, and supports fast querying and recovery.
[0008] Preferably, the host control module has a built-in industrial-grade main control chip, runs an address allocation scheduler, and has the following functions: (1) Multi-threaded management: Simultaneously execute the fault detection thread, the power module control thread, and the address allocation thread; (2) Timeout mechanism: Timeout allocation is implemented through a timer, with a timeout of 90-95 seconds and new request listening time of 100-105 milliseconds; (3) Topology calculation: based on the output voltage of the power module With terminal sampling voltage Through formula ≤5V determines direct connection: when the power module output voltage With terminal sampling voltage When the absolute value difference is ≤5V, it is determined that the module and the charging gun have a direct power topology relationship.
[0009] Preferably, the terminal device module uses a low-power MCU and integrates the following functions: (1) Voltage sampling: The output voltage of the charging gun is acquired through the ADC channel and obtained through the formula. Calculate the effective value. This represents the number of sampling points, and is the default value. =100; (2) Address Management: When no formal address has been assigned, the formula is used. This generates a virtual address, where ≪8 means shifting the hexadecimal value of the last byte of the IP address 8 bits to the left, with the gun identifier occupying the lower 8 bits. For example, if the last byte of the IP address is 0x55 and the gun identifier is 0x01, then the virtual address is 0x5501. (3) Status reporting: Sends data packets containing the effective voltage value, virtual address, and terminal status to the host at set intervals.
[0010] Preferably, the charging gun access module includes the following technical features: (1) Interface standard: 5-pin aviation connector is used, defining CC, CP, L, N and PE; (2) Status detection: The status of the insertion gun is determined by the change in the CC resistance, according to the formula. Calculate the connection confirmation signal. The reference voltage is 5V. To detect voltage, The constant current source current is 1mA; (3) Temperature compensation: Through an NTC thermistor (B value 3950K), the temperature is compensated by the formula. Calculate the nozzle temperature. =25℃, =100kΩ, For NTC real-time resistors.
[0011] Preferably, the power transmission detection module consists of 20 independent modules and has the following functions: (1) Stepped voltage output: The start-up voltage is set according to the rule of module number × 20V + 130V, as shown in the formula. express, Let n be the module number, and n = 1~20; (2) Fault isolation: When startup fails, it is marked as unavailable and power is cut off, according to the formula. >10% The startup failure is determined as a startup failure.
[0012] Preferably, the network communication interaction module adopts a TCP / IP protocol stack and has the following technical features: (1) Data packet format: Define address request frame, address allocation frame, and status report frame, using the formula ,calculate check, For data length, This is the i-th byte of data; (2) Connection management: TCP long connections are maintained through heartbeat packets, with a heartbeat interval of <60s as defined by the formula. The connection is normal, indicating that the connection is alive.
[0013] Preferably, the address intelligent allocation module runs the following algorithm: (1) Initialization allocation: Starting from the base address, according to the formula Distribute in sequence, among which, For the request sequence number, =181; (2) Update allocation: Query the historical address table; if it exists, reuse it; otherwise, follow the formula. , Find a free address from the set of allocated addresses: (3) Conflict checking: The allocated addresses are stored in a hash table, and a uniqueness check is performed after a new address is generated.
[0014] Preferably, the fault diagnosis and isolation module employs the following fault detection logic: (1) Emergency stop detection: The emergency stop signal is monitored through the digital input pin. The formula is: emergency stop state = pin level = 0V. Trigger emergency stop, determine if emergency stop has been triggered; (2) Module offline: determined by communication timeout, according to the formula Calculate the timeout period; (3) Contactor sticking: Determined by the feedback signal of the output contactor, according to the formula. express.
[0015] Preferably, the data storage module uses the lightweight SQLite database to store the following content: (1) Address mapping table: records the charging gun ID, official address and allocation time; (2) System parameters: Configurable items such as storage reference address, voltage threshold, and timeout time; (3) Fault Log: Recorded in the format of timestamp-fault type-associated module, supporting fault tracing; The interactive display module includes: (1) Host side: The touch screen displays the allocation progress and the list of faulty modules; (2) Terminal: The terminal is an LED digital tube, which displays the official address according to the host instruction. The display logic is: display value = official address ⟹ hexadecimal to decimal display.
[0016] Compared with existing technologies, this invention provides a method and system for dynamic allocation of charging station gun addresses based on power topology identification, which has the following advantages: This invention dynamically identifies the physical connection topology by real-time detection of the power transmission characteristics (such as voltage sampling values) between the charging gun and the direct-connect module, and automatically assigns a unique address accordingly. Combined with an address verification mechanism to avoid duplication or out-of-bounds errors, this invention achieves the beneficial effects of completely eliminating manual configuration errors and realizing accurate automatic address matching.
[0017] This invention achieves end-to-end adaptive management of the terminal's "power-on" functionality and the system's long-term stable operation by using virtual addresses for temporary communication in the terminal, persistently storing the formal addresses in EEPROM, and supporting dynamic updates and forced modifications of addresses in the host. Ultimately, this improves system compatibility and ease of maintenance.
[0018] This invention supports the configuration of all charging gun addresses in a single process through a multi-host collaborative intelligent triggering mechanism, a dual-mode allocation strategy, and an automatic fault module isolation design. This significantly improves batch processing efficiency while ensuring the stability of the allocation process, ultimately achieving the beneficial effect of rapid deployment and reduced operation and maintenance costs for large-scale group charging systems. Attached Figure Description
[0019] Figure 1 This is the physical power topology diagram of the system of the present invention; Figure 2 This is a multi-terminal network communication topology diagram of the present invention; Figure 3 This is a flowchart of the multi-terminal automatic gun address acquisition process of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Please see Figure 1 - Figure 3 A dynamic address allocation method for charging pile guns based on power topology identification includes the following steps: Step 1: System Topology Construction and Initialization: In the system architecture design phase, establish the host control module, terminal device module, charging gun access module, power transmission detection module, network communication interaction module, address intelligent allocation module, fault diagnosis and isolation module, and data persistent storage module; the host control module connects to the charging gun access module, power transmission detection module, and other subsequent functional modules through power lines (each module connects to the power transmission link as needed), and each module connects to the terminal and charging gun respectively. Based on the hardware connection relationship, construct the system physical power topology and multi-terminal network communication topology. The host and terminal complete power-on initialization respectively, the host starts the address allocation preparation process, and the terminal starts network initialization and address request preparation. Step 2: Host Initialization Detection: The host detects the emergency stop, door sensor, terminal emergency stop, and the sticking status of the door sensor and output contactor. If any abnormality is found, automatic allocation is paused. At the same time, the host control module is checked for offline and parallel contactor sticking faults, and modules that do not participate in allocation are marked. A 90-second timeout timer is started, and the number of gun address requests is polled at a period of 10 milliseconds. When "the number of requests > 0 and timeout is triggered" or "the number of requests = the total number of system modules", the module startup process is entered. Step 3: Host Control Module Startup and Power Detection: The host uses a stepped voltage algorithm to sequentially start the charging gun connection module and the power transmission detection module (according to the power topology association order, core modules directly connected to the charging gun and affecting power detection are started first), delays to verify the startup status, and marks and shuts down modules that fail to start; the terminal collects the output voltage and its own status at a period of 1-2 seconds and sends them to the host; the host compares the module output voltage with the sampled value reported by the terminal and calculates the power topology relationship between the charging gun and the module (if the voltage difference is ≤5V, it is determined to be a direct connection); Step 4, Intelligent Address Allocation on the Host Side: The host selects the allocation mode based on the storage status: When in initialization mode, it linearly allocates addresses from the base address (e.g., 181) in the order of requests; when in update mode, it prioritizes reusing historical address records, and if no match is found, it searches for the first free address; it performs address conflict verification (duplicate detection, range validity verification) to generate a unique legal address; Step 5, Address Result Feedback and Terminal Writing: The host sends the allocation result to the terminal and enters a 10-second standby state; after receiving the formal address, the terminal immediately writes it to the EEPROM (Electrically Erasable Programmable Read-Only Memory) for persistent storage and switches to normal communication mode (if it is the first allocation, the virtual address is generated using "last byte of IP + gun identifier" for temporary communication). Step Six: System Dynamic Maintenance and Fault Tolerance: The host listens for new address requests every 100 milliseconds and re-executes the entire process when triggered; the terminal responds to the host address update command, switches to the new address in real time, and logs in again; the host automatically isolates faulty modules to ensure the stability of the allocation process, and completes the address configuration of all request guns in a single process; Step 7: Terminal Address Persistence and Communication Switching: The terminal first reads the historical address from the EEPROM (Electrically Erasable Programmable Read-Only Memory). If no address is available, a virtual address is generated for temporary communication. After receiving the host's official address, it writes it into the EEPROM to ensure retention even after power failure. Then, it switches to the official address for TCP (Transmission Control Protocol) long-connection communication, achieving plug-and-play functionality. Step 8: Closed-loop process and continuous response: After allocation, the host enters standby after 10 seconds and continuously listens for new requests at 100-millisecond intervals; the terminal displays address information on the LED board according to the host's instructions (for 60 seconds); if a new address request is triggered, the host re-executes the entire process of initialization detection - module startup - address allocation to achieve dynamic cyclic allocation and ensure long-term stable operation of the system.
[0022] The advantages are: through the precise construction and initialization of the above system topology, multi-dimensional initialization detection on the host side, module startup and power topology identification based on the stepped voltage algorithm, dual-mode intelligent address allocation and conflict verification, temporary communication of terminal virtual address and persistent storage of formal address, and dynamic maintenance and fault isolation mechanism throughout the whole process, the charging pile gun address is automatically and accurately allocated, effectively avoiding manual configuration errors, improving the deployment efficiency and operation and maintenance reliability of large-scale group charging systems, and achieving the beneficial effects of plug-and-play and long-term stable operation.
[0023] The charging pile gun address dynamic allocation system based on power topology recognition includes a host control module, a terminal equipment module, a charging gun access module, a power transmission detection module, a network communication interaction module, an address intelligent allocation module, a fault diagnosis and isolation module, and a data persistent storage module. The host control module, as the core scheduling component of the system, integrates address allocation logic, power module control, and fault diagnosis algorithms, and coordinates the entire process execution. The terminal device module is equipped with a voltage sampling circuit, a network communication unit, and EEPROM (Electrically Erasable Programmable Read-Only Memory) for storage, and is responsible for data acquisition and address status management; The charging gun access module provides a physical interface that conforms to the national standard (GB / T 20234.3) and provides feedback on the charging gun status and voltage sampling point data; The power transfer detection module consists of N independent power modules (N is the system configuration number) and supports stepped voltage output and power topology identification. The network communication interaction module establishes a host-terminal Ethernet connection to realize the real-time transmission of address requests and allocation results; The address intelligent allocation module runs a dual-mode allocation algorithm and conflict verification logic to generate a unique legal address; The fault diagnosis and isolation module monitors emergency stop, door magnetic, and module offline signals, and marks and blocks these signals. The persistent data storage module stores historical address mapping tables, system parameters, and fault logs, and supports fast querying and recovery.
[0024] Specifically, the host control module has a built-in industrial-grade main control chip (such as ARM Cortex-A9) that runs an address allocation scheduler and has the following functions: (1) Multi-threaded management: The fault detection thread, power module control thread and address allocation thread are executed simultaneously to ensure process parallelism; (2) Timeout mechanism: Time control is implemented through a timer to achieve a 90-second allocation timeout and a 100-millisecond new request listening time; (3) Topology calculation: based on the output voltage of the power module With terminal sampling voltage Through formula ≤5V determines direct connection: when the power module output voltage With terminal sampling voltage When the absolute value difference is ≤5V, it is determined that the module and the charging gun have a direct power topology relationship.
[0025] The advantages are: by coordinating and managing the host control module with multi-threading, managing the voltage sampling and intelligent address management of the terminal equipment module, standardizing the interface and status detection of the charging gun access module, providing stepped voltage output and topology identification of the power transmission detection module, real-time data transmission and connection maintenance of the network communication interaction module, and monitoring anomalies and blocking the process of the fault diagnosis and isolation module, a highly efficient and collaborative system architecture is built, thereby ensuring the stability and accuracy of the entire address allocation process to meet the plug-and-play and large-scale operation and maintenance needs of large charging piles.
[0026] Specifically, the terminal device module uses a low-power MCU (such as STM32F4) and integrates the following functions: (1) Voltage sampling: The output voltage of the charging gun is acquired through the ADC channel (sampling rate 1kHz), and the voltage is obtained through the formula. Calculate the effective value. This represents the number of sampling points, and is the default value. =100; (2) Address Management: When no formal address has been assigned, the formula is used. This generates a virtual address, where ≪8 means shifting the hexadecimal value of the last byte of the IP address left by 8 bits (i.e., occupying the high 8 bits), and the gun identifier occupies the low 8 bits. For example, if the last byte of the IP address is 0x55 and the gun identifier is 0x01, then the virtual address is 0x5501. (3) Status reporting: Send data packets containing the effective voltage value, virtual address, and terminal status to the host at a 1-second interval.
[0027] The advantages are: through the above-mentioned high-precision voltage sampling and effective value calculation, virtual address generation rules and formal address management mechanism, periodic status reporting and real-time communication switching, the terminal can achieve temporary communication capability when there is no formal address and stable operation after address allocation, thereby ensuring efficient interaction between the terminal and the host, supporting "power-on", and ultimately improving the adaptability and reliability of the system.
[0028] Specifically, the charging gun connection module includes the following technical features: (1) Interface standard: 5-pin aviation plug is used, defining CC (connection confirmation), CP (control protection), L (live wire), N (neutral wire), PE (ground wire); (2) Status detection: The status of the insertion gun is determined by the change in the CC resistance (1kΩ→2.2kΩ), according to the formula. Calculate the connection confirmation signal. The reference voltage is 5V. To detect voltage, The constant current source current is 1mA; (3) Temperature compensation: Through an NTC thermistor (B value 3950K), the temperature is compensated by the formula. Calculate the nozzle temperature. =25℃, =100kΩ, For NTC real-time resistors.
[0029] The advantages are: by defining physical interfaces that comply with national standards, detecting the plug-in status based on CC resistance changes, and using the temperature compensation mechanism of NTC thermistors, the standardization and safety of charging gun connection are ensured, thereby achieving accurate judgment of plug-in status and real-time monitoring of gun head temperature, ultimately providing reliable support for power topology identification and safe system operation.
[0030] Specifically, the power transmission detection module consists of 20 independent modules (e.g., in an 800kW system configuration) and has the following functions: (1) Stepped voltage output: Set the start-up voltage according to the rule of module number × 20V + 130V (e.g., module 1: 150V = 1 × 20 + 130), according to the formula express, The module numbers are n = 1 to 20; (2) Fault isolation: When startup fails (voltage deviation > 10%), it is marked as unusable and power is cut off, according to the formula. >10% The startup failure is determined as a startup failure.
[0031] The advantages are: by using the above-mentioned stepped voltage output set according to the rules, marking and power-off processing of modules that fail to start, and fault isolation logic based on voltage deviation, the orderly start-up of modules and the accurate identification of power topology are achieved, ensuring the timely isolation of faulty modules, thereby ensuring the stability and accuracy of the power detection process and providing a reliable topology basis for address allocation.
[0032] Specifically, the network communication interaction module adopts the TCP (Transmission Control Protocol) / IP protocol stack and has the following technical characteristics: (1) Data packet format: Define address request frame (type 0x01), address allocation frame (type 0x02), and status report frame (type 0x03), using the formula calculate check, For data length, This is the i-th byte of data; (2) Connection Management: A long TCP (Transmission Control Protocol) connection is maintained via heartbeat packets (every 30 seconds), as per the formula: heartbeat interval < 60s. The connection is normal, indicating that the connection is alive.
[0033] The advantages are: through the clearly defined data packet format and verification mechanism, and the TCP long connection management based on heartbeat packets, efficient transmission and reliable verification of address request and allocation result data between the host and the terminal can be achieved, ensuring the stability of the network connection, thereby ensuring the smooth progress of the address allocation process and ultimately improving the reliability of system communication.
[0034] Specifically, the address intelligent allocation module runs the following algorithm: (1) Initialization allocation: Starting from the base address (e.g., 181), follow the formula Distribute in sequence, among which, For the request sequence number, =181; (2) Update allocation: Query the historical address table; if it exists, reuse it; otherwise, follow the formula. , Find a free address from the set of allocated addresses: (3) Conflict checking: The allocated addresses are stored in a hash table, and a uniqueness check is performed after a new address is generated.
[0035] The advantages are: through the linear address allocation in the initialization mode, the reuse of historical addresses and lookup of free addresses in the update mode, and the collision verification logic based on hash tables, the intelligent and unique address allocation is achieved, ensuring the legality and validity of addresses, thereby avoiding address conflicts, and ultimately improving the efficiency and accuracy of address allocation, adapting to the address configuration needs in different scenarios.
[0036] Specifically, the fault diagnosis and isolation module employs the following fault detection logic: (1) Emergency stop detection: The emergency stop signal (active low) is monitored through the digital input pin. The formula is: emergency stop state = pin level = 0V. Trigger emergency stop, determine if emergency stop has been triggered; (2) Module offline: Determined by communication timeout (no response for more than 3 seconds), according to the formula. Calculate the timeout period; (3) Contactor sticking: Determined by the output contactor feedback signal (continuous conduction > 500ms), according to the formula. express.
[0037] The advantages are: by using the above-mentioned emergency stop detection based on pin level, module offline judgment based on communication timeout, and contactor adhesion judgment based on continuous conduction time, the system can accurately identify and promptly block key faults, ensuring that the address allocation process is carried out in a fault-free or fault-controllable state, thereby improving the fault tolerance and operational reliability of the system.
[0038] Specifically, the data storage module uses the lightweight database SQLite (Simplified Version of Structured Query Language) to store the following content: (1) Address mapping table: records the charging gun ID, official address and allocation time; (2) System parameters: Configurable items such as storage reference address, voltage threshold, and timeout time; (3) Fault Log: Recorded in the format of timestamp-fault type-associated module, supporting fault tracing; The interactive display module includes: (1) Host side: 7-inch touch screen displays allocation progress (number allocated / total number of requests) and list of faulty modules; (2) Terminal: 4-digit LED digital tube, displays the actual address according to the host instruction (for 60 seconds), display logic: display value = actual address Display hexadecimal to decimal.
[0039] The advantages are: by storing and managing address mapping tables, system parameters, and fault logs through the SQLite database, and displaying information on the host-side touch screen and terminal-side LED digital tube, the system data can be effectively traced and the allocation process can be visualized and monitored, which facilitates system operation and maintenance and fault diagnosis, and ultimately improves the maintainability of the system and the user experience.
[0040] Example This routine uses an 800kW group charging system with 20 system modules and 20 terminal guns.
[0041] T1. After the host is powered on, the program starts successfully and enters the automatic allocation algorithm waiting stage after the configuration is completed. T2. After the terminal powers on and fails to log in, the terminal starts sending a request to obtain the gun address command every 1 second. T3. After the host self-test is completed, check whether the number of test requests is consistent with the number of system modules. If they are inconsistent, wait 90 seconds and start the modules according to the stepped voltage. Please refer to Table 1: Table 1
[0042] T4. The terminal reports the actual collected output voltage to the host every 1 second. T5. The host calculates the linear relationship between the module and the gun power based on the difference between the terminal's sampling voltage and the module's output voltage being within 5V. Please refer to Table 2: Table 2
[0043] T6. Allocate the actual communication address according to the power relationship and save the allocation result to the configuration file; T7. The host sends the address allocated by the host to the terminal device, and the terminal uses the allocated address for data communication. T8. The terminal uses the newly allocated address to log in and communicate normally. At this time, the allocation algorithm enters the final stage and checks for new requests for 100 milliseconds. If a new request is received, the allocation process is executed again.
[0044] In summary, by accurately identifying the power topology, implementing dual-mode intelligent address allocation, virtual address temporary communication and formal address persistence, full-process fault detection and isolation, efficient batch processing and dynamic maintenance, and standardized interfaces and reliable network communication, the system achieves automated and accurate address allocation for charging piles, completely avoiding manual configuration errors, significantly improving the deployment efficiency of large-scale group charging systems (efficiency improvement of over 90%), ensuring long-term stable operation of the system, reducing operational complexity, enabling plug-and-play terminal devices, and meeting the needs of large-scale deployment of charging facilities for new energy vehicles.
[0045] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for dynamic allocation of charging pile gun addresses based on power topology identification, characterized in that, Includes the following steps: System Topology Construction and Initialization: In the system architecture design phase, a host control module, terminal device module, charging gun access module, power transmission detection module, network communication interaction module, address intelligent allocation module, fault diagnosis and isolation module, and data persistent storage module are established. The host control module is connected to the charging gun access module, power transmission detection module, and other subsequent functional modules through power lines. Each module is connected to the terminal and charging gun respectively. Based on the hardware connection relationship, the physical power topology and multi-terminal network communication topology of the system are constructed. The host and terminal complete power-on initialization respectively. The host starts the address allocation preparation process, and the terminal starts network initialization and address request preparation. Host-side initialization detection: The host detects the emergency stop, door sensor, terminal emergency stop, door sensor and output contactor sticking status. If an abnormality is found, automatic allocation is suspended. At the same time, the host control module is detected to be offline and parallel contactor sticking faults are detected, and modules that do not participate in allocation are marked. When the requirements are met, the module startup process begins; Host control module startup and power detection: The host uses a stepped voltage algorithm to sequentially start the charging gun access module and the power transmission detection module, delays to verify the startup status, and marks and shuts down modules that fail to start; the terminal collects the output voltage and its own status at a set period and sends them to the host; the host compares the module output voltage with the sampled value reported by the terminal and calculates the power topology relationship between the charging gun and the module; Intelligent address allocation on the host side: The host selects the allocation mode based on the storage status. When it is in the initialization mode, it allocates linearly from the base address in the order of requests. When it is in the update mode, it prioritizes the reuse of historical addresses. If no match is found, it searches for the first free address. Perform address conflict verification and generate a unique valid address; Address result feedback and terminal writing: The host sends the allocation result to the terminal and enters standby mode; After receiving the official address, the terminal immediately writes it into the EEPROM for persistent storage and switches to normal communication mode. System dynamic maintenance and fault tolerance: The host listens for new address requests at set intervals and re-executes the entire process when triggered; The terminal responds to the host address update command, switches to the new address in real time, and logs in again. The host automatically isolates fault modules to ensure the stability of the allocation process, and completes the address configuration of all request guns in a single process; Terminal address persistence and communication switching: The terminal first reads the historical address from EEPROM, and generates a virtual address for temporary communication when no address is available; After receiving the host's official address, it is written to the EEPROM for power-off retention, and then switched to the official address for TCP long-connection communication to achieve plug-and-play functionality. Closed-loop process and continuous response: After allocation, the host enters standby after 9-10 seconds and continues to listen for new requests at a set period; the terminal displays address information through LED light board according to the host's instructions; when a new address is available, the request is triggered, and the host re-executes the entire process of initialization detection-module startup-address allocation, realizing dynamic cyclic allocation.
2. A dynamic address allocation system for charging pile guns based on power topology identification, characterized in that, It includes a host control module, a terminal equipment module, a charging gun access module, a power transmission detection module, a network communication interaction module, an address intelligent allocation module, a fault diagnosis and isolation module, and a data persistent storage module; The host control module serves as the core scheduling component of the system, integrating address allocation logic, power module control, and fault diagnosis algorithms to coordinate the entire process execution. The terminal device module is equipped with a voltage sampling circuit, a network communication unit, and an EEPROM storage, and is responsible for data acquisition and address status management. The charging gun access module provides a physical interface that conforms to national standards and provides feedback on the charging gun status and voltage sampling point data. The power transmission detection module consists of N independent power modules and supports stepped voltage output and power topology identification. The network communication interaction module establishes a host-terminal Ethernet connection to realize the real-time transmission of address requests and allocation results; The address intelligent allocation module runs a dual-mode allocation algorithm and conflict verification logic to generate legal addresses; The fault diagnosis and isolation module monitors emergency stop, door magnetic and module offline signals, and marks and blocks the process. The persistent data storage module stores historical address mapping tables, system parameters, and fault logs, and supports fast querying and recovery.
3. The dynamic address allocation system for charging pile guns based on power topology identification according to claim 2, characterized in that: The host control module has a built-in industrial-grade main control chip and runs an address allocation and scheduling program, specifically including: Multi-threaded management: Simultaneously execute the fault detection thread, power module control thread, and address allocation thread; Timeout mechanism: Timeout allocation is implemented through a timer, with a timeout period of 90-95 seconds and new request listening time of 100-105 milliseconds; Topology calculation: based on power module output voltage With terminal sampling voltage Through formula ≤5V determines direct connection: when the power module output voltage With terminal sampling voltage When the absolute value difference is ≤5V, it is determined that the module and the charging gun have a direct power topology relationship.
4. The dynamic address allocation system for charging pile guns based on power topology identification according to claim 2, characterized in that: The terminal device module uses a low-power MCU and can specifically achieve the following functions: Voltage sampling: The output voltage of the charging gun is acquired through the ADC channel, and then calculated using the formula... Calculate the effective value. This represents the number of sampling points, and is the default value. =100; Address Management: When no formal address has been assigned, the formula is used. This generates a virtual address, where ≪8 means shifting the hexadecimal value of the last byte of the IP address 8 bits to the left, with the gun identifier occupying the lower 8 bits. For example, if the last byte of the IP address is 0x55 and the gun identifier is 0x01, then the virtual address is 0x5501. Status reporting: Sends data packets containing the effective voltage value, virtual address, and terminal status to the host at set intervals.
5. The dynamic address allocation system for charging pile guns based on power topology identification according to claim 1, characterized in that: The charging gun access module specifically includes: Interface standard: Uses a 5-pin aviation connector, defining CC, CP, L, N and PE; Status detection: The status of the insertion gun is determined by the change in the CC resistance, using the formula... Calculate the connection confirmation signal. The reference voltage is 5V. To detect voltage, The constant current source current is 1mA; Temperature compensation: via an NTC thermistor (B value 3950K), calculated using the formula... Calculate the nozzle temperature. =25℃, =100kΩ, For NTC real-time resistors.
6. The dynamic address allocation system for charging pile guns based on power topology identification according to claim 2, characterized in that: The power transmission detection module consists of 20 independent modules and has the following functions: Stepped voltage output: The power-on voltage is set according to the rule of module number × 20V + 130V, calculated using the formula... express, Let n be the module number, and n = 1~20; Fault isolation: When startup fails, it is marked as unavailable and power is cut off, as indicated by the formula. >10% The startup failure is determined as a startup failure.
7. The dynamic address allocation system for charging pile guns based on power topology identification according to claim 2, characterized in that: The network communication interaction module adopts the TCP / IP protocol stack and has the following technical features: Data packets Format: Define address request frame, address allocation frame, and status report frame using formulas. ,calculate check, For data length, This is the i-th byte of data; Connection management: TCP long connections are maintained through heartbeat packets. The formula "heartbeat interval < 60s ⟹" indicates a normal connection and the connection is considered alive.
8. The dynamic address allocation system for charging pile guns based on power topology identification according to claim 2, characterized in that: The address intelligent allocation module runs the following algorithm: Initial allocation: Starting from the base address, according to the formula Distribute in sequence, among which, For the request sequence number, =181; Update allocation: Query the historical address table; if it exists, reuse it; otherwise, follow the formula. , Find a free address from the set of allocated addresses: Conflict checking: Allocated addresses are stored in a hash table, and a uniqueness check is performed after a new address is generated.
9. The dynamic address allocation system for charging pile guns based on power topology identification according to claim 2, characterized in that: The fault diagnosis and isolation module employs the following fault detection logic: Emergency stop detection: The emergency stop signal is monitored through the digital input pin. The emergency stop is triggered by the formula: emergency stop state = pin level = 0V. Module offline: Determined by communication timeout, using the formula. Calculate the timeout period; Contactor sticking: Determined by the output contactor feedback signal, using the formula... express.
10. The dynamic address allocation system for charging pile guns based on power topology identification according to claim 2, characterized in that: The data storage module uses the lightweight SQLite database to store the following content: Address mapping table: records the charging gun ID, official address, and allocation time; System parameters: configurable items such as storage reference address, voltage threshold, and timeout time; Fault logs are recorded in the format of timestamp-fault type-associated module, supporting fault tracing; The interactive display module includes: Host side: Touch screen displays allocation progress and a list of faulty modules; Terminal: The terminal is an LED digital tube that displays the actual address according to the host instruction. The display logic is: Display value = Actual address. Display hexadecimal to decimal.
Citation Information
Cited By
Bus temperature measurement system capable of automatically allocating addresses
CN116754097A
