Similarity calculation method for direct current system recording wave signal and simulation signal
Patent Information
- Application Number
- CN202610952338.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]本申请提供一种直流系统录波信号和仿真信号的相似度计算方法,用以解决现有技术中无法反映波形真实的形态相似程度的缺陷,实现对录波信号和仿真信号之间的相似度的准确计算
[0023] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the similarity calculation method for DC system waveform recording signals and simulated signals as described above.
Smart Images

Figure CN122595623A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of signal processing technology, and in particular to a method for calculating the similarity between recorded and simulated signals of a DC system. Background Technology
[0002] In the field of power system fault analysis and simulation verification, the comparison between recorded waveforms, i.e., the actual fault waveforms collected by relay protection devices or fault recorders, and simulation signals generated by electromagnetic transient simulation software such as CloudPSS, Power Systems Computer Aided Design (PSCAD), and Electromagnetic Transients Program (EMTP), is a key step in evaluating the accuracy of simulation models and assisting in fault reproduction and analysis.
[0003] Currently, most comparisons between recorded and simulated signals rely on point-to-point Euclidean distance or root mean square error (RMSE). These methods are highly sensitive to waveform time axis alignment errors. When there is a slight time drift or sampling rate discrepancy between the recorded and simulated waveforms, the calculation results will be severely distorted and fail to reflect the true similarity of the waveforms. Therefore, determining the similarity between recorded and simulated signals is a problem that urgently needs to be solved. Summary of the Invention
[0004] This application provides a method for calculating the similarity between recorded waveform signals and simulated signals in a DC system, in order to overcome the shortcomings of existing technologies that cannot reflect the true morphological similarity of waveforms, and to achieve accurate calculation of the similarity between recorded waveform signals and simulated signals.
[0005] This application provides a method for calculating the similarity between recorded and simulated signals of a DC system, including the following steps: The preprocessed DC system waveform recording signal and simulation signal are subjected to time delay alignment processing. The similarity between the time delay aligned waveform recording signal and simulation signal in multiple dimensions is determined. Multiple dimensions include multiple ones in the time domain, frequency domain or feature domain. The similarity in multiple dimensions is weighted and fused to obtain the similarity between the waveform recording signal and the simulation signal.
[0006] According to a method provided in this application, time delay alignment processing is performed on the preprocessed waveform recording signal and simulation signal of a DC system, including: The first time delay offset between the recorded signal and the simulated signal is determined by a normalized cross-correlation function. Based on the first time delay offset, an interpolation method is used to perform subsampling accuracy translation compensation on the recorded signal or the simulated signal.
[0007] According to a method provided in this application, the above also includes: When the maximum value of the normalized cross-correlation function is less than the preset alignment threshold, the zero-crossing alignment method is used to determine the first time delay offset between the recorded signal and the simulated signal.
[0008] According to a method provided in this application, the similarity between the time-delay aligned recorded signal and the simulated signal is determined in multiple dimensions, including: Adaptive segmentation is performed on the time-delay aligned waveform and simulated signal to obtain multiple time segments. In each time segment, the similarity between the waveform and simulated signal in each dimension is determined. For each time segment, the segment similarity corresponding to the time segment is determined based on the similarity corresponding to each dimension in the time segment.
[0009] Based on this, the similarity under multiple dimensions is weighted and fused to obtain the similarity between the recorded signal and the simulated signal, including: weighting and fusing the segment similarity corresponding to each time segment to obtain the similarity between the recorded signal and the simulated signal.
[0010] According to a method provided in this application, multiple time segments include a pre-fault steady-state segment, a fault transient segment, and a post-fault recovery segment; the pre-fault steady-state segment refers to the time period before the fault occurs, the fault transient segment refers to the time period from the start of the fault to the end of the fault, and the post-fault recovery segment refers to the time period after the fault ends; adaptive segmentation is performed on the time-delay aligned waveform signal and the simulated signal to obtain multiple time segments, including: Based on the short-time energy function and the first-order differential rate of change, the fault initiation time and the fault recovery time are determined. Based on the fault initiation time and the fault recovery time, the time-delay aligned waveform signal and the simulation signal are segmented to obtain the pre-fault steady-state segment, the fault transient segment, and the post-fault recovery segment.
[0011] According to a method provided in this application, the weight of the fault transient segment is greater than the weight of the post-fault recovery segment, and the weight of the post-fault recovery segment is greater than the weight of the pre-fault steady-state segment.
[0012] According to a method provided in this application, for each time series segment, based on the similarity corresponding to each dimension within the time series segment, the segment similarity corresponding to the time series segment is determined, including: Determine the dimensional weight of each dimension, and for each time series segment, perform weighted fusion of the similarities under multiple dimensions in the time series segment based on the dimensional weight of each dimension to obtain the segment similarity corresponding to each time series segment.
[0013] According to a method provided in this application, the dimensional weight of each dimension is determined, including: Determine the information entropy of each dimension in each time series segment. Information entropy is used to characterize the distinguishability of a dimension between different time series segments. Determine the dimension weight of each dimension based on the information entropy of each dimension. Information entropy is negatively correlated with dimension weight.
[0014] According to a method provided in this application, the similarity between the time-delay aligned recorded signal and the simulated signal in the time domain is determined, including: The normalized cross-correlation coefficients of the mean-removed recorded signal and the simulated signal are determined as the first time-domain index. The constrained dynamic time warping similarity is determined as the second time-domain index. The instantaneous amplitude envelopes of the recorded signal and the simulated signal are extracted, and the normalized cross-correlation coefficients of the instantaneous amplitude envelopes are calculated as the third time-domain index. The first, second, and third time-domain indices are weighted and fused to obtain the time-delay aligned similarity between the recorded signal and the simulated signal in the time domain.
[0015] According to a method provided in this application, the similarity between a time-delay aligned recorded signal and a simulated signal in the frequency domain is determined, including: The weighted spectral correlation coefficient is determined, which characterizes the degree of agreement between the amplitude spectra of the recorded signal and the simulated signal at each frequency component. The fundamental frequency amplitude deviation rate and the phase spectrum deviation rate are determined, which characterize the degree of agreement between the recorded signal and the simulated signal in terms of the fundamental energy intensity of the power frequency. The phase spectrum deviation rate characterizes the degree of agreement between the recorded signal and the simulated signal in terms of the phase structure of each harmonic. The weighted spectral correlation coefficient is corrected using the fundamental frequency amplitude deviation rate and the phase spectrum deviation rate to obtain the similarity between the time-delay aligned recorded signal and the simulated signal in the frequency domain.
[0016] According to a method provided in this application, the similarity between a time-delay aligned recorded signal and a simulated signal in the feature domain is determined, including: Multiple types of feature points are extracted from the recorded signal and the simulated signal, including multiple peak points, zero-crossing points, or abrupt change points. For each type of feature point, bidirectional nearest neighbor matching is performed on the feature points in the recorded signal and the feature points in the simulated signal to determine the similarity of each type of feature point. Based on the similarity of each type of feature point, the similarity between the time-delay aligned recorded signal and the simulated signal in the feature domain is determined.
[0017] According to a method provided in this application, the recorded signal and the simulated signal include multiple channels, and the method further includes: The similarity between the recorded signal and the simulated signal in each channel is determined. For each channel, the channel weight is determined based on the channel's signal quality index and fault correlation index. The signal quality index is used to evaluate the reliability of the recorded signal in the channel, and the fault correlation index is used to evaluate the degree of association between the channel and the current fault type. Based on the channel weight of each channel, the similarity between the recorded signal and the simulated signal in each channel is weighted and fused.
[0018] According to a method provided in this application, the above method further includes: A resampling method is used to calculate the similarity between the recorded signal and the simulated signal multiple times to obtain the confidence interval of the similarity. Based on the width of the confidence interval, the reliability index is calculated, which is used to characterize the credibility of the similarity.
[0019] According to a method provided in this application, the above method further includes: Time-frequency transformations are performed on the recorded signal and the simulated signal respectively to obtain the time-frequency distribution of the recorded signal and the simulated signal. Based on the difference between the time-frequency distribution of the recorded signal and the simulated signal, a difference heatmap is generated. The difference heatmap is used to identify the deviation areas between the recorded signal and the simulated signal in the time-frequency domain.
[0020] This application also provides a similarity calculation device for DC system waveform recording signals and simulation signals, including the following modules: The processing module is used to perform time delay alignment processing on the preprocessed waveform recording signal and simulation signal of the DC system; The determination module is used to determine the similarity between the time-delay aligned recorded signal and the simulated signal in multiple dimensions; these multiple dimensions include multiple components in the time domain, frequency domain, or feature domain. The fusion module is used to perform weighted fusion of similarity across multiple dimensions to obtain the similarity between the recorded signal and the simulated signal.
[0021] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the similarity calculation method for DC system waveform recording signals and simulated signals as described above.
[0022] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the similarity calculation method for DC system waveform recording signals and simulation signals as described above.
[0023] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the similarity calculation method for DC system waveform recording signals and simulated signals as described above.
[0024] The above technical solution first relies on time delay alignment processing to eliminate the timing deviation caused by time drift and asynchronous sampling between the recorded signal and the simulated signal. This fundamentally avoids the defects of traditional point-by-point Euclidean distance and RMSE algorithms, which suffer from severe distortion in similarity calculation due to time axis misalignment. It solves the pre-processing pain point of timing error interfering with waveform morphology evaluation. On this basis, it quantifies the similarity performance of the two types of signals in each dimension from multiple dimensions, including time domain, frequency domain, and feature domain. This breaks through the limitation that a single index can only represent local waveform information in a one-sided way. Then, through weighted fusion and integration of the similarity weights of each dimension, it finally outputs a similarity result that closely matches the actual waveform morphology. In this way, it can not only effectively avoid the inherent drawback of traditional algorithms being highly sensitive to time errors, but also improve the similarity evaluation dimensions from multiple information levels, accurately achieving the core evaluation purpose of quantifying the accuracy of the simulation model and verifying the reproduction of fault waveforms. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a flowchart illustrating a method for calculating the similarity between recorded and simulated signals of a DC system, as provided in this application.
[0027] Figure 2 This is a flowchart illustrating a similarity calculation system for recorded and simulated signals provided in this application.
[0028] Figure 3 This is a flowchart illustrating another method for calculating the similarity between recorded and simulated signals of a DC system provided in this application.
[0029] Figure 4 This is a schematic diagram of the structure of a device for calculating the similarity between recorded and simulated signals of a DC system, as provided in this application.
[0030] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0032] The following is combined Figures 1 to 5 This application describes a method for calculating the similarity between recorded and simulated signals of a DC system, as provided in an embodiment.
[0033] Figure 1 This is a flowchart illustrating a method for calculating the similarity between recorded and simulated signals of a DC system, provided in an embodiment of this application. It is applied to electronic devices. (See also...) Figure 1 As shown, the method includes the following: S101 performs time delay alignment processing on the preprocessed DC system waveform recording signal and simulation signal.
[0034] Fault waveform recording, also known as fault waveform recording, refers to the instantaneous voltage and current waveform data automatically recorded by a fault waveform recorder or relay protection device when a short circuit, open circuit, or ground fault occurs in a power DC system. The waveform recording signal is typically stored in the Common Format for Transient Data Exchange for Power Systems (COMTRADE), containing analog channels (voltage, current) and digital channels (circuit breaker position, etc.), and serves as an important basis for fault analysis and accident investigation.
[0035] Simulation signals are waveform data of node voltages and branch currents changing over time, output by electromagnetic transient simulation software after digital modeling and numerical solving of power system fault processes. The accuracy of simulation signals directly reflects the parameter precision and modeling quality of the simulation model and is the core basis for verifying the effectiveness of the simulation model. The format of simulation signals can be either comma-separated values (CSV) or Hierarchical Data Format version 5 (HDF5).
[0036] Specifically, after acquiring the recorded waveform signal and the simulated signal, the electronic device can preprocess the recorded waveform signal and the simulated signal respectively to obtain the preprocessed recorded waveform signal and simulated signal. Then, time delay alignment processing can be performed on the preprocessed DC system recorded waveform signal and simulated signal.
[0037] The preprocessing of the recorded and simulated signals described above can be specifically implemented as follows: (1) Analyzing the recorded and simulated signals. (2) Performing low-pass filtering noise reduction on the analyzed signals. In one example, an Nth-order Butterworth low-pass filter can be used, with its cutoff frequency set to... Set as signal sampling frequency One-quarter, that is This can filter out high-frequency noise components in the signal while retaining the main frequency band information in the fault transient segment. (3) Resample the filtered waveform signal and the simulation signal to a uniform sampling rate. Since the original sampling rates of the two may differ, the resampling operation can make the two signals have the same sampling interval on the time axis. (4) Normalize the resampled waveform signal and the simulation signal.
[0038] The following explanation uses the preprocessed waveform recording signal x[n] and the preprocessed simulation signal y[n] as an example.
[0039] In one example, time delay alignment processing is performed on the preprocessed DC system waveform recording signal and simulation signal, which can be specifically implemented as steps A-C below.
[0040] Step A: Determine the first time delay offset between the recorded signal and the simulated signal using the Normalized Cross Correlation Function (NCCF).
[0041] The cross-correlation function is a statistic that describes the similarity between two signals at different time offsets.
[0042] In this embodiment of the application, NCCF can be represented as: in, This represents the normalized similarity between the recorded signal and the simulated signal after the simulated signal has been moved by k sampling points, with a value range of [-1, 1]; k is the time delay offset. ; This represents the original similarity between the recorded waveform and the simulated waveform after the simulated waveform has been moved by k sampling points. It has not been normalized and is affected by the waveform amplitude. Let x[n] represent the value of the autocorrelation function of the recorded signal at zero offset. The value of the autocorrelation function of the simulated signal y[n] at zero offset is given. N represents the sampling length, i.e., the number of sampling points.
[0043] Electronic devices can search within a preset range. The delay offset by which the internal search maximizes the NCCF value. This refers to the first time delay offset, also known as the optimal time delay offset: in, It can be determined based on prior engineering knowledge, and is usually set to 1.5 times the number of sampling points corresponding to the maximum expected delay, in order to balance search efficiency and reliability.
[0044] In one example, when the maximum value of the normalized cross-correlation function is less than a preset alignment threshold, a zero-crossing alignment method can be used to determine the first time delay offset between the recorded signal and the simulated signal. For example, the maximum value of the normalized cross-correlation function can be expressed as... The preset alignment threshold can be expressed as ,exist < In this case, cross-correlation alignment failure can be determined. In this situation, a zero-crossing alignment method can be used to determine the first time delay offset between the recorded signal and the simulated signal. In one example, The value can be 0.3.
[0045] In one example, the above-mentioned method of using zero-crossing alignment to determine the first time delay offset between the recorded signal and the simulated signal can be specifically implemented as follows: (1) Perform linear interpolation on the preprocessed recorded signal and the simulated signal respectively to extract the zero-crossing time of the power frequency. The following uses the zero-crossing sequence extracted from the recorded signal as an example. The zero-crossing sequence extracted from the simulation signal is (2) Based on the zero-crossing sequence of the recorded signal and the simulated signal in the steady-state segment before the fault, determine the average interval corresponding to each of the recorded signal and the simulated signal respectively. The average interval corresponding to the recorded signal is used as the mean in the following description. The average interval corresponding to the simulated signal is For example, (3) the average interval corresponding to the recorded waveform signal. Average interval corresponding to the simulated signal If the difference is less than or equal to a preset interval threshold, then for the zero-crossing sequence... and Perform cross-correlation analysis to obtain the offset corresponding to the cross-correlation peak. Finally, the following formula is used to calculate the average interval corresponding to the recorded signal. Offset and the average interval corresponding to the simulated signal Determine the first time delay offset.
[0046] in, Indicates the first time delay offset. Indicates the sampling interval.
[0047] In one example, the preset interval threshold can be 0.5 milliseconds (ms).
[0048] In one example, when the first time delay offset is determined using the zero-crossing alignment method, the process of determining the first time delay offset can be marked so that the origin of the first time delay offset can be traced back to the zero-crossing alignment method.
[0049] Step B: Based on the first time delay offset, use an interpolation method to perform subsampling accuracy translation compensation on the simulation signal.
[0050] In one example, the interpolation method could be the Sinc interpolation method.
[0051] Specifically, the first time delay offset obtained from step A is an offset at the integer sampling point level, combined with the sampling frequency. The conversion yields the subsampling precision delay offset to be compensated. (Unit: seconds), fine translation compensation for non-integer sampling intervals is achieved using Sinc interpolation.
[0052] The interpolation formula can be expressed as: in, The signal sampling frequency, Indicates the time delay offset after subsampling precision. The simulated signal after compensation and alignment.
[0053] In practice, to reduce computational complexity, the infinite summation can be truncated into a finite number of terms, i.e. It can be represented as: .
[0054] In one example, .
[0055] In one example, a lookup table method can be used to pre-calculate the Sinc function value to speed up the computation.
[0056] Through iterative optimization or precise solution, the error between the shift-compensated simulated signal and the recorded signal can be minimized, thus obtaining the optimal subsampling precision time delay offset. This method can improve the accuracy of time delay estimation and compensation to [a certain level]. The accuracy is on the order of seconds, significantly better than the accuracy of whole sampling points.
[0057] In one example, when the first time delay offset is determined using a normalized cross-correlation function, before performing subsampling precision translation compensation on the simulated signal using an interpolation method based on the first time delay offset, it is also possible that there are multiple time delay offsets that cause the normalized similarity between the recorded signal and the simulated signal to be greater than a preset threshold. In other words, when the cross-correlation curve has multiple local maxima and is multi-peaked, the multiple time delay offsets can be denoted as a candidate time delay set {k1*, k2*, ..., k m *} (m ≥ 2), and the target delay offset is determined from the candidate delay set through the Dynamic Time Warping (DTW) algorithm.
[0058] In one example, a preset threshold It can be represented as: = .
[0059] DTW (Time-Delay Waveform) is an algorithm for measuring the similarity between two time series. It allows the series to undergo nonlinear bending along the time axis, finding the optimal bending path between the two series using dynamic programming and calculating their minimum cumulative distance. DTW is invariant to local compression and stretching along the time axis, making it suitable for scenarios where there are local time delay variations in waveform morphology comparisons, such as oscillation frequency deviations in transient fault segments.
[0060] Specifically, for each delay offset k in the candidate delay set p * Sakoe-Chiba band constraints can be introduced within the transient fault phase. The Sakoe-Chiba band constraint conditions can be expressed as: in, and These are the recorded waveform signals. and simulated signals The sampling point index, This is the bandwidth scaling factor, and its value range is... This constraint can limit the DTW's curved path to a width of approximately 1000 meters near the diagonal. Within the strip-shaped area.
[0061] Under the Sakoe-Chiba band constraint, the cumulative cost matrix is calculated only within the aforementioned banded region. Since the coordinates outside the region are no longer involved in the path solving, the recursive relationship of the cumulative cost matrix can be expressed as: Among them, the local cost function The absolute difference can be expressed as: The delay offset k in the candidate delay set can be obtained using the above method. p *Corresponding total cumulative cost Then, the delay offset that minimizes the total cumulative cost can be used as the refined delay offset, i.e., the target delay offset. .
[0062] After determining the target time delay offset using the above method, the above method of using interpolation to perform subsampling precision translation compensation on the simulation signal based on the first time delay offset can be replaced with: using interpolation to perform subsampling precision translation compensation on the simulation signal based on the target time delay offset.
[0063] S102, determine the similarity between the time-delay aligned recorded signal and the simulated signal in multiple dimensions.
[0064] Multiple dimensions include multiple dimensions in the time domain, frequency domain, or feature domain.
[0065] The following will describe the process of determining the similarity between the time-delay aligned recorded signal and the simulated signal in the time domain (hereinafter referred to as time domain similarity), in the frequency domain (hereinafter referred to as frequency domain similarity), and in the feature domain (hereinafter referred to as feature point similarity).
[0066] Temporal similarity In one example, determining the time-domain similarity between the time-delay aligned waveform recording signal and the simulated signal can be achieved as follows: determining the normalized cross-correlation coefficient (NCC) of the mean-removed waveform recording signal and the simulated signal as the first time-domain index; determining the similarity including constrained dynamic time warping as the second time-domain index; extracting the instantaneous amplitude envelopes of the waveform recording signal and the simulated signal, and calculating the normalized cross-correlation coefficient of the instantaneous amplitude envelopes as the third time-domain index; and weightedly fusing the first, second, and third time-domain indices to obtain the time-domain similarity between the time-delay aligned waveform recording signal and the simulated signal, i.e., the time-domain similarity.
[0067] Specifically, determine the normalized cross-correlation coefficient between the mean-removed recorded signal and the simulated signal. That is, the formula for determining the first time-domain index can be expressed as: in, The closer the value is to 1, the more similar the waveform shape is.
[0068] Determine the constrained dynamic time warping similarity. That is, the formula for determining the second time-domain index can be expressed as: in, The normalized DTW cumulative distance determined under the Sakoe-Chiba band constraint. To adapt to the maximum allowable distortion distance, and The dimensions are consistent, both being the product of amplitude and number of sampling points. The standard deviation of the current recorded signal amplitude. The current number of sampling points is κ, which is a configurable scaling factor. The default value is κ = 2.0. The above method enables the temporal similarity to have adaptive normalization capability for signals of different amplitude levels. The range of values is .
[0069] The instantaneous amplitude envelope of the extracted waveform signal is used as The instantaneous amplitude envelope of the extracted simulation signal is For example, the above calculation of the normalized cross-correlation coefficient of the instantaneous amplitude envelope The formula for determining the third time-domain index can be expressed as: The first time-domain index is obtained through the above method. Second time-domain indicators Third time domain indicators Then, based on the first time domain index Second time-domain indicators Third time domain indicators The corresponding weights are determined by the following formula for the first time-domain index. Second time-domain indicators Third time domain indicators We perform a weighted summation to obtain the temporal similarity. .
[0070] in, In one example, , , .
[0071] Frequency domain similarity In one example, determining the similarity between the time-delay aligned recorded signal and the simulated signal in the frequency domain can be achieved by: determining the weighted spectral correlation coefficient, determining the fundamental frequency amplitude deviation rate and the phase spectrum deviation rate, and using the fundamental frequency amplitude deviation rate and the phase spectrum deviation rate to correct the weighted spectral correlation coefficient, thereby obtaining the similarity between the time-delay aligned recorded signal and the simulated signal in the frequency domain, i.e., the frequency domain similarity.
[0072] The weighted spectral correlation coefficient is used to characterize the degree of agreement between the amplitude spectra of the recorded signal and the simulated signal at each frequency component. The fundamental frequency amplitude deviation rate is used to characterize the degree of agreement between the recorded signal and the simulated signal in terms of the fundamental frequency energy intensity. The amplitude of the power frequency component of the fault current / voltage in the power system directly reflects the modeling accuracy of core parameters such as system impedance, fault resistance, and power supply strength. The smaller the fundamental frequency amplitude deviation rate, the more accurate the simulation model's reproduction of the amplitude of the fault steady-state electrical quantities; if the fundamental frequency amplitude deviation rate is large, it usually indicates deviations in parameters such as line impedance parameters, transformer turns ratio, or equivalent power supply impedance.
[0073] Phase spectrum deviation rate is used to characterize the degree of agreement between the recorded signal and the simulated signal in terms of phase structure at each harmonic level. It reflects the difference in waveform shape and timing rather than amplitude. Phase spectrum deviation rate mainly originates from two types of modeling errors: first, inaccurate system time constants (such as the L / RL / RL / R ratio) lead to a discrepancy between the transient decay rate and the recorded waveform; second, distorted modeling of the harmonic generation mechanism of nonlinear components (such as transformer cores and arc models) results in relative phase misalignment of each harmonic component. Phase spectrum deviation rate can serve as a sensitive indicator to distinguish between amplitude-matched but waveform timing-off faults, complementing the fundamental frequency amplitude deviation rate to jointly pinpoint the specific type of simulation parameter deviation.
[0074] Specifically, the time-delay aligned waveform recording signal and the simulated signal can be processed separately. The Fast Fourier Transform (FFT) of the points yields the amplitude spectrum |X[k]| of the recorded signal and the amplitude spectrum |Y[k]| of the simulated signal, k = 0, 1, ..., .
[0075] in, The number of points represents the number of points in the Fast Fourier Transform, i.e., the number of discrete sampling points in the frequency domain. The value of this number determines the balance between frequency domain resolution and computational complexity, and it is usually taken as an integer power of 2, such as 1024, 2048, etc.
[0076] Then, based on the amplitude spectrum |X[k]| of the recorded signal and the amplitude spectrum |Y[k]| of the simulated signal, the weighted spectral correlation coefficient can be determined using the following formula. .
[0077] Weight This is used to highlight the importance of different frequency components in similarity evaluation.
[0078] In one example, weights It can be determined based on the energy ratio of the fundamental frequency and each harmonic component. The calculation formula is: in, This is a dummy variable that iterates through all frequency components. Using the energy distribution of the recorded signal as the weighting benchmark, the evaluation results focus on the main frequency components carried by the measured waveform, conforming to the engineering evaluation logic of using recorded signals as a reference standard.
[0079] In one example, a larger weight can be given to the fundamental frequency component to highlight the degree of match between the main frequency components.
[0080] The formula for calculating the fundamental frequency amplitude deviation rate can be: in, and These are the FFT amplitudes of the recorded signal and the simulated signal at the power frequency (e.g., 50Hz), respectively.
[0081] The formula for calculating the phase spectrum deviation rate is as follows: Where H is the highest harmonic order considered, with H = 13 by default. and The recorded signal and the simulated signal are respectively at the 1st... Phase angle (in radians) at the second harmonic frequency. Divide by The phase deviations of each harmonic can be normalized to the [0,1] interval, making It has the same dimensions as other similarity indicators. This indicates that all harmonics are in phase.
[0082] Finally, the frequency domain similarity can be obtained by correcting the weighted spectral correlation coefficient using the fundamental frequency amplitude deviation rate and phase spectrum deviation rate through the following formula. .
[0083] The introduction of this correction factor reduces the frequency domain similarity when there is a significant deviation in the fundamental frequency amplitude or phase, thus more comprehensively reflecting the overall consistency between the recorded signal and the simulated signal in the frequency domain.
[0084] Feature point similarity In one example, determining the similarity between the time-delay aligned waveform recording signal and the simulated signal in the feature domain can be specifically implemented as follows: extracting multiple types of feature points from the waveform recording signal and the simulated signal respectively; the multiple types of feature points include multiple peak points, zero-crossing points, or abrupt change points; for each type of feature point, performing bidirectional nearest neighbor matching on the feature points in the waveform recording signal and the feature points in the simulated signal to determine the similarity of each type of feature point; based on the similarity of each type of feature point, determining the similarity between the time-delay aligned waveform recording signal and the simulated signal in the feature domain, i.e., the feature point similarity.
[0085] The following examples use multiple types of feature points, including peak points, zero-crossing points, and abrupt change points.
[0086] Peak point set: Points in the signal where the first derivative is zero and the second derivative is less than zero. For discrete signals, the derivative is approximated using difference, and the peak positions are refined to sub-sampling accuracy using cubic spline interpolation. The peak point set of the recorded signal is denoted as: The set of peak points of the simulated signal is denoted as: Zero-crossing set: Extracts the moments when the signs of adjacent sampling points of the signal change. If... If the zero-crossing point is zero, then a zero-crossing point exists. The zero-crossing time is refined using linear interpolation. The set of zero-crossing points of the recorded signal is denoted as […]. The set of zero-crossing points of the simulated signal is denoted as .
[0087] Set of abrupt change points: Points where the absolute value of the second-order difference of the extracted signal exceeds an adaptive threshold. The absolute value of the second-order difference of the recorded signal is defined. Adaptive threshold It can be determined based on the statistical properties of the second-order difference of the signal (e.g., the mean plus twice the standard deviation). The set of abrupt changes in the recorded signal is denoted as: The set of abrupt change points in the simulated signal is denoted as... .
[0088] For each type of feature point, a bidirectional nearest neighbor matching algorithm is used to pair feature points of the recorded signal and the simulated signal. The matching process is described below using peak points as an example.
[0089] For each peak point in the recorded signal, find the time nearest point in the set of peak points in the simulated signal. If the time difference is less than a preset time difference threshold, the signal is considered the nearest peak point. If the peak points in the simulated signal are found, the closest point in time is found in the set of peak points in the recorded signal. If the time difference is less than a preset time difference threshold, the pair is considered a candidate match. If they are matched, then they constitute the second candidate matching pair.
[0090] In one example, the time difference is less than a preset time difference threshold. It can be represented as: in, yes The point that is closest in time to the peak points of the simulated signal. yes The point that is temporally nearest to the peak points of the recorded signal. In one example, .
[0091] The candidate matching pairs that are common to the first and second candidate matching pairs are taken as the target matching pairs.
[0092] After completing the matching process as described above, the similarity of each type of feature point can be determined.
[0093] similarity of peak points Similarity at zero crossings and the similarity of mutation points The calculation formulas are as follows: in, , represents the power frequency cycle. The mean of the absolute values of the time differences between successfully matched zero-crossing pairs. , , These represent the bidirectional matching rates of the three types of feature points. This represents the average deviation of the peak amplitude. The mean of the absolute values of the time differences between successfully matched mutation point pairs. This is the attenuation coefficient, the default value. =2.0, This represents the fundamental peak value of the recorded waveform signal.
[0094] Mean peak amplitude deviation It is used to characterize the average difference in amplitude between the recorded signal and the simulated signal at the peak point of a successful match.
[0095] The following will , , Abbreviated as , It refers to the proportion of successfully matched logs to the total number of such feature points in the recorded or simulated signal.
[0096] In one example, the matching rate It can be represented as: in, For the number of successfully matched pairs, , These represent the total number of such feature points in the recorded signal and the difficult signal, respectively.
[0097] The similarity of peak points was determined using the above method. Similarity at zero crossings Similarity to mutation points Then, the feature point similarity can be determined using the following formula. .
[0098] S103 performs weighted fusion of similarity across multiple dimensions to obtain the similarity between the recorded signal and the simulated signal.
[0099] Taking the similarity across multiple dimensions, including time-domain similarity, frequency-domain similarity, and feature point similarity, as an example, the similarity between the recorded signal and the simulated signal can be obtained by weighted fusion of the time-domain similarity, frequency-domain similarity, and feature point similarity.
[0100] The above technical solution first eliminates the timing deviation caused by time drift and asynchronous sampling between the recorded and simulated signals by relying on time delay alignment processing. It avoids the defects of traditional point-by-point Euclidean distance and RMSE algorithm, which suffer from serious distortion in similarity calculation due to time axis misalignment. It solves the pre-technical pain point of timing error interfering with waveform morphology evaluation. On this basis, it quantifies the similarity performance of the two types of signals in each dimension from multiple dimensions of time domain, frequency domain, and feature domain. It breaks through the limitation of a single index that can only represent local waveform information. Then, through weighted fusion and integration of the similarity weights of each dimension, it finally outputs a comprehensive similarity result that fits the actual waveform morphology. It not only effectively avoids the inherent drawback of traditional algorithms being highly sensitive to time errors, but also improves the similarity evaluation dimensions from multiple information levels, accurately achieving the core evaluation purpose of quantifying the accuracy of simulation models and verifying the reproduction of fault waveforms.
[0101] In one example, determining the similarity of the time-delay aligned waveform recording signal and the simulated signal in multiple dimensions may include: adaptively segmenting the time-delay aligned waveform recording signal and the simulated signal to obtain multiple time segments; determining the similarity of the waveform recording signal and the simulated signal in each dimension within each time segment; and determining the segment similarity corresponding to each time segment based on the similarity corresponding to each dimension within that time segment.
[0102] Based on this, the above-mentioned weighted fusion of similarities across multiple dimensions to obtain the similarity between the recorded signal and the simulated signal can be replaced by: weighted fusion of the segmented similarities corresponding to each time segment to obtain the similarity between the recorded signal and the simulated signal.
[0103] In one example, multiple time-series segments may include a pre-fault steady-state segment, a fault transient segment, and a post-fault recovery segment. The pre-fault steady-state segment refers to the time period before the fault occurs, the fault transient segment refers to the time period from the start of the fault to the end of the fault, and the post-fault recovery segment refers to the time period after the fault ends. Accordingly, the above-mentioned adaptive segmentation of the time-delay aligned waveform and simulation signals to obtain multiple time-series segments can be implemented as follows: based on the short-time energy function and the first-order differential rate of change, the fault start time and the fault recovery time are determined; based on the fault start time and the fault recovery time, the time-delay aligned waveform and simulation signals are segmented to obtain the pre-fault steady-state segment, the fault transient segment, and the post-fault recovery segment.
[0104] Short-time energy function It can be represented as: Among them, window length That is, the number of sampling points in one power frequency cycle. Sampling frequency, It is the power frequency.
[0105] First-order difference rate of change It can be represented as: Fault start time satisfy: .in, It represents the standard deviation of the short-time energy sequence within the steady-state period before the fault.
[0106] Fault recovery time satisfy: .in, Short-time energy during the steady-state period before the fault The mean.
[0107] Based on the detected fault start time and fault recovery time The time-delay aligned waveform recording and simulation signals can be divided into: the steady-state segment before the fault. Fault transient segment [ , -1] and post-fault recovery segment[ ,1).
[0108] In one example, the above method of determining the segment similarity of each time series segment based on the similarity of each dimension in that time series segment can be specifically implemented as follows: determine the dimension weight of each dimension, and for each time series segment, perform weighted fusion of the similarities under multiple dimensions in that time series segment according to the dimension weight of each dimension to obtain the segment similarity of each time series segment.
[0109] In one example, determining the dimensional weight of each dimension can be implemented by: determining the information entropy of each dimension in each time series segment, where information entropy characterizes the discriminative power of each dimension across different time series segments; and determining the dimensional weight of each dimension based on its information entropy. Information entropy and dimensional weight are negatively correlated.
[0110] After determining the segmental similarity of the recorded and simulated signals in each dimension within each time series segment, a reasonable weight needs to be assigned to each dimension to reflect its importance in distinguishing different time series segments. Specifically, if the similarity distribution of a certain dimension differs significantly across different time series segments—that is, if the dimension is significantly higher or lower in a particular time series segment—it indicates that the dimension has a stronger discriminative ability to distinguish different time series segments and should be given a greater weight. Conversely, if the performance of a certain dimension is almost consistent across all time series segments, its contribution to the final fusion should be reduced. Information entropy is an effective tool for measuring this distributional difference.
[0111] The following explanation uses multiple dimensions, including the time domain, frequency domain, and feature domain, as examples. Assume that after adaptive segmentation, a total of... A time sequence segment, segment index For each paragraph It is possible to calculate their similarity in three dimensions: temporal similarity. Frequency domain similarity Feature point similarity , forming paragraphs The three-dimensional similarity vector on: First, within each time series segment, the similarity of each dimension is normalized to construct the probability distribution of that time series segment across each dimension. For each dimension... Its normalized probability in the i-th time segment It can be represented as: Where d' is a dummy variable for summation, and d' ∈ {time, freq, feat} means summing over three dimensions. This indicates traversing three dimensions; therefore, for the i-th time series segment, .
[0112] Subsequently, for each dimension The information entropy of the sequence across all time periods was calculated using the Shannon entropy formula. : in, This is used to avoid the logarithm being zero. The above formula uses Shannon entropy with the natural logarithm (ln) as the base, where the maximum value of the entropy is ln(M).
[0113] Information entropy The smaller the value, the higher the probability distribution of dimension d across all time segments. The more unbalanced the information entropy, meaning that this dimension occupies a high proportion only in a few time segments, the higher its distinguishability between different time segments; conversely, the lower its information entropy. The larger the value, the more evenly the probability distribution of dimension d is across all time series segments, and the weaker its distinguishing ability.
[0114] Based on the negative correlation between entropy and discriminative power, an inverse weighting strategy can be adopted, and the dimension weights can be determined using the following formula. .
[0115] In one example, assuming the information entropy of each dimension is equal to the maximum entropy ln(M), the above method for determining dimension weights is used. When the molecule is 0, it can be set to 0. .
[0116] Obtain dimensional weights Then, the segment similarity of each time sequence segment can be determined using the following formula. : After obtaining the segment similarity corresponding to each time segment through the above method, the segment similarity corresponding to each time segment can be weighted and fused to obtain the similarity between the recorded signal and the simulated signal.
[0117] Considering the different importance of different time segments in fault analysis, as well as the impact of the length of the time segments, in one example, the segment similarity corresponding to each time segment can be weighted and fused based on the weight of each time segment and the number of sampling points in each time segment to obtain the similarity between the recorded signal and the simulated signal.
[0118] In one example, the weight of the fault transient segment is greater than the weight of the post-fault recovery segment, and the weight of the post-fault recovery segment is greater than the weight of the pre-fault steady-state segment. For example, the weight of the fault transient segment can be 2.0, the weight of the post-fault recovery segment can be 1.5, and the weight of the pre-fault steady-state segment can be 1.0.
[0119] In one example, the similarity between the recorded signal and the simulated signal can be determined using the following formula. : in, This represents the weight of the i-th time series segment. This represents the number of sampling points in the i-th time segment.
[0120] In one example, the recorded signal and the simulated signal may contain multiple channels. The above method may further include: determining the similarity between the recorded signal and the simulated signal in each channel; determining the channel weight for each channel based on the signal quality index and fault correlation index of that channel; and finally, performing weighted fusion of the similarity between the recorded signal and the simulated signal in each channel based on the channel weight of each channel.
[0121] The method for determining the similarity between the recorded signal and the simulated signal in each channel can be referred to the above. Figure 1 The method for determining the similarity between the recorded signal and the simulated signal, as shown, will not be elaborated here.
[0122] The signal quality index is used to evaluate the reliability of the recorded signal in that channel. For the c-th channel, its signal quality index can be determined by the following formula: in, This represents the noise standard deviation of channel c in the steady-state phase before the fault. Indicates the fundamental frequency amplitude. and These are binary test indices for unsaturated and unclipping conditions, respectively, with 1 indicating normal and 0 indicating abnormal. or When it is 0 =0, the channel weight is zero, meaning the saturated or clipped channel does not participate in the overall scoring at all, thus excluding contamination from severely distorted channels. If <epsA (Default 0.01 pu), then confirm directly. =0, to avoid division by zero exception.
[0123] The fault correlation index is used to assess the degree of association between the channel and the current fault type. The range of values is , respectively corresponding to the three-phase current ( ) and three-phase voltage ( The fault relevance index can be determined based on the type of fault currently occurring and the physical quantity (current or voltage) associated with the channel. Fault types can include single-phase ground faults, two-phase short-circuit faults, and three-phase ground faults. Specifically: For single-phase ground faults, taking phase A ground fault as an example, the weight of the faulty phase (phase A) in the current path is 1.0, that is... The weight of the non-faulty phases (phases B and C) is 0.3, that is... The voltage channel weight is 0.5, that is... .
[0124] For a two-phase short-circuit fault, taking a short circuit between phases A and B as an example, for the current path, the weight of the two faulty phases (A and B) is 1.0, that is... The weight of the non-faulty phase (C phase) is 0.3, that is... The voltage channel weight is 0.6, that is... .
[0125] For a three-phase short-circuit fault, the weight of the three faulty phases (A, B, and C phases) in the current path is 1.0, i.e. The voltage channel weight is 0.8, that is... .
[0126] For other fault types or unlisted channel components (such as zero-sequence and negative-sequence components), the Fortescue transform can be used to decompose the three-phase current. For example, for the zero-sequence component, the formula can be used. To decompose the three-phase current, the negative sequence component can be represented by the formula... in, Decompose the three-phase current.
[0127] The signal quality index of each channel is obtained through the above method. Fault correlation index After that, the Channel weights It can be represented as: Channel weight This reflects both the reliability of the channel's own waveform recording signal and the channel's sensitivity to the current type of fault.
[0128] Finally, based on the channel weights, the similarity between the recorded signal and the simulated signal in each channel can be weighted and fused using the following formula to obtain the comprehensive similarity between the recorded signal and the simulated signal. .
[0129] Saturation or clipping occurs in all channels, resulting in =0 can output an invalid flag and stop the evaluation, prompting engineers to check the quality of the waveform data.
[0130] In one example, the range of the overall similarity between the recorded signal and the simulated signal is: ,Right now Based on preset similarity thresholds, three levels of model accuracy can be defined, each matched with corresponding engineering judgment criteria and handling schemes. Specifically, if the overall similarity between the recorded signal and the simulated signal is greater than or equal to the first similarity threshold, it can be determined that the recorded signal and the simulated signal are highly consistent, the simulation model parameters are highly accurate, and it can be directly used for engineering verification. The corresponding handling method is to directly adopt the model and archive and retain the confidence score. If the overall similarity between the recorded signal and the simulated signal is less than the first similarity threshold but greater than or equal to the second similarity threshold, it can be determined that the recorded signal and the simulated signal are basically consistent, indicating that the simulation model only has local parameter deviations. It is necessary to rely on the waveform difference location report to check item by item and correct the relevant parameters accordingly. If the overall similarity between the recorded signal and the simulated signal is less than the second similarity threshold, it can be determined that the recorded signal and the simulated signal are significantly different, the simulation results deviate too much from the measured recorded signal, and a full-dimensional parameter re-verification must be carried out, and the model must be rebuilt to complete the simulation verification.
[0131] The first similarity threshold is greater than the second similarity threshold. In one example, the first similarity threshold can be 0.9 and the second similarity threshold can be 0.75.
[0132] In one example, a resampling method can be used to calculate the similarity between the recorded signal and the simulated signal multiple times to obtain a confidence interval for the similarity. Based on the width of the confidence interval, a reliability index is calculated. The reliability index is used to characterize the credibility of the similarity.
[0133] Similarity obtained from a single calculation Due to factors such as signal noise and segmented randomness, statistical uncertainty exists. To quantify this uncertainty and assess the reliability of the score, a nonparametric bootstrap resampling method can be used. The core idea is to construct multiple pseudo-sample sets by resampling the original signal sample multiple times with replacement, calculate the similarity of each pseudo-sample set, and then extract confidence intervals and reliability metrics from the distribution of these repeated results.
[0134] Specifically, let the entire multi-channel fusion scoring function be... For each channel signal, resampling with replacement can be performed at the segmented granularity to generate the first... The sample set of secondary resampling And calculate the corresponding comprehensive similarity: Among them, the number of resampling times It can take 1000 values to ensure the stability of the statistical estimate. Each resampling result can form a Bootstrap distribution.
[0135] Then, based on the Bootstrap distribution, a 95% confidence interval for the overall similarity can be determined: in, and These are the 2.5% and 97.5% quantiles of the Bootstrap distribution, respectively. The width of the confidence interval can be defined as: This width directly reflects the uncertainty of the scoring results: the smaller the width, the more concentrated the overall similarity obtained from multiple resamplings, and the more stable and reliable the score. Empirically, when... When similarity scores are high, they can be considered to have high statistical reliability. Therefore, a reliability index can be defined as: The index ranges from [value range]. The closer the similarity is to 1, the more reliable the similarity estimation result is, and it can be used as an auxiliary criterion for decision-making or subsequent analysis.
[0136] In one example, time-frequency transformation can be performed on the recorded signal and the simulated signal respectively to obtain the time-frequency distribution of the recorded signal and the time-frequency distribution of the simulated signal. Based on the difference between the time-frequency distribution of the recorded signal and the time-frequency distribution of the simulated signal, a difference heatmap is generated. The difference heatmap is used to identify the deviation area between the recorded signal and the simulated signal in the time-frequency domain.
[0137] To visually represent the time-frequency distribution differences between the recorded and simulated waveforms, a Short-Time Fourier Transform (STFT) can be used to perform time-frequency analysis on both the recorded and simulated signals. For the recorded signal... and simulated signals Its STFT is defined as follows: in, It is a Hanning window, with a length of... This corresponds to 250 sampling points at a sampling rate of 4800 Hz, with a window shift step size of [missing information]. This transformation allows us to obtain the energy distribution of the two signals in the time-frequency plane.
[0138] Based on the power spectra of the recorded and simulated signals, the time-frequency difference heatmap is defined in logarithmic normalization form as follows: This index calculates the recorded signal and the simulated signal at each time-frequency point. The absolute difference in the power spectrum is calculated and normalized to the maximum power spectrum value of the recorded signal, thereby eliminating the influence of dimensions and facilitating comparison of the degree of difference across time and frequency.
[0139] To highlight time-frequency regions with significant differences, a threshold can be set. and to satisfy The areas are highlighted. These highlighted areas represent the intervals where the two signals deviate significantly in the time and frequency domains. Engineers can use this information to quickly locate the deficiencies of the simulation model in specific time periods and frequency bands, providing an intuitive basis for model correction.
[0140] Figure 2 This is a schematic diagram of the structure of a similarity calculation system for recorded signals and simulated signals provided in an embodiment of this application, with reference to... Figure 2 As shown, the similarity calculation system for recorded signals and simulated signals may include a data preprocessing module, a time alignment module, an adaptive segmentation module, a multi-dimensional similarity calculation module, a multi-channel weighted fusion module, a difference localization and visualization module, and a comprehensive scoring and confidence assessment module.
[0141] The data preprocessing module preprocesses the recorded and simulated signals. The time alignment module performs time delay alignment on the preprocessed DC system recorded and simulated signals. The adaptive segmentation module adaptively segments the time-delay aligned recorded and simulated signals into multiple time segments. The multi-dimensional similarity calculation module determines the similarity between the recorded and simulated signals in each dimension within each time segment, and, based on the similarity in each dimension, determines the segment similarity of each time segment. The multi-channel weighted fusion module performs weighted fusion of the similarity between the recorded and simulated signals across all channels based on their channel weights. The difference localization and visualization module generates a difference heatmap and outputs a structured report of deviations in each dimension, assisting engineers in optimizing simulation model parameters. The comprehensive scoring and confidence assessment module calculates a reliability index, enhancing the credibility of the assessment results.
[0142] The following will provide a detailed description of a method for calculating the similarity between recorded and simulated signals of a DC system, based on the aforementioned embodiments. Figure 3 A flowchart illustrating a method for calculating the similarity between recorded and simulated signals of a DC system, as provided in an embodiment of this application, is shown below. Figure 3 As shown, the method includes: S301 performs preprocessing on the recorded and simulated signals of the DC system.
[0143] S302 performs time delay alignment processing on the preprocessed DC system waveform recording signal and simulation signal using a normalized cross-correlation function, dynamic time warping algorithm, and Sinc interpolation method.
[0144] S303 adaptively segments the time-delay aligned waveform and simulation signals to obtain multiple timing segments.
[0145] S304, in each time segment, determine the time-domain similarity, frequency-domain similarity, and feature point similarity between the recorded signal and the simulated signal.
[0146] S305, determine the dimension weight of each dimension based on the information entropy of each dimension.
[0147] S306: For each time series segment, based on the dimensional weight of each dimension, the similarity under multiple dimensions in the time series segment is weighted and fused to obtain the segment similarity corresponding to each time series segment.
[0148] S307, weighted fusion of the segment similarity corresponding to each time segment to obtain the similarity between the recorded signal and the simulated signal.
[0149] S308, repeat the above steps repeatedly to obtain the similarity between the recorded signal and the simulated signal for each channel.
[0150] S309: For each channel, determine the channel weight based on the channel's signal quality index and fault correlation index.
[0151] S310, based on the channel weights of each channel, performs weighted fusion of the similarity between the recorded signal and the simulated signal under each channel to obtain the comprehensive similarity between the recorded signal and the simulated signal under multiple channels.
[0152] S311 generates a difference heatmap based on the difference between the time-frequency distribution of the recorded signal and the time-frequency distribution of the simulated signal.
[0153] S311 outputs a differential heatmap.
[0154] The following steps, using the waveform recording signal of a single-phase ground fault on a 220kV transmission line and the simulation signal output by CloudPSS as an example, verify the calculation process of this method.
[0155] Step 1: Receive the COMTRADE file from the waveform recorder, i.e., the waveform signal, with a sampling rate of 4800Hz and a recording duration of 200ms. Also receive the CSV file output by CloudPSS simulation, i.e., the simulation signal, with a simulation step size of 50μs, which is resampled and aligned to 4800Hz.
[0156] Step 2: Calculate the time delay offset of the simulated signal relative to the recorded signal using the normalized cross-correlation function to obtain the offset at the integer sampling level. Each sampling point (3.125 ms) is used. Based on this, an interpolation method (such as Sinc interpolation) is employed to refine the subsampling precision of the cross-correlation peaks, thus determining the final time delay offset. This completes the time delay alignment between the recorded signal and the simulated signal.
[0157] Step 3: Divide the time-delay aligned waveform and simulation signal into three segments: a steady-state segment before the fault (0-50ms), with L1=240 sampling points and λ1=1.0 weight; a transient segment after the fault (50-120ms), with L2=336 sampling points and λ2=2.0 weight; and a recovery segment after the fault (120-200ms), with L3=384 sampling points and λ3=1.5 weight.
[0158] Step 4: The information entropy corresponding to the time domain, frequency domain, and feature domain is... The inverse entropy ratios for each dimension are calculated using the formula: (1-0.64 / 1.099)=0.418, (1-0.71 / 1.099)=0.354, (1-0.85 / 1.099)=0.227. The normalized dimensional weights for the time domain, frequency domain, and feature domain are... .
[0159] Step 5: Within each time series segment, determine the similarity across each dimension. Pre-fault steady-state segment: Fault transient phase: =0.969, =0.966, =0.921, post-fault recovery segment: Among them, the first time-domain index of the fault transient phase. Second time-domain indicator Third time-domain indicator Weighted spectral correlation coefficient Fundamental frequency amplitude deviation rate The matching rate at the peak point is 0.94, and the matching rate at the zero-crossing point is 0.97.
[0160] Step 6: Taking phase A current as an example, calculate the current according to the dimensional weights w of each dimension. time =0.42, w freq =0.35, w feat =0.23) Synthesize each segment: S_seg(1)=0.42×0.990+0.35×0.988+0.23×0.970=0.985 S_seg(2)=0.42×0.969+0.35×0.966+0.23×0.921=0.957 S_seg(3)=0.42×0.976+0.35×0.973+0.23×0.942=0.968 Therefore, the single-channel similarity is: S channel (I A =(1.0×240×0.985+2.0×336×0.957+1.5×384×0.968) / (240+672+576)=(236.4+643.1+557.6) / 1488=1437.6 / 1488=0.966, the remaining channels (I B I C U A U B U C Similarly, after calculation, multi-channel weighted fusion is performed.
[0161] Step 7: Multi-channel integrated similarity: Confidence interval = [0.951, 0.972], reliability index Accuracy rating: "Highly accurate" Step 8: The differential thermal map shows that the 150Hz (3rd harmonic) component of the B-phase current has an energy deviation in the 65~80ms interval of the fault transient period. =0.22>0.15), indicating that the transformer core saturation parameters in the simulation model may need to be corrected.
[0162] As can be seen from the above technical solution, this application relies on normalized cross-correlation to achieve high-precision time alignment, eliminate waveform sampling drift and time delay deviation, and ensure the accuracy of time-domain similarity calculation from the source. On this basis, it conducts similarity evaluation from multiple dimensions such as time domain, frequency domain, and feature domain, comprehensively covering waveform contour morphology, harmonic distribution law and key fault feature information. Then, it reduces noise and abnormal signal interference by segmenting and differentiating steady-state and transient states. At the same time, it uses time-frequency difference heatmap and feature deviation report to intuitively display the location of various deviation points, which is convenient for engineers to locate model defects. Finally, it adaptively configures the fusion weight of each channel based on the correlation between signal quality and fault, and outputs a comprehensive similarity score that can objectively represent the overall accuracy of simulation. This improves the quantitative reliability of waveform similarity measurement and enhances the engineering practicality of the solution.
[0163] The following describes the similarity calculation device for DC system waveform recording signals and simulated signals provided in this application. The similarity calculation device for DC system waveform recording signals and simulated signals described below can be referred to in correspondence with the similarity calculation method for DC system waveform recording signals and simulated signals described above.
[0164] Figure 4 A schematic diagram of a similarity calculation device for DC system waveform recording signals and simulated signals provided in an embodiment of this application is shown below. Figure 4 As shown, the similarity calculation device for the DC system recorded signal and simulated signal includes: Processing module 401 is used to perform time delay alignment processing on the preprocessed DC system waveform recording signal and simulation signal; The determination module 402 is used to determine the similarity between the time-delay aligned recorded signal and the simulated signal in multiple dimensions; the multiple dimensions include multiple dimensions in the time domain, frequency domain, or feature domain. The fusion module 403 is used to perform weighted fusion of similarity under multiple dimensions to obtain the similarity between the recorded signal and the simulated signal.
[0165] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call logic instructions in the memory 530 to execute a similarity calculation method between the DC system recorded signal and the simulated signal, the method including: The preprocessed DC system waveform recording signal and simulation signal are subjected to time delay alignment processing. The similarity between the time delay aligned waveform recording signal and simulation signal in multiple dimensions is determined. Multiple dimensions include multiple ones in the time domain, frequency domain or feature domain. The similarity in multiple dimensions is weighted and fused to obtain the similarity between the waveform recording signal and the simulation signal.
[0166] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0167] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the similarity calculation method for DC system waveform recording signals and simulation signals provided by the above methods. The method includes: The preprocessed DC system waveform recording signal and simulation signal are subjected to time delay alignment processing. The similarity between the time delay aligned waveform recording signal and simulation signal in multiple dimensions is determined. Multiple dimensions include multiple ones in the time domain, frequency domain or feature domain. The similarity in multiple dimensions is weighted and fused to obtain the similarity between the waveform recording signal and the simulation signal.
[0168] Furthermore, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for calculating the similarity between DC system waveform recording signals and simulated signals provided by the methods described above. This method includes: The preprocessed DC system waveform recording signal and simulation signal are subjected to time delay alignment processing. The similarity between the time delay aligned waveform recording signal and simulation signal in multiple dimensions is determined. Multiple dimensions include multiple ones in the time domain, frequency domain or feature domain. The similarity in multiple dimensions is weighted and fused to obtain the similarity between the waveform recording signal and the simulation signal.
[0169] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0170] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for calculating the similarity between recorded and simulated signals of a DC system, characterized in that, The method includes: Time delay alignment is performed on the preprocessed waveform recording signal and simulation signal of the DC system. The similarity between the time-delay aligned recorded signal and the simulated signal is determined in multiple dimensions; the multiple dimensions include multiple components in the time domain, frequency domain, or feature domain. The similarity across the multiple dimensions is weighted and fused to obtain the similarity between the recorded signal and the simulated signal.
2. The method according to claim 1, characterized in that, The time delay alignment processing of the preprocessed DC system waveform recording signal and simulation signal includes: The first time delay offset between the recorded signal and the simulated signal is determined by a normalized cross-correlation function; Based on the first time delay offset, an interpolation method is used to perform subsampling precision translation compensation on the simulated signal.
3. The method according to claim 2, characterized in that, The method further includes: If the maximum value of the normalized cross-correlation function is less than a preset alignment threshold, the first time delay offset between the recorded signal and the simulated signal is determined by the zero-crossing alignment method.
4. The method according to any one of claims 1-3, characterized in that, The step of determining the similarity between the time-delay aligned recorded signal and the simulated signal in multiple dimensions includes: The time-delay aligned waveform signal and the simulated signal are adaptively segmented to obtain multiple time segments; In each of the time segments, the similarity between the recorded signal and the simulated signal is determined in each of the dimensions; For each time series segment, the segment similarity corresponding to each dimension in the time series segment is determined; The weighted fusion of similarities across multiple dimensions to obtain the similarity between the recorded signal and the simulated signal includes: The similarity of each segment corresponding to the time sequence segment is weighted and fused to obtain the similarity between the recorded signal and the simulated signal.
5. The method according to claim 4, characterized in that, The multiple time segments include a pre-fault steady-state segment, a fault transient segment, and a post-fault recovery segment; the pre-fault steady-state segment refers to the time period before the fault occurs, the fault transient segment refers to the time period from the start of the fault to the end of the fault, and the post-fault recovery segment refers to the time period after the fault ends. The time-delay aligned recorded signal and simulated signal are adaptively segmented to obtain multiple time segments, including: Based on the short-time energy function and the first-order differential rate of change, the fault initiation time and the fault recovery time are determined. Based on the fault initiation time and the fault recovery time, the time-delay aligned waveform signal and the simulated signal are segmented to obtain the pre-fault steady-state segment, the fault transient segment, and the post-fault recovery segment.
6. The method according to claim 4, characterized in that, For each time series segment, determining the segment similarity corresponding to the time series segment based on the similarity corresponding to each dimension in the time series segment includes: Determine the dimensional weight for each of the aforementioned dimensions; For each time series segment, the similarity under multiple dimensions in the time series segment is weighted and fused according to the dimension weight of each dimension to obtain the segment similarity corresponding to each time series segment.
7. The method according to claim 6, characterized in that, Determining the dimension weight for each dimension includes: Determine the information entropy of each dimension in each time series segment, wherein the information entropy is used to characterize the distinguishability of the dimension between different time series segments; The dimension weight of each dimension is determined based on the information entropy of each dimension; the information entropy is negatively correlated with the dimension weight.
8. The method according to any one of claims 1-3, characterized in that, The recorded waveform signal and the simulated signal contain multiple channels, and the method further includes: Determine the similarity between the recorded waveform signal and the simulated signal in each of the channels; For each of the aforementioned channels, a channel weight is determined based on the channel's signal quality index and fault correlation index; the signal quality index is used to evaluate the reliability of the recorded waveform signal under the channel; the fault correlation index is used to evaluate the degree of correlation between the channel and the current fault type. Based on the channel weights of each channel, the similarity between the recorded signal and the simulated signal in each channel is weighted and fused.
9. The method according to any one of claims 1-3, characterized in that, The method further includes: A resampling method is used to calculate the similarity between the recorded signal and the simulated signal multiple times to obtain the confidence interval of the similarity. The reliability index is calculated based on the width of the confidence interval; the reliability index is used to characterize the credibility of the similarity.
10. The method according to any one of claims 1-3, characterized in that, The method further includes: The recorded waveform signal and the simulated signal are subjected to time-frequency transformation respectively to obtain the time-frequency distribution of the recorded waveform signal and the time-frequency distribution of the simulated signal; A difference heatmap is generated based on the difference between the time-frequency distribution of the recorded signal and the time-frequency distribution of the simulated signal; the difference heatmap is used to identify the deviation region between the recorded signal and the simulated signal in the time-frequency domain.