Energy storage system grid-connected collaborative test equipment based on scene switching
By constructing a multi-dimensional anomaly diagnosis model and a unified sampling timing benchmark, the shortcomings of grid-connected testing equipment for energy storage systems in adapting to changes in grid topology have been addressed, improving testing accuracy and efficiency, reducing configuration complexity, and enabling more accurate control link screening and sampling data synchronization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, grid-connected testing equipment for energy storage systems is difficult to dynamically adapt to changes in grid topology, resulting in insufficient matching between test scenarios and actual operating conditions, leading to misjudgments and missed detections. Furthermore, the selection of control links lacks quantitative evaluation standards, and the selection of sampling channel benchmarks lacks unified timing coordination, increasing the risk of configuration conflicts and debugging time costs in multi-device collaborative testing.
By employing a grid-connected extended mapping module, a control anomaly identification module, a link path screening module, and a sampling benchmark selection module, the system acquires the power grid topology relationship, identifies disturbance nodes and abnormal control ports, constructs a multi-dimensional anomaly diagnosis model, optimizes the control link screening logic, establishes a unified sampling timing benchmark, and forms a standardized parameter integration scheme.
It achieves adaptive matching of test scenario parameters, improves test coverage accuracy under complex power grid structures, enhances the accuracy of control port anomaly location, reduces redundant command transmission, eliminates time deviation between different channels, reduces the configuration complexity of multi-device collaborative testing, and improves test task execution efficiency and result repeatability.
Smart Images

