Energy storage converter communication test method and device

The automated communication testing method for energy storage converters solves the problem of low efficiency in manual testing, and achieves efficient and flexible communication testing, applicable to energy storage systems with different topologies.

CN121056352APending Publication Date: 2025-12-02TBEA XIAN ELECTRIC TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511203077.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

In existing technologies, communication testing of energy storage converters is inefficient, mainly relying on manual methods to set up communication interference, which leads to low efficiency.

Method used

A communication testing method for energy storage converters is provided. The method automatically obtains the current status and test type through electronic devices, determines the target test message generation strategy, controls the target tool to generate and send test messages, and determines the test result based on the time after receiving feedback messages, thereby achieving automated testing.

Benefits of technology

It improves the efficiency of communication testing for energy storage converters, supports scripted automatic test programs, enhances the consistency and relevance of testing, can simulate communication anomalies in real-world scenarios, and is suitable for multi-node communication testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121056352A_ABST
    Figure CN121056352A_ABST
Patent Text Reader

Abstract

The invention discloses an energy storage converter communication test method and device, and relates to the technical field of energy storage converters. The method comprises the following steps: acquiring a current state and a current test type of the energy storage converter; when the current state is a target state, determining a target test message generation strategy of the energy storage converter according to the current test type; controlling the target tool to execute the target test message generation strategy to obtain a target test message, and sending the target test message to the energy storage converter, so that the energy storage converter sends a first feedback message to the electronic equipment under the condition that the energy storage converter receives the target test message; under the condition that the first feedback message is received, a target test result of the energy storage converter is determined according to the first moment and the second moment, and the target test result is used for representing whether the communication test of the energy storage converter passes or not. According to the embodiment of the invention, the method can improve the communication test efficiency of the energy storage converter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of energy storage converter technology, specifically relating to a communication testing method and device for energy storage converters. Background Technology

[0002] With the rapid development of energy storage technology, the power conversion system (PCS), as the core device connecting the battery system and the power grid, directly affects the operating efficiency and safety of the energy storage system due to its communication stability. The battery management system (BMS) and the PCS communicate in real time via the controller area network bus (CAN) to transmit battery status information such as voltage, current, and state of charge (SOC), as well as control commands. However, in actual operation, factors such as electromagnetic interference, line aging, and node failures may cause abnormalities in the communication link, such as data delays, packet loss, bit errors, and frame duplication, thus affecting the normal operation of the battery system. Therefore, testing the communication of the energy storage converter is crucial.

[0003] Currently, the main technology for testing the communication of energy storage converters is to manually set up communication interference, which results in low efficiency in the communication testing of energy storage converters. Summary of the Invention

[0004] The technical problem to be solved by this application is to provide a communication testing method and apparatus for energy storage converters, which addresses the above-mentioned shortcomings of the existing technology. Using this energy storage converter communication testing method, communication testing of energy storage converters can be automatically realized, thereby improving the communication testing efficiency of energy storage converters.

[0005] In a first aspect, embodiments of this application provide a communication testing method for an energy storage converter, applied to an electronic device, wherein the electronic device is connected to the energy storage converter via target interface hardware; the electronic device is equipped with a target tool; the method includes:

[0006] Obtain the current status and current test type of the energy storage converter;

[0007] Given that the current state is the target state, determine the target test message generation strategy for the energy storage converter based on the current test type.

[0008] The target tool executes the target test message generation strategy to obtain the target test message;

[0009] Send a target test message to the energy storage converter so that the energy storage converter sends a first feedback message to the electronic equipment upon receiving the target test message;

[0010] Upon receiving the first feedback message, the target test result of the energy storage converter is determined based on the first time and the second time. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the time when the target tool executes the target test message generation strategy. The second time is the time when the electronic device receives the first feedback message.

[0011] In some embodiments of the first aspect, obtaining the current state of the energy storage converter specifically includes:

[0012] Obtain the first controller area network message sent by the energy storage converter;

[0013] Parse the local area network packets of the first controller to obtain the current status.

[0014] In some embodiments of the first aspect, before obtaining the current state and current test type of the energy storage converter, the method further includes:

[0015] Initialize the target tool to obtain the initialized target tool;

[0016] For the initialized target tool, load the battery management system protocol to obtain the loaded target tool;

[0017] Using the loaded target tool, a reference controller area network (Controller Area Network) message is sent to the energy storage converter to initiate communication between the energy storage converter and the electronic equipment; the reference controller area network message includes at least one of the following: battery status message, control command message, and fault status message.

[0018] In some implementations of the first aspect, the current test types include one of data tampering, message loss, data length code error, cyclic redundancy check error, and timing jitter.

[0019] Based on the current test type, determine the target test message generation strategy for the energy storage converter, specifically including:

[0020] Given that the current test type is data tampering, the target test message generation strategy is determined to be modifying the data fields of the preset test message;

[0021] When the current test type is message loss, the target test message generation strategy is determined to be to skip the preset identifier in the preset test message;

[0022] When the current test type is a data length code error, the target test message generation strategy is determined to set the data length code field value of the preset test message to the first field value.

[0023] When the current test type is Cyclic Redundancy Check error, the target test message generation strategy is determined to modify the target byte of the Cyclic Redundancy Check in the preset test message.

[0024] Given that the current test type is timing jitter, the target test message generation strategy is determined to be sending preset test messages with random delay.

[0025] In some embodiments of the first aspect, the target test result of the energy storage converter is determined based on a first time moment and a second time moment, specifically including:

[0026] The difference between the second time point and the first time point is defined as the first time difference;

[0027] If the first time difference is less than the preset time difference threshold and the target action corresponding to the current test type is detected, the target test result is determined to be a successful communication test.

[0028] If the first time difference is less than the preset time difference threshold, or if no target action is detected, the target test result is determined to be a communication test failure.

[0029] In some embodiments of the first aspect, after determining the target test result of the energy storage converter based on a first time moment and a second time moment, the method further includes:

[0030] Integrate the current test type and target test results into a target test report for the target energy storage converter;

[0031] Display the target test report.

