Digital twinborn model construction method based on power system
By constructing a minimum enclosing ellipsoid for anomaly detection and using a tensor algorithm to fill missing values, the problems of missing data and anomaly detection in the digital twin model of the power system are solved, achieving higher accuracy and stability, and ensuring the safe operation of the power system.
Patent Information
- Application Number
- CN202510857246.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-19
Smart Images

Figure CN120671405A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital twin model construction, and in particular to a method for constructing a digital twin model based on an electric power system. Background Art
[0002] As the infrastructure of modern society, power systems are highly complex, dynamic, and uncertain. With the increasing penetration of renewable energy, the expansion of grid scale, and the diversification of user needs, traditional modeling and operation methods face challenges. Digital twin technology, by building a virtual mirror of the physical system and enabling real-time monitoring, prediction, and optimization, has become a key tool for improving the reliability, efficiency, and flexibility of power systems.
[0003] By building a digital twin model of the power system and driving the update of the digital twin model with real-time data from the power system, high-precision dynamic simulation can be achieved, avoiding the traditional power system model's reliance on static assumptions and difficulty in adapting to the intermittent nature and load fluctuations of new energy sources. At the same time, historical data can be combined to achieve fault prediction, thereby anticipating risks and conducting risk inspections in advance.
[0004] However, due to the complex structure of the power system and the wide range of operating data sources, some operating data may be missing or incomplete during the data collection process due to sensor failure, communication interruption, or environmental interference, thus affecting the accuracy and reliability of the digital twin model. Traditional data filling methods, such as mean filling and interpolation, cannot fully consider the spatiotemporal correlation and multi-physics field coupling characteristics between operating data, resulting in large deviations between the filled values and the true values, affecting the operational accuracy of the digital twin model. In addition, operating data may contain anomalies during the collection process, which need to be deleted in a timely manner to avoid affecting the stable operation of the digital twin model. However, traditional data anomaly detection methods often rely on fixed thresholds, which cannot adapt to changes in the data distribution of the power system, resulting in insufficient anomaly detection accuracy. Summary of the Invention
[0005] In response to the problems existing in the prior art, the present invention provides a method for constructing a digital twin model based on the power system, providing accurate power system operation data, so that the operation data in the digital twin model can be updated synchronously in real time, thereby more comprehensively simulating and predicting the behavior of physical entities in the power system, and ensuring the stable and safe operation of the power system.
[0006] To achieve the above technical objectives, the present invention adopts the following technical solution: a method for constructing a digital twin model based on a power system, comprising the following steps:
[0007] Step S1: collecting historical operating data of each physical entity in the power system, and filtering out normal operating data from the historical operating data to construct the minimum enclosing ellipsoid of each physical entity;
[0008] Step S2: collecting operating data of each physical entity in the power system in real time, calculating the distance between the operating data of each physical entity and the center of the corresponding minimum enclosing ellipsoid, and deleting the operating data corresponding to the physical entity if the calculated distance is greater than 1; otherwise, retaining the operating data;
[0009] Step S3: Fill missing values in the retained operating data using a tensor algorithm to obtain complete operating data of each physical entity in the power system;
[0010] Step S4: Use each physical entity in the power system to construct a corresponding virtual entity in the virtual space, use the complete operation data of each physical entity in the power system to drive the operation of the corresponding virtual entity, and complete the construction of the digital twin model.
[0011] Furthermore, the physical entities in the power system include: power generation equipment, transmission equipment, transformation equipment, distribution equipment, power consumption equipment, protection equipment, regulation and control equipment, communication equipment and monitoring equipment.
[0012] Furthermore, the process of constructing the minimum enclosing ellipsoid of the physical entity is as follows:
[0013] i. constructing an objective function and constraint conditions for an enclosing ellipsoid based on normal operating data of the physical entity;
[0014] ii. Introducing Lagrange multipliers into the objective function of the bounding ellipsoid and the constraints of the bounding ellipsoid to construct the Lagrange function of the bounding ellipsoid;
[0015] iii. Optimizing the Lagrange multiplier by the gradient ascent method until the value of the Lagrange function of the enclosing ellipsoid reaches a maximum, obtaining the optimal covariance matrix and center point of the enclosing ellipsoid, and constructing a minimum enclosing ellipsoid.
[0016] Furthermore,
[0017] The objective function F of the bounding ellipsoid is:
[0018] The constraints of the enclosing ellipsoid are: i -a) T A(x i -a)≤1+ξ i ,ξ i ≥0;
[0019] Among them, A represents the covariance matrix of the enclosing ellipsoid constructed using the normal operation data of the physical entity, a represents the center point of the enclosing ellipsoid constructed using the normal operation data of the physical entity, det() represents the determinant, C represents the penalty coefficient, n represents the amount of normal operation data of the physical entity, i represents the index of n, and x represents the number of normal operation data of the physical entity. i represents the normal operation data of the i-th time, ξ i represents the relaxation variable that allows the i-th normal running data to deviate from the bounding ellipsoid.
[0020] Furthermore, the Lagrangian function L of the bounding ellipsoid is:
[0021]
[0022] Among them, α i Indicates the constraint (x i -a) T A(x i -a)≤1+ξ i The first Lagrange multiplier of i Represents the constraint ξ i The second Lagrange multiplier ≥ 0.
[0023] Furthermore, the distance d between the running data of the physical entity and the center of the corresponding minimum enclosing ellipsoid is calculated as follows:
[0024]
[0025] Among them, x new Represents the real-time collected operational data of physical entities in the power system. represents the center point of the minimum enclosing ellipsoid, Represents the covariance matrix of the minimum bounding ellipsoid.
[0026] Furthermore, step S3 includes the following sub-steps:
[0027] Step S3.1: Determine the dimension of the tensor based on the operating data of each physical entity in the power system;
[0028] Step S3.2: Mark the missing values in the retained running data, and fill the marked running data into the corresponding dimensions of the tensor to form a tensor matrix;
[0029] Step S3.3: factorize the tensor matrix into a factor matrix using CP, and construct the objective function using the estimated error between the tensor matrix and the factor matrix;
[0030] Step S3.4: Use the alternating least squares method to optimize the factor matrix until the objective function reaches the minimum value, and use the product of the factor matrix under the minimum value of the objective function to fill the corresponding missing values.
[0031] Furthermore, the specific process of constructing the objective function L through the estimation error of the tensor matrix and the factor matrix is as follows:
[0032]
[0033] Among them, X represents the tensor matrix, A (1) ,…,A (K) represents the K factor matrices obtained by CP factorization of the tensor matrix, represents the Frobenius norm.
[0034] Furthermore, the complete operating data of each physical entity in the power system is used to update the minimum enclosing ellipsoid of the corresponding physical entity in real time.
[0035] Furthermore, the construction process of the digital twin model is as follows:
[0036]
[0037] in, represents the complex digital twin relationship formed by the coupling of virtual entities in the digital twin model at time t, ψ represents the evolution function of the digital twin model of the power system, DT represents the digital twin relationship of each physical entity in the power system mapped to the virtual entity, S P (t) represents the complete operating data of each physical entity in the power system obtained at time t, ΔS P (t) represents the change in the complete operating data of each physical entity in the power system obtained at time t, M P Represents the virtual entities corresponding to each physical entity in the power system.
[0038] Compared with the prior art, the present invention has the following beneficial effects: the present invention is based on the method for constructing a digital twin model of the power system, and performs outlier detection on the operating data collected in real time from the physical entity by constructing the minimum enclosing ellipsoid of each physical entity in the power system. It can adapt to the dynamic changing characteristics of the power system operating data and improve the accuracy and robustness of the anomaly detection of the operating data; by filling the missing values in the operating data through the tensor algorithm, it can capture the dependency relationship between the multi-dimensional operating data, and reduce the local error through the cross least squares method, so as to more accurately restore the missing data, reduce the deviation between the filled data and the real data, and improve the robustness of the filled data. Based on this, the present invention can input complete and accurate operating data into the digital twin model of the power system, so as to more comprehensively simulate and predict the behavior of the physical entities in the power system, ensure the stable and safe operation of the power system, and improve the response speed and flexibility of the real-time interaction in the virtual space, so as to better cope with the complex situations in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a flow chart of a method for constructing a digital twin model based on a power system according to the present invention;
[0040] Figure 2 This is a flow chart for filling in missing operating data in the present invention. DETAILED DESCRIPTION
[0041] The technical solution of the present invention will be further explained below with reference to the accompanying drawings.
[0042] like Figure 1 This is a flow chart of a method for constructing a digital twin model based on a power system according to the present invention. The method for constructing a digital twin model includes the following steps:
[0043] Step S1: Collect historical operating data of each physical entity in the power system, and filter out normal operating data from the historical operating data to construct the minimum enclosing ellipsoid of each physical entity. Use the minimum enclosing ellipsoid to detect outliers in the operating data collected in real time from the physical entity. This can adapt to the dynamic changes in the power system operating data and improve the accuracy and robustness of operating data anomaly detection.
[0044] The specific process of constructing the minimum enclosing ellipsoid of each physical entity through normal operation data is as follows:
[0045] i. Construct the objective function of the bounding ellipsoid based on the normal operation data of the physical entity And the constraints surrounding the ellipsoid (x i -a) T A(x i -a)≤1+ξ i ,ξi ≥0, where A represents the covariance matrix of the bounding ellipsoid constructed using the normal operation data of the physical entity, a represents the center point of the bounding ellipsoid constructed using the normal operation data of the physical entity, det() represents the determinant, C represents the penalty coefficient, n represents the amount of normal operation data of the physical entity, i represents the index of n, and x i represents the normal operation data of the i-th time, ξ i represents the relaxation variable that allows the i-th normal running data to deviate from the bounding ellipsoid.
[0046] ii. Introduce Lagrange multipliers into the objective function and constraints of the bounding ellipsoid to construct the Lagrange function of the bounding ellipsoid:
[0047]
[0048] Among them, α i Indicates the constraint (x i -a) T A(x i -a)≤1+ξ i The first Lagrange multiplier of i Represents the constraint ξ i The second Lagrange multiplier ≥ 0.
[0049] iii. Order The Lagrangian function enclosing the ellipsoid is rewritten as a dual function related only to the first Lagrangian multiplier, and the first Lagrangian multiplier is optimized by the gradient ascent method until the value of the Lagrangian function enclosing the ellipsoid reaches the maximum;
[0050] The second Lagrange multiplier is used to handle the constraint condition ξ associated with the slack variable i ≥0, this constraint is about the slack variables, ensuring that the value of each slack variable is non-negative, η i The solution of ξ i It is directly related to the optimal value of , and only needs to be automatically adjusted when the constraints are met.
[0051] The optimized first Lagrangian multiplier and the second Lagrangian multiplier are substituted into the Lagrangian function of the bounding ellipsoid to obtain the optimal covariance matrix and center point of the bounding ellipsoid, and the minimum bounding ellipsoid is constructed.
[0052] Among them, the gradient calculation process of the dual function is:
[0053]
[0054] in, <x i ,x i > represents the i-th normal running data xi The inner product of Represents the i-th normal running data x i and the jth normal running data x j The inner product between .
[0055] The physical entities in the power system include: power generation equipment, transmission equipment, substation equipment, distribution equipment, power consumption equipment, protection equipment, regulation and control equipment, communication equipment and monitoring equipment. Due to the complex structure of the power system, it is crucial to build a virtual mirror of the physical entities through digital twin technology to achieve real-time monitoring, prediction and optimization of the power system.
[0056] Step S2: The operating data of each physical entity in the power system is collected in real time, and the distance between the operating data of each physical entity and the center of the corresponding minimum enclosing ellipsoid is calculated. If the calculated distance is greater than 1, the operating data corresponding to the physical entity is deleted; otherwise, the operating data is retained.
[0057] The calculation process of the distance d between the running data of the physical entity and the center of the corresponding minimum enclosing ellipsoid in the present invention is:
[0058]
[0059] Among them, x new Represents the real-time collected operational data of physical entities in the power system. represents the center point of the minimum enclosing ellipsoid, Represents the covariance matrix of the minimum bounding ellipsoid.
[0060] Step S3: Use the tensor algorithm to fill missing values in the retained operating data to obtain complete operating data of each physical entity in the power system. The tensor algorithm can capture the dependencies between multi-dimensional operating data and reduce local errors through cross least squares method, thereby more accurately recovering missing data, reducing the deviation between the filled data and the real data, and improving the robustness of the filled data.
[0061] like Figure 2 , including the following sub-steps:
[0062] Step S3.1: Determine the dimensions of the tensor based on the operating data of each physical entity in the power system, including: a time dimension, a spatial dimension of the physical entity, and a characteristic data dimension of the physical entity;
[0063] Step S3.2: Mark the missing values in the retained running data, and fill the marked running data into the corresponding dimensions of the tensor to form a tensor matrix;
[0064] Step S3.3: Decompose the tensor matrix into a factor matrix using CP factorization, and construct the objective function using the estimated error between the tensor matrix and the factor matrix: Among them, X represents the tensor matrix, A (1) ,…,A (K) represents the K factor matrices obtained by CP factorization of the tensor matrix, represents the Frobenius norm;
[0065] Step S3.4: Use the alternating least squares method to optimize the factor matrix until the objective function reaches the minimum value, and use the product of the factor matrix under the minimum value of the objective function to fill the corresponding missing values.
[0066] For A (1) ,…,A (K) The kth factor matrix A in (k) The optimization process is:
[0067]
[0068] Among them, X (k) represents the tensor matrix expanded along the k dimension, represents the tensor product of all factor matrices except the k-th factor matrix,
[0069] Step S4: Use the physical entities in the power system to construct corresponding virtual entities in the virtual space, use the complete operating data of each physical entity in the power system to drive the operation of the corresponding virtual entity, and complete the construction of the digital twin model. By inputting complete and accurate operating data into the digital twin model of the power system, the behavior of the physical entities in the power system can be more comprehensively simulated and predicted, ensuring the stable and safe operation of the power system, and improving the response speed and flexibility of real-time interaction in the virtual space, which can better cope with complex situations in actual applications.
[0070] The construction process of the digital twin model is as follows:
[0071]
[0072] in, represents the complex digital twin relationship formed by the coupling of virtual entities in the digital twin model at time t, ψ represents the evolution function of the digital twin model of the power system, DT represents the digital twin relationship of each physical entity in the power system mapped to the virtual entity, S P (t) represents the complete operating data of each physical entity in the power system obtained at time t, ΔS P (t) represents the change in the complete operating data of each physical entity in the power system obtained at time t, M PRepresents the virtual entities corresponding to each physical entity in the power system.
[0073] In one technical solution of the present invention, the complete operating data of each physical entity in the power system is used to update the minimum enclosing ellipsoid of the corresponding physical entity in real time, adapting to the dynamic changing characteristics of the power system operating data and improving the accuracy and robustness of operating data anomaly detection.
[0074] In one technical solution of the present invention, a computer-readable storage medium is also provided, storing a computer program, which enables a computer to execute a method for constructing a digital twin model based on a power system.
[0075] In one technical solution of the present invention, an electronic device is also provided, including: a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, a method for constructing a digital twin model based on the power system is implemented.
[0076] In the embodiments disclosed herein, computer storage media can be tangible media that can contain or store programs for use by or in conjunction with an instruction execution system, device, or apparatus. Computer storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. More specific examples of computer storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0077] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0078] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions based on the principles of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A method for constructing a digital twin model based on a power system, characterized in that: The steps include: Step S1: collecting historical operating data of each physical entity in the power system, and filtering out normal operating data from the historical operating data to construct the minimum enclosing ellipsoid of each physical entity; Step S2: collecting operating data of each physical entity in the power system in real time, calculating the distance between the operating data of each physical entity and the center of the corresponding minimum enclosing ellipsoid, and deleting the operating data corresponding to the physical entity if the calculated distance is greater than 1; otherwise, retaining the operating data; Step S3: Fill missing values in the retained operating data using a tensor algorithm to obtain complete operating data of each physical entity in the power system; Step S4: Use each physical entity in the power system to construct a corresponding virtual entity in the virtual space, use the complete operation data of each physical entity in the power system to drive the operation of the corresponding virtual entity, and complete the construction of the digital twin model.
2. The method for constructing a digital twin model based on a power system according to claim 1, characterized in that: The physical entities in the power system include: power generation equipment, transmission equipment, transformation equipment, distribution equipment, power consumption equipment, protection equipment, regulation and control equipment, communication equipment and monitoring equipment.
3. The method for constructing a digital twin model based on a power system according to claim 1, characterized in that: The construction process of the minimum enclosing ellipsoid of the physical entity is: i. constructing an objective function and constraint conditions for an enclosing ellipsoid based on normal operating data of the physical entity; ii. Introducing Lagrange multipliers into the objective function of the bounding ellipsoid and the constraints of the bounding ellipsoid to construct the Lagrange function of the bounding ellipsoid; iii. Optimizing the Lagrange multiplier by the gradient ascent method until the value of the Lagrange function of the enclosing ellipsoid reaches a maximum, obtaining the optimal covariance matrix and center point of the enclosing ellipsoid, and constructing a minimum enclosing ellipsoid.
4. The method for constructing a digital twin model based on a power system according to claim 3, characterized in that: The objective function F of the enclosing ellipsoid is: The constraints of the enclosing ellipsoid are: i -a) T A(x i -a)≤1+ξ i ,ξ i ≥0; Among them, A represents the covariance matrix of the enclosing ellipsoid constructed using the normal operation data of the physical entity, a represents the center point of the enclosing ellipsoid constructed using the normal operation data of the physical entity, det() represents the determinant, C represents the penalty coefficient, n represents the amount of normal operation data of the physical entity, i represents the index of n, and x represents the number of normal operation data of the physical entity. i represents the normal operation data of the i-th time, ξ i represents the relaxation variable that allows the i-th normal running data to deviate from the bounding ellipsoid.
5. The method for constructing a digital twin model based on a power system according to claim 4, characterized in that: The Lagrangian function L of the enclosing ellipsoid is: Among them, α i Indicates the constraint (x i -a) T A(x i -a)≤1+ξ i The first Lagrange multiplier of i Represents the constraint ξ i The second Lagrange multiplier ≥ 0.
6. The method for constructing a digital twin model based on a power system according to claim 1, characterized in that: The calculation process of the distance d between the running data of the physical entity and the center of the corresponding minimum enclosing ellipsoid is: Among them, x new Represents the real-time collected operational data of physical entities in the power system. represents the center point of the minimum enclosing ellipsoid, Represents the covariance matrix of the minimum bounding ellipsoid.
7. The method for constructing a digital twin model based on a power system according to claim 1, characterized in that: Step S3 includes the following sub-steps: Step S3.1: Determine the dimension of the tensor based on the operating data of each physical entity in the power system; Step S3.2: Mark the missing values in the retained running data, and fill the marked running data into the corresponding dimensions of the tensor to form a tensor matrix; Step S3.3: factorize the tensor matrix into a factor matrix using CP, and construct the objective function using the estimated error between the tensor matrix and the factor matrix; Step S3.4: Use the alternating least squares method to optimize the factor matrix until the objective function reaches the minimum value, and use the product of the factor matrix under the minimum value of the objective function to fill the corresponding missing values.
8. The method for constructing a digital twin model based on a power system according to claim 7, characterized in that: The specific process of constructing the objective function L through the estimation error of the tensor matrix and the factor matrix is: Among them, X represents the tensor matrix, A (1) ,…,A (K) represents the K factor matrices obtained by CP factorization of the tensor matrix, represents the Frobenius norm.
9. The method for constructing a digital twin model based on a power system according to claim 1, characterized in that: The complete operating data of each physical entity in the power system is used to update the minimum enclosing ellipsoid of the corresponding physical entity in real time.
10. The method for constructing a digital twin model based on a power system according to claim 1, characterized in that: The construction process of the digital twin model is as follows: in, represents the complex digital twin relationship formed by the coupling of virtual entities in the digital twin model at time t, ψ represents the evolution function of the digital twin model of the power system, DT represents the digital twin relationship of each physical entity in the power system mapped to the virtual entity, S P (t) represents the complete operating data of each physical entity in the power system obtained at time t, ΔS P (t) represents the change in the complete operating data of each physical entity in the power system obtained at time t, M P Represents the virtual entities corresponding to each physical entity in the power system.
Citation Information
Cited By
Electric power system intelligent simulation control system based on digital twinning
CN121634888A