Methods for Evaluating the Consistency of Virtual and Real Data in Electromechanical Systems
By determining the phase error, correcting the phase error, and identifying the local phase error, combined with dynamic time warping, the problem of low efficiency in evaluating the consistency of virtual and real data in electromechanical systems is solved, and a faster and more accurate evaluation is achieved.
Patent Information
- Application Number
- CN202510062821.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-01-15
AI Technical Summary
Existing technologies have low computational efficiency when evaluating the consistency between simulation models of electromechanical systems and actual data of real electromechanical systems. This is especially true when the data sequence is long or when multiple performance indicators need to be evaluated, as calculating phase error, amplitude error, and shape error one by one is inefficient.
By determining the phase error between the simulated data sequence and the measured data sequence, phase error correction and local phase error identification are performed. Combined with dynamic time warping, amplitude error and shape error are calculated, and finally, consistency evaluation results are obtained based on these errors.
This improves the computational efficiency and accuracy of consistency assessment between electromechanical system simulation models and actual electromechanical systems, reduces the computational complexity of dynamic time warping, and allows for rapid and accurate acquisition of consistency assessment results.
Smart Images

Figure CN119962220B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of simulation model evaluation technology, and in particular to a method for evaluating the consistency of virtual and real data in electromechanical systems. Background Technology
[0002] Electromechanical systems are widely used in manufacturing, automotive, aerospace, medical equipment, consumer electronics, and energy systems. They represent a cross-disciplinary integration of mechanical engineering, electronic engineering, control engineering, computer science, and information technology, characterized by high integration. Due to this high integration, functional and performance testing of electromechanical systems often requires the use of simulation models. Therefore, establishing accurate simulation models for electromechanical systems is essential.
[0003] The essence of an electromechanical system simulation model is an approximation of the actual electromechanical system. To establish an accurate electromechanical system simulation model, the consistency between the simulation data (i.e., virtual data) output by the simulation model and the measured data (i.e., actual data) output by the actual electromechanical system is usually evaluated first. Although the consistency between the electromechanical system simulation model and the actual electromechanical system can be measured relatively accurately using parameters such as phase error, amplitude error, and shape error, calculating the phase error, amplitude error, and shape error one by one is often computationally inefficient when the simulation data sequence output by the electromechanical system simulation model and the measured data sequence output by the actual electromechanical system are long, or when it is necessary to evaluate the consistency of multiple performance indicators between the electromechanical system simulation model and the actual electromechanical system. Summary of the Invention
[0004] This invention provides a method for evaluating the consistency of virtual and real data in electromechanical systems, in order to solve the problem of low computational efficiency when evaluating the consistency of virtual and real data in electromechanical systems.
[0005] In a first aspect, embodiments of the present invention provide a method for evaluating the consistency of virtual and real data in an electromechanical system, comprising:
[0006] The phase error is determined based on the correlation coefficient between the simulation data sequence of the electromechanical system simulation model and the actual measured data sequence of the corresponding electromechanical system at different time shift steps.
[0007] Based on the phase error, the simulated data sequence and the measured data sequence are respectively corrected for phase error to obtain the first simulated data sequence and the first measured data sequence.
[0008] Local phase error identification is performed on the first simulated data sequence and the first measured data sequence to obtain the local phase error region of the first simulated data sequence and the first measured data sequence;
[0009] Within each local phase error region, the first simulated data sequence and the first measured data sequence are dynamically time-normalized, and the amplitude error between the simulated data sequence and the measured data sequence is calculated based on the normalization result.
[0010] Based on the first simulation data sequence and the first measured data sequence, the simulation slope data sequence of the first simulation data sequence and the measured slope data sequence of the first measured data sequence are obtained.
[0011] Dynamic time warping is performed on the simulated slope data sequence and the measured slope data sequence, and the shape error between the simulated data sequence and the measured data sequence is calculated based on the warping result;
[0012] The consistency evaluation results between the electromechanical system simulation model and the actual electromechanical system are obtained based on the phase error, the amplitude error, and the shape error.
[0013] In one possible implementation, local phase error identification is performed on the first simulated data sequence and the first measured data sequence to obtain the local phase error regions of the first simulated data sequence and the first measured data sequence, including:
[0014] Calculate the distance between the data point at each moment in the first simulated data sequence and the corresponding data point in the first measured data sequence, and calculate the average distance based on the distance.
[0015] Each of the distances is compared with the average distance, and the local phase error regions of the first simulated data sequence and the first measured data sequence are obtained based on the comparison results.
[0016] In one possible implementation, each of the distances is compared with the average distance, and the local phase error region of the first simulated data sequence and the first measured data sequence is obtained based on the comparison result, including:
[0017] Each of the distances is compared with the average distance;
[0018] If a certain distance exceeds the preset range of the average distance, a local phase error region is obtained for the first simulated data sequence and the first measured data sequence based on that distance.
[0019] In one possible implementation, if a certain distance exceeds a preset range of the average distance, a local phase error region is obtained based on that distance for the first simulated data sequence and the first measured data sequence, including:
[0020] If a certain distance exceeds the preset range of the average distance, then the time corresponding to that distance is determined as the target time;
[0021] Based on the target time, the first simulated data sequence or the first measured data sequence is time-shifted until the distance between the data point at the target time in the first simulated data sequence and the data point at the target time in the second simulated data sequence after the time shift is within the preset range of the average distance. The current time shift step is recorded as the local phase error step.
[0022] A local phase error region is obtained for the first simulated data sequence and the first measured data sequence based on the target time and the number of local phase error steps.
[0023] In one possible implementation, local phase error identification is performed on the first simulated data sequence and the first measured data sequence to obtain the local phase error regions of the first simulated data sequence and the first measured data sequence, including:
[0024] Extract the simulation data feature points from the first simulation data sequence and the measured data feature points from the first measured data sequence;
[0025] The distance between each simulated data feature point and each measured data feature point is calculated sequentially and denoted as the feature distance.
[0026] The local phase error regions of the first simulated data sequence and the first measured data sequence are obtained based on the respective feature distances.
[0027] In one possible implementation, obtaining the local phase error region of the first simulated data sequence and the first measured data sequence based on each of the said feature distances includes:
[0028] Cluster the feature distances and obtain the number of feature distances contained in each cluster;
[0029] The regions in the first simulated data sequence and the first measured data sequence where the number of clusters is less than a set threshold are defined as the local phase error regions of the first simulated data sequence and the first measured data sequence.
[0030] One possible implementation also includes:
[0031] According to the method for obtaining the phase error, amplitude error and shape error, the phase error, amplitude error and shape error of each simulation data sequence and the corresponding measured data sequence of the actual electromechanical system are obtained under each working condition for each simulation parameter value of the electromechanical system simulation model, and an error matrix is obtained;
[0032] Based on the entropy method, the weight of each error index in the error matrix under each working condition is calculated to obtain a two-dimensional weight coefficient matrix.
[0033] Based on grey relational analysis, the grey relational coefficient of each error index under each working condition in the error matrix is calculated to obtain the grey relational coefficient matrix;
[0034] Multiply the two-dimensional weight coefficient matrix and the gray relational coefficient matrix, and obtain the consistency evaluation results of the electromechanical system simulation model and the actual electromechanical system under various working conditions based on the vector composed of the diagonal elements of the resulting matrix.
[0035] Secondly, embodiments of the present invention provide a device for evaluating the consistency of virtual and real data in an electromechanical system, comprising:
[0036] The first processing module is used to determine the phase error based on the correlation coefficient between the simulation data sequence of the electromechanical system simulation model and the actual measured data sequence of the corresponding electromechanical system at different time shift steps.
[0037] The second processing module is used to perform phase error correction on the simulated data sequence and the measured data sequence based on the phase error, respectively, to obtain a first simulated data sequence and a first measured data sequence.
[0038] The third processing module is used to identify local phase errors in the first simulated data sequence and the first measured data sequence to obtain the local phase error regions of the first simulated data sequence and the first measured data sequence.
[0039] The fourth processing module is used to perform dynamic time warping on the first simulated data sequence and the first measured data sequence in each local phase error region, and calculate the amplitude error between the simulated data sequence and the measured data sequence based on the warping result;
[0040] The fifth processing module is used to obtain the simulated slope data sequence of the first simulated data sequence and the measured slope data sequence of the first measured data sequence based on the first simulated data sequence and the first measured data sequence.
[0041] The sixth processing module is used to perform dynamic time warping on the simulated slope data sequence and the measured slope data sequence, and calculate the shape error between the simulated data sequence and the measured data sequence based on the warping result;
[0042] The consistency evaluation module is used to obtain the consistency evaluation results between the electromechanical system simulation model and the actual electromechanical system based on the phase error, the amplitude error and the shape error.
[0043] Thirdly, embodiments of the present invention provide a terminal, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to perform the steps of the method as described in the first aspect or any possible implementation thereof.
[0044] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in the first aspect or any possible implementation thereof.
[0045] This invention provides a method for evaluating the consistency of virtual and real data in electromechanical systems. The method determines the phase error by using the correlation coefficient between the simulated data sequence of the electromechanical system simulation model and the corresponding measured data sequence of the actual electromechanical system at different time-shift steps. Then, based on the phase error, phase error correction is performed on both the simulated and measured data sequences to obtain a first simulated data sequence and a first measured data sequence. Next, local phase error identification is performed on the first simulated and measured data sequences to obtain local phase error regions. Finally, within each local phase error region, the first... The simulated data sequence and the first measured data sequence are dynamically time-warped, and the amplitude error between the simulated data sequence and the measured data sequence is calculated based on the warping result. The simulated slope data sequence and the measured slope data sequence of the first simulated data sequence are obtained based on the first simulated data sequence and the first measured data sequence. The simulated slope data sequence and the measured slope data sequence are then dynamically time-warped, and the shape error between the simulated data sequence and the measured data sequence is calculated based on the warping result. Thus, the consistency evaluation result between the electromechanical system simulation model and the actual electromechanical system is obtained based on the phase error, amplitude error, and shape error. Local phase error regions that may exist in the first simulated data sequence and the first measured data sequence can be identified first through local phase error identification, thus eliminating the need for dynamic time warping of the entire first simulated data sequence and the first measured data sequence. This reduces the computational complexity of dynamic time warping when calculating the amplitude error, thereby improving computational efficiency and obtaining the consistency evaluation result between the electromechanical system simulation model and the actual electromechanical system more quickly and accurately. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a flowchart of the method for evaluating the consistency of virtual and real data in electromechanical systems provided in this embodiment of the invention;
[0048] Figure 2 This is a schematic diagram of the electromechanical system virtual-real data consistency evaluation device provided in an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram of the terminal provided in an embodiment of the present invention. Detailed Implementation
[0050] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0051] To make the objectives, technical solutions, and advantages of the present invention clearer, specific embodiments will be described below in conjunction with the accompanying drawings.
[0052] See Figure 1 The flowchart illustrating the implementation of the electromechanical system virtual-real data consistency evaluation method provided in this embodiment of the invention is described in detail below:
[0053] In step 101, the phase error is determined based on the correlation coefficient between the simulation data sequence of the electromechanical system simulation model and the actual measured data sequence of the corresponding electromechanical system at different time shift steps.
[0054] Assumption Represents a simulation model of an electromechanical system. This represents the actual electromechanical system. Both have the same input. In this case, and These represent the simulation data sequence output by the electromechanical system simulation model and the measured data sequence output by the actual electromechanical system, respectively.
[0055] Considering that the dynamic response output in actual electromechanical systems is usually dominated by non-periodic signals, in order to reasonably and effectively perform error analysis on the non-periodic dynamic response curve and measure it from different angles throughout the entire time domain, we consider the phase error, amplitude error, and shape error of the simulation data sequence output by the computer electromechanical system simulation model and the measured data sequence output by the actual electromechanical system.
[0056] Among them, phase error examines the overall time error of the data characteristics of two sets of data. By calculating the phase error, the time alignment problem between simulation data and measured data can be solved.
[0057] For example, a correlation coefficient, such as the Pearson correlation coefficient, can be used to determine the phase error. The simulation data sequence is... The measured data sequence is When, the correlation coefficient ,in, Describing covariance, Indicates variance.
[0058] Because high-frequency components may appear in the response curve, directly calculating the correlation coefficient may be inaccurate. Therefore, before calculating the correlation coefficient, wavelet transform and filtering can be used to filter out the high-frequency components that may exist in the response curve, thereby extracting the low-frequency approximation coefficients between the simulated data and the measured data. The correlation coefficient is then calculated for these low-frequency approximation coefficients to more accurately reflect the linear relationship between the simulated data and the measured data.
[0059] After determining the method for calculating the correlation coefficient, the phase error is defined as... ,but ,in, and These represent the number of steps the simulation data moves backward and forward over time, respectively. When the number of steps is real-time, the correlation coefficient between the simulated data and the measured data is given. This represents the original length of the original time series. This represents the length of the approximate coefficients after wavelet transform, and the value at which the correlation coefficient is at its maximum is taken as the magnitude of the phase error.
[0060] In step 102, phase error correction is performed on the simulated data sequence and the measured data sequence based on the phase error, respectively, to obtain the first simulated data sequence and the first measured data sequence.
[0061] In step 103, local phase error identification is performed on the first simulated data sequence and the first measured data sequence to obtain the local phase error region of the first simulated data sequence and the first measured data sequence.
[0062] In step 104, within each local phase error region, dynamic time warping is performed on the first simulated data sequence and the first measured data sequence, and the amplitude error between the simulated data sequence and the measured data sequence is calculated based on the warping result.
[0063] In this embodiment, after determining the phase error, the simulated data sequence and the measured data sequence are shifted forward or backward by the corresponding number of steps according to the phase error. This eliminates the overall temporal error between the simulated data sequence and the measured data sequence, thereby obtaining the first simulated data sequence. and the first measured data sequence Although the overall phase error has been eliminated at this point, the first simulation data sequence... and the first measured data sequence There may still be local phase errors.
[0064] To more accurately calculate the amplitude error between the simulated data sequence and the measured data sequence and improve computational efficiency, local phase error identification can be performed on the first simulated data sequence and the first measured data sequence. Then, dynamic time warping can be performed on the identified local phase error region to calculate the amplitude error between the simulated data sequence and the measured data sequence based on the warping result.
[0065] Dynamic time warping (DTW) is an algorithm for measuring the differences between time series. Its core idea is to find an optimal way to align two series by bending and stretching them along the time axis, minimizing the distance between them. This method is particularly effective when dealing with time series of different lengths or speeds. DTW can effectively solve problems such as data loss and sampling frequency mismatch with simulation in the data acquisition process of practical electromechanical systems, and eliminate potential local phase errors, thereby improving the accuracy of subsequent amplitude error calculations.
[0066] For example, when performing dynamic time warping, the distance metric function can be defined as:
[0067] ;
[0068] in, The Euclidean distance between two points in spacetime was quantified in both simulated and measured data after eliminating overall phase error. The Euclidean distance between two points is quantified by the slope. This distance metric function simultaneously considers both the spatiotemporal Euclidean distance and the Euclidean distance by slope. By fusing distance dimensions in different units through a product, the final dynamic programming recursive formula can be obtained as follows:
[0069] ;
[0070] in, To eliminate the overall phase error in the simulation data sequence, the first... The data point and the first data point in the measured data sequence The cumulative distance between data points makes Minimize, that is, obtain the normalized result of dynamic time warping.
[0071] After obtaining the normalization result corresponding to each local phase error region, the first simulation data sequence is processed according to the normalization result corresponding to each local phase error region. and the first measured data sequence Perform a transformation, assuming we obtain and Then the amplitude error between the simulated data sequence and the measured data sequence can be:
[0072] ;
[0073] in, It is a norm, usually a first-order norm.
[0074] In step 105, based on the first simulation data sequence and the first measured data sequence, the simulation slope data sequence of the first simulation data sequence and the measured slope data sequence of the first measured data sequence are obtained.
[0075] In step 106, dynamic time warping is performed on the simulated slope data sequence and the measured slope data sequence, and the shape error between the simulated data sequence and the measured data sequence is calculated based on the warping result.
[0076] In this embodiment, shape error reflects the inconsistency in morphology between the simulated data sequence and the measured data sequence. This is achieved when the first simulated data sequence is obtained. and the first measured data sequence Then, the signal is first-order differentiated to obtain the simulated slope data sequence. and measured slope data sequence Then, for the simulated slope data sequence and measured slope data sequence The error was processed in a similar way to the quantization amplitude error to obtain the normalized result. and Then the shape error between the simulated data sequence and the measured data sequence can be: Similarly, It is a norm, usually a first-order norm.
[0077] In step 107, the consistency evaluation results between the electromechanical system simulation model and the actual electromechanical system are obtained based on the phase error, amplitude error and shape error.
[0078] In this embodiment, after obtaining a set of phase error, amplitude error, and shape error of simulated data sequence and measured data sequence, in order to ensure that the phase error, amplitude error, and shape error are fairly considered in the evaluation, normalization processing can be performed to convert them into dimensionless standard evaluation indicators.
[0079] For example, the normalized phase error can be: .
[0080] in, To revert to the power order, The larger the phase error, the greater its impact on the consistency assessment results. The length of the dynamic response curve. The acceptable proportion of phase error, ranging from .
[0081] For example, the normalized magnitude error can be: .
[0082] in, To revert to the power order, The larger the magnitude error, the greater its impact on the consistency assessment results. This is an acceptable amplitude error.
[0083] For example, the normalized shape error can be: .
[0084] in, To revert to the power order, The larger the shape error, the greater its impact on the consistency assessment results. The shape error is acceptable.
[0085] This invention determines the phase error by using the correlation coefficient between the simulation data sequence of the electromechanical system simulation model and the corresponding measured data sequence of the actual electromechanical system at different time shift steps. Then, based on the phase error, phase error correction is performed on both the simulation data sequence and the measured data sequence to obtain a first simulation data sequence and a first measured data sequence. Next, local phase error identification is performed on the first simulation data sequence and the first measured data sequence to obtain local phase error regions. Within each local phase error region, dynamic time warping is performed on the first simulation data sequence and the first measured data sequence, and the amplitude error between the simulation data sequence and the measured data sequence is calculated based on the warping results. Furthermore, based on the first simulation data sequence and the first measured data sequence, a simulation slope data sequence and a measured slope data sequence are obtained. Dynamic time warping is performed on the simulation slope data sequence and the measured slope data sequence, and the shape error between the simulation data sequence and the measured data sequence is calculated based on the warping results. Thus, based on the phase error, amplitude error, and shape error, a consistency evaluation result between the electromechanical system simulation model and the actual electromechanical system is obtained. Local phase error regions that may exist in the first simulated data sequence and the first measured data sequence can be identified by identifying local phase errors. This eliminates the need for dynamic time warping of the entire first simulated data sequence and the first measured data sequence, thereby reducing the computational complexity of dynamic time warping when calculating amplitude errors, thus improving computational efficiency and obtaining the consistency evaluation results between the electromechanical system simulation model and the actual electromechanical system more quickly and accurately.
[0086] In one embodiment, local phase error identification is performed on the first simulated data sequence and the first measured data sequence to obtain the local phase error region of the first simulated data sequence and the first measured data sequence, which may include:
[0087] Calculate the distance between the data point at each time step in the first simulated data sequence and the corresponding data point in the first measured data sequence, and calculate the average distance based on the distance.
[0088] Each distance is compared with the average distance, and the local phase error region of the first simulated data sequence and the first measured data sequence is obtained based on the comparison results.
[0089] For example, comparing each distance with the average distance and obtaining the local phase error region of the first simulated data sequence and the first measured data sequence based on the comparison results may include:
[0090] Each distance is compared to the average distance.
[0091] If a certain distance exceeds the preset range of the average distance, a local phase error region is obtained based on that distance for the first simulated data sequence and the first measured data sequence.
[0092] For example, if a certain distance exceeds a preset range of the average distance, a local phase error region is obtained based on that distance for the first simulated data sequence and the first measured data sequence, which may include:
[0093] If a certain distance exceeds the preset range of the average distance, then the time corresponding to that distance is determined as the target time.
[0094] The first simulated data sequence or the first measured data sequence is time-shifted based on the target time until the distance between the data point at the target time in the first simulated data sequence and the data point at the target time in the second simulated data sequence is within the preset range of the average distance after the time shift. The current time shift step is recorded as the local phase error step.
[0095] A local phase error region is obtained from the first simulated data sequence and the first measured data sequence based on the target time and the number of local phase error steps.
[0096] In this embodiment, after eliminating the overall phase error, in order to quickly identify the first simulation data sequence... and the first measured data sequence The local errors can be calculated sequentially. and The distance between data points at corresponding times is compared with the preset range of the average distance. If a distance exceeds the preset range of the average distance, for example, if a distance is greater than or less than the preset range of the average distance, it means that the time corresponding to that distance is not fully aligned, that is, there is a local phase error at the time corresponding to that distance. Then, dynamic time warping can be performed on the region where that time is located.
[0097] When it is determined that the time corresponding to a certain distance is not fully aligned, that time can be determined as the target time. Then, the target time in the first simulated data sequence or the first measured data sequence is moved forward or backward to find the number of moves required to make the distance corresponding to the target time within the preset range of the average distance, which is also the number of local phase error steps.
[0098] For example, if in The first simulation data sequence at time 1 and The distance between data points in the first measured data sequence at time point exceeds the preset range of the average distance, so the first simulated data sequence is moved from... After moving the time forward 3 steps, The first simulation data sequence at time 1 and If the distance between data points in the first measured data sequence at time 1 is within a preset range of the average distance, then the first simulated data sequence and the first measured data sequence can be compared. to The data points at each time point are defined as the local phase error region.
[0099] In one embodiment, local phase error identification is performed on the first simulated data sequence and the first measured data sequence to obtain the local phase error region of the first simulated data sequence and the first measured data sequence, which may include:
[0100] Extract the simulation data feature points from the first simulation data sequence and the measured data feature points from the first measured data sequence.
[0101] The distance between each simulated data feature point and each measured data feature point is calculated sequentially and denoted as the feature distance.
[0102] The local phase error regions of the first simulated data sequence and the first measured data sequence are obtained based on each characteristic distance.
[0103] For example, obtaining the local phase error region of the first simulated data sequence and the first measured data sequence based on various feature distances may include:
[0104] Cluster the feature distances and obtain the number of feature distances contained in each cluster.
[0105] The regions in which the distances of each feature in clusters with a number less than a set threshold are defined as the local phase error regions in the first simulated data sequence and the first measured data sequence.
[0106] In this embodiment, in order to more quickly identify the first simulation data sequence and the first measured data sequence To address local errors, we consider extracting simulation data feature points from the first simulation data sequence and measured data feature points from the first measured data sequence, and then calculating the distance between each simulation data feature point and each measured data feature point in turn, denoted as the feature distance, to further reduce the computational load.
[0107] Due to the first simulation data sequence and the first measured data sequence The locations where local errors occur all belong to a feature point in the corresponding data sequence. Therefore, by extracting feature points from both the simulated and measured data, the first simulated data sequence can be selected. and the first measured data sequence Data points that may contain local errors are then further analyzed.
[0108] For example, considering the specificity of feature points exhibiting local phase errors, feature distances can be calculated and clustered to exclude feature points with similar and numerous feature distances. The remaining feature points with similar but fewer feature distances, or feature points with dissimilar feature distances and fewer feature distances, are the outliers exhibiting local phase errors. Thus, the local phase error regions of the first simulated data sequence and the first measured data sequence can be quickly identified with minimal computation.
[0109] In one embodiment, the method for evaluating the consistency of virtual and real data in electromechanical systems may further include:
[0110] Following the method for obtaining phase error, amplitude error, and shape error, the phase error, amplitude error, and shape error of each simulation data sequence and the corresponding measured data sequence of the actual electromechanical system are obtained for each working condition under each simulation parameter value of the electromechanical system simulation model, thus obtaining the error matrix.
[0111] Based on the entropy method, the weight of each error index in the error matrix under each working condition is calculated to obtain a two-dimensional weight coefficient matrix.
[0112] Based on grey relational analysis, the grey relational coefficient of each error index under each working condition in the error matrix is calculated to obtain the grey relational coefficient matrix.
[0113] By multiplying the two-dimensional weight coefficient matrix and the grey relational coefficient matrix, and using the vector composed of the diagonal elements of the resulting matrix, the consistency evaluation results between the electromechanical system simulation model and the actual electromechanical system under various operating conditions can be obtained.
[0114] In this embodiment, considering the possibility that the different error sensitivity of the electromechanical system under different operating conditions may lead to significant differences in the dimensions of the consistency evaluation results, grey relational analysis is introduced under multiple operating conditions to standardize the consistency evaluation results under different operating conditions. This ensures that the evaluation results can truly reflect the consistency between the electromechanical system simulation model and the actual electromechanical system under various operating conditions, thereby improving the accuracy and practicality of the evaluation.
[0115] For example, first construct an error matrix. ,include Each sampling point A time series and its corresponding Each evaluation metric (phase error, amplitude error, shape error) and Data from various operating conditions were collected using Latin hypercube sampling to obtain parameter sample points under different conditions, ensuring broad coverage and high diversity of parameter samples. Then, the evaluation score for each sample point was calculated through simulation, resulting in a three-dimensional evaluation score matrix. This matrix contains all simulation evaluation results under different parameters, time series, and operating conditions, providing basic data for further analysis of the evaluation scores. The calculation is shown in the following formula:
[0116] ;
[0117] ;
[0118] Based on this, to ensure the weighting coefficients of the evaluation indicators under the same working conditions, the entropy method is used according to the evaluation score matrix. Calculate the weight of each evaluation indicator, for A set of time series will yield Each evaluation score corresponds to a weighting coefficient. This step generates a three-dimensional evaluation score matrix. Dimensionality reduction is performed along the sampling point dimension to obtain a two-dimensional weight coefficient matrix. This reflects the importance of each evaluation score under different working conditions. The calculation is as follows:
[0119] ;
[0120] Then, to further evaluate a specific parameter The simulation model's performance scores under various operating conditions were calculated. Grey relational analysis was employed. By calculating the similarity between the evaluation score and the actual hydraulic system output under each operating condition, a grey relational coefficient matrix was obtained. This matrix reflects the correlation strength between various evaluation indicators under different operating conditions. The calculation is as follows:
[0121] ;
[0122] The grey relational coefficient is calculated by comparing the similarity between each indicator and a reference sequence; a higher correlation coefficient indicates a closer similarity between the two sequences. The specific calculation process is as follows:
[0123] (1) Normalize each indicator to ensure that the data are compared on the same order of magnitude.
[0124] (2) Select or construct a reference sequence. In general, the maximum value index is selected as the maximum value; the maximum value of the error assessment score is 1, and the larger the value, the higher the score. Therefore, construct a reference sequence. The reference sequence is provided for subsequent calculations.
[0125] (3) Construct the original matrix ,Depend on , The composition is as shown in the following formula:
[0126] ;
[0127] (4) Calculate the correlation coefficient using a specific grey relational coefficient formula, as shown in the following formula:
[0128] ;
[0129] By The grey relational coefficient matrix and Multiplying the weight coefficient matrices together yields a... From a square matrix, taking the diagonal elements yields a... The vector represents the vector under specific parameter adjustments. The consistency evaluation scores for each operating condition are shown in the following formula. This vector allows for intuitive comparison of a specific parameter. The system's performance under different operating conditions provides a scientific basis for the final decision.
[0130] ;
[0131] This embodiment achieves effective fusion of evaluation scores under different operating conditions through grey relational analysis and weight allocation. This enables comparison of the degree of consistency between the simulation model and the actual output under different operating conditions, which helps to optimize system design and operation strategies.
[0132] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0133] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0134] Figure 2 A schematic diagram of the structure of the electromechanical system virtual-real data consistency evaluation device provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below:
[0135] like Figure 2 As shown, the device for evaluating the consistency of virtual and real data in electromechanical systems includes: a first processing module 21, a second processing module 22, a third processing module 23, a fourth processing module 24, a fifth processing module 25, a sixth processing module 26, and a consistency evaluation module 27.
[0136] The first processing module 21 is used to determine the phase error based on the correlation coefficient between the simulation data sequence of the electromechanical system simulation model and the actual measured data sequence of the corresponding electromechanical system at different time shift steps.
[0137] The second processing module 22 is used to perform phase error correction on the simulated data sequence and the measured data sequence based on the phase error, respectively, to obtain a first simulated data sequence and a first measured data sequence.
[0138] The third processing module 23 is used to perform local phase error identification on the first simulated data sequence and the first measured data sequence to obtain the local phase error region of the first simulated data sequence and the first measured data sequence.
[0139] The fourth processing module 24 is used to perform dynamic time warping on the first simulated data sequence and the first measured data sequence in each local phase error region, and calculate the amplitude error between the simulated data sequence and the measured data sequence based on the warping result;
[0140] The fifth processing module 25 is used to obtain the simulation slope data sequence of the first simulation data sequence and the measured slope data sequence of the first measured data sequence based on the first simulation data sequence and the first measured data sequence.
[0141] The sixth processing module 26 is used to perform dynamic time warping on the simulated slope data sequence and the measured slope data sequence, and calculate the shape error between the simulated data sequence and the measured data sequence based on the warping result;
[0142] The consistency evaluation module 27 is used to obtain the consistency evaluation results between the electromechanical system simulation model and the actual electromechanical system based on the phase error, the amplitude error and the shape error.
[0143] This invention determines the phase error by using the correlation coefficient between the simulation data sequence of the electromechanical system simulation model and the corresponding measured data sequence of the actual electromechanical system at different time shift steps. Then, based on the phase error, phase error correction is performed on both the simulation data sequence and the measured data sequence to obtain a first simulation data sequence and a first measured data sequence. Next, local phase error identification is performed on the first simulation data sequence and the first measured data sequence to obtain local phase error regions. Within each local phase error region, dynamic time warping is performed on the first simulation data sequence and the first measured data sequence, and the amplitude error between the simulation data sequence and the measured data sequence is calculated based on the warping results. Furthermore, based on the first simulation data sequence and the first measured data sequence, a simulation slope data sequence and a measured slope data sequence are obtained. Dynamic time warping is performed on the simulation slope data sequence and the measured slope data sequence, and the shape error between the simulation data sequence and the measured data sequence is calculated based on the warping results. Thus, based on the phase error, amplitude error, and shape error, a consistency evaluation result between the electromechanical system simulation model and the actual electromechanical system is obtained. Local phase error regions that may exist in the first simulated data sequence and the first measured data sequence can be identified by identifying local phase errors. This eliminates the need for dynamic time warping of the entire first simulated data sequence and the first measured data sequence, thereby reducing the computational complexity of dynamic time warping when calculating amplitude errors, thus improving computational efficiency and obtaining the consistency evaluation results between the electromechanical system simulation model and the actual electromechanical system more quickly and accurately.
[0144] In one possible implementation, the third processing module 23 can be used to sequentially calculate the distance between the data point at each time step in the first simulated data sequence and the corresponding data point at the first measured data sequence, calculate the average distance based on the distance, compare each distance with the average distance, and obtain the local phase error region of the first simulated data sequence and the first measured data sequence based on the comparison result.
[0145] In one possible implementation, the third processing module 23 can be used to compare each of the distances with the average distance; if a certain distance exceeds a preset range of the average distance, then a local phase error region of the first simulated data sequence and the first measured data sequence is obtained based on the distance.
[0146] In one possible implementation, the third processing module 23 can be used to determine the time corresponding to a certain distance as a target time if a certain distance exceeds the preset range of the average distance; to time-shift the first simulated data sequence or the first measured data sequence based on the target time until the distance between the data point at the target time in the first simulated data sequence and the data point at the target time in the second simulated data sequence is within the preset range of the average distance after the time shift, and to record the current time shift step as the local phase error step; and to obtain a local phase error region of the first simulated data sequence and the first measured data sequence according to the target time and the local phase error step.
[0147] In one possible implementation, the third processing module 23 can be used to extract the simulated data feature points in the first simulated data sequence and the measured data feature points in the first measured data sequence; calculate the distance between each simulated data feature point and each measured data feature point in turn, and record it as the feature distance; and obtain the local phase error region of the first simulated data sequence and the first measured data sequence based on each of the feature distances.
[0148] In one possible implementation, the third processing module 23 can be used to cluster each of the feature distances and obtain the number of feature distances contained in each cluster; the regions of each of the feature distances in the first simulation data sequence and the first measured data sequence in the clusters whose number is less than a set threshold are determined as the local phase error regions of the first simulation data sequence and the first measured data sequence.
[0149] In one possible implementation, the first processing module 21 can also be used to obtain the phase error between each simulation data sequence and the corresponding measured data sequence of the actual electromechanical system under each operating condition for each simulation parameter value of the electromechanical system simulation model; the fourth processing module 24 can also be used to obtain the amplitude error between each simulation data sequence and the corresponding measured data sequence of the actual electromechanical system under each operating condition for each simulation parameter value of the electromechanical system simulation model; the sixth processing module 26 can also be used to obtain the amplitude error between each simulation data sequence and the corresponding measured data sequence of the actual electromechanical system under each operating condition for each simulation parameter value of the electromechanical system simulation model. The shape error of the corresponding measured data sequence is used to obtain the error matrix; the consistency evaluation module 27 can be used to calculate the weight of each error index in the error matrix under each working condition based on the entropy method to obtain a two-dimensional weight coefficient matrix; based on grey relational analysis, the grey relational coefficient of each error index under each working condition in the error matrix is calculated to obtain a grey relational coefficient matrix; the two-dimensional weight coefficient matrix and the grey relational coefficient matrix are multiplied, and the consistency evaluation results of the electromechanical system simulation model and the actual electromechanical system under multiple working conditions are obtained based on the vector composed of the diagonal elements of the matrix obtained after multiplication.
[0150] Figure 3 This is a schematic diagram of a terminal provided in an embodiment of the present invention. Figure 3 As shown, the terminal 3 in this embodiment includes a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30. When the processor 30 executes the computer program 32, it implements the steps in the embodiments of the above-described electromechanical system virtual-real data consistency evaluation methods, for example... Figure 1 Steps 101 to 107 are shown. Alternatively, when processor 30 executes computer program 32, it implements the functions of each module in the above-described device embodiments, for example... Figure 2 The functions of modules 21 to 27 are shown.
[0151] For example, computer program 32 can be divided into one or more modules, one or more modules are stored in memory 31 and executed by processor 30 to complete the present invention. One or more modules can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 32 in terminal 3. For example, computer program 32 can be divided into... Figure 2 Modules 21 to 27 are shown.
[0152] Terminal 3 can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. Terminal 3 may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will understand that... Figure 3This is merely an example of terminal 3 and does not constitute a limitation on terminal 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal may also include input / output devices, network access devices, buses, etc.
[0153] The processor 30 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0154] The memory 31 can be an internal storage unit of the terminal 3, such as a hard disk or RAM of the terminal 3. The memory 31 can also be an external storage device of the terminal 3, such as a plug-in hard disk, Smart MediaCard (SMC), Secure Digital (SD) card, or Flash Card equipped on the terminal 3. Furthermore, the memory 31 can include both internal and external storage units of the terminal 3. The memory 31 is used to store computer programs and other programs and data required by the terminal. The memory 31 can also be used to temporarily store data that has been output or will be output.
[0155] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0156] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0157] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0158] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0159] 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0160] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0161] If integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above embodiments of the electromechanical system virtual-physical data consistency evaluation method. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0162] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention 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 the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for evaluating consistency of virtual and real data of an electromechanical system, characterized in that, The method comprises the following steps: determining a phase error according to a correlation coefficient of a simulation data sequence of a simulation model of an electromechanical system and a measured data sequence of an actual electromechanical system at different time shifts; correcting the phase error of the simulation data sequence and the measured data sequence respectively to obtain a first simulation data sequence and a first measured data sequence; identifying a local phase error of the first simulation data sequence and the first measured data sequence to obtain a local phase error region of the first simulation data sequence and the first measured data sequence; performing dynamic time warping on the first simulation data sequence and the first measured data sequence in each local phase error region, and calculating an amplitude error of the simulation data sequence and the measured data sequence according to the warping result; obtaining a simulation slope data sequence of the first simulation data sequence and a measured slope data sequence of the first measured data sequence according to the first simulation data sequence and the first measured data sequence; performing dynamic time warping on the simulation slope data sequence and the measured slope data sequence, and calculating a shape error of the simulation data sequence and the measured data sequence based on the warping result; obtaining a consistency evaluation result of the simulation model of the electromechanical system and the actual electromechanical system according to the phase error, the amplitude error and the shape error; wherein the local phase error of the first simulation data sequence and the first measured data sequence is identified to obtain a local phase error region of the first simulation data sequence and the first measured data sequence, which comprises: extracting simulation data feature points in the first simulation data sequence and measured data feature points in the first measured data sequence; calculating the distance between each simulation data feature point and each measured data feature point in turn, denoted as a feature distance; obtaining a local phase error region of the first simulation data sequence and the first measured data sequence according to each feature distance; obtaining a local phase error region of the first simulation data sequence and the first measured data sequence according to each feature distance, which comprises: clustering each feature distance and obtaining the number of feature distances contained in each cluster; determining the region of each feature distance in the first simulation data sequence and the first measured data sequence in a cluster whose number is less than a set number threshold as a local phase error region of the first simulation data sequence and the first measured data sequence. 2.The method of claim 1, wherein, The local phase error of the first simulation data sequence and the first measured data sequence is identified to obtain a local phase error region of the first simulation data sequence and the first measured data sequence, which comprises: calculating the distance between each data point in the first simulation data sequence and the corresponding data point in the first measured data sequence in turn, and calculating an average distance according to the distance; comparing each distance with the average distance respectively, and obtaining a local phase error region of the first simulation data sequence and the first measured data sequence according to the comparison result. 3.The method of claim 2, wherein, comparing each of the distances with the average distance respectively, and obtaining a local phase error region of the first simulation data sequence and the first measured data sequence according to a comparison result, comprising: comparing each of the distances with the average distance respectively; if a certain distance exceeds a preset range in which the average distance is located, obtaining a local phase error region of the first simulation data sequence and the first measured data sequence according to the distance. 4.The method of claim 3, wherein, if a certain distance exceeds a preset range in which the average distance is located, obtaining a local phase error region of the first simulation data sequence and the first measured data sequence according to the distance, comprising: if a certain distance exceeds a preset range in which the average distance is located, determining a target time corresponding to the distance as a target time; based on the target time, time-shifting the first simulation data sequence or the first measured data sequence until a distance between a data point of the target time in the first simulation data sequence and a data point of the target time in the first measured data sequence is within a preset range in which the average distance is located, and recording a current time-shifting step number as a local phase error step number; obtaining a local phase error region of the first simulation data sequence and the first measured data sequence according to the target time and the local phase error step number. 5.The method of claim 1, wherein, Further comprising: obtaining phase errors, amplitude errors and shape errors of each simulation data sequence and a corresponding measured data sequence of an actual electromechanical system under each working condition of each simulation parameter value of an electromechanical system simulation model according to the method of obtaining the phase errors, the amplitude errors and the shape errors, and obtaining an error matrix; based on an entropy value method, calculating weights of each error index in each working condition in the error matrix, and obtaining a two-dimensional weight coefficient matrix; based on a grey correlation degree analysis, calculating a grey correlation coefficient of each error index in each working condition in the error matrix, and obtaining a grey correlation coefficient matrix; multiplying the two-dimensional weight coefficient matrix and the grey correlation coefficient matrix, and obtaining a consistency evaluation result of the electromechanical system simulation model and the actual electromechanical system under multiple working conditions according to a vector composed of diagonal elements of a matrix obtained after multiplication.
6. A device for evaluating the consistency of virtual and real data in an electromechanical system, characterized in that, comprising: a first processing module configured to determine a phase error according to a correlation coefficient of a simulation data sequence of an electromechanical system simulation model and a corresponding measured data sequence of an actual electromechanical system under different time-shifting step numbers; a second processing module configured to perform phase error correction on the simulation data sequence and the measured data sequence based on the phase error respectively, and obtain a first simulation data sequence and a first measured data sequence; a third processing module configured to perform local phase error identification on the first simulation data sequence and the first measured data sequence, and obtain a local phase error region of the first simulation data sequence and the first measured data sequence. a fourth processing module, configured to perform dynamic time warping on the first simulation data sequence and the first measured data sequence in each of the local phase error regions, and calculate an amplitude error between the simulation data sequence and the measured data sequence according to a warping result; a fifth processing module, configured to obtain a simulation slope data sequence of the first simulation data sequence and a measured slope data sequence of the first measured data sequence according to the first simulation data sequence and the first measured data sequence; a sixth processing module, configured to perform dynamic time warping on the simulation slope data sequence and the measured slope data sequence, and calculate a shape error between the simulation data sequence and the measured data sequence based on a warping result; a consistency evaluation module, configured to obtain a consistency evaluation result of the electromechanical system simulation model and the actual electromechanical system according to the phase error, the amplitude error and the shape error; the third processing module is specifically configured to: extract simulation data feature points in the first simulation data sequence and measured data feature points in the first measured data sequence; calculate distances between each of the simulation data feature points and each of the measured data feature points in sequence, denoted as feature distances; cluster the feature distances, and obtain a quantity of the feature distances contained in each cluster; determine regions of each of the feature distances in the first simulation data sequence and the first measured data sequence as local phase error regions of the first simulation data sequence and the first measured data sequence, if the quantity of the feature distances in the cluster is less than a set quantity threshold.
7. A terminal, characterized by comprising: a memory and a processor, the memory is configured to store a computer program, and the processor is configured to call and run the computer program stored in the memory, and execute the method in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5.
Citation Information
Patent Citations
A multivariate data analysis method for dynamic system model verification
CN109102033A
Underwater acoustic target array amplitude phase error calibration method based on rank decomposition theorem
CN115085827A