[0032] Based on the same inventive concept, in a second aspect, embodiments of this application also provide a communication testing method for an energy storage converter, applied to an energy storage converter, wherein the energy storage converter is connected to an electronic device through target interface hardware, and the electronic device is equipped with a target tool; the target interface hardware is a controller local area network to universal serial bus interface hardware; the method includes:

[0033] Upon receiving a target test message from an electronic device, a first feedback message is sent to the electronic device so that the electronic device, upon receiving the first feedback message, determines the target test result of the energy storage converter based on a first time and a second time. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the moment when the target tool executes the target test message generation strategy; the second time is the moment when the electronic device receives the first feedback message.

[0034] The target test message is generated by the electronic device after performing a first operation. The first operation includes: obtaining the current state and current test type of the energy storage converter; if the current state is the target state, determining the target test message generation strategy of the energy storage converter according to the current test type; and controlling the target tool to execute the target test message generation strategy.

[0035] Based on the same inventive concept, in a third aspect, embodiments of this application provide a communication testing device for an energy storage converter, applied to an electronic device, wherein the electronic device is connected to the energy storage converter via a target interface hardware; the electronic device is equipped with a target tool; the device includes:

[0036] The first acquisition module is used to acquire the current status and current test type of the energy storage converter;

[0037] The first determining module, connected to the first obtaining module, is used to determine the target test message generation strategy of the energy storage converter according to the current test type when the current state is the target state.

[0038] The first control module, connected to the first determination module, is used to control the target tool to execute the target test message generation strategy and obtain the target test message;

[0039] The first sending module, connected to the first control module, is used to send a target test message to the energy storage converter, so that the energy storage converter sends a first feedback message to the electronic device upon receiving the target test message.

[0040] The second determining module, connected to the first sending module, is used to determine the target test result of the energy storage converter based on the first time and the second time when the first feedback message is received. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the time when the target tool executes the target test message generation strategy. The second time is the time when the electronic device receives the first feedback message.

[0041] In some embodiments of the third aspect, the first acquisition module is specifically used for:

[0042] Obtain the first controller area network message sent by the energy storage converter;

[0043] Parse the local area network packets of the first controller to obtain the current status.

[0044] In some embodiments of the third aspect, the device further includes:

[0045] The initialization module is used to initialize the target tool and obtain the initialized target tool;

[0046] The loading module and connection initialization module are used to load the battery management system protocol onto the target tool for initialization, thus obtaining the loaded target tool.

[0047] The second sending module, connected to the loading module, is used to send a reference controller area network (Controller Area Network) message to the energy storage converter using the loaded target tool, so as to initiate communication between the energy storage converter and the electronic equipment; the reference controller area network message includes at least one of battery status message, control command message and fault status message.

[0048] Based on the same inventive concept, in a third aspect, embodiments of this application provide a communication testing device for an energy storage converter, applied to an energy storage converter. The energy storage converter is connected to an electronic device via target interface hardware, and the electronic device is equipped with a target tool. The target interface hardware is a controller local area network to universal serial bus interface hardware. The device includes:

[0049] The second sending module is used to send a first feedback message to the electronic device upon receiving the target test message sent by the electronic device, so that the electronic device, upon receiving the first feedback message, determines the target test result of the energy storage converter according to the first time and the second time. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the time when the target tool executes the target test message generation strategy; the second time is the time when the electronic device receives the first feedback message.

[0050] The target test message is generated by the electronic device after performing a first operation. The first operation includes: obtaining the current state and current test type of the energy storage converter; if the current state is the target state, determining the target test message generation strategy of the energy storage converter according to the current test type; and controlling the target tool to execute the target test message generation strategy.

[0051] According to the communication testing method and apparatus for energy storage converters provided in the embodiments of this application, the current state and current test type of the energy storage converter are first obtained; then, if the current state is the target state, the target test message generation strategy of the energy storage converter is determined according to the current test type; then, the target tool is controlled to execute the target test message generation strategy to obtain the target test message and send the target test message to the energy storage converter, so that the energy storage converter sends a first feedback message to the electronic device upon receiving the target test message; then, upon receiving the first feedback message, the target test result of the energy storage converter is determined according to the first time and the second time. In other words, in this embodiment, the electronic device can automatically determine the target test message generation strategy of the energy storage converter based on the current test type, and then control the target tool to automatically execute the target test message generation strategy. This allows the energy storage converter to automatically send a first feedback message to the electronic device upon receiving the target test message. Consequently, the electronic device, upon receiving the first feedback message, automatically determines the target test result of the energy storage converter based on the first and second moments, thereby achieving automatic testing of the energy storage converter's communication. Compared to the related technologies that use manual communication interference settings for energy storage converter communication testing, this method can improve the efficiency of energy storage converter communication testing. Attached Figure Description

[0052] Figure 1 This diagram illustrates the test system architecture for energy storage converter communication testing provided in an embodiment of this application.

[0053] Figure 2 This illustration shows an interactive flow diagram of the energy storage converter communication testing method provided in an embodiment of this application;

[0054] Figure 3 This illustration shows a flowchart of a communication testing method for an energy storage converter provided in an embodiment of this application.

[0055] Figure 4 This illustration shows another flowchart of the energy storage converter communication testing method provided in an embodiment of this application;

[0056] Figure 5 This illustration shows another flowchart of the energy storage converter communication testing method provided in the embodiments of this application;

[0057] Figure 6 This illustration shows a structural schematic of an energy storage converter communication test device provided in an embodiment of this application. Detailed Implementation

[0058] To enable those skilled in the art to better understand the technical solutions of this application, the application will be further described in detail below with reference to the accompanying drawings and embodiments.

[0059] The features and exemplary embodiments of various aspects of this application will now be described in detail. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain this application and are not configured to limit this application. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples of this application.

[0060] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0061] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0062] Before introducing the energy storage converter communication test method provided in the embodiments of this application, the test system architecture of the energy storage converter communication test involved in the embodiments of this application will be introduced first.

