A power quality simulation test system fusing primary and secondary equipment states

By constructing a power quality simulation and testing system with cross-domain coupling mapping and closed-loop verification, the problem of separating the states of primary and secondary equipment is solved, enabling accurate assessment of power quality and scientific assessment of equipment health status, thereby improving the safety and robustness of equipment in complex environments.

CN121936310BActive Publication Date: 2026-07-10JIANGSU LIANNENG ELECTRIC POWER RES INST CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU LIANNENG ELECTRIC POWER RES INST CO LTD
Filing Date
2026-03-30
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In existing power systems, the separation of primary and secondary equipment states makes it difficult for simulation testing systems to identify the dynamic impact of sensor aging, communication delays, and network attacks on power quality data, and thus cannot accurately reproduce measurement errors under cross-domain coupling conditions.

Method used

A power quality simulation and testing system integrating the status of primary and secondary equipment is constructed. By establishing a cross-domain coupling mapping and closed-loop verification environment, and utilizing digital twin models, signal interface modules, and closed-loop control modules, the power quality monitoring performance can be accurately evaluated.

Benefits of technology

It enables high-fidelity reproduction and accurate assessment of power quality under digital risk conditions, significantly improving the security and robustness of equipment under complex electromagnetic environments and network attacks, and providing a scientific basis for assessing the health status of equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121936310B_ABST
    Figure CN121936310B_ABST
Patent Text Reader

Abstract

This invention relates to the field of power system power quality testing technology, specifically a power quality simulation testing system integrating primary and secondary equipment status, including a simulation calculation module, a symmetric mapping module, a signal interface module, a closed-loop control module, and a quality assessment module. This invention generates dynamic data streams by constructing a digital twin model of the primary equipment and solving node equations; establishes the correlation between physical losses and measurement logic through the mapping module; encapsulates sampled value messages through the interface module and performs delay, packet loss, duplicate frame, and sampling drift interference injection; utilizes the closed-loop control module to feed back trip and close commands to drive dynamic adjustment of the model topology; and finally, the assessment module compares the baseline parameters with the measurement results. This invention achieves closed-loop assessment of the accuracy of equipment disturbance capture under digital risk interference conditions, effectively solving the problem of difficulty in realistically reproducing measurement errors under cross-domain coupling conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system power quality testing technology, specifically a power quality simulation testing system that integrates the status of primary and secondary equipment. Background Technology

[0002] In traditional power systems, primary equipment such as circuit breakers and transformers are highly separated from secondary equipment such as monitoring and metering devices in terms of both physical form and logical function, relying on extensive hard-wired cabling to transmit analog signals. With the intelligent transformation of distribution networks, primary and secondary integration technology enables secondary terminals to directly acquire digital or low-voltage signals by pre-embedding sensors within primary equipment. Existing simulation and testing systems primarily focus on simulating single physical quantities, generating voltage sags, harmonic interference, or transient pulse waveforms conforming to the IEEE Std 1159 standard through mathematical models and using them as physical excitations on the primary side. Simultaneously, they utilize sampled values ​​defined by the IEC 61850 standard and object-oriented substation event messages to verify inter-device communication behavior. In terms of evaluation, existing methods tend to extract time-frequency domain features such as root mean square (RMS) values ​​and peak factor to identify power quality disturbances.

[0003] In new power systems, the lack of a correlation mapping between primary-side physical losses and secondary-side logical loads makes it difficult for test systems to identify the dynamic impact of sensor aging, communication latency, and network attacks on the reliability of power quality data, and makes it impossible to truly reproduce measurement errors under cross-domain coupling conditions.

[0004] To address this, a power quality simulation and testing system integrating the status of primary and secondary equipment is proposed. Summary of the Invention

[0005] The purpose of this invention is to provide a power quality simulation and testing system that integrates the status of primary and secondary equipment. By establishing a cross-domain coupling mapping and closed-loop verification environment, it can achieve accurate evaluation of power quality monitoring performance under digital risk conditions.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A power quality simulation and testing system integrating the status of primary and secondary equipment includes:

[0008] The simulation calculation module constructs a digital twin model of the primary equipment of the distribution network, solves the power system node equations according to the preset real-time simulation step size, and generates real-time dynamic data streams.

[0009] The symmetric mapping module maps the mechanical life model, temperature rise model, and spatial position parameters of the primary equipment to the digital logic layer of the secondary equipment in real time, establishing the correlation between the physical loss state of the primary side and the measurement logic state of the secondary side.

[0010] The signal interface module encapsulates the real-time dynamic data stream into a sampled value message, and performs communication delay injection, message packet loss injection, duplicate frame injection and sampling drift deviation injection on the message transmission link to send the signal containing interference information to the primary and secondary fusion terminal.

[0011] The closed-loop control module collects the trip and close command messages output by the primary and secondary fusion terminals in real time, and feeds the trip and close command messages back to the simulation calculation module in real time, driving the topology of the digital twin model to complete dynamic adjustment.

[0012] The quality assessment module connects the real-time simulation calculation module and the primary and secondary fusion terminal. By comparing the baseline electrical parameters of the digital twin model with the measurement results fed back by the primary and secondary fusion terminal, it evaluates the accuracy of the primary and secondary fusion equipment in capturing power quality disturbances under operating conditions with digital risk interference.