Figure CN121785294A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of grid-connected control technology for energy storage systems, and in particular to a grid-connected collaborative testing device for energy storage systems based on scenario switching. Background Technology
[0002] The field of grid-connected control technology for energy storage systems encompasses energy interaction management technologies between the power system and energy storage devices, involving core aspects such as grid interface characteristic adaptation, dynamic power adjustment strategies, and grid stability assurance mechanisms. It primarily studies methods for coordinated operation between energy storage units and the grid, covering a systematic technical framework including grid-connected inverter control logic design, grid dispatch command response mechanisms, voltage and frequency regulation precision control, and power quality optimization technologies. This framework must meet the technical requirements of grid specifications for the grid-connected performance of energy storage devices under different operating conditions.
[0003] Among them, the grid-connected collaborative testing equipment for energy storage systems based on scenario switching refers to a dedicated device that triggers the testing process by constructing a database of typical power grid operation scenarios and using preset scenario parameter combinations. Addressing the testing needs of energy storage systems for grid connection characteristics under different power grid topologies, it utilizes standardized testing protocols to perform multi-dimensional testing and verification of core indicators such as grid connection response speed, power regulation accuracy, and protection action logic of the energy storage system by setting test elements such as typical load fluctuation modes, power grid fault simulation parameters, and renewable energy output change curves.
[0004] Existing technologies use fixed scenario parameter combinations to trigger test processes, which makes it difficult to dynamically adapt to changes in power grid topology. This results in insufficient matching between test scenarios and actual operating conditions. Anomaly detection relies on a single response time threshold for judgment, lacking the ability to perform multi-dimensional feature correlation analysis, which easily leads to false positives and false negatives. The selection of control links lacks a quantitative evaluation standard, resulting in response delays due to redundancy at the command level. The selection of sampling channel benchmarks lacks a unified timing coordination mechanism, and the time windows of data collected by different devices are misaligned, affecting the effectiveness of horizontal comparison of test results. The parameter configuration adopts a decentralized writing mode, which increases the risk of configuration conflicts and debugging time costs when multiple devices are tested collaboratively. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by proposing a grid-connected collaborative testing device for energy storage systems based on scenario switching.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a grid-connected collaborative testing device for energy storage systems based on scenario switching, the device comprising: The grid-connected expansion mapping module obtains the target access structure file, extracts the energy storage node number and connection path, generates the connection index, constructs the disturbance vector and XOR-encodes the node number, and generates the disturbance node identification configuration set. The control anomaly identification module extracts the trigger time and response time based on the control port and feedback channel corresponding to the node number in the disturbance node identification configuration set, constructs a delay difference sequence and identifies abrupt changes, and generates an anomaly control port event calibration table. The link path screening module extracts the number of instruction fields and the level depth of each link according to the port number recorded in the abnormal control port event calibration table, constructs and sorts the structure values, filters the channel with the smallest structure value and registers the number, and generates the simplest control link structure number set. The sampling reference selection module extracts the sampling time and value changes of the sampling channel corresponding to the structure number in the set of the simplest control link structure numbers, constructs a difference matrix and compares the fluctuation range, selects the channel with the smallest change, and generates a unified sampling time sequence reference table.
[0007] As a further embodiment of the present invention, the disturbance node identification configuration set includes a disturbance node number, a node XOR identifier, and a structure index label; the abnormal control port event calibration table includes a control port number, a delay difference label, and a feedback mutation marker; the simplest control link structure number set includes a link structure number, a structure complexity value, and instruction field statistics; and the unified sampling time sequence reference table includes a sampling time sequence, a channel fluctuation index, and a reference channel number.
[0008] As a further embodiment of the present invention, the grid-connected expansion mapping module includes a structure parsing submodule, a topology sorting submodule, and a disturbance configuration submodule; The structure parsing submodule obtains the target scenario access area structure file, calls the energy storage device node number, node connection number and path number, constructs a topology table containing the correspondence between node number and path number, counts the connection number of each node to generate a connection number sequence, and generates a node connection matrix based on the connection number sequence; The topology sorting submodule extracts the extreme values of node connection numbers based on the node connection matrix, calculates the connection number difference interval, groups the node numbers according to the connection number difference interval, performs ascending sorting on each group of node numbers to generate a sorting index, constructs a perturbation vector containing connection number weights based on the sorting index, and generates sorting perturbation coefficients. The disturbance configuration submodule calls the sorted disturbance coefficient and the original node number of the device, performs a binary XOR operation between the coefficient value and the node number, converts the XOR operation result into hexadecimal encoding, and writes it into the device test configuration area storage unit in the order of path number to generate a disturbance node identification configuration set.
[0009] As a further aspect of the present invention, the control anomaly identification module includes a channel positioning submodule, a delay analysis submodule, and an event calibration submodule; The channel positioning submodule calls the node number in the disturbance node identification configuration set, matches the control port number with the feedback channel number, extracts the initial trigger timestamp and response timestamp of each port, calculates the difference between the trigger time and the response time, and generates a delay difference sequence by sorting the port numbers. The delay analysis submodule extracts extreme values based on the delay difference sequence, calculates the absolute value of the range, marks ports whose absolute values of the range exceed a set range as abnormal candidate ports, counts the frequency of consecutive occurrence of abnormal candidate ports, and generates a range fluctuation coefficient containing port number and range value. The event calibration submodule, in conjunction with the range fluctuation coefficient and the effective marking status of the feedback channel, filters candidate ports with effective marking anomalies, compares the fluctuation trend of their delay difference with the change rate of the difference between adjacent ports, determines the type of the sudden port and assigns an event code, writes it into the event registration table in the order of timestamps, and generates an abnormal control port event calibration table.
[0010] As a further embodiment of the present invention, the link path screening module includes a link extraction submodule, a complexity calculation submodule, and a path screening submodule; The link extraction submodule, based on the port number recorded in the abnormal control port event calibration table, calls the corresponding control link data in the test task set, extracts the number of instruction fields and instruction level depth of each link, establishes a correspondence table between instruction fields and level depth according to the link number, and generates a link structure parameter table. The complexity calculation submodule calls the number of instruction fields and the level depth in the link structure parameter table, multiplies the number of fields by the level depth coefficient, accumulates the weight value of the number of jumps between levels, calculates the complexity index of each link, and generates a structural complexity sequence by sorting the links by link number. The path filtering submodule selects the link number corresponding to the minimum value according to the structural complexity sequence, compares the difference in the number of instruction fields of links with the same complexity value, selects the link number with the fewest fields, and registers it in the filtering result table in ascending order to generate the set of the simplest control link structure numbers.
[0011] As a further embodiment of the present invention, the sampling reference selection module includes a channel positioning submodule, a fluctuation analysis submodule, and a reference generation submodule; The channel positioning submodule calls the structure number in the set of the simplest control link structure numbering, matches the corresponding sampling channel number, extracts the time point and numerical difference of each channel's continuous sampling period, constructs a time difference and numerical difference correspondence table according to the channel number, and generates an incremental fluctuation matrix. The fluctuation analysis submodule calculates the fluctuation range of each channel based on the incremental fluctuation matrix, compares the fluctuation range difference of adjacent channels, selects the channel group with the smallest fluctuation range difference, counts the number of times the continuous fluctuation direction changes of the channel group, and generates fluctuation characteristic coefficients. The benchmark generation submodule filters the channel with the smallest fluctuation change based on the fluctuation characteristic coefficient, extracts its complete sampling time point sequence, arranges it in ascending order by timestamp and completes the interval time points, and generates a unified sampling time sequence reference table.
[0012] As a further aspect of the present invention, the device further includes: The structure instruction integration module, based on the time sequence given by the unified sampling timing reference table, collects the control link number, sampling channel number and control port identifier involved in the test task, establishes a combination mapping table for the three types of structures, and registers and writes it into the parameter cache of the test equipment operating area, generating the device-level test task structure configuration result; The device-level test task structure configuration results include link number mapping, channel number index, and port parameter set.
[0013] As a further aspect of the present invention, the structure instruction integration module includes a data collection submodule, a mapping construction submodule, and a configuration generation submodule; The data collection submodule calls the time series in the unified sampling timing reference table, extracts the control link number, sampling channel number and control port identifier involved in the test task, establishes a three-type structure correspondence index table according to the time series order, and generates a structure association index. The mapping construction submodule, based on the structure association index, bidirectionally matches the control link number and the sampling channel number, adds the control port identifier as the third dimension of the mapping relationship, constructs a combined mapping table containing the three-dimensional correspondence of link-channel-port, and generates a three-dimensional mapping relationship matrix; The configuration generation submodule converts the three-dimensional mapping relationship matrix according to the device operating area parameter cache format, verifies the integrity of the time series and port identifiers, writes it to the test device operating area storage partition, and generates the device-level test task structure configuration result.
[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, based on dynamic mapping of power grid topology and XOR processing of node disturbances, adaptive matching of test scenario parameters is achieved, improving the test coverage accuracy under complex power grid structures. Through a joint analysis mechanism of delay range identification and feedback marking, a multi-dimensional anomaly diagnosis model is established to enhance the accuracy of control port anomaly location. By using a structural complexity index constructed from instruction level depth and field number, the control link screening logic is optimized to reduce redundant instruction transmission. Combined with the channel feature comparison of incremental fluctuation matrix, a time-series synchronization benchmark for multi-source sampling data is established to eliminate time deviations between different channels. Through the combined mapping configuration of control links, sampling channels, and ports, a standardized parameter integration scheme is formed, reducing the configuration complexity of multi-device collaborative testing and improving the execution efficiency and result repeatability of test tasks. Attached Figure Description
[0015] Figure 1 This is an overall flowchart of the testing equipment of the present invention; Figure 2 This is a flowchart illustrating the acquisition process of the grid-connected extended mapping module of the present invention. Figure 3 This is a flowchart illustrating the acquisition process of the anomaly detection module of the present invention. Figure 4 This is a flowchart illustrating the acquisition process of the link path screening module of the present invention. Figure 5 This is a flowchart illustrating the acquisition process of the sampling reference selection module of the present invention. Figure 6 This is a flowchart illustrating the acquisition process of the structural instruction integration module of this invention. Detailed Implementation
[0016] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0017] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0018] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0019] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0020] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0021] Please see Figure 1 This invention provides a technical solution: a grid-connected collaborative testing device for energy storage systems based on scenario switching, the device comprising: The grid-connected expansion mapping module obtains the target scenario access area structure file, calls the node number, node connection number and path number corresponding to the energy storage device, constructs a topology relationship table, generates a sorting index based on the number of connections, constructs a disturbance vector and performs XOR processing on the node number, writes the disturbance structure into the current test configuration area of the device, and generates a disturbance node identification configuration set. The control anomaly identification module locates the corresponding control port and feedback channel based on the node number in the disturbance node identification configuration set, extracts the initial trigger time and response time sequence, performs delay difference construction, identifies the range of delay values, combines the effective feedback marking information to perform judgment analysis on the mutation port, registers and forms event items, and generates an anomaly control port event calibration table. The link path screening module calls all relevant control links in the test task set according to the port number recorded in the abnormal control port event labeling table, extracts the number of instruction fields and instruction level depth of each link, constructs a structural complexity index, sorts them in ascending order according to structural value, filters the link with the smallest structural value and registers its number, and generates the simplest control link structure number set. The sampling reference selection module locates the connected sampling channels based on the structure number in the set of the simplest control link structure numbering, extracts the sampling time point and numerical difference of each channel, constructs an incremental fluctuation matrix, compares the fluctuation characteristics of each channel in intervals, selects the channel with the smallest fluctuation change and extracts its time series as the sampling reference, and generates a unified sampling time series reference table. The structure instruction integration module, based on the time sequence given by the unified sampling timing reference table, collects the control link number, sampling channel number and control port identifier involved in the test task, establishes a combination mapping table for the three types of structures, and registers and writes it into the parameter cache of the test equipment's operating area, generating the device-level test task structure configuration result.
[0022] The disturbance node identification configuration set includes disturbance node number, node XOR identifier, and structure index label; the abnormal control port event calibration table includes control port number, delay difference label, and feedback mutation marker; the simplest control link structure number set includes link structure number, structure complexity value, and instruction field statistics; the unified sampling timing reference table includes sampling time series, channel fluctuation index, and baseline channel number; and the device-level test task structure configuration results include link number mapping, channel number index, and port parameter set.
[0023] Please see Figure 2 The grid-connected expansion mapping module includes a structure parsing submodule, a topology sorting submodule, and a disturbance configuration submodule; The structure parsing submodule obtains the target scenario access area structure file, calls the energy storage device node number, node connection number and path number, constructs a topology table containing the correspondence between node number and path number, counts the connection number of each node to generate a connection number sequence, and generates a node connection matrix based on the connection number sequence; Assuming the target scenario access area structure file is ESS_Grid_Topology_A01.xml, which records the topology information of 5 energy storage device nodes within the target test area, parsing this file first extracts all the energy storage device node numbers, denoted as set N={N1,N2,N3,N4,N5}. Simultaneously, the path numbers connecting each node to external connections are extracted. For example, node N1 is connected to N2 via path P1, and to N3 via path P2. After all extractions are complete, a topology table is constructed, as shown in Table 1. Subsequently, based on this table, the number of connections for each node is counted, i.e., the number of connections for that node in the "starting node" or "..." list. The total number of occurrences in the "Terminal Node" column yields the connection number sequence C = {C(N1) = 2, C(N2) = 3, C(N3) = 2, C(N4) = 2, C(N5) = 1}. For example, node N2 appears as the terminal node of P1, the starting node of P3, and the starting node of P4, so its connection number is 3. Finally, based on this connection number sequence C and the node set N, a 5x5 node connection matrix M is generated. In the matrix, if node i is directly connected to node j, then the element M(i,j) is 1, otherwise it is 0. The diagonal element M(i,i) is 0. This matrix intuitively represents the direct connection relationship between nodes, generating the node connection matrix.
[0024] Table 1: Energy Storage System Topology Table As shown in Table 1, this table describes in detail the starting and ending nodes connected by each path, providing basic data for subsequent connection count and matrix generation.
[0025] The topology sorting submodule extracts the extreme values of node connection numbers based on the node connection matrix, calculates the interval of connection number difference, groups the node numbers according to the interval of connection number difference, performs ascending sorting on the node numbers of each group to generate a sorting index, constructs a perturbation vector containing connection number weights based on the sorting index, and generates sorting perturbation coefficients. The connection count of each node is extracted based on the node connection matrix M, resulting in a connection count sequence C={2,3,2,2,1}. The maximum value of the connection count is then determined from this sequence. (Corresponding node N2) and minimum value (Corresponding to node N5), calculate the difference range of connection counts. Specifically, divide the connection counts from minimum to maximum into several integer levels, in this example, level 1, level 2, and level 3. Assign all node numbers to the corresponding level groups based on their connection counts, resulting in groupings G1={N5} (connection count 1), G2={N1,N3,N4} (connection count 2), and G3={N2} (connection count 3). For the node numbers within each group, sort them in ascending order based on their numerical values. Since the node numbers within each group are already naturally ordered or only one, the order remains unchanged after sorting. Generate a sorting index I={N5,N1,N3,N4,N2}. Based on this sorting index and the connection counts of each node, construct a perturbation vector. In this step, a connection count weight W needs to be set. The weight W is set by considering the position p of the node in the sorting index (starting from 1) and the total number of nodes. To perform the association, the calculation formula is as follows: For example, N2 is located at position 5 in sorted index I, and its weight... N1 is in the second position, and its weight is... Next, to facilitate binary operations, the weights W need to be converted into integer sorting perturbation coefficients S. This conversion is achieved by multiplying the weights W by a fixed scaling factor K and rounding down. The scaling factor K needs to be determined experimentally. The experimental procedure involves setting different K values (e.g., from 10 to 255) in a simulation environment, applying perturbations to the standard topology model, and evaluating the discreteness of the resulting system state changes. The K value that produces the most uniform and widest coverage of the state changes after the perturbation is selected. In this example, based on experimental data analysis, K=100 is chosen, and the sorting perturbation coefficient of N² is calculated accordingly. The sorting perturbation coefficient of N1 Calculate all nodes sequentially to generate sorting perturbation coefficients.
[0026] The disturbance configuration submodule calls the sorting disturbance coefficient and the original node number of the device, performs a binary XOR operation between the coefficient value and the node number, converts the XOR operation result into hexadecimal encoding, and writes it into the device test configuration area storage unit in the order of path number to generate a disturbance node identification configuration set. The sorting perturbation coefficient S is called in conjunction with the original node number N of the device. For example, for node N2, whose original number is 2 (binary representation is 00000010), its sorting perturbation coefficient is... The value is 100 (01100100 in binary). A binary XOR operation is performed between the coefficient value and the node number. Specifically, the calculation is 00000010 XOR 01100100. The XOR operation is performed bit-by-bit: 0 AND 0 equals 0, 0 AND 1 equals 1, 1 AND 0 equals 1, and 1 AND 1 equals 0, resulting in the binary result 01100110. This binary result 01100110 is then converted to hexadecimal encoding. First, it is split into two parts of four bits each, resulting in 0110 and 0110. These are then converted to hexadecimal characters. 0110 corresponds to the hexadecimal number 6, so the final hexadecimal encoding is 0x66. This 0x66 represents the node N2 after perturbation in the test configuration. The new identifier, using the same hexadecimal encoding results obtained from the same calculation for all nodes (N1 to N5), is sequentially written into specific storage unit addresses in the device test configuration area according to the ascending order of their associated path numbers (P1 to P5). For example, starting from address 0xCF00, the node perturbation code associated with P1 is written, followed by the code associated with P2 at address 0xCF01, until the perturbation configurations for all paths are written. This set of writes constitutes the complete perturbation node identification configuration set.
[0027] Please see Figure 3 The control anomaly identification module includes a channel positioning submodule, a delay analysis submodule, and an event calibration submodule; The channel positioning submodule calls the node number in the disturbance node identification configuration set, matches the control port number with the feedback channel number, extracts the initial trigger timestamp and response timestamp of each port, calculates the difference between the trigger time and the response time, and generates a delay difference sequence by sorting by port number; The system calls upon the node number in the disturbance node identification configuration set, for example, the generated disturbance node identifier 0x66. By consulting the device's internal preset port mapping table, it matches the physical control port number corresponding to this node as CP08 and its status feedback channel number as FC08. Subsequently, it monitors the control behavior of CP08. When it receives a control command, it extracts the initial trigger timestamp, for example, 1678886400.1051 seconds, and continuously monitors its corresponding feedback channel FC08 until a valid response signal is received. Then, it extracts the response timestamp, for example, 1678886400.1856 seconds, and calculates... The time difference between these two values is used as the delay value, i.e., 1678886400.1856-1678886400.1051=0.0805 seconds, or 80.5 milliseconds. This operation is repeated for all monitored control ports in the system (e.g., CP01 to CP16). The latest delay difference calculated for each port is sorted in ascending order according to the port number, forming a one-dimensional array containing the delay information of each port, i.e., the delay difference sequence D={d(CP01),d(CP02),…,d(CP08)=80.5ms,…,d(CP16)}, thus generating the delay difference sequence.
[0028] The delay analysis submodule extracts extreme values based on the delay difference sequence, calculates the absolute value of the range, marks ports whose absolute value of the range exceeds the set range as abnormal candidate ports, counts the frequency of consecutive occurrence of abnormal candidate ports, and generates a range fluctuation coefficient containing port number and range value. Based on the generated delay difference sequence D={21.2ms,20.8ms,…,80.5ms,…,22.1ms}, we first traverse the sequence and extract the maximum delay value. ms (from CP08) and minimum latency ms (from CP11), calculate the absolute value of the range between the two. ms, compare the absolute value of this range with a preset upper limit threshold for the delay range. The threshold is compared. The setting is based on collecting over 1 million delay difference samples during 72 consecutive hours of normal operation of the energy storage system, statistically analyzing their range distribution, taking the 99.5th percentile value as a reference, and adding a 10% margin, ultimately setting it to 30.0ms. Since the currently calculated range of 60.4ms exceeds the set range of 30.0ms, the port CP08, which contributed the largest delay value, was marked as an anomalous candidate port. Next, over 10 consecutive monitoring cycles, the number of times CP08 was marked as an anomalous candidate port was counted. For example, if CP08 was marked 9 times in 10 cycles, the consecutive occurrence frequency is 9. Finally, a structured data set containing the anomalous candidate port number and its corresponding range value, i.e., the range fluctuation coefficient, is generated. In this example, {Port:CP08,Value:60.4ms} generates a range fluctuation coefficient that includes the port number and the range value.
[0029] The event calibration submodule combines the range fluctuation coefficient and the effective marking status of the feedback channel to filter candidate ports with effective marking anomalies, compares the fluctuation trend of their delay difference with the change rate of the difference between adjacent ports, determines the type of the sudden port and assigns an event code, writes it into the event registration table in the order of timestamps, and generates an abnormal control port event calibration table. The analysis combines the range fluctuation coefficient {Port:CP08, Value: 60.4ms} with the valid flag status of the corresponding feedback channel FC08. First, the status register of FC08 is queried to read its valid flag bit. A flag bit of 1 indicates that the feedback signal content is valid, while 0 indicates invalidity or timeout. In this example, the valid flag of FC08 is 1, therefore CP08 is selected as a valid candidate port for analysis. Next, the fluctuation trend of the delay difference of CP08 over the most recent 5 monitoring periods is compared. For example, its delay sequence is {75.1ms, 80.5ms, 78.9ms, 82.3ms, 81.5ms}. Simultaneously, the synchronous delay difference sequences of its physically or logically adjacent ports CP07 and CP09 are extracted. CP07's delay difference is {21.5ms, 21.7ms, 21.4ms, 21.8ms, 21.6ms}. CP09 has a latency range of {22.0ms, 22.1ms, 21.9ms, 22.3ms, 22.2ms}. The rate of change of the latency difference between each port is calculated, which is the absolute value of the difference between adjacent cycles. The rate of change sequence of CP08 is {5.4, 1.6, 3.4, 0.8}, while the rates of change of CP07 and CP09 are both between 0.1 and 0.4. It is determined that the latency value of CP08 is not only high, but also has a much greater fluctuation than that of adjacent ports, belonging to the "high latency jitter" type of mutation. According to the predefined event coding rules, the event code 0xEA01 is assigned to the "high latency jitter" type. The timestamp of this event (e.g., 1678886400.1856 seconds), port number (CP08), event code (0xEA01), and latency value (80.5ms) are recorded as a record and written into the event registration table in the order of timestamps, as shown in Table 2, generating the abnormal control port event calibration table.
[0030] Table 2: Abnormal Event Registration Form As shown in Table 2, this table records the abnormal events identified by the system and their key information, providing direct input for subsequent link screening.
[0031] Please see Figure 4 The link path screening module includes a link extraction submodule, a complexity calculation submodule, and a path screening submodule; The link extraction submodule, based on the port number recorded in the abnormal control port event calibration table, calls the corresponding control link data in the test task set, extracts the number of instruction fields and instruction level depth of each link, establishes a correspondence table between instruction fields and level depth according to the link number, and generates a link structure parameter table. Based on the first abnormal port number CP08 recorded in the abnormal control port event labeling table (see Table 2), all control link data preset in the test task set were called to retrieve all control links whose execution paths contained CP08. The search revealed two control links in the test task set, link L-01 and link L-02, both associated with CP08. Next, structural analysis was performed on these two links to extract the number of instruction fields and instruction hierarchy depth for each link. For link L-01, its instruction structure was analyzed, revealing that it contains 5 instruction fields. (e.g., target address, opcode, data length, data body, checksum), and instruction processing needs to go through 2 layers (network layer, execution layer). For link L-02, its structure is more complex, containing 8 instruction fields, and processing needs to go through 3 layers (network layer, logic layer, execution layer). These extracted parameters are organized according to the link number to establish a correspondence table between the number of instruction fields and the depth of the layers. This table clearly indicates that L-01 corresponds to {number of fields: 5, depth: 2}, and L-02 corresponds to {number of fields: 8, depth: 3}, generating a link structure parameter table.
[0032] The complexity calculation submodule calls the number of instruction fields and the level depth in the link structure parameter table, multiplies the number of fields by the level depth coefficient, accumulates the weight value of the number of jumps between levels, calculates the complexity index of each link, and generates a structural complexity sequence by sorting by link number. The system retrieves the instruction field count and hierarchy depth data for links L-01 and L-02 from the link structure parameter table, calculates the structural complexity index C for each link, and follows the same calculation process. The rules, among which It refers to the number of instruction fields. It is the hierarchy depth coefficient. It refers to the number of jumps between levels. It is the jump count weight value, the hierarchy depth coefficient. The setting is based on historical data analysis, which found that for each additional processing level added to an instruction, the average processing time increases by approximately 40%, hence the setting... Redirection count weight value The setting is based on evaluating the additional overhead (such as context switching) incurred by each cross-level communication. Experiments show that this overhead is approximately equal to the time taken to process three standard instruction fields. If the processing time for one standard field is a baseline of 1, then the setting is... Number of jumps between levels This equals the hierarchy depth minus 1. For link L-01, its , , , Its complexity index For link L-02, its , , , Its complexity index The calculation results are sorted according to the link number to obtain the structural complexity sequence S={L-01:10.0,L-02:17.2}, thus generating the structural complexity sequence.
[0033] The path filtering submodule selects the link number corresponding to the minimum value according to the structural complexity sequence, compares the difference in the number of instruction fields of links with the same complexity value, selects the link number with the fewest fields, and registers it in the filtering result table in ascending order to generate the set of the simplest control link structure numbers. Based on the structural complexity sequence S={L-01:10.0,L-02:17.2}, the sequence is first traversed, and the entry with the smallest complexity index value, i.e., 10.0, is selected. Its corresponding link number is L-01. If multiple links have the same minimum complexity index value, for example, if another link L-03 also has a complexity index of 10.0, then the second round of screening is entered. The difference in the number of instruction fields of these links with the same complexity value is compared. From the link structure parameter table, it is found that L-01 has 5 instruction fields, and if L-03 has 6 instruction fields, then the link with the fewest fields, i.e., L-01, is selected. In this embodiment, there is no case of the same complexity, so L-01 is directly selected as the simplest link. The selected link number L-01 is registered in a newly created screening result table, and this process is repeated for all identified abnormal ports. Finally, all the selected simplest link numbers are registered in ascending order by number or letter to form a set, generating the set of simplest control link structure numbers.
[0034] Please see Figure 5 The sampling reference selection module includes a channel positioning submodule, a fluctuation analysis submodule, and a reference generation submodule; The channel positioning submodule calls the structure number in the simplest control link structure number set, matches the corresponding sampling channel number, extracts the time point and numerical difference of each channel's continuous sampling period, constructs a time difference and numerical difference correspondence table according to the channel number, and generates an incremental fluctuation matrix. The system calls the first structure number L-01 in the simplest control link structure number set. By consulting the link-channel mapping relationship in the system configuration, it matches three sampling channels directly associated with L-01, numbered SC-A, SC-B, and SC-C. Then, it extracts continuous sampling data for these three channels within the most recent complete sampling period (e.g., 100 milliseconds) from the data cache. Each sampling point includes a time point and a measured value. The system calculates the time difference and numerical difference between adjacent sampling points. For example, for channel SC-A, the extracted sampling point sequence {(t... The increment sequence is {(10ms, +0.02V), (10ms, -0.01V)}. This operation is performed on all three channels SC-A, SC-B, and SC-C. The time difference and numerical difference data of all channels are collected and organized by channel number to construct a matrix. The rows represent different sampling channels and the columns represent continuous sampling increments (including time difference and numerical difference), as shown in Table 3, generating the increment fluctuation matrix.
[0035] Table 3: Incremental Fluctuation Matrix As shown in Table 3, the matrix clearly lists the changes of each sampling channel between consecutive sampling points, providing a quantitative basis for subsequent volatility analysis.
[0036] The fluctuation analysis submodule calculates the fluctuation range of each channel based on the incremental fluctuation matrix, compares the fluctuation range difference of adjacent channels, selects the channel group with the smallest fluctuation range difference, counts the number of times the continuous fluctuation direction changes of the channel group, and generates fluctuation characteristic coefficients. Based on the data in the incremental fluctuation matrix (see Table 3), the fluctuation range R of the numerical difference for each channel is first calculated, which is the difference between the maximum and minimum values in its numerical difference sequence. For SC-A, its numerical difference sequence is {+0.02, -0.01, +0.03}, and the fluctuation range is... For V, the numerical difference sequence for SC-B is {+0.01,+0.01,+0.00}, with a fluctuation range of... For V, the numerical difference sequence for SC-C is {-0.05, +0.07, -0.04}, with a fluctuation range of... Next, compare the fluctuation range differences between adjacent channels (here referring to SC-A and SC-B, and SC-B and SC-C in the channel list). V, V. Select the channel group with the smallest difference in fluctuation range, i.e., (SC-A, SC-B). Then, count the number of times the continuous fluctuation direction (sign) of each channel in this group changes. The sign sequence of the numerical difference for SC-A is {+,-,+}, with two directional changes. The sign sequence for SC-B is {+,+,0}, with one directional change (from positive to zero is considered one change). Finally, a fluctuation characteristic coefficient F is generated for each channel, calculated as follows: The weight Used to balance the effects of fluctuation amplitude and fluctuation frequency, its value is empirically set to 10% of the average fluctuation range, i.e., 0.005. Therefore, the coefficient of SC-A... The coefficient of SC-B , generate fluctuation characteristic coefficients.
[0037] The benchmark generation submodule filters the channel with the smallest fluctuation change based on the fluctuation characteristic coefficient, extracts its complete sampling time point sequence, arranges it in ascending order by timestamp and fills in the interval time points to generate a unified sampling time sequence reference table. Based on the fluctuation characteristic coefficients of each channel, F(SC-A)=0.05, F(SC-B)=0.015, F(SC-C)=0.12+0.005*2=0.13, the channel with the smallest fluctuation characteristic coefficient, SC-B, is selected. Its coefficient is 0.015, indicating that its signal fluctuation amplitude and frequency are the most stable overall. After selecting SC-B, the complete sampling time point sequence of this channel during the entire test task is extracted from the original data buffer, for example, {T1,T2,T3,…,Tn}, where T1=1678886400.0000, T2=1678886400.010 0, T3=1678886400.0200, etc., this time series is checked to confirm whether there are missing time points or uneven intervals. For example, if the check finds that the time interval between T4 and T5 is 20ms, while the standard sampling interval is 10ms, then a completion operation is performed here. A new time point (T4+10ms) is inserted at the midpoint between T4 and T5 using linear interpolation to maintain the uniformity of the time series. After sorting and completion, a strictly monotonically increasing and equally spaced time series is obtained. This series serves as the benchmark for aligning all subsequent data and generating a unified sampling time series reference table.
[0038] Please see Figure 6 The structure instruction integration module includes a data collection submodule, a mapping construction submodule, and a configuration generation submodule; The data collection submodule calls the time series in the unified sampling timing reference table, extracts the control link number, sampling channel number and control port identifier involved in the test task, establishes a three-type structure correspondence index table according to the time series order, and generates a structure association index. The unified sampling timing reference table is invoked, which provides a high-precision time base sequence, for example, starting from time point 1678886401.0000 with continuous timestamps in 1ms increments. Then, the complete definition of the current test task is traversed to extract all relevant structural elements, including the numbers of all activated control links (e.g., {L-01, L-05, L-08}), the numbers of all sampling channels that need to record data (e.g., {SC-A, SC-B, SC-C, SC-D, SC-E}), and the identifiers of all monitored or operated control ports (e.g., {CP02, CP08, CP15}). Then, unified sampling... The time series in the timing reference table is the main axis. For each timestamp, an association list is created. This list records which control links are executing commands, which sampling channels are sampling, and which control ports are undergoing state changes at that precise moment. For example, at time 1678886401.0550, the association list might be [L-01,SC-A,CP08], indicating that at this moment, link L-01 is sending commands to port CP08, while channel SC-A is sampling. By performing this operation throughout the entire task cycle, an index table is ultimately formed with time as the key and three types of structural element sets as values, generating a structural association index.
[0039] The mapping construction submodule performs bidirectional matching of control link number and sampling channel number based on structural association index, adds control port identifier as the third dimension of mapping relationship, constructs a combined mapping table containing three-dimensional correspondence of link-channel-port, and generates a three-dimensional mapping relationship matrix; Based on the mapping relationship between time points and structural elements established in the structural association index, the intrinsic connections between these structural elements are further deepened. For each time point, the control link number and sampling channel number recorded in the structural association index are bidirectionally matched. Specifically, an association pair is created, for example (L-01, SC-A), indicating that at a specific time, the activity of link L-01 is related to the sampling data of channel SC-A. Such association pairs are established for all links and channels that coexist at the same time. Subsequently, the control port identifier is added as the third dimension of this two-dimensional relationship, forming a three-dimensional tuple (tu). For example, at time 1678886401.0550, if the associated link is L-01, the channel is SC-A, and the port is CP08, then a tuple (L-01, SC-A, CP08) is constructed. This tuple clearly defines a complete closed-loop unit of "instruction-operation-feedback". The three-dimensional tuples constructed at all time points are collected to form a combined mapping table. This table is finally organized into a logical three-dimensional matrix, with the dimensions of time, link-channel pair, and port, respectively. Each element of the matrix represents a precise mapping relationship at a specific time point, generating a three-dimensional mapping relationship matrix.
[0040] The configuration generation submodule converts the three-dimensional mapping relationship matrix according to the device operating area parameter cache format, verifies the integrity of the time series and port identifiers, writes it to the test device operating area storage partition, and generates the device-level test task structure configuration result. The 3D mapping matrix is converted according to the specific data format required by the test equipment's operating area parameter cache. This cache requires data to be stored in contiguous binary blocks, with each block representing a configuration at a specific time point. The block structure is: 64-bit timestamp + 16-bit link mask + 32-bit channel mask + 16-bit port mask. Therefore, each tuple in the 3D matrix (e.g., (L-01, SC-A, CP08)) needs to be converted to its corresponding mask. For example, if L-01 corresponds to the 1st bit, SC-A corresponds to the 1st bit, and CP08 corresponds to the 8th bit, then in the binary block corresponding to the timestamp, the 1st bit of the link mask is set to 1, and the 2nd bit of the channel mask is set to 8th bit. Bit 1 of the code is set to 1, and bit 8 of the port mask is set to 1. After format conversion of all time points is completed, an integrity check is performed. The check process is to traverse the converted binary data block from beginning to end, check whether the timestamp of each block is strictly monotonically increasing, and check whether there are invalid bits in the mask (i.e., bits corresponding to non-existent links, channels, or ports). After the check passes, this entire block of formatted and checked binary data is written to the storage partition specified in the test device's running area at once, for example, starting from physical address 0x8000F000, overwriting the original test configuration and generating the device-level test task structure configuration result.
[0041] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A grid-connected collaborative testing device for energy storage systems based on scenario switching, characterized in that, The device includes: The grid-connected expansion mapping module obtains the target access structure file, extracts the energy storage node number and connection path, generates the connection index, constructs the disturbance vector and XOR-encodes the node number, and generates the disturbance node identification configuration set. The control anomaly identification module extracts the trigger time and response time based on the control port and feedback channel corresponding to the node number in the disturbance node identification configuration set, constructs a delay difference sequence and identifies abrupt changes, and generates an anomaly control port event calibration table. The link path screening module extracts the number of instruction fields and the level depth of each link according to the port number recorded in the abnormal control port event calibration table, constructs and sorts the structure values, filters the channel with the smallest structure value and registers the number, and generates the simplest control link structure number set. The sampling reference selection module extracts the sampling time and value changes of the sampling channel corresponding to the structure number in the set of the simplest control link structure numbers, constructs a difference matrix and compares the fluctuation range, selects the channel with the smallest change, and generates a unified sampling time sequence reference table.
2. The grid-connected collaborative testing equipment for energy storage systems based on scenario switching according to claim 1, characterized in that: The disturbance node identification configuration set includes disturbance node number, node XOR identifier, and structure index label; the abnormal control port event calibration table includes control port number, delay difference label, and feedback mutation marker; the simplest control link structure number set includes link structure number, structure complexity value, and instruction field statistics; and the unified sampling time sequence reference table includes sampling time sequence, channel fluctuation index, and reference channel number.
3. The grid-connected collaborative testing equipment for energy storage systems based on scenario switching according to claim 1, characterized in that: The grid-connected expansion mapping module includes a structure parsing submodule, a topology sorting submodule, and a disturbance configuration submodule. The structure parsing submodule obtains the target scenario access area structure file, calls the energy storage device node number, node connection number and path number, constructs a topology table containing the correspondence between node number and path number, counts the connection number of each node to generate a connection number sequence, and generates a node connection matrix based on the connection number sequence; The topology sorting submodule extracts the extreme values of node connection numbers based on the node connection matrix, calculates the connection number difference interval, groups the node numbers according to the connection number difference interval, performs ascending sorting on each group of node numbers to generate a sorting index, constructs a perturbation vector containing connection number weights based on the sorting index, and generates sorting perturbation coefficients. The disturbance configuration submodule calls the sorted disturbance coefficient and the original node number of the device, performs a binary XOR operation between the coefficient value and the node number, converts the XOR operation result into hexadecimal encoding, and writes it into the device test configuration area storage unit in the order of path number to generate a disturbance node identification configuration set.
4. The grid-connected collaborative testing equipment for energy storage systems based on scenario switching according to claim 1, characterized in that: The control anomaly identification module includes a channel positioning submodule, a delay analysis submodule, and an event calibration submodule. The channel positioning submodule calls the node number in the disturbance node identification configuration set, matches the control port number with the feedback channel number, extracts the initial trigger timestamp and response timestamp of each port, calculates the difference between the trigger time and the response time, and generates a delay difference sequence by sorting the port numbers. The delay analysis submodule extracts extreme values based on the delay difference sequence, calculates the absolute value of the range, marks ports whose absolute values of the range exceed a set range as abnormal candidate ports, counts the frequency of consecutive occurrence of abnormal candidate ports, and generates a range fluctuation coefficient containing port number and range value. The event calibration submodule, in conjunction with the range fluctuation coefficient and the effective marking status of the feedback channel, filters candidate ports with effective marking anomalies, compares the fluctuation trend of their delay difference with the change rate of the difference between adjacent ports, determines the type of the sudden port and assigns an event code, writes it into the event registration table in the order of timestamps, and generates an abnormal control port event calibration table.
5. The grid-connected collaborative testing equipment for energy storage systems based on scenario switching according to claim 1, characterized in that: The link path screening module includes a link extraction submodule, a complexity calculation submodule, and a path screening submodule; The link extraction submodule, based on the port number recorded in the abnormal control port event calibration table, calls the corresponding control link data in the test task set, extracts the number of instruction fields and instruction level depth of each link, establishes a correspondence table between instruction fields and level depth according to the link number, and generates a link structure parameter table. The complexity calculation submodule calls the number of instruction fields and the level depth in the link structure parameter table, multiplies the number of fields by the level depth coefficient, accumulates the weight value of the number of jumps between levels, calculates the complexity index of each link, and generates a structural complexity sequence by sorting the links by link number. The path filtering submodule selects the link number corresponding to the minimum value according to the structural complexity sequence, compares the difference in the number of instruction fields of links with the same complexity value, selects the link number with the fewest fields, and registers it in the filtering result table in ascending order to generate the set of the simplest control link structure numbers.
6. The grid-connected collaborative testing equipment for energy storage systems based on scenario switching according to claim 1, characterized in that: The sampling reference selection module includes a channel positioning submodule, a fluctuation analysis submodule, and a reference generation submodule; The channel positioning submodule calls the structure number in the set of the simplest control link structure numbering, matches the corresponding sampling channel number, extracts the time point and numerical difference of each channel's continuous sampling period, constructs a time difference and numerical difference correspondence table according to the channel number, and generates an incremental fluctuation matrix. The fluctuation analysis submodule calculates the fluctuation range of each channel based on the incremental fluctuation matrix, compares the fluctuation range difference of adjacent channels, selects the channel group with the smallest fluctuation range difference, counts the number of times the continuous fluctuation direction changes of the channel group, and generates fluctuation characteristic coefficients. The benchmark generation submodule filters the channel with the smallest fluctuation change based on the fluctuation characteristic coefficient, extracts its complete sampling time point sequence, arranges it in ascending order by timestamp and completes the interval time points, and generates a unified sampling time sequence reference table.
7. The grid-connected collaborative testing equipment for energy storage systems based on scenario switching according to claim 1, characterized in that, The device also includes: The structure instruction integration module, based on the time sequence given by the unified sampling timing reference table, collects the control link number, sampling channel number and control port identifier involved in the test task, establishes a combination mapping table for the three types of structures, and registers and writes it into the parameter cache of the test equipment operating area, generating the device-level test task structure configuration result; The device-level test task structure configuration results include link number mapping, channel number index, and port parameter set.
8. The grid-connected collaborative testing equipment for energy storage systems based on scenario switching according to claim 1, characterized in that: The structure instruction integration module includes a data collection submodule, a mapping construction submodule, and a configuration generation submodule; The data collection submodule calls the time series in the unified sampling timing reference table, extracts the control link number, sampling channel number and control port identifier involved in the test task, establishes a three-type structure correspondence index table according to the time series order, and generates a structure association index. The mapping construction submodule, based on the structure association index, bidirectionally matches the control link number and the sampling channel number, adds the control port identifier as the third dimension of the mapping relationship, constructs a combined mapping table containing the three-dimensional correspondence of link-channel-port, and generates a three-dimensional mapping relationship matrix; The configuration generation submodule converts the three-dimensional mapping relationship matrix according to the device operating area parameter cache format, verifies the integrity of the time series and port identifiers, writes it to the test device operating area storage partition, and generates the device-level test task structure configuration result.