[0063] like Figure 1 As shown, the test system architecture provided in this application embodiment includes an electronic device 101, a target interface hardware 102, an energy storage converter 103, an AC power supply 104, and a DC power supply 105. The electronic device 101 and the energy storage converter 103 are connected through the target interface hardware 102, and the energy storage converter 103 is also connected to the AC power supply 104 and the DC power supply 105.

[0064] For example, electronic device 101 can be an industrial control computer or a personal computer (PC), which may be equipped with a Windows operating system and PCAN-Explorer software, and can run the PCAN-Explorer software to realize message monitoring and transmission. Electronic device 101 may also be equipped with Python and PCAN Basic application programming interface (API) to realize script development, and can also run test scripts to generate test reports. Electronic device 101 performs comprehensive testing of communication link stability through anomaly injection such as data tampering and message loss under charging and discharging conditions.

[0065] For example, the target interface hardware 102 can be used to transmit data from the Controller Area Network (CAN) to the electronic device 101 via a Universal Serial Bus (USB). One end of the target interface hardware 102 has a USB interface that can be connected to the electronic device 101, and the other end can be connected to the CAN communication interface of the energy storage converter 103 via the CAN high-level signal line (H) and CAN low-level signal line (L) of the CAN bus for hardware-level anomaly injection.

[0066] For example, the energy storage converter 103 may be an energy storage converter prototype to be tested for communication.

[0067] For example, USB communication cables and CAN bus communication cables can be shielded twisted-pair cables.

[0068] Example 1

[0069] The energy storage converter communication testing method provided in this application can be applied to the communication stability testing of energy storage systems. This energy storage converter communication testing method supports multi-node communication testing and is applicable to energy storage systems with different topologies.

[0070] like Figure 2 As shown, the energy storage converter communication testing method provided in this application embodiment is based on two executing entities: an electronic device 101 equipped with a target tool and an energy storage converter 103. The energy storage converter communication method includes steps S110 to S160. For example, the target tool can be a PCAN tool.

[0071] S110. Electronic equipment acquires the current status and current test type of the energy storage converter.

[0072] S120. When the electronic device is in the target state, determine the target test message generation strategy for the energy storage converter according to the current test type.

[0073] S130. The electronic device control target tool executes the target test message generation strategy to obtain the target test message.

[0074] S140, Send the target test message to the energy storage converter.

[0075] S150: Upon receiving the target test message, the energy storage converter sends a first feedback message to the electronic equipment.

[0076] S160. Upon receiving the first feedback message, the electronic device determines the target test result of the energy storage converter based on the first time and the second time. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the time when the target tool executes the target test message generation strategy. The second time is the time when the electronic device receives the first feedback message.

[0077] According to the communication testing method for energy storage converters provided in the embodiments of this application, the current state and current test type of the energy storage converter are first obtained; then, if the current state is the target state, the target test message generation strategy of the energy storage converter is determined according to the current test type; then, the target tool is controlled to execute the target test message generation strategy to obtain the target test message and send the target test message to the energy storage converter, so that the energy storage converter sends a first feedback message to the electronic device upon receiving the target test message; then, upon receiving the first feedback message, the target test result of the energy storage converter is determined according to the first time and the second time. In other words, in this embodiment, the electronic device can automatically determine the target test message generation strategy of the energy storage converter based on the current test type, and then control the target tool to automatically execute the target test message generation strategy. This allows the energy storage converter to automatically send a first feedback message to the electronic device upon receiving the target test message. Consequently, the electronic device, upon receiving the first feedback message, automatically determines the target test result of the energy storage converter based on the first and second moments, thereby achieving automatic testing of the energy storage converter's communication. Compared to the related technologies that use manual communication interference settings for energy storage converter communication testing, this method can improve the efficiency of energy storage converter communication testing.

[0078] Furthermore, the energy storage converter communication testing method provided in this application embodiment supports scripted automatic testing programs, which can improve the consistency of testing.

[0079] The specific implementation methods for each of the above steps are described below.

[0080] In step S110, the energy storage converter in this embodiment can be any energy storage converter that requires communication testing.

[0081] For example, the current state can be any one of standby state, discharge state, charging state, and power off state.

[0082] For example, the current test type can be any one of data tampering, message loss, data length code error, cyclic redundancy check error, and timing jitter.

[0083] In some implementations, the electronic device obtains the current state of the energy storage converter, specifically by: the electronic device obtaining a first controller local area network (Controller Area Network) message sent by the energy storage converter; and the electronic device parsing the first Controller Area Network (Controller Area Network) message to obtain the current state.

[0084] For example, the energy storage converter sends a first controller local area network (Controller Area Network) message to the electronic device in real time through the target interface hardware. The first controller local area network (Controller Area Network) message includes the current status of the energy storage converter. Therefore, after the electronic device receives the first controller local area network (Controller Area Network) message, it can obtain the current status of the energy storage converter by parsing the first controller local area network (Controller Area Network) message.

[0085] For example, the electronic device may obtain the current state of the energy storage converter by: determining the current state of the energy storage converter according to a preset type test sequence, or determining the current state of the energy storage converter in response to a user's test type input operation based on the electronic device. The preset type test sequence is also the test sequence of the test types of the energy storage converter preset in the electronic device. For example, the preset type test sequence may be data tampering, message loss, data length code error, cyclic redundancy check error, and timing jitter. The test type input operation may be an operation in which the user inputs the current test type.

[0086] In some implementations, before the electronic device obtains the current state and current test type of the energy storage converter, the method further includes: the electronic device initializing a target tool to obtain an initialized target tool; the electronic device loading a battery management system protocol onto the initialized target tool to obtain a loaded target tool; and the electronic device using the loaded target tool to send a reference controller area network (Controller Area Network) message to the energy storage converter to initiate communication between the energy storage converter and the electronic device; the reference controller area network (Controller Area Network) message includes at least one of a battery status message, a control command message, and a fault status message.

[0087] For example, the battery status message may include at least one of the following: battery management system state of charge (BMS SOC), battery management system voltage (BMS VOLTAGE), and battery management system current (BMS CURRENT).

[0088] For example, the control command message may include at least one of charge / discharge enable, maximum permissible charge / discharge current, and maximum permissible charge / discharge power.