[0013] Preferably, the digital twin model is constructed as follows: A physical characteristic model of the primary-side equipment is established by collecting the processing actions, spatial positions, mechanical fatigue parameters, and heat conduction parameters of the primary-side equipment to construct a physical state machine that reflects the operational evolution of the physical entity; a logical behavior model of the secondary-side equipment is established, encompassing the CPU load rate, memory usage, communication protocol stack traffic distribution, and message parsing latency characteristics of the secondary-side equipment; an environmental impact coupling model is established, using environmental humidity, environmental temperature, and electromagnetic field strength as input variables to calculate in real-time the quantitative impact of environmental parameters on the insulation dielectric loss evolution of the primary-side equipment and the failure rate of electronic components in the secondary-side equipment; and a high-precision time synchronization protocol is used to temporally correlate the physical characteristic model, logical behavior model, and environmental impact coupling model to achieve synchronous operation of the data flow and the state machine in digital space, generating a digital twin model.

[0014] Preferably, the steps for generating the real-time dynamic data stream are as follows: Based on the real-time topology and load variation parameters of the primary-side equipment in the digital twin model, calculate the reference voltage vector data and reference current vector data under ideal operating conditions; call the sensor error characteristic model, introduce the thermal conduction parameters and mechanical fatigue parameters from the physical characteristic model, calculate the resistance temperature drift deviation and sampling accuracy loss of the primary-side sensor during long-term operation, and correct the reference voltage vector data and reference current vector data; based on the ambient temperature and electromagnetic field strength provided by the environmental influence coupling model, superimpose nonlinear response characteristics and frequency characteristic deviations onto the corrected data to generate a digital raw sampling stream with physical damage characteristics; map the digital raw sampling stream to the CPU load rate and message parsing delay characteristics in the logic behavior model via a time axis to form a real-time dynamic data stream that can synchronously reflect the physical performance degradation state of the primary side and the logic processing load state of the secondary side.

[0015] Preferably, the correlation between the primary-side physical loss state and the secondary-side measurement logic state is established as follows: based on the mechanical life model and the temperature rise model, the sampling amplitude error and phase noise of the primary-side sensor caused by insulation aging and resistance temperature drift are quantified; the electromagnetic field strength output by the environmental influence coupling model is correlated with the central processing unit load rate and processing delay of the secondary device to simulate the degree of decline in the efficiency of secondary-side logic operations; when the secondary-side measurement logic state is abnormal, the system automatically increases the risk weight of the primary-side physical loss state in the evaluation matrix and reduces the credibility score of the device's measurement data in the fuzzy comprehensive evaluation, thus completing the dynamic correlation between physical loss and measurement logic.

[0016] Preferably, the implementation method of encapsulating the real-time dynamic data stream into a sampled value message is as follows: the real-time dynamic data stream is mapped to a data object model, and the hardware timestamp generated by the precision time protocol is used to synchronously label each frame of original sampled data; an application layer protocol data unit is constructed, and the labeled sampled data is converted and formatted according to the sampled value service mapping specification, and a sampling synchronization status bit reflecting the current secondary side logic state is embedded; an Ethernet destination address, a source address, and a virtual LAN identifier are added to the application layer protocol data unit to generate an Ethernet frame that conforms to the sampled value specification, and the frame is sent to the device under test through a digital signal interface.

[0017] Preferably, the implementation methods for the communication delay injection, packet loss injection, duplicate frame injection, and sampling drift deviation injection are as follows: The network scheduling controller controls the packet buffering and transmission sequence, discarding sampled value packet frames according to a preset probability to achieve packet loss injection; the same sampled value packet frame is repeatedly transmitted to achieve duplicate frame injection; the packet forwarding step size is delayed to achieve communication delay injection; the packet load tampering module modifies the sampled values, and during the application layer protocol data unit encapsulation stage, the sampling drift deviation is superimposed on the original sampled value load to achieve sampling drift deviation injection; the communication pressure simulator mixes and sends interference traffic, synchronously outputting non-service packets generated by denial-of-service attacks and sampled value packets containing interference information.

[0018] Preferably, the evaluation method of the quality assessment module is as follows: A multi-source information feature matrix is ​​constructed to extract operational features including the root mean square value of the reference voltage, peak factor, harmonic amplitude, sampling synchronization deviation, timing accuracy index, message loss rate, and synchronization jitter; the multi-source information feature matrix is ​​input into an ensemble learning model composed of a random forest and a long short-term memory network to identify the gradual decline trend of secondary equipment performance and output the equipment health index; using a combined weighting method and dynamically adjusting the voltage sag weight and harmonic fluctuation weight according to the equipment health index, the measurement accuracy of the primary and secondary fusion terminal under digital risk conditions is determined by comparing the measured values ​​of the primary and secondary fusion terminal with the reference electrical parameters of the digital twin model.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0020] 1. This invention constructs a digital twin mirror image containing mechanical life models, temperature rise models, and spatial position parameters, mapping the physical degradation patterns of the primary side to the secondary side logic layer in real time. Combined with real-time simulation step sizes, the system can reproduce microscopic physical characteristic deviations such as sampling drift caused by sensor aging and insulation dielectric loss induced by environmental stress. This closed-loop control mode allows the trip / close message feedback to instantly change the topology of the twin model, providing a high-fidelity test environment for the primary and secondary fusion terminal that includes not only electrical physical quantities but also the synchronous operation of the logic state machine, thus solving the technical bottleneck of separating the primary and secondary side states in traditional simulations.