[0089] For example, a fault status message may include at least one of overvoltage, undervoltage, and overtemperature.

[0090] For example, the electronic device initializes PCAN and loads the BMS protocol, and uses the PCAN tool to simulate the BMS to send reference CAN messages to the energy storage converter in order to start normal communication and monitor the communication status in real time.

[0091] In step S120, after obtaining the current state and current test type of the energy storage converter, the electronic device can also determine the target test message generation strategy of the energy storage converter according to the current test type if the current state is the target state.

[0092] For example, it can be written in Python or C++ to obtain the current test type and determine the target test message generation strategy for the energy storage converter based on the current test type.

[0093] For example, the target state can be any one of standby state, discharge state, charging state, and power off state.

[0094] For example, the target state may be preset in the electronic device for direct invocation later, or the target state may be determined in response to a user's input operation based on the target state of the electronic device. The target state input operation may be an operation that inputs the target state.

[0095] It should be noted that if the current state is not the target state, the process will jump to the step of initializing the target tool for the electronic device.

[0096] In some implementations, the current test type includes one of the following: data tampering, message loss, data length code error, cyclic redundancy check (CRC) error, and timing jitter. The electronic device determines the target test message generation strategy for the energy storage converter based on the current test type. Specifically, this includes: if the current test type is data tampering, the electronic device determines the target test message generation strategy to modify the data (DATA) field of the preset test message; if the current test type is message loss, the electronic device determines the target test message generation strategy to skip the preset identifier (ID) in the preset test message; if the current test type is data length code error, the electronic device determines the target test message generation strategy to set the data length code (DLC) field value of the preset test message to the first field value; if the current test type is cyclic redundancy check (CRC) error, the electronic device determines the target test message generation strategy to modify the target byte of the CRC in the preset test message; and if the current test type is timing jitter, the electronic device determines the target test message generation strategy to send the preset test message with a random delay.

[0097] In this embodiment, by determining different target test message generation strategies for different test types, it is possible to simulate communication anomaly types in real-world scenarios, thereby improving the relevance and effectiveness of the tests. Furthermore, by setting different test types and different target test message generation strategies, a comprehensive assessment of communication link stability can be achieved.

[0098] For example, preset test messages can be pre-set in electronic devices for direct invocation later.

[0099] For example, the value of the first field can be set according to the actual situation, and there is no limitation here. For example, the value of the first field can be 15, etc.

[0100] For example, the target byte can be set according to the actual situation, and there is no limitation here. For example, the target byte can be the last byte, etc.

[0101] For example, the duration of the random delay can be set according to the actual situation and is not limited here. For example, the duration of the random delay can be from 0.1ms to 5ms.

[0102] For example, when the current test type is data tampering, message loss, data length code error, cyclic redundancy check error, and timing jitter, the electronic device can also determine that the application programming interface (API) is the CAN_Write interface.

[0103] In steps S130 and S140, when the electronic device is in the target state, after determining the target test message generation strategy of the energy storage converter according to the current test type, it can also control the target tool to execute the target test message generation strategy, obtain the target test message, and send the target test message to the energy storage converter.

[0104] For example, when the electronic device determines that the target test message generation strategy is to modify the data field of the preset test message, it can modify the data field of the preset test message to obtain the target test message, and send the target test message to the energy storage converter through the CAN_Write interface.

[0105] For example, if the electronic device determines that the target test message generation strategy is to skip the preset identifier in the preset test message, it can skip the preset identifier in the preset test message, obtain the target test message, and send the target test message to the energy storage converter through the CAN_Write interface. Skipping the preset identifier in the preset test message can be achieved through a combination of conditional judgment and counting statistics. For example, one frame can be discarded every three frames, the message count can be performed, and whether the message should be sent or discarded can be determined by dividing the count by 3 and checking for a remainder.

[0106] For example, if the electronic device determines that the target test message generation strategy is to set the data length code field value of the preset test message to the first field value, it can set the data length code field value of the preset test message to the first field value to obtain the target test message, and then send the target test message to the energy storage converter through the CAN_Write interface. For example, if the normal CAN standard or extended data bits are 8 bytes, Msg_len can be set to 15, and the message can be sent to the energy storage converter through the CAN_Write interface.

[0107] For example, when an electronic device determines that the target test message generation strategy is to modify the target byte of the cyclic redundancy check (CRC) code of a preset test message, it can modify the last byte of the CRC of the preset test message to obtain the target test message, and then send the target test message to the energy storage converter through the CAN_Write interface. Modifying the last byte of the CRC of the preset test message can be achieved using a custom CRC algorithm.

[0108] For example, if the electronic device determines that the target test message generation strategy is to send a preset test message with a random delay, it can send the target test message to the energy storage converter via the CAN_Write interface with a random delay of 0.1ms to 5ms. The random delay can be implemented using Thread.sleep(random_delay).

[0109] In step S150, after the electronic device sends the target test message to the energy storage converter, the energy storage converter sends a first feedback message to the electronic device upon receiving the target test message.

[0110] For example, the first feedback message may be a message from the energy storage converter to the electronic device indicating that it has received the target test message.

[0111] In step S160, after the energy storage converter sends a first feedback message to the electronic device upon receiving the target test message, the electronic device, upon receiving the first feedback message, determines the target test result of the energy storage converter based on the first time and the second time.

[0112] In some implementations, the target test result of the energy storage converter is determined based on the first time and the second time. Specifically, this includes: determining the difference between the second time and the first time as the first time difference; if the first time difference is less than a preset time difference threshold and the target action corresponding to the current test type is detected, determining the target test result as a communication test passed; if the first time difference is less than the preset time difference threshold, or if no target action is detected, determining the target test result as a communication test failed.

[0113] For example, the preset time difference threshold can be set according to the actual situation, and is not limited here.

[0114] For example, the target action corresponding to the current test type can be set according to the actual situation, and is not limited here. For example, the target action corresponding to packet loss could be shutdown, etc.

[0115] In some implementations, after determining the target test result of the energy storage converter based on the first time and the second time, the method further includes: integrating the current test type and the target test result into a target test report of the target energy storage converter; and displaying the target test report.

[0116] In this embodiment, by displaying the target test report, users can easily analyze and optimize the relevant content of the energy storage converter communication test.

[0117] For example, the target test report may also include the response time, error codes, and alarm information of the energy storage converter.

[0118] For example, it may also include communication recovery time, error handling mechanism, and system stability score. The communication recovery time records the time it takes for the system to resume normal communication after an anomaly injection (i.e., the electronic device controlling the target tool to execute the target test message generation strategy, obtain the target test message, and send the target test message to the energy storage converter); the error handling mechanism analyzes whether the energy storage converter can identify and handle abnormal frames; and the system stability score provides a robustness score (e.g., 0-100 points) based on the anomaly response performance.

[0119] For example, after the electronic device receives the target test message, the method may further include: displaying the target test message; modifying the target test message in response to a user's modification operation based on the electronic device to obtain a modified target test message; sending the modified target test message to the energy storage converter; and, upon receiving the modified target test message, the energy storage converter sending a second feedback message to the electronic device. The modification operation may be an operation used to modify the target test message. The second feedback message may be a message from the energy storage converter to the electronic device indicating that it has received the modified target test message. In this way, the target test message can be adjusted according to user needs, meaning the anomaly injection parameters are adjustable, supporting anomaly simulations of different intensities and frequencies.

[0120] To better understand the energy storage converter communication test method provided in the embodiments of this application, a specific implementation method will be described below.

[0121] This application provides a dynamic anomaly injection method for testing the communication robustness of an energy storage converter (i.e., an energy storage converter communication testing method), comprising the following steps:

[0122] 1. Construct a test communication environment: Use the PCAN tool (i.e., the target tool) to simulate the BMS sending standard CAN messages (i.e., reference controller LAN messages) to the energy storage converter;

[0123] 2. Define the types of communication anomalies (i.e., test types): including data tampering, message loss, DLC error, CRC error, timing jitter, etc.

[0124] 3. Implement a dynamic exception injection mechanism: Implement dynamic exception injection through the PCAN API interface and custom scripts (i.e., control the target tool to execute the target test message generation strategy, obtain the target test message, and send the target test message to the energy storage converter);

[0125] 4. Monitoring and anomaly recording: Monitor the response behavior of the energy storage converter to abnormal messages, and record communication recovery time, error handling mechanism, system alarm information, etc.

[0126] 5. Generate test results and feedback: Generate robustness scores based on test data and provide feedback to system designers or testers to optimize communication protocols or hardware designs.

[0127] More specifically, this includes the following.

[0128] I. Test Environment Setup

[0129] Hardware equipment;

[0130] PCAN-USB interface card

[0131] Industrial control computer or PC (running PCAN-Explorer and test scripts);

[0132] Energy storage converter (PCS) prototype;

[0133] Communication cables (shielded twisted pair);

[0134] Software configuration;

[0135] Windows operating system PCAN-Explorer (used for message monitoring and transmission);

[0136] Python + PCAN Basic API (for script development);

[0137] Figure 1This is a dynamic anomaly injection device for testing the communication robustness of a power storage converter (PCS). 101 is the P test control PC (electronic device), which runs the PCAN-Explorer software and test scripts to generate test reports. 102 is the CAN-to-USB interface hardware (target interface hardware), with one end connected to the test control PC via a USB interface and the other end connected to the CAN communication interface of the power storage converter (PCS) via CAN_H and CAN_L to perform hardware-level anomaly injection, such as data tampering, data loss, and data delay. 103 is the power storage converter (PCS) under test, 104 is the AC power supply, and 105 is the DC power supply. This device tests the PCS under charging and discharging conditions to assess anomaly injection, achieving a comprehensive test of the communication link stability.

[0138] II. PCAN Initialization and Loading of BMS Protocol

[0139] Figure 3 For dynamic exception injection, PCAN is initialized and the BMS protocol is loaded. The PCAN tool is used to simulate the BMS sending standard CAN messages, mainly including:

[0140] Battery status messages (such as BMS_SOC, BMS_VOLTAGE, BMS_CURRENT);

[0141] Control command messages (such as charge / discharge enable, maximum allowable charge / discharge current, and maximum allowable charge / discharge power);

[0142] Fault status messages (such as overvoltage, undervoltage, overtemperature, etc.);

[0143] Initiate normal communication and monitor communication status in real time.

[0144] III. State Awareness and Protocol Resolution;

[0145] Capture CAN message streams via the PCAN interface;

[0146] Analyze the PCS running status;

[0147] IV. PCAN Injection Anomaly

[0148] The relationship between the exception types (i.e. test types), PCAN implementation schemes, and key APIs provided in this application embodiment is shown in Table 1.

[0149] Table 1

[0150]

[0151] The contents of Table 1 above are for illustrative purposes only and are not intended to limit this application.

[0152] V. Real-time monitoring and response records

[0153] While performing fault injection, monitor the energy storage converter's response to abnormal situations, record the energy storage converter's response time, error codes, alarm information, etc., and generate a report.

[0154] VI. Test Result Analysis

[0155] Communication recovery time: Records the time it takes for the system to resume normal communication after an exception injection.

[0156] Error handling mechanism: Analyze whether the energy storage converter can identify and process abnormal frames;

[0157] System stability score: Based on the abnormal response performance, a robustness score (e.g., 0-100 points) is given.

[0158] like Figure 2 As shown in the embodiments of this application, the communication testing method for energy storage converters specifically includes the following: First, PCAN initialization; Second, loading the BMS protocol; Third, starting normal communication; Fourth, acquiring messages in real time to obtain status messages (i.e., first controller LAN messages); Fifth, parsing the PCS status (i.e., parsing the first controller LAN messages to obtain the current status); Sixth, determining whether the status meets the rules (i.e., whether the current status is the target status); Seventh, generating abnormal parameters and injecting anomalies into PCAN if the rules are met (i.e., when the current status is the target status, determining the target test message generation strategy for the energy storage converter according to the current test type, and controlling the target tool). The process involves: executing the target test message generation strategy, obtaining the target test message, and sending the target test message to the energy storage converter (injected into injection time T1, i.e., the first moment); eighth, monitoring the PCS response; ninth, capturing the response message (i.e., the feedback message), calculating the delay ΔT (i.e., the first time difference) = T2 (i.e., the second moment) - T1, and recording PASS (i.e., communication test passed) if ΔT is less than the threshold (i.e., the preset time difference threshold) and meets the logical action (i.e., the target action corresponding to the current test type is detected); and recording FAIL (i.e., communication test failed) if ΔT is not less than the threshold or does not meet the logical action; and tenth, generating a test report (i.e., the target test report).

[0159] For example, the test configuration for communication timeout failure testing is as follows:

[0160]

[0161] For example, the execution process of a communication timeout failure is as follows:

[0162] 1. PCAN continuously sends 0x351 messages (period 100ms, SOC = 80%);

[0163] 2. After charging continues for 60 seconds, 0x351 messages will begin to be discarded;

[0164] 3. Monitor whether the PCS triggers 0xE1 within 80 seconds;

[0165] 4. Record the fault trigger delay.

[0166] For example, the software implementation for voltage tampering attack testing is as follows:

[0167]

[0168] For example, the performance comparison data of the energy storage converter communication test method provided in this application embodiment and the traditional solution is shown in Table 2.

[0169] Table 2

[0170]

[0171]

[0172] As can be seen, compared with the traditional solution, the embodiments of this application have improved single test case testing time, protocol adaptation time and exception coverage.

[0173] The embodiments of this application can simulate the CAN messages of the BMS and communicate with the energy storage converter through the PCAN tool, and dynamically inject various communication anomalies to achieve a comprehensive assessment of the stability of the communication link.

[0174] The embodiments of this application have at least the following beneficial effects:

[0175] 1. High simulation: It can simulate communication anomalies in real-world scenarios, improving the relevance and effectiveness of testing;

[0176] 2. Automated Testing: Supports scripted automated testing processes, improving testing efficiency and consistency;

[0177] 3. Flexible and controllable: The abnormal injection parameters are adjustable, supporting the simulation of abnormalities with different intensities and frequencies;

[0178] 4. High scalability: Supports multi-node communication testing and is suitable for energy storage systems with different topologies;

[0179] 5. Results visualization: Test data can be exported as charts or reports for easy analysis and optimization.

[0180] Example 2

[0181] This application provides a communication testing method for an energy storage converter, which can be applied to electronic devices, meaning the electronic device can execute this communication testing method. The electronic device can be connected to the energy storage converter via target interface hardware; the electronic device is equipped with a target tool; such as... Figure 4 As shown, the method includes steps S410 to S450. S410: Obtain the current state and current test type of the energy storage converter; S420: If the current state is the target state, determine the target test message generation strategy for the energy storage converter based on the current test type; S430: Control the target tool to execute the target test message generation strategy to obtain the target test message; S440: Send the target test message to the energy storage converter so that the energy storage converter sends a feedback message to the electronic device upon receiving the target test message; S450: Upon receiving the feedback message, determine the target test result of the energy storage converter based on a first time and a second time. The target test result is used to characterize whether the communication test of the energy storage converter has passed; the first time is the moment when the target tool executes the target test message generation strategy; the second time is the moment when the electronic device receives the feedback message.

[0182] In some implementations, obtaining the current state of the energy storage converter specifically includes: obtaining a first controller local area network (Controller Area Network) message sent by the energy storage converter; and parsing the first Controller Area Network (Controller Area Network) message to obtain the current state.

[0183] In some implementations, before obtaining the current state and current test type of the energy storage converter, the method further includes: initializing the target tool to obtain an initialized target tool; loading the battery management system protocol onto the initialized target tool to obtain a loaded target tool; and using the loaded target tool to send a reference controller area network (Controller Area Network) message to the energy storage converter to initiate communication between the energy storage converter and the electronic device; the reference controller area network (Controller Area Network) message includes at least one of a battery status message, a control command message, and a fault status message.

[0184] In some implementations, the current test type includes one of the following: data tampering, message loss, data length code error, cyclic redundancy check (CRC) error, and timing jitter. Based on the current test type, a target test message generation strategy for the energy storage converter is determined, specifically including: if the current test type is data tampering, the target test message generation strategy is to modify the data field of a preset test message; if the current test type is message loss, the target test message generation strategy is to skip the preset identifier in the preset test message; if the current test type is data length code error, the target test message generation strategy is to set the data length code field value of the preset test message to the first field value; if the current test type is CRC error, the target test message generation strategy is to modify the target byte of the CRC in the preset test message; and if the current test type is timing jitter, the target test message generation strategy is to send the preset test message with a random delay.

[0185] In some implementations, the target test result of the energy storage converter is determined based on the first time and the second time. Specifically, this includes: determining the difference between the second time and the first time as the first time difference; if the first time difference is less than a preset time difference threshold and the target action corresponding to the current test type is detected, determining the target test result as a communication test passed; if the first time difference is less than the preset time difference threshold, or if no target action is detected, determining the target test result as a communication test failed.

[0186] In some implementations, after determining the target test result of the energy storage converter based on the first time and the second time, the method further includes: integrating the current test type and the target test result into a target test report of the target energy storage converter; and displaying the target test report.

[0187] The energy storage converter communication test method provided in this application has the beneficial effects and implementation methods of the energy storage converter communication test method provided in Embodiment 1 of this application. For details, please refer to the specific description of the energy storage converter communication test method in Embodiment 1 above. This embodiment will not repeat the description here.

[0188] Example 3