[0021] 2. This invention utilizes hardware timestamps generated by a precision time protocol for synchronous tagging, avoiding random errors introduced by the software protocol stack. Based on this, the system, through a network scheduling controller and a communication stress simulator, can synchronously inject digital risks across multiple dimensions, including communication latency, packet loss, duplicate frames, and denial-of-service attacks. Compared to existing technologies that can only simulate simple line faults, this invention can quantitatively analyze the combined impact of network storms, synchronization jitter, and data load tampering on the accuracy of real-time power quality calculations. This allows researchers to quantitatively study the cross-domain impact of secondary-side "digital state" on primary-side "sampling accuracy," significantly improving the security and robustness verification level of equipment under complex electromagnetic environments and network attacks.

[0022] 3. This invention overcomes the limitation of single mathematical models in describing the complex nonlinearities of secondary equipment by constructing a two-layer integrated learning framework using random forests and long short-term memory networks. The system extracts multi-source information feature matrices, including sampling synchronization deviation, timing accuracy, and synchronization jitter, enabling accurate identification of gradual performance degradation trends in equipment. Specifically, this invention introduces a variable weighting coefficient model; when an abnormal logic state on the secondary side is detected, the system automatically increases the risk weights in the evaluation matrix and decreases the confidence score. This combined weighting method, based on dynamically adjusting voltage sags and harmonic fluctuation weights according to the health index, ensures that the evaluation results not only comply with technical guidelines but also accurately reflect the impact of the equipment's own health status on power quality data quality, providing a scientific basis for achieving precise condition-based maintenance. Attached Figure Description

[0023] Figure 1 This is a flowchart of a power quality simulation and testing system that integrates the states of primary and secondary equipment, as proposed in this invention.

[0024] Figure 2 This is a flowchart illustrating a power quality simulation and testing system that integrates the status of primary and secondary equipment, as proposed in this invention.

[0025] Figure 3 This is a system structure diagram of a power quality simulation and testing system that integrates the status of primary and secondary equipment, as proposed in this invention. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] Please see Figures 1 to 3This invention provides a power quality simulation and testing system that integrates the status of primary and secondary equipment. The technical solution is as follows:

[0028] Example 1

[0029] A power quality simulation and testing system that integrates the status of primary and secondary equipment, such as Figures 1-3 As shown, it includes:

[0030] The simulation calculation module constructs a digital twin model of the primary equipment of the distribution network, solves the power system node equations according to the preset real-time simulation step size, and generates real-time dynamic data streams.

[0031] The symmetric mapping module maps the mechanical life model, temperature rise model, and spatial position parameters of the primary equipment to the digital logic layer of the secondary equipment in real time, establishing the correlation between the physical loss state of the primary side and the measurement logic state of the secondary side.

[0032] The signal interface module encapsulates the real-time dynamic data stream into a sampled value message, and performs communication delay injection, message packet loss injection, duplicate frame injection and sampling drift deviation injection on the message transmission link to send the signal containing interference information to the primary and secondary fusion terminal.

[0033] The closed-loop control module collects the trip and close command messages output by the primary and secondary fusion terminals in real time, and feeds the trip and close command messages back to the simulation calculation module in real time, driving the topology of the digital twin model to complete dynamic adjustment.

[0034] The quality assessment module connects the real-time simulation calculation module and the primary and secondary fusion terminal. By comparing the baseline electrical parameters of the digital twin model with the measurement results fed back by the primary and secondary fusion terminal, it evaluates the accuracy of the primary and secondary fusion equipment in capturing power quality disturbances under operating conditions with digital risk interference.

[0035] Furthermore, the digital twin model is constructed as follows: A physical characteristic model of the primary-side equipment is established by collecting data on the processing actions, spatial location, mechanical fatigue parameters, and heat conduction parameters of the primary-side equipment to construct a physical state machine that reflects the evolutionary laws of the physical entity's operation; a logical behavior model of the secondary-side equipment is established, encompassing the CPU load rate, memory usage, communication protocol stack traffic distribution, and message parsing latency characteristics of the secondary-side equipment; an environmental impact coupling model is established, using environmental humidity, environmental temperature, and electromagnetic field strength as input variables to calculate in real-time the quantitative impact of environmental parameters on the evolutionary laws of insulation dielectric loss in the primary-side equipment and the failure rate of electronic components in the secondary-side equipment; and a high-precision time synchronization protocol is used to temporally correlate the physical characteristic model, logical behavior model, and environmental impact coupling model, enabling synchronized operation of the data flow and the state machine in digital space, thereby generating a digital twin model.

[0036] The specific method for calculating the impact of environmental parameters on quantification in real time is as follows: a physical model of electronic device failure based on the Arrhenius equation is pre-constructed, and the real-time collected ambient temperature is input into the model. By calculating the offset of the energy efficiency activation energy, the mean fault interval time of key semiconductor devices in the secondary side equipment is corrected in real time. At the same time, the collected electromagnetic field intensity is converted into the additional dielectric loss factor of the primary side insulation medium using an electromagnetic coupling algorithm, thereby dynamically correcting the insulation evolution slope of the primary side equipment.

[0037] When performing timing correlation using a high-precision time synchronization protocol, a hardware-assisted precision time protocol (IEEE 1588 PTP) is used as the global master clock. The physical characteristic model, logical behavior model, and environmental influence coupling model are deployed on independent computing threads, and data exchange between threads is triggered by hardware timer interrupts. Within each simulation step, a phase-locked loop-based clock calibration algorithm is used to eliminate the cumulative time deviation between the models, ensuring that the state switching points of the physical state machine and the instruction solution points of the logical behavior model are aligned within nanosecond precision. This guarantees the logical determinism and timing consistency of the digital twin model during cross-domain mapping.

[0038] This embodiment achieves quantitative assessment of the failure evolution of primary and secondary equipment by introducing the Arrhenius equation and electromagnetic coupling algorithm. Combined with a precision time protocol and phase-locked loop calibration technology, it ensures timing alignment between the physical state machine and the logical behavior model at nanosecond-level accuracy, effectively solving the logical uncertainty problem in cross-domain mapping of heterogeneous models and significantly improving the fidelity of the simulation system's prediction of the equipment's state throughout its entire lifecycle.

[0039] Further, the steps for generating the real-time dynamic data stream are as follows: Based on the real-time topology and load variation parameters of the primary-side equipment in the digital twin model, the reference voltage vector data and reference current vector data under ideal operating conditions are calculated; the sensor error characteristic model is invoked, and the thermal conduction parameters and mechanical fatigue parameters in the physical characteristic model are introduced to calculate the resistance temperature drift deviation and sampling accuracy loss of the primary-side sensor during long-term operation, thereby correcting the reference voltage vector data and reference current vector data; based on the ambient temperature and electromagnetic field strength provided by the environmental influence coupling model, nonlinear response characteristics and frequency characteristic deviations are superimposed on the corrected data to generate a digital raw sampling stream with physical damage characteristics; the digital raw sampling stream is mapped along the time axis with the central processing unit load rate and message parsing delay characteristics in the logical behavior model to form a real-time dynamic data stream that can synchronously reflect the physical performance degradation state of the primary side and the logical processing load state of the secondary side.

[0040] The preset real-time simulation step size is set to 10 microseconds to 50 microseconds to meet the real-time requirements of power system nodal equation solving.

[0041] The specific method for superimposing nonlinear response characteristics and frequency characteristic deviations is as follows: using a preset sensor transfer function matrix, the magnetic saturation coefficient is compensated according to the ambient temperature, and the amplitude gain error and phase lag angle of higher harmonic components are introduced according to the electromagnetic field strength, thereby quantifying the output distortion of the sensor in the nonlinear range.

[0042] During timeline mapping, a hardware-assisted precision time protocol (IEEE 1588) is used as the global synchronization clock source. Nanosecond-level hardware timestamps are embedded in each sampled data frame of the digitized raw sampling stream to align the time of calculating the physical performance degradation state of the primary side with the time of acquiring the load rate of the secondary side's central processing unit. The mapping process also includes non-uniform resampling of the sampled data frames based on the message parsing delay characteristics. This reproduces the signal reconstruction distortion caused by fluctuations in the load of the secondary side's logic processing, ensuring that the generated real-time dynamic data stream accurately reflects the actual operating state of the primary and secondary fusion equipment under cross-domain coupling conditions.

[0043] This embodiment utilizes hardware timestamping and non-uniform resampling technology based on a precise time protocol to achieve accurate time-stamp alignment between the physical decay state and the delay of the secondary-side logic load. This significantly improves the cross-domain simulation fidelity of the data stream and provides high-precision data support for verifying the sampling consistency of the fusion terminal under complex operating conditions.

[0044] Furthermore, the correlation between the primary-side physical loss state and the secondary-side measurement logic state is established as follows: based on the mechanical life model and the temperature rise model, the sampling amplitude error and phase noise of the primary-side sensor caused by insulation aging and resistance temperature drift are quantified; the electromagnetic field strength output by the environmental influence coupling model is correlated with the central processing unit load rate and processing delay of the secondary equipment to simulate the degree of decline in the efficiency of secondary-side logic operations; when the secondary-side measurement logic state is abnormal, the system automatically increases the risk weight of the primary-side physical loss state in the evaluation matrix and reduces the credibility score of the equipment's measurement data in the fuzzy comprehensive evaluation, thus completing the dynamic correlation between physical loss and measurement logic.

[0045] The specific process of quantifying the sampling amplitude error and phase noise is as follows: using a preset temperature drift compensation coefficient matrix, the difference between the real-time temperature output by the temperature rise model and the reference temperature is used as the independent variable to calculate the resistivity offset of the sensor, thereby determining the percentage error of the sampling amplitude; at the same time, based on the change in the loss tangent of the insulating medium in the mechanical life model, the phase offset radian of the sampling signal is mapped to generate a digital signal superimposed with phase noise.

[0046] When simulating the degree of decline in the efficiency of secondary logic operations, a queuing theory model is adopted. The frequency of electromagnetic interference pulses excited by the electromagnetic field intensity is used as background noise input. The average waiting time for message parsing is calculated in combination with the central processing unit load rate. When the waiting time exceeds the preset communication cycle threshold, it is determined that the operation efficiency has declined.

[0047] The specific implementation of automatically increasing risk weights and decreasing confidence scores is as follows: a fuzzy comprehensive evaluation matrix based on membership functions is constructed to divide the abnormality level of the secondary side measurement logic state into multiple quantification levels; when an increase in the abnormality level is detected, the weight coefficient corresponding to the primary side physical loss state is dynamically increased through a variable weight operator, and the confidence score of the measurement data is deducted in real time using a weighted average deviation algorithm, thereby realizing a closed-loop correlation evaluation between the primary side physical performance degradation and the confidence of the secondary side data.

[0048] The specific implementation of the real-time mapping is as follows: constructing a nonlinear mapping function based on multidimensional feature vectors. , where the input vector Includes mechanical life loss rate, temperature offset, and spatial displacement deviation, output vector This is the error correction factor for the secondary logic layer. The mapping function is fitted using a radial basis function neural network. Discrete point modeling is performed using pre-collected physical test data to achieve cross-domain quantization transformation from primary physical quantities to secondary logic parameters.

[0049] The quantification rule for adjusting the risk weights is as follows: An initial weight vector is preset in the evaluation matrix. And set a quantitative threshold for secondary side measurement logic anomalies. When the real-time monitored processing latency or load fluctuation exceeds the threshold... When the value reaches 15%, a progressive weight adjustment instruction is triggered, which is achieved through the weighting operator. The physical loss weighting coefficient on the primary side is dynamically adjusted to ensure that the risk weight increases exponentially with the degree of anomaly.

[0050] The confidence score is calculated by setting an initial confidence score for the measurement data. The weighted average deviation algorithm is used to calculate the real-time score. ,in The standardized value of the sampling deviation caused by various physical losses. Indicates the first The weighting coefficients of the influencing factors are used to measure the degree of impact of different environments or operating conditions on power loss. When the confidence score... When the power quality disturbance data falls below the preset threshold of 60 points, the system automatically determines that the power quality disturbance data for that period is unavailable, thereby completing a dynamic closed-loop evaluation of physical losses and measurement logic at the quantitative level.

[0051] This embodiment achieves a quantitative correlation between sensor physical attenuation and the decrease in secondary-side logic operation efficiency by using a temperature drift compensation coefficient matrix and a queuing theory model. Utilizing variable weight operators and a fuzzy comprehensive evaluation mechanism, the system can dynamically adjust the reliability weights of measurement data based on the anomaly level of the secondary side. This closed-loop correlation evaluation method effectively addresses the impact of secondary equipment condition deterioration on the reliability of power quality data, providing a scientific quantitative basis for achieving dynamic and accurate equipment performance perception and condition-based maintenance.

[0052] Furthermore, the implementation method of encapsulating the real-time dynamic data stream into a sampled value message is as follows: the real-time dynamic data stream is mapped to a data object model, and the hardware timestamp generated by the precision time protocol is used to synchronously label each frame of original sampled data; an application layer protocol data unit is constructed, and the labeled sampled data is converted and formatted according to the sampled value service mapping specification, and a sampling synchronization status bit reflecting the current secondary side logic state is embedded; an Ethernet destination address, a source address, and a virtual LAN identifier are added to the application layer protocol data unit to generate an Ethernet frame that conforms to the sampled value specification, and the frame is sent to the device under test through a digital signal interface.

[0053] The mapping to the data object model specifically involves mapping the voltage and current data in the real-time dynamic data stream to the data attributes of the measurement logic node and the transformer logic node, respectively, according to the logic node definition of the International Electrotechnical Commission 61850 standard, and converting the physical loss parameters into the state dictionary of the logic node through specific logic.

[0054] The embedding logic of the sampling synchronization status bit is as follows: real-time monitoring of the precision time protocol slave clock lock status in the secondary side logic behavior model; when the deviation between the local hardware timestamp and the global master clock exceeds the preset synchronization deviation threshold, or when the message parsing delay feature shows that the processor load exceeds the preset safety threshold, the synchronization status bit in the application layer protocol data unit of the sampled value message is automatically set from "synchronous" to "asynchronous" or "test" status.

[0055] When generating Ethernet frames that conform to the sampling value specifications, each frame is assigned a unique identifier and counter sequence number according to the preset control block configuration parameters. The priority marking field of the Ethernet frame is used to prioritize the sampling value messages with obvious power quality disturbance characteristics, so as to ensure that the key test data stream can have the predetermined transmission determinism and real-time performance when traffic congestion occurs at the digital signal interface.

[0056] This technical solution utilizes hardware timestamps generated by a precision time protocol for synchronization tagging, achieving nanosecond-level high-precision alignment between sampled data and physical states. By dynamically switching synchronization status bits through real-time monitoring of processor load and clock deviation, combined with Ethernet priority tagging technology, the deterministic and real-time transmission of critical disturbance data is ensured under network congestion conditions. This enhances the verification depth of the simulation system's ability to parse messages from secondary devices, providing a reliable guarantee for evaluating the stability of the primary and secondary converged terminals in a digital communication environment.

[0057] Furthermore, the implementation methods for the aforementioned communication delay injection, packet loss injection, duplicate frame injection, and sampling drift deviation injection are as follows: The network scheduling controller controls the packet buffering and transmission sequence, discarding sampled value packet frames according to a preset probability to achieve packet loss injection; the same sampled value packet frame is repeatedly transmitted multiple times to achieve duplicate frame injection; the packet forwarding step size is delayed to achieve communication delay injection; the packet payload tampering module modifies the sampled values, and during the application layer protocol data unit encapsulation stage, the sampling drift deviation is superimposed on the original sampled value payload to achieve sampling drift deviation injection; the communication stress simulator mixes and sends interference traffic, synchronously outputting non-service packets generated by denial-of-service attacks and sampled value packets containing interference information.

[0058] The specific implementation of dropping packets according to a preset probability and delaying forwarding is as follows: the packet dropping interval is calculated using the Poisson distribution model, and a random delay jitter sequence that conforms to the characteristics of Internet services is generated according to the Pareto distribution function. By controlling the queue depth of the network scheduling controller, the delay jitter sequence is superimposed on the forwarding period of the sampled value packets.

[0059] When performing sampling drift deviation injection, the message load tampering module uses the big-endian byte order conversion algorithm to locate the current and voltage sampling value fields in the application layer protocol data unit based on the abnormal amplitude of the sensing circuit calculated in the previous step. By performing overflow check and linear bias operation on the original binary two's complement, the resistance temperature drift deviation is covered to the corresponding message payload in real time.

[0060] The synchronization mechanism for the hybrid transmission interference traffic is as follows: a denial-of-service attack traffic pool is constructed using a communication stress simulator; a time-sensitive network scheduling algorithm is used at the digital signal interface layer to dynamically prioritize non-service packets and sampled value packets; by adjusting the transmission rate of non-service packets, different levels of network bandwidth occupancy are simulated, thereby inducing buffer overflow or parsing task scheduling anomalies in the device under test, in order to evaluate the survival boundary and data reassembly capability of the primary and secondary fusion terminal under network storm conditions.

[0061] This embodiment utilizes Poisson and Pareto distribution models to accurately reproduce the complex network stochastic characteristics of a digital substation. Through big-endian byte order conversion and binary bias operations, it achieves precise low-level tampering of the sampled message payload. Combined with a time-sensitive network scheduling algorithm to simulate network storm conditions, it can effectively induce and identify buffer overflows and parsing anomalies in the device under test under extreme traffic pressure, providing a rigorous testing method for quantitatively evaluating the data reconstruction capability and operational robustness of primary and secondary converged terminals in a digital risk environment.

[0062] Furthermore, the evaluation method of the quality assessment module is as follows: a multi-source information feature matrix is ​​constructed to extract operating features including the root mean square value of the reference voltage, peak factor, amplitude of each harmonic, sampling synchronization deviation, timing accuracy index, message loss rate, and synchronization jitter; the multi-source information feature matrix is ​​input into an ensemble learning model composed of random forest and long short-term memory network to identify the gradual decline trend of secondary equipment performance and output the equipment health index; using a combined weighting method and dynamically adjusting the voltage sag weight and harmonic fluctuation weight according to the equipment health index, the measurement accuracy of the primary and secondary fusion terminal under digital risk conditions is determined by comparing the measured values ​​of the primary and secondary fusion terminal with the reference electrical parameters of the digital twin model.

[0063] The specific process of constructing the multi-source information feature matrix is ​​as follows: the amplitude values ​​of each harmonic of the reference voltage and reference current are extracted from the real-time dynamic data stream using fast Fourier transform, and the sampling synchronization deviation in nanoseconds is quantified by performing difference calculation on the timestamps of the digital twin model and the primary and secondary fusion terminal. At the same time, the continuity of message sequence numbers within the preset time window is statistically analyzed in real time to calculate the message loss rate, thereby constructing a multi-dimensional operation feature vector.

[0064] When performing ensemble learning discrimination, the random forest serves as the first-layer base learner, used to learn the nonlinear correlation features between device current temperature rise, processor load and communication traffic; the long short-term memory network serves as the second-layer meta-learner, which introduces a neuron structure with a time forget gate to perform temporal evolution modeling on the feature vector output by the first layer, thereby identifying the gradual performance degradation trend of the device caused by component aging or environmental stress.

[0065] The training process and parameter settings of the ensemble learning model are as follows:

[0066] The simulation calculation module performs traversal simulations under different loads (20% to 120% of rated value), different environmental stresses (-20°C to 60°C), and different risk injection intensities to obtain sample pairs containing "multi-source feature vectors - actual equipment degradation state" and divides the training set and test set in an 8:2 ratio.

[0067] The random forest base learner is configured with 100 decision trees and a maximum depth of 15 layers to extract static nonlinear features. The long short-term memory network has a hidden layer dimension of 64, a stride of 10, and a learning rate of 0.001. Mean squared error is used as the loss function, and the Adam optimization algorithm is employed for parameter iteration.

[0068] The output layer of the ensemble learning model uses the Sigmoid activation function to normalize the output values ​​to the [0, 1] interval, defined as the health index H; where 1 represents a fully healthy state and 0 represents equipment failure. The first derivative of the health index within adjacent simulation time windows is calculated. To quantify a gradual decline trend; if If the value is consistently less than 0 and its absolute value increases, the device is considered to be in an accelerated degradation phase.

[0069] The combined weighting method employs a linear weighted fusion of the analytic hierarchy process (AHP) and the entropy weighting method: First, the AHP is used to determine the initial subjective weights of voltage sag and harmonic fluctuations; then, the entropy weighting method is used to calculate the objective weights based on the dispersion of the measured data; when the equipment health index is lower than a preset safety threshold, the system automatically increases the harmonic phase weight, which is significantly affected by communication jitter, through a variable weighting coefficient model, thereby determining the comprehensive measurement accuracy of the primary and secondary fusion terminal under digital risk conditions by comparing the measured values ​​with the reference electrical parameters.

[0070] The specific triggering logic and quantification process for dynamically adjusting the voltage sag weight and harmonic fluctuation weight are as follows: establish a variable weight mapping function based on health index classification, and divide the equipment health index into normal zone, warning zone and fault risk zone; when the health index is in the normal zone, maintain the initial linear weighting ratio determined by the analytic hierarchy process and the entropy weighting method.

[0071] When the health index falls into the warning zone and is determined to be caused by secondary-side communication jitter or an increase in message loss rate, the system activates a weight offset algorithm. Following an exponential function, it lowers the weight of harmonic fluctuations, which are sensitive to sampling delay, and simultaneously increases the weight of voltage sags, which have time-scale tolerance, to reduce the interference of communication noise on steady-state accuracy assessment. If the health index enters the fault risk zone, a punitive weighting operator forcibly increases the weight of the voltage component most affected by physical losses to a preset upper limit, thereby widening the deviation between the measured value and the reference electrical parameters.

[0072] This embodiment achieves joint feature extraction of physical quantities and communication status by aligning with fast Fourier transform and nanosecond-level time scales. A two-layer ensemble learning model composed of random forest and long short-term memory networks can accurately capture the micro-degradation trend of equipment performance. Combined with a variable weighting mechanism using the analytic hierarchy process (AHP) and entropy weighting, the system can dynamically adjust the evaluation weights based on the real-time health index of the equipment, significantly improving the sensitivity and objectivity of measurement accuracy determination under digital interference conditions. This provides core technical support for achieving intelligent and accurate assessment of power equipment status.

[0073] This embodiment overcomes the technical bottleneck of isolation between the physical primary side and the logical secondary side in traditional simulation by constructing a digital twin model integrating primary and secondary equipment and a cross-domain symmetric mapping mechanism. The system utilizes a closed-loop control module to feed terminal commands back to the physical simulation layer in real time, realizing dynamic evolution of the topology and real-time interaction throughout the entire process. By performing multi-dimensional digital risk injection on the message transmission link, it faithfully reproduces the complex physical losses and communication anomalies encountered in real-world operation. This scheme can accurately quantify the dynamic impact of digital interference on measurement results, providing a rigorous, closed-loop, and repeatable verification method for the accuracy of power quality capture by the integrated primary and secondary terminals in extreme environments, significantly improving the testing depth and safety early warning capabilities of secondary equipment in power systems.

[0074] Example 2

[0075] This embodiment takes the monitoring accuracy test of a primary and secondary integrated pole-mounted circuit breaker under extreme high temperature and strong electromagnetic interference environment as an example.

[0076] During the simulation test initiation phase, the simulation calculation module constructs the primary-side physical characteristic model and logical behavior model of the circuit breaker. The system sets the real-time simulation step size to 20 microseconds to accurately solve the power system node equations and generate high-frequency dynamic data streams. The symmetric mapping module maps the temperature rise model under 45°C high-temperature conditions and the mechanical fatigue parameters after cumulative operation to the digital space, establishing a cross-domain correlation between primary-side physical losses and secondary-side measurement logic.

[0077] Subsequently, the system performs real-time dynamic data stream calculation and correction. The sensor error characteristic model calls upon thermal conduction parameters to calculate the 0.8% sampling gain error caused by the resistance temperature drift of the circuit breaker transformer, and corrects the reference voltage vector data in real time. The environmental influence coupling model inputs the detected strong electromagnetic pulse into the sensor transfer function matrix, superimposing nonlinear response distortion and high-order harmonic deviations onto the sampling stream to generate digital raw sampling data with real physical damage characteristics.

[0078] During signal transmission, the signal interface module uses the hardware timestamp generated by the IEEE 1588 Precision Time Protocol to synchronously mark the sampled stream and encapsulate it into a sampled value message. At this time, the logical behavior model detects that the CPU load rate has reached 80% due to message parsing pressure caused by electromagnetic interference, and the system automatically sets the synchronization status bit in the application layer protocol data unit of the message from "synchronization" to "test".

[0079] To test the device's survivability limits, the system initiated digital risk injection. The network scheduling controller used a Poisson distribution model to simulate an extreme network storm, injecting a 3% packet loss rate and random jitter latency. The packet payload tampering module located the current sampling field using a big-endian byte order conversion algorithm and overwrote the calculated resistance temperature drift deviation into the packet payload in real time. The communication stress simulator synchronously sent non-service traffic generated by a denial-of-service attack, inducing parsing task scheduling anomalies in the terminal under test by adjusting bandwidth utilization.

[0080] Finally, the quality assessment module performs feature extraction and discrimination. It uses Fast Fourier Transform to obtain the harmonic amplitude containing interference information and inputs it into an ensemble learning model composed of a random forest and a long short-term memory network to quantify and identify the gradual degradation trend of secondary equipment performance. Through a combined weighting method and by dynamically adjusting the assessment weights based on the output health index, the terminal feedback results are compared with the digital twin benchmark value to ultimately determine the accuracy of the primary and secondary fusion terminal in capturing power quality under extreme digital risk conditions.

[0081] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A power quality simulation and testing system integrating the status of primary and secondary equipment, characterized in that, include: The simulation calculation module constructs a digital twin model of the primary equipment of the distribution network, solves the power system node equations according to the preset real-time simulation step size, and generates real-time dynamic data streams. The digital twin model is constructed as follows: a physical characteristic model of the primary side device is established by collecting the processing actions, spatial position, mechanical fatigue parameters and heat conduction parameters of the primary side device to construct a physical state machine that can reflect the operation and evolution law of the physical entity; a logical behavior model of the secondary side device is established, which covers the CPU load rate, memory usage, communication protocol stack traffic distribution and message parsing latency characteristics of the secondary side device. An environmental impact coupling model is established, taking environmental humidity, environmental temperature, and electromagnetic field strength as input variables. The quantitative impact of environmental parameters on the evolution of insulation dielectric loss of primary equipment and failure rate of electronic devices of secondary equipment is calculated in real time. The physical characteristic model, logical behavior model, and environmental impact coupling model are time-series correlated through a high-precision time synchronization protocol to realize the synchronous operation of data flow and state machine in digital space and generate a digital twin model. The symmetric mapping module maps the mechanical life model, temperature rise model, and spatial position parameters of the primary equipment to the digital logic layer of the secondary equipment in real time, establishing a correlation between the physical loss state of the primary side and the measurement logic state of the secondary side. The correlation is established as follows: based on the mechanical life model and the temperature rise model, the sampling amplitude error and phase noise of the primary side sensor caused by insulation aging and resistance temperature drift are quantified; the electromagnetic field strength output by the environmental influence coupling model is correlated with the CPU load rate and processing delay of the secondary equipment to simulate the degree of decrease in the efficiency of the secondary side logic operation; when the secondary side measurement logic state exhibits abnormality, the system automatically increases the risk weight of the primary side physical loss state in the evaluation matrix and reduces the credibility score of the equipment's measurement data in the fuzzy comprehensive evaluation, thus completing the dynamic correlation between physical loss and measurement logic. The signal interface module encapsulates the real-time dynamic data stream into a sampled value message, and performs communication delay injection, message packet loss injection, duplicate frame injection and sampling drift deviation injection on the message transmission link to send the signal containing interference information to the primary and secondary fusion terminal. The closed-loop control module collects the trip and close command messages output by the primary and secondary fusion terminals in real time, and feeds the trip and close command messages back to the simulation calculation module in real time, driving the topology of the digital twin model to complete dynamic adjustment. The quality assessment module connects the real-time simulation calculation module and the primary and secondary fusion terminal. By comparing the baseline electrical parameters of the digital twin model with the measurement results fed back by the primary and secondary fusion terminal, it evaluates the accuracy of the primary and secondary fusion equipment in capturing power quality disturbances under operating conditions with digital risk interference.

2. The power quality simulation and testing system integrating primary and secondary equipment status according to claim 1, characterized in that, The steps for generating the real-time dynamic data stream are as follows: based on the real-time topology and load variation parameters of the primary-side equipment in the digital twin model, the reference voltage vector data and reference current vector data under ideal operating conditions are calculated. By invoking the sensor error characteristic model and incorporating the thermal conduction and mechanical fatigue parameters from the physical characteristic model, the resistance temperature drift deviation and sampling accuracy loss of the primary-side sensor during long-term operation are calculated, and the reference voltage vector data and reference current vector data are corrected. Based on the ambient temperature and electromagnetic field strength provided by the environmental influence coupling model, nonlinear response characteristics and frequency characteristic deviations are superimposed on the corrected data to generate a digital raw sampling stream with physical damage characteristics. The digital raw sampling stream is then mapped along a time axis with the central processing unit load rate and message parsing delay characteristics from the logic behavior model to form a real-time dynamic data stream that synchronously reflects the physical performance degradation state of the primary side and the logic processing load state of the secondary side.

3. The power quality simulation and testing system integrating primary and secondary equipment status according to claim 1, characterized in that, The implementation method of encapsulating the real-time dynamic data stream into a sampled value message is as follows: the real-time dynamic data stream is mapped to a data object model, and the hardware timestamp generated by the precision time protocol is used to synchronously label each frame of original sampled data; an application layer protocol data unit is constructed, and the labeled sampled data is converted and formatted according to the sampled value service mapping specification, and a sampling synchronization status bit reflecting the current secondary side logic state is embedded. Ethernet destination address, source address, and virtual LAN identifier are added to the application layer protocol data unit to generate an Ethernet frame that conforms to the sampling value specification, which is then sent to the device under test through a digital signal interface.

4. The power quality simulation and testing system integrating primary and secondary equipment status according to claim 3, characterized in that, The implementation methods for communication delay injection, packet loss injection, duplicate frame injection, and sampling drift deviation injection are as follows: The network scheduling controller controls the packet buffering and transmission sequence, discarding sampled value packet frames according to a preset probability to achieve packet loss injection; the same sampled value packet frame is repeatedly transmitted to achieve duplicate frame injection; and the packet forwarding step size is delayed to achieve communication delay injection. The packet payload tampering module modifies the sampled values, and during the application layer protocol data unit encapsulation stage, the sampling drift deviation is superimposed on the original sampled value payload to achieve sampling drift deviation injection. Interference traffic is mixed and transmitted through a communication stress simulator, synchronously outputting non-service packets generated by denial-of-service attacks and sampled value packets containing interference information.

5. The power quality simulation and testing system integrating primary and secondary equipment status according to claim 1, characterized in that, The quality assessment module evaluates performance as follows: A multi-source information feature matrix is ​​constructed to extract operational features including the root mean square value of the reference voltage, peak factor, harmonic amplitude, sampling synchronization deviation, timing accuracy index, message loss rate, and synchronization jitter. This multi-source information feature matrix is ​​then input into an ensemble learning model composed of a random forest and a long short-term memory network to identify the progressive degradation trend of secondary equipment performance and output an equipment health index. A combined weighting method is used, and the voltage sag weight and harmonic fluctuation weight are dynamically adjusted based on the equipment health index. By comparing the measured values ​​of the primary and secondary fusion terminal with the reference electrical parameters of the digital twin model, the measurement accuracy of the primary and secondary fusion terminal under digital risk conditions is determined.