[0189] This application also provides a communication testing method for an energy storage converter, applied to an energy storage converter, meaning that the communication testing method is executed by the energy storage converter. The energy storage converter is connected to an electronic device via target interface hardware, and the electronic device is equipped with a target tool; the target interface hardware is a controller area network to universal serial bus interface hardware; such as... Figure 5As shown, the method includes step S510. S510: Upon receiving a target test message from an electronic device, a feedback message is sent to the electronic device, so that the electronic device, upon receiving the feedback message, determines the target test result of the energy storage converter based on a first time and a second time. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the moment when the target tool executes the target test message generation strategy; the second time is the moment when the electronic device receives the feedback message. The target test message is generated by the electronic device after performing a first operation. The first operation includes: obtaining the current state and current test type of the energy storage converter; if the current state is the target state, determining the target test message generation strategy of the energy storage converter based on the current test type; and controlling the target tool to execute the target test message generation strategy.

[0190] The energy storage converter communication test method provided in this application has the beneficial effects and implementation methods of the energy storage converter communication test method provided in Embodiment 1 of this application. For details, please refer to the specific description of the energy storage converter communication test method in Embodiment 1 above. This embodiment will not repeat the description here.

[0191] Example 4

[0192] This application provides a communication testing device for an energy storage converter, applied to an electronic device. The electronic device is connected to the energy storage converter via a target interface hardware; the electronic device is equipped with a target tool; such as... Figure 6 As shown, the device includes: a first acquisition module 610, a first determination module 620, a first control module 630, a first transmission module 640, and a second determination module 650.

[0193] The first acquisition module 610 is used to acquire the current state and current test type of the energy storage converter; the first determination module 620, connected to the first acquisition module 610, is used to determine the target test message generation strategy of the energy storage converter according to the current test type when the current state is the target state; the first control module 630, connected to the first determination module 620, is used to control the target tool to execute the target test message generation strategy to obtain the target test message; the first sending module 640, connected to the first control module 630, is used to send the target test message to the energy storage converter so that the energy storage converter sends a feedback message to the electronic device upon receiving the target test message; the second determination module 650, connected to the first sending module 640, is used to determine the target test result of the energy storage converter according to a first time and a second time upon receiving the feedback message. The target test result is used to characterize whether the communication test of the energy storage converter has passed; the first time is the time when the target tool executes the target test message generation strategy; the second time is the time when the electronic device receives the feedback message.

[0194] In some implementations, the first acquisition module 610 is specifically used to: acquire the first controller local area network (Controller Area Network) message sent by the energy storage converter; parse the first controller local area network (Controller Area Network) message to obtain the current status.

[0195] In some embodiments, the device may further include: an initialization module for initializing the target tool to obtain an initialized target tool; a loading module connected to the initialization module for loading a battery management system protocol onto the initialized target tool to obtain a loaded target tool; and a second sending module for using the loaded target tool to send a reference controller area network (Controller Area Network) message to the energy storage converter to initiate communication between the energy storage converter and the electronic device; the reference controller area network (Controller Area Network) message includes at least one of a battery status message, a control command message, and a fault status message.

[0196] In some implementations, the current test type includes one of data tampering, message loss, data length code error, cyclic redundancy check (CRC) error, and timing jitter. The first determining module 620 is specifically configured to: determine, when the current test type is data tampering, that the target test message generation strategy is to modify the data field of a preset test message; determine, when the current test type is message loss, that the target test message generation strategy is to skip the preset identifier in the preset test message; determine, when the current test type is data length code error, that the target test message generation strategy is to set the data length code field value of the preset test message to the first field value; determine, when the current test type is CRC error, that the target test message generation strategy is to modify the target byte of the CRC in the preset test message; and determine, when the current test type is timing jitter, that the target test message generation strategy is to send the preset test message with a random delay.

[0197] In some implementations, the second determining module 650 is specifically used to: determine the difference between the second time and the first time as a first time difference; if the first time difference is less than a preset time difference threshold and a target action corresponding to the current test type is detected, determine the target test result as a communication test passed; if the first time difference is less than the preset time difference threshold, or if no target action is detected, determine the target test result as a communication test failed.

[0198] In some embodiments, the device further includes: an integration module for integrating the current test type and the target test results into a target test report for the target energy storage converter; and a display module for displaying the target test report.

[0199] For example, the energy storage converter communication testing device in this application embodiment may include a PCAN communication interface module, an anomaly injection control module, a test case management module, and a real-time monitoring and data recording module. The PCAN communication interface module connects a PC to the CAN bus to enable message transmission and reception; the anomaly injection control module, written in Python or C++, controls the anomaly type (i.e., test type), injection timing, and intensity; the test case management module loads test case configurations and supports multiple anomaly combinations; and the real-time monitoring and data recording module stores historical anomaly patterns and test results.

[0200] The energy storage converter communication test device provided in this application has the beneficial effects and implementation methods of the energy storage converter communication test method provided in Embodiment 1 of this application. For details, please refer to the specific description of the energy storage converter communication test method in Embodiment 1 above. This embodiment will not repeat the description here.

[0201] Example 5

[0202] This application provides a communication testing device for an energy storage converter, applied to an energy storage converter. The energy storage converter is connected to an electronic device via target interface hardware, and the electronic device is equipped with a target tool. The target interface hardware is a controller area network to universal serial bus interface hardware. The device includes a second sending module. The second sending module is used to send a feedback message to the electronic device when it receives a target test message sent by the electronic device, so that the electronic device, upon receiving the feedback message, determines the target test result of the energy storage converter according to a first time and a second time. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the time when the target tool executes the target test message generation strategy; the second time is the time when the electronic device receives the feedback message. The target test message is generated by the electronic device after performing a first operation. The first operation includes: obtaining the current state and current test type of the energy storage converter; if the current state is the target state, determining the target test message generation strategy of the energy storage converter according to the current test type; and controlling the target tool to execute the target test message generation strategy.

[0203] The energy storage converter communication test device provided in this application has the beneficial effects and implementation methods of the energy storage converter communication test method provided in Embodiment 1 of this application. For details, please refer to the specific description of the energy storage converter communication test method in Embodiment 1 above. This embodiment will not repeat the description here.

[0204] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of this application, and this application is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of this application, and these modifications and improvements are also considered to be within the scope of protection of this application.

Claims

1. A communication testing method for an energy storage converter, characterized in that, The method is applied to an electronic device, which is connected to an energy storage converter via a target interface hardware; the electronic device is equipped with a target tool; the method includes: Obtain the current state and current test type of the energy storage converter; When the current state is the target state, the target test message generation strategy of the energy storage converter is determined according to the current test type; The target tool is controlled to execute the target test message generation strategy to obtain the target test message; The target test message is sent to the energy storage converter, so that the energy storage converter sends a first feedback message to the electronic device upon receiving the target test message; Upon receiving the first feedback message, the target test result of the energy storage converter is determined based on the first time and the second time. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the time when the target tool executes the target test message generation strategy. The second time is the time when the electronic device receives the first feedback message.

2. The method according to claim 1, characterized in that, The process of obtaining the current state of the energy storage converter specifically includes: Obtain the first controller local area network message sent by the energy storage converter; The current state is obtained by parsing the local area network packets of the first controller.

3. The method according to claim 1, characterized in that, Before obtaining the current state and current test type of the energy storage converter, the method further includes: Initialize the target tool to obtain the initialized target tool; For the initialized target tool, load the battery management system protocol to obtain the loaded target tool; Using the loaded target tool, a reference controller area network (Controller Area Network) message is sent to the energy storage converter to initiate communication between the energy storage converter and the electronic device; the reference controller area network message includes at least one of a battery status message, a control command message, and a fault status message.

4. The method according to claim 1, characterized in that, The current test type includes one of the following: data tampering, message loss, data length code error, cyclic redundancy check code error, and timing jitter. The step of determining the target test message generation strategy for the energy storage converter based on the current test type specifically includes: In the case where the current test type is data tampering, the target test message generation strategy is determined to be modifying the data fields of the preset test message; In the case where the current test type is packet loss, the target test packet generation strategy is determined to skip the preset identifier in the preset test packet; When the current test type is the data length code error, the target test message generation strategy is determined to set the data length code field value of the preset test message to the first field value; When the current test type is the Cyclic Redundancy Check error, the target test message generation strategy is determined to modify the target byte of the Cyclic Redundancy Check of the preset test message. When the current test type is timing jitter, the target test message generation strategy is determined to be sending the preset test message with a random delay.

5. The method according to claim 1, characterized in that, The determination of the target test result of the energy storage converter based on the first time point and the second time point specifically includes: The difference between the second time point and the first time point is determined as the first time difference; If the first time difference is less than a preset time difference threshold and the target action corresponding to the current test type is detected, the target test result is determined to be a successful communication test. If the first time difference is less than the preset time difference threshold, or if the target action is not detected, the target test result is determined to be a communication test failure.

6. The method according to any one of claims 1 to 5, characterized in that, After determining the target test result of the energy storage converter based on the first time point and the second time point, the method further includes: The current test type and the target test results are integrated into a target test report for the target energy storage converter. Display the target test report.

7. A communication testing method for an energy storage converter, characterized in that, The method is applied to the energy storage converter, which is connected to an electronic device via target interface hardware, and the electronic device is equipped with the target tool; the target interface hardware is a controller area network to universal serial bus interface hardware; the method includes: Upon receiving a target test message from the electronic device, a first feedback message is sent to the electronic device, so that the electronic device, upon receiving the first feedback message, determines the target test result of the energy storage converter based on a first time and a second time. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the time when the target tool executes the target test message generation strategy; the second time is the time when the electronic device receives the first feedback message. The target test message is generated by the electronic device after performing a first operation; the first operation includes: obtaining the current state and current test type of the energy storage converter; if the current state is the target state, determining the target test message generation strategy of the energy storage converter according to the current test type; and controlling the target tool to execute the target test message generation strategy.

8. A communication testing device for an energy storage converter, characterized in that, Applied to electronic devices, the electronic devices are connected to an energy storage converter via target interface hardware; the electronic devices are equipped with target tools; the device includes: The first acquisition module is used to acquire the current status and current test type of the energy storage converter; The first determining module, connected to the first obtaining module, is used to determine the target test message generation strategy of the energy storage converter according to the current test type when the current state is the target state. The first control module, connected to the first determining module, is used to control the target tool to execute the target test message generation strategy to obtain the target test message; The first sending module, connected to the first control module, is used to send the target test message to the energy storage converter, so that the energy storage converter sends a first feedback message to the electronic device upon receiving the target test message. The second determining module, connected to the first sending module, is used to determine the target test result of the energy storage converter based on a first time and a second time when the first feedback message is received. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the time when the target tool executes the target test message generation strategy. The second time is the time when the electronic device receives the first feedback message.

9. The apparatus according to claim 8, characterized in that, The first acquisition module is specifically used for: Obtain the first controller local area network message sent by the energy storage converter; Parse the first controller LAN packets to obtain the current state; And / or, the device further includes: An initialization module is used to initialize the target tool to obtain the initialized target tool. A loading module, connected to the initialization module, is used to load the battery management system protocol onto the initialized target tool to obtain the loaded target tool. The second sending module, connected to the loading module, is used to send a reference controller local area network (Controller Area Network) message to the energy storage converter using the loaded target tool, so as to initiate communication between the energy storage converter and the electronic device; the reference controller local area network (Controller Area Network) message includes at least one of a battery status message, a control command message, and a fault status message.

10. A communication testing device for an energy storage converter, characterized in that, The device is applied to the energy storage converter, which is connected to an electronic device via target interface hardware. The electronic device is equipped with the target tool. The target interface hardware is a controller area network to universal serial bus interface hardware. The device includes: The second sending module is configured to send a first feedback message to the electronic device upon receiving a target test message sent by the electronic device, so that the electronic device, upon receiving the first feedback message, determines the target test result of the energy storage converter based on a first time and a second time. The target test result is used to characterize whether the communication test of the energy storage converter has passed. The first time is the time when the target tool executes the target test message generation strategy; the second time is the time when the electronic device receives the first feedback message. The target test message is generated by the electronic device after performing a first operation; the first operation includes: obtaining the current state and current test type of the energy storage converter; if the current state is the target state, determining the target test message generation strategy of the energy storage converter according to the current test type; and controlling the target tool to execute the target test message generation strategy.