Power voltage simulation and regulation method and system based on digital twinning
By constructing a real-time voltage state vector and a dynamic impedance coupling matrix, the voltage changes under grid load disturbances are simulated, and reactive power compensation commands are generated. This solves the problems of time delay and error in traditional power voltage simulation and realizes precise regulation and steady-state control of power voltage.
Patent Information
- Application Number
- CN202610499618.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-16
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional digital twin-based power voltage simulation and regulation methods cannot perceive the coupling relationship between nodes in real time. This results in time delays and errors in the regulation strategies calculated when facing complex operating conditions, making it difficult to accurately suppress instantaneous voltage fluctuations and easily triggering a chain of voltage over-limit faults.
Voltage data is collected by synchronous phasor measurement devices distributed at key nodes of the power grid, a real-time voltage state vector is constructed, the sensitivity coefficient is calculated using the recursive least squares algorithm, a dynamic impedance coupling matrix is generated, the voltage change trend under load disturbance is simulated, the Euclidean distance deviation is calculated and reactive power compensation commands are generated, and voltage regulation is optimized in real time.
It achieves real-time mapping of the time-varying topology characteristics of the power grid, accurately quantifies the nonlinear electrical correlation between nodes, and dynamically generates reactive power compensation commands. It effectively solves the regulation error problem caused by the lag in parameter updates in traditional static models, and realizes active defense and steady-state control of power voltage.
Smart Images

Figure CN122026419A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital twin simulation technology, and in particular to a method and system for power voltage simulation and regulation based on digital twins. Background Technology
[0002] The field of digital twin simulation technology involves using high-fidelity digital models to map, predict, and optimize physical entities throughout their entire lifecycle. By integrating multi-physics data and real-time sensing information, it constructs a virtual space that reflects the dynamic evolution of physical objects, thereby enabling state monitoring and closed-loop control of complex industrial systems.
[0003] Traditional digital twin-based power voltage simulation and regulation methods rely mainly on offline-built static network topology models for power flow calculations and set fixed voltage deviation thresholds as the basis for triggering regulation. This operation mode, based on idealized steady-state assumptions, ignores the nonlinear dynamic impedance changes caused by random load changes in actual power grid operation. As a result, it is impossible to perceive the coupling relationship between nodes in real time when facing complex operating conditions. The calculated regulation strategies often have serious time delays and error accumulation, making it difficult to accurately smooth out instantaneous voltage fluctuations on a millisecond time scale, which can easily lead to a chain of voltage over-limit faults. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and to propose a power voltage simulation and regulation method and system based on digital twins.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a power voltage simulation and regulation method based on digital twins, comprising the following steps: S1: Collect voltage amplitude and phase data through synchronous phasor measurement devices distributed at key nodes of the power grid, map the voltage amplitude and phase data to Hilbert space, construct a real-time voltage state vector, and extract the power grid topology connection structure that defines the physical connection relationship at the current moment; S2: In a digital twin simulation environment, a dynamic impedance coupling matrix is constructed based on the real-time voltage state vector and the power grid topology connection structure. The recursive least squares algorithm is used to calculate the sensitivity coefficient describing the electrical correlation strength between nodes. The dynamic impedance coupling matrix reflecting the nonlinear mapping relationship is updated in real time using the sensitivity coefficient. S3: Generate a virtual load disturbance sequence that follows a normal distribution, input the virtual load disturbance sequence into the dynamic impedance coupling matrix for iterative calculation, simulate the node voltage change trend under different load conditions, and calculate the virtual voltage response trajectory that covers future time window information. S4: Calculate the Euclidean distance deviation between the virtual voltage response trajectory and the preset ideal voltage standard curve. Based on the Euclidean distance deviation, solve the reactive power compensation command that minimizes voltage fluctuation through particle swarm optimization logic, and send the reactive power compensation command to the flexible AC transmission device.
[0006] As a further aspect of the present invention, step S1 specifically comprises: S11: The original voltage amplitude sequence and original voltage phase sequence of key nodes of the power grid are obtained in real time at a millisecond sampling frequency through a synchronous phasor measurement device. The Kalman filter algorithm is used to denoise the original data to generate a reference voltage amplitude and reference voltage phase with a high signal-to-noise ratio. S12: Perform Hilbert transform on the reference voltage amplitude and reference voltage phase to construct an analytical signal, map the analytical signal to the complex domain Hilbert space, and establish a real-time voltage state vector that can characterize the instantaneous electrical characteristics of the entire network by combining the complex voltage signals of each node. S13: Read the switching status signals of each circuit breaker and disconnector in the power grid in real time, identify the electrical connectivity between each node based on graph theory logic, construct an adjacency matrix describing the physical connection relationship between nodes, and define it as the power grid topology connection structure.
[0007] As a further aspect of the present invention, step S2 specifically includes: S21: Obtain the real-time voltage state vector and the grid topology connection structure, initialize the Jacobian matrix based on the physical circuit law, and use the inverse of the Jacobian matrix as the dynamic impedance coupling matrix at the initial moment. S22: Set the initial values of the forgetting factor and covariance matrix, take the current node voltage change as the output vector and the node injected power change as the input vector, and use the recursive least squares algorithm to iteratively calculate the partial derivative of voltage with respect to power change to generate a sensitivity coefficient characterizing voltage fluctuation sensitivity. S23: The impedance matrix elements of the previous moment are weighted and corrected using the newly generated sensitivity coefficients to eliminate model distortion caused by linearization error, thereby establishing a dynamic impedance coupling matrix that can follow the time-varying characteristics of the power grid operation in real time.
[0008] As a further aspect of the present invention, step S3 specifically comprises: S31: Based on the statistical characteristics of historical load data, set the mean and standard deviation, and use the Monte Carlo method to generate a series of random power fluctuation values that conform to the normal distribution law. Combine the random power fluctuation values that conform to the normal distribution law to form the virtual load disturbance sequence that simulates the uncertainty of future load. S32: The virtual load disturbance sequence is used as the excitation input to the dynamic impedance coupling matrix. The voltage response values of each node under different disturbance excitations are deduced through matrix multiplication, and multiple sets of voltage prediction time series are generated by arranging them in order of time step. S33: Perform weighted averaging on multiple sets of voltage prediction time series to eliminate random error interference, extract the voltage change envelope of each node within a preset future time window, and construct a virtual voltage response trajectory containing time and spatial information.
[0009] As a further aspect of the present invention, step S4 specifically comprises: S41: Obtain the virtual voltage response trajectory and the ideal voltage standard curve, calculate the sum of squares of the differences between the two at each corresponding time point and perform square root operation to generate Euclidean distance deviation that can quantify the degree of voltage deviation. S42: Establish a particle swarm search space containing reactive power output values, set the Euclidean distance deviation as the optimization objective of the fitness function, initialize the position vector and velocity vector of the particle swarm, and find the global optimal position that minimizes the fitness function value through iterative updates. S43: Analyze the reactive power value corresponding to the global optimal position, convert it into control code that the device can execute, and generate reactive power compensation instructions for driving the flexible AC transmission device.
[0010] As a further aspect of the present invention, the calculation process of the sensitivity coefficient specifically includes: Obtain the estimated parameter vector and covariance matrix from the previous time step, and update the current gain matrix and estimated parameter vector using the following formula, combined with the current input vector: ; and ; in, Representative moment The gain matrix, Representative moment The covariance matrix, Representative moment The input data vector, This represents the forgetting factor used to adjust the weights of historical data. Representative moment Updated sensitivity coefficient, Representative moment The actual observed output value of the system.
[0011] As a further aspect of the present invention, the iterative update process for finding the globally optimal position specifically includes: Obtain the current individual extreme value of each particle and the global extreme value of the entire population. Based on the preset inertia weight factor and learning factor, update the particle's velocity vector and position vector using the following formula: ; and ; in, Representing the The particle in the first The velocity vector at the next iteration The inertial weighting factor represents the inertia that maintains the inertia of particle motion. and The learning factor represents the step size of the particle's flight towards the individual and global maxima. and This represents a random number with a value between 0 and 1. Representing the The optimal position of each particle in its historical history. Represents the globally optimal position of the population. Representing the The particle in the first The position vector at the next iteration.
[0012] As a further aspect of the present invention, the process of establishing the real-time voltage state vector specifically includes: The analytical signal magnitude and phase angle of all monitoring nodes are obtained. The analytical signals of each node are arranged into column vectors according to the node number order. The column vectors are expanded into a high-dimensional tensor structure using the Kronecker product. A timestamp is embedded in the tensor structure to establish a real-time voltage state vector with spatiotemporal correlation characteristics.
[0013] As a further aspect of the present invention, the process of generating the virtual load disturbance sequence specifically includes: Typical daily load curves are obtained from the historical operation database of the power grid. The probability density function parameters of load fluctuations are fitted using the maximum likelihood estimation method. Based on the fitted mean and variance parameters, a Gaussian white noise generator is constructed to generate random disturbance components superimposed on the baseline load curve, thereby combining them to generate a virtual load disturbance sequence.
[0014] A power voltage simulation and regulation system based on digital twins, the system being used to implement the aforementioned power voltage simulation and regulation method based on digital twins, the system comprising: The data acquisition and topology reconstruction module is used to acquire voltage amplitude and phase data through synchronous phasor measurement devices distributed at key nodes of the power grid, map the voltage amplitude and phase data to Hilbert space, construct a real-time voltage state vector, and extract the power grid topology connection structure that defines the physical connection relationship at the current moment. The dynamic impedance modeling and updating module is used to construct a dynamic impedance coupling matrix based on the real-time voltage state vector and the power grid topology in a digital twin simulation environment. It uses a recursive least squares algorithm to calculate the sensitivity coefficient describing the electrical correlation strength between nodes and uses the sensitivity coefficient to update the dynamic impedance coupling matrix reflecting the nonlinear mapping relationship in real time. The virtual simulation and trajectory prediction module is used to generate a virtual load disturbance sequence that follows a normal distribution. The virtual load disturbance sequence is input into the dynamic impedance coupling matrix for iterative calculation to simulate the node voltage change trend under different load conditions and calculate the virtual voltage response trajectory that includes information about future time windows. The optimization decision and instruction execution module is used to calculate the Euclidean distance deviation between the virtual voltage response trajectory and the preset ideal voltage standard curve. Based on the Euclidean distance deviation, the reactive power compensation instruction that minimizes voltage fluctuation is solved in reverse through particle swarm optimization logic, and the reactive power compensation instruction is sent to the flexible AC transmission device.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, by constructing a dynamic impedance coupling matrix, the time-varying topological characteristics of the physical power grid are mapped to the digital twin space in real time, accurately quantifying the degree of nonlinear electrical correlation between multiple nodes. By inputting the virtual load disturbance sequence into the matrix for simulation calculation, a virtual voltage response trajectory that can reflect the future trend is generated. Based on the Euclidean distance deviation between this trajectory and the standard curve, reactive power compensation commands are dynamically generated, and precise regulation and control are completed before a substantial voltage over-limit occurs. This effectively solves the regulation error problem caused by the lag in parameter updates in traditional static models, and realizes active defense and steady-state control of power voltage. Attached Figure Description
[0016] Figure 1 This is a flowchart of the power voltage simulation and regulation method based on digital twins of the present invention; Figure 2 This is a flowchart illustrating the construction process of the real-time voltage state vector and the power grid topology connection structure of this invention. Figure 3 This is a flowchart of the dynamic impedance coupling matrix update and sensitivity calculation process of this invention; Figure 4 This is a flowchart of the virtual voltage response trajectory generation process of the present invention; Figure 5 This is a flowchart of the reactive power compensation command solution based on particle swarm optimization in this invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the software-based technical solution is described in detail below with reference to system architecture diagrams and embodiments. It should be understood that the specific embodiments described herein are only for explaining the technical solutions of this invention and do not constitute a limitation on the scope of protection.
[0018] In the description of this invention, the system architecture relationships or data processing flows indicated by terms such as "layer," "module," "interface," "data flow," "client," and "server" are all defined based on the architecture diagram or flowchart corresponding to the embodiments. This way of describing is only used to clearly illustrate the logical relationships between the elements in the technical solution, and not to limit the physical deployment form. The term "multiple" includes two or more technical units, including but not limited to multiple data nodes, processing threads, service instances, or functional components and other scalable elements. The specific number is determined according to the actual business scenario and needs to be specifically specified.
[0019] Please see Figure 1 and Figure 2 The present invention provides a technical solution: a power voltage simulation and regulation method based on digital twins, comprising the following steps: S1: collecting voltage amplitude and phase data through synchronous phasor measurement devices distributed at key nodes of the power grid, mapping the voltage amplitude and phase data to Hilbert space, constructing a real-time voltage state vector, and extracting the power grid topology connection structure that defines the physical connection relationship at the current moment.
[0020] S11: The original voltage amplitude sequence and original voltage phase sequence of key nodes of the power grid are obtained in real time at a millisecond sampling frequency through a synchronous phasor measurement device. The Kalman filter algorithm is used to denoise the original data to generate a reference voltage amplitude and reference voltage phase with a high signal-to-noise ratio. S12: Perform Hilbert transform on the reference voltage amplitude and reference voltage phase to construct an analytical signal, map the analytical signal to the complex domain Hilbert space, and establish a real-time voltage state vector that can characterize the instantaneous electrical characteristics of the entire network by combining the complex voltage signals of each node. S13: Read the switching status signals of each circuit breaker and disconnector in the power grid in real time, identify the electrical connectivity between each node based on graph theory logic, construct an adjacency matrix describing the physical connection relationship between nodes, and define it as the power grid topology connection structure.
[0021] The process of establishing a real-time voltage state vector specifically includes: obtaining the analytical signal magnitude and phase angle of all monitoring nodes, arranging the analytical signals of each node into a column vector according to the node number order, expanding the column vector into a high-dimensional tensor structure using the Kronecker product, and embedding a timestamp mark in the tensor structure, thereby establishing a real-time voltage state vector with spatiotemporal correlation characteristics.
[0022] Synchronous phasor measurement units (PMUs) distributed at key nodes of the power grid (including but not limited to high-voltage busbars of power plant step-up substations, hub substations, and key transmission channel interfaces) continuously capture power grid operation data at a high-frequency sampling rate of 100Hz. The data acquisition front-end employs a high-precision A / D converter to convert analog voltage signals into digital signals. The input signal first passes through a low-pass filter to remove high-frequency noise interference, with the cutoff frequency set to 200Hz. A Kalman filter algorithm is used for secondary cleaning of the acquired raw voltage amplitude and phase sequences. A system state vector is then defined. Including time The true voltage amplitude and phase, and the state transition matrix. The identity matrix, the measurement matrix It is also an identity matrix. Process noise covariance matrix. Based on historical environmental noise levels, a diagonal matrix is defined, with diagonal elements taking values... Measure the noise covariance matrix Set as diagonal element The matrix is used. At each time step, the prior estimate is calculated through the prediction step, and then the Kalman gain is calculated by combining it with the current measurement value to update the posterior estimate, thereby outputting high signal-to-noise ratio reference voltage data. Subsequently, a Hilbert transform is performed on the reference voltage data. For the reference voltage signal at any time point... The conjugate imaginary part is constructed through convolution operations, and then the analytic signal is synthesized. The calculation formula is as follows: ; and ; in, Representative signal The Hilbert transform result, Pi is a constant. The voltage signal value corresponding to the integral variable. For the current observation time point, For integration variables, For the constructed analytical signal, It is the imaginary unit.
[0023] The aforementioned analytical signal refers to the complex signal obtained by mapping the voltage fluctuation in the real domain to the Hilbert space in the complex domain. This signal can retain the instantaneous envelope and instantaneous frequency characteristics of the original voltage signal, thus facilitating subsequent phasor analysis.
[0024] Get the entire network After analyzing the signals from each monitoring node, the data is processed according to the node number (1 to...). Arranged into column vectors Using the Kronecker Product operation, the column vector is expanded with the unit time basis vector to generate a high-dimensional tensor structure. A GPS timestamp accurate to the microsecond level is embedded in the tensor dimension to form a real-time voltage status vector. Simultaneously, the binary status bits (0 for open, 1 for closed) of all circuit breakers and disconnectors in the network are read in real time through the SCADA system interface. All nodes are traversed using graph theory depth-first search (DFS) logic to identify electrical connectivity domains. Construction... Adjacency matrix of dimension If node With nodes If there is a physical connection and the switch is in the closed state, then set the matrix elements. Otherwise, it is 0. This adjacency matrix is the current power grid topology connection structure, which is used for the dimensional constraints and sparsification of the subsequent impedance matrix.
[0025] Please see Figure 1 and Figure 3 S2: In the digital twin simulation environment, a dynamic impedance coupling matrix is constructed based on the real-time voltage state vector and the power grid topology connection structure. The sensitivity coefficient describing the electrical correlation strength between nodes is calculated using the recursive least squares algorithm. The dynamic impedance coupling matrix reflecting the nonlinear mapping relationship is updated in real time using the sensitivity coefficient.
[0026] S21: Obtain the real-time voltage state vector and the grid topology connection structure, initialize the Jacobian matrix based on the physical circuit law, and use the inverse of the Jacobian matrix as the dynamic impedance coupling matrix at the initial moment. S22: Set the initial values of the forgetting factor and covariance matrix, take the current node voltage change as the output vector and the node injected power change as the input vector, and use the recursive least squares algorithm to iteratively calculate the partial derivative of voltage with respect to power change to generate a sensitivity coefficient characterizing voltage fluctuation sensitivity. S23: The impedance matrix elements of the previous moment are weighted and corrected using the newly generated sensitivity coefficients to eliminate model distortion caused by linearization error, thereby establishing a dynamic impedance coupling matrix that can follow the time-varying characteristics of the power grid operation in real time.
[0027] The calculation process for the sensitivity coefficient specifically includes: Obtain the estimated parameter vector and covariance matrix from the previous time step, and update the current gain matrix and estimated parameter vector using the following formula, combined with the current input vector: ; and ; in, Representative moment The gain matrix, Representative moment The covariance matrix, Representative moment The input data vector, This represents the forgetting factor used to adjust the weights of historical data. Representative moment Updated sensitivity coefficient, Representative moment The actual observed output value of the system.
[0028] In the digital twin simulation platform (built on a high-performance GPU cluster), the power grid topology and real-time voltage state vector are first invoked. Based on Kirchhoff's Current Law (KCL) and physical circuit parameters (line resistance)... Reactance Initialize the entire network Jacobian matrix. The elements of the Jacobian matrix Corresponding nodes active power and reactive power For nodes voltage amplitude and phase angle The partial derivatives of the initial Jacobian matrix. Defined as the dynamic impedance coupling matrix at the initial moment Then, the iterative update loop of the Recursive Least Squares (RLS) algorithm is entered. A forgetting factor is set. The value is 0.98, determined through extensive historical backtesting experiments, which balances the model's rate of forgetting old data with its ability to track new data. Initialize the covariance matrix. for ( (identity matrix), estimated parameter vector Initialize to a zero vector. At each sampling time... Calculate the vector of changes in node injected power. As the algorithm input vector Calculate the vector of changes in node voltage. As the actual observed output value of the system .
[0029] The covariance matrix of the previous time step With the current input vector Substitute into the formula to calculate the gain matrix And update the sensitivity coefficient based on the prediction error. The specific calculation formula is as follows: ; and ; in, Representative moment The gain matrix, Representative moment The covariance matrix, Representative moment The input data vector (i.e., the power change). This represents the forgetting factor used to adjust the weights of historical data. This represents the transpose of the input data vector. Representative moment Updated sensitivity coefficient vector, Representative moment The sensitivity coefficient vector, Representative moment The actual observed output value of the system (i.e., voltage change).
[0030] The aforementioned sensitivity coefficient essentially characterizes the degree to which voltage is sensitive to power fluctuations (i.e., and Using the updated sensitivity coefficients For dynamic impedance coupling matrix The corresponding elements in the matrix are weighted and corrected using a weighted moving average logic, with the weighting coefficients directly related to the sensitivity amplitude. For example, when the reactive power sensitivity coefficient of a node increases from 0.5 to 0.8, the magnitude of the corresponding self-impedance element in the impedance matrix will increase accordingly, thereby eliminating the linearization error caused by the operating point drift and ensuring that the dynamic impedance coupling matrix can map the time-varying operating conditions of the power grid in real time and nonlinearly.
[0031] Table 1 lists the voltage prediction error comparison data between the fixed impedance model and the dynamic impedance model in this embodiment under a certain load change scenario.
[0032] Table 1. Validation data of dynamic impedance model: ; As shown in Table 1, the error of the dynamic model was significantly lower than that of the fixed model in the 200ms to 400ms range after the load change, and the error was reduced by an order of magnitude, which verified the effectiveness of the sensitivity coefficient update mechanism under nonlinear conditions.
[0033] Please see Figure 1 and Figure 4 S3: Generate a virtual load disturbance sequence that follows a normal distribution. Input the virtual load disturbance sequence into the dynamic impedance coupling matrix for iterative calculation to simulate the node voltage change trend under different load conditions and calculate the virtual voltage response trajectory that includes information about future time windows.
[0034] S31: Based on the statistical characteristics of historical load data, set the mean and standard deviation, and use the Monte Carlo method to generate a series of random power fluctuation values that conform to the normal distribution law. Combine the random power fluctuation values that conform to the normal distribution law to form the virtual load disturbance sequence that simulates the uncertainty of future load. S32: The virtual load disturbance sequence is used as the excitation input to the dynamic impedance coupling matrix. The voltage response values of each node under different disturbance excitations are deduced through matrix multiplication, and multiple sets of voltage prediction time series are generated by arranging them in order of time step. S33: Perform weighted averaging on multiple sets of voltage prediction time series to eliminate random error interference, extract the voltage change envelope of each node within a preset future time window, and construct a virtual voltage response trajectory containing time and spatial information.
[0035] The process of generating a virtual load disturbance sequence specifically includes: acquiring typical daily load curves from the historical operation database of the power grid, fitting the probability density function parameters of load fluctuations using the maximum likelihood estimation method, constructing a Gaussian white noise generator based on the fitted mean and variance parameters, generating random disturbance components superimposed on the benchmark load curve, and thus combining them to generate a virtual load disturbance sequence.
[0036] Typical daily load curve data for the past 30 days for the area to be simulated were retrieved from the historical power grid operation database. Statistical analysis was performed on this time series data, and the probability density function (PDF) of load fluctuations was fitted using the maximum likelihood estimation (MLE) method. It was assumed that the load fluctuations followed a normal distribution. The mean parameter is calculated by taking the logarithmic derivative of the likelihood function. (e.g., 50MW) and standard deviation parameter (e.g., 5MW). A Gaussian white noise generator is constructed based on the fitted statistical parameters. A random number seed is set, and a series of random numbers following a standard normal distribution are generated using the Box-Muller transform algorithm, then linearly transformed into a distribution following a standard normal distribution. The random power fluctuation values are generated. 1000 such random values are generated and superimposed onto the baseline load forecast curve according to a time step (e.g., one point every 15 minutes) to form a virtual load disturbance sequence. .
[0037] The virtual load disturbance sequence is input into the dynamic impedance coupling matrix updated in step S2. In the middle. Perform matrix multiplication. The voltage response deviation of each node under different disturbance excitations is estimated. This deviation is then superimposed on the current reference voltage to obtain the predicted voltage value of each node within a preset future time window (e.g., one hour). Due to the use of a Monte Carlo simulation strategy, 1000 possible voltage response values are generated for each prediction time point. These 1000 sample values are weighted and averaged, with the weights set to the probability density values of each sample occurrence, thereby eliminating the error interference of a single random event. The upper and lower bounds of the 95% confidence interval of the voltage distribution at each time point are extracted, and connecting these upper and lower bounds forms the voltage change envelope. This envelope is the virtual voltage response trajectory, which not only contains the trend of change in the time dimension but also the voltage fluctuation range information in the spatial dimension (each node).
[0038] Please see Figure 1 and Figure 5 S4: Calculate the Euclidean distance deviation between the virtual voltage response trajectory and the preset ideal voltage standard curve. Based on the Euclidean distance deviation, solve the reactive power compensation command that minimizes voltage fluctuation through particle swarm optimization logic, and send the reactive power compensation command to the flexible AC transmission device.
[0039] S41: Obtain the virtual voltage response trajectory and the ideal voltage standard curve, calculate the sum of squares of the differences between the two at each corresponding time point and perform square root operation to generate Euclidean distance deviation that can quantify the degree of voltage deviation. S42: Establish a particle swarm search space containing reactive power output values, set the Euclidean distance deviation as the optimization objective of the fitness function, initialize the position vector and velocity vector of the particle swarm, and find the global optimal position that minimizes the fitness function value through iterative updates. S43: Analyze the reactive power value corresponding to the global optimal position, convert it into control code that the device can execute, and generate reactive power compensation instructions for driving the flexible AC transmission device.
[0040] The iterative update process for finding the global optimum specifically includes: Obtain the current individual extreme value of each particle and the global extreme value of the entire population. Based on the preset inertia weight factor and learning factor, update the particle's velocity vector and position vector using the following formula: ; and ; in, Representing the The particle in the first The velocity vector at the next iteration The inertial weighting factor represents the inertia that maintains the inertia of particle motion. and The learning factor represents the step size of the particle's flight towards the individual and global maxima. and This represents a random number with a value between 0 and 1. Representing the The optimal position of each particle in its historical history. Represents the globally optimal position of the population. Representing the The particle in the first The position vector at the next iteration.
[0041] Setting the ideal voltage standard curve for the power grid The value is typically taken as 1.0 per-unit (pu) of the rated voltage. The virtual voltage response trajectory generated in step S3 is then obtained. At each discrete point in time within the future time window Calculate the difference between the center value of the virtual trajectory and the ideal standard curve. Calculate the sum of squares of the differences at all time points and take the square root to obtain the Euclidean distance deviation. This deviation quantifies the overall degree to which the future voltage trend deviates from the ideal state.
[0042] Establish the search space for the Particle Swarm Optimization (PSO) algorithm. The particle position vectors... Defined as the reactive power output command value of flexible AC transmission systems (FACTS, such as SVC or STATCOM), with the dimension being the number of FACTS devices. The particle swarm size is set to 50, and the maximum number of iterations is 100. Fitness function. Directly defined as Euclidean distance deviation The goal is to find a set of reactive power output values that makes the future voltage trajectory closest to the ideal curve. Initialize the particle's position vector. For random values within the device's allowable range (e.g., -50 Mvar to +50 Mvar), the velocity vector Initialized to 0. In the... In the nth iteration, the following formula is used to update the 1st iteration. The velocity and position of each particle: ; ; in, Representing the The particle in the first The velocity vector at the next iteration Representing the The particle in the first The velocity vector at the next iteration The inertial weighting factor represents the inertia that maintains the inertia of particle motion. and The learning factor represents the step size of the particle's flight towards the individual and global maxima. and This represents a random number with a value between 0 and 1. Representing the The optimal position of each particle in its historical history. Representing the The particle in the first The position vector at the next iteration. Represents the globally optimal position of the population. Representing the The particle in the first The position vector at the next iteration.
[0043] Inertia weight factor The learning factor is set to 0.7 (this value was determined through convergence testing and effectively balances global and local searches). and All values are set to 1.5. To verify the calculation process, we assume the current particle velocity scalar value is... The current position scalar value is 2Mvar / s. The optimal position for this particle is 10 Mvar. With a population size of 12Mvar, the globally optimal position is... 15Mvar, and random numbers Substitute the above values into the speed update formula to calculate: Mvar / s. Then, the position vector is updated using the new velocity: Mvar. If the new position exceeds the device's physical limits (e.g., exceeding +50Mvar), it is forcibly constrained to the boundary values. After 100 iterations, the globally optimal position is output. The corresponding reactive power value (e.g., +15.5Mvar). The control interface converts this value into the corresponding thyristor firing angle (for SVC) or PWM modulation waveform command (for STATCOM), and sends it to the flexible AC transmission device for execution, thereby suppressing voltage fluctuations in their infancy.
[0044] Table 2 shows the convergence performance data of the optimization decision module at different iteration numbers.
[0045] Table 2. Convergence Performance of Particle Swarm Optimization: ; As shown in Table 2, the fitness value decreases rapidly and tends to stabilize as the number of iterations increases, proving that the system can quickly find the optimal control strategy, and the computation time of 115ms meets the time window requirements for real-time regulation of the power grid.
[0046] A power voltage simulation and regulation system based on digital twins, the system being used to execute the aforementioned power voltage simulation and regulation method based on digital twins, the system comprising: The core components of the data acquisition and topology reconstruction module include a high-throughput synchronous phasor acquisition card and a graph computing engine. The acquisition card connects to the secondary side of the power grid transformer via a fiber optic interface and integrates an FPGA chip to perform parallel pipelined operations of Kalman filtering and Hilbert transform. During processing, the module first discretizes the received analog waveform and performs real-time convolution on the data stream using the on-chip stored Kalman gain matrix, outputting cleaned phasor data. Subsequently, the graph computing engine dynamically parses the power grid model file in CIM (Common Information Model) format and, combined with the switch change information from the SCADA system, reconstructs the power grid topology in real time using an adjacency list data structure. When a circuit breaker change signal is detected, the engine completes the dimension adjustment and element reset of the adjacency matrix within 10ms to ensure that subsequent calculations are based on the latest physical connection relationships.
[0047] The dynamic impedance modeling and updating module runs in the in-memory computing unit of an industrial-grade server. This module comes pre-loaded with a component library containing physical parameters for various lines and transformers. During initialization, the module automatically assembles the Jacobian matrix based on the component parameters. During runtime, the module's built-in RLS arithmetic unit periodically retrieves first-order difference data of voltage and power from the data bus. The arithmetic unit stores the covariance matrix in double-precision floating-point format. It also utilizes the BLAS (Basic Linear Algebra Subroutines) library to accelerate matrix multiplication and inverse operations. Whenever a new sensitivity coefficient is calculated... Upon activation, the module immediately triggers the impedance matrix update mechanism, employing sparse matrix storage technology to update only non-zero elements, thereby reducing memory usage and computational overhead. The dynamic impedance coupling matrix output by this module is provided to the virtual simulation module via a shared memory region.
[0048] The virtual simulation and trajectory prediction module mainly consists of a random number generator and a matrix solver. The random number generator, based on a hardware true random number source (TRNG) or a high-order pseudo-random algorithm, continuously generates a stream of load disturbance samples that conform to a normal distribution. Internally, the module maintains a historical load database and periodically (e.g., daily) triggers the MLE algorithm to update the probability distribution parameters. The matrix solver employs a parallel computing architecture (e.g., CUDA cores) to simultaneously process voltage response calculations for thousands of disturbance scenarios. For each time step, the solver multiplies the impedance matrix with the load disturbance vector and stores the result in a cache. The trajectory synthesis unit then reads these results, calculates the statistical mean and confidence interval for each time point, and finally generates a virtual voltage response trajectory data package containing time axis coordinates and voltage amplitude ranges.
[0049] The optimization decision-making and instruction execution module integrates an intelligent optimization algorithm library and an industrial communication protocol stack. The intelligent optimization algorithm library embeds Particle Swarm Optimization (PSO) logic. Upon receiving the virtual voltage response trajectory, the module immediately initiates the optimization process. A dedicated array space in memory is allocated to store the position and velocity information of the particle swarm. In each iteration, the fitness evaluation unit quickly calculates the Euclidean distance deviation and updates the global optimum. When convergence conditions are met (e.g., deviation less than 0.01 or reaching the maximum number of iterations), the module locks the optimal reactive power compensation value. The industrial communication protocol stack (supporting IEC61850 or ModbusTCP) encapsulates this value into a control message, which includes the target device ID, operation type (reactive power regulation), and specific value (e.g., 15.5 Mvar). This message is sent via industrial Ethernet to the field flexible AC transmission device controller, driving the power electronic devices to achieve closed-loop voltage control.
[0050] The above embodiments illustrate preferred embodiments of the present invention. Any equivalent adjustments to the technical solution based on software engineering methods are within the scope of protection, including but not limited to: implementing algorithm logic using different programming languages, refactoring functional modules into services, adjusting data interaction protocols, and optimizing resource scheduling strategies. Any implementation scheme derived from reasonable modifications to the data processing flow, service call chain, or system architecture layer without departing from the core technology of the present invention should be considered within the protection scope defined by the technical solution of the present invention.
Claims
1. A method for power voltage simulation and regulation based on digital twins, characterized in that, Includes the following steps: S1: Collect voltage amplitude and phase data through synchronous phasor measurement devices distributed at key nodes of the power grid, map the voltage amplitude and phase data to Hilbert space, construct a real-time voltage state vector, and extract the power grid topology connection structure that defines the physical connection relationship at the current moment; S2: In the digital twin simulation environment, a dynamic impedance coupling matrix is constructed based on the real-time voltage state vector and the power grid topology connection structure. The sensitivity coefficient describing the electrical correlation strength between nodes is calculated using the recursive least squares algorithm. The dynamic impedance coupling matrix reflecting the nonlinear mapping relationship is updated in real time using the sensitivity coefficient. S3: Generate a virtual load disturbance sequence that follows a normal distribution, input the virtual load disturbance sequence into the dynamic impedance coupling matrix for iterative calculation, simulate the node voltage change trend under different load conditions, and calculate the virtual voltage response trajectory that covers future time window information; S4: Calculate the Euclidean distance deviation between the virtual voltage response trajectory and the preset ideal voltage standard curve, and based on the Euclidean distance deviation, solve the reactive power compensation command that minimizes voltage fluctuation through particle swarm optimization logic, and send the reactive power compensation command to the flexible AC transmission device.
2. The power voltage simulation and regulation method based on digital twins according to claim 1, characterized in that, The specific steps of S1 are as follows: S11: The original voltage amplitude sequence and original voltage phase sequence of key nodes of the power grid are obtained in real time at a millisecond sampling frequency through the synchronous phasor measurement device. The original data are denoised using the Kalman filter algorithm to generate a reference voltage amplitude and reference voltage phase with a high signal-to-noise ratio. S12: Perform Hilbert transform on the amplitude and phase of the reference voltage to construct an analytical signal, map the analytical signal to the complex domain Hilbert space, and establish the real-time voltage state vector that can characterize the instantaneous electrical characteristics of the entire network by combining the complex voltage signals of each node. S13: Read the switching status signals of each circuit breaker and disconnector in the power grid in real time, identify the electrical connectivity between each node based on graph theory logic, construct an adjacency matrix describing the physical connection relationship between nodes, and define it as the power grid topology connection structure.
3. The power voltage simulation and regulation method based on digital twins according to claim 1, characterized in that, The specific steps of S2 are as follows: S21: Obtain the real-time voltage state vector and the power grid topology connection structure, initialize the Jacobian matrix based on the physical circuit law, and use the inverse of the Jacobian matrix as the dynamic impedance coupling matrix at the initial moment. S22: Set the initial values of the forgetting factor and the covariance matrix, take the current node voltage change as the output vector and the node injected power change as the input vector, and use the recursive least squares algorithm to iteratively calculate the partial derivative of voltage with respect to power change to generate the sensitivity coefficient characterizing the voltage fluctuation sensitivity. S23: The impedance matrix elements of the previous moment are weighted and corrected using the newly generated sensitivity coefficients to eliminate model distortion caused by linearization error, thereby establishing the dynamic impedance coupling matrix that can follow the time-varying characteristics of the power grid operation in real time.
4. The power voltage simulation and regulation method based on digital twin according to claim 1, characterized in that, The specific steps of S3 are as follows: S31: Based on the statistical characteristics of historical load data, set the mean and standard deviation, and use the Monte Carlo method to generate a series of random power fluctuation values that conform to the normal distribution law. Combine the random power fluctuation values that conform to the normal distribution law to form the virtual load disturbance sequence that simulates the uncertainty of future load. S32: The virtual load disturbance sequence is used as an excitation input to the dynamic impedance coupling matrix. The voltage response values of each node under different disturbance excitations are deduced through matrix multiplication, and multiple sets of voltage prediction time series are generated by arranging them in order of time step. S33: Perform weighted averaging on multiple sets of voltage prediction time series to eliminate random error interference, extract the voltage change envelope of each node within a future preset time window, and construct the virtual voltage response trajectory containing time domain and spatial domain information.
5. The power voltage simulation and regulation method based on digital twin according to claim 1, characterized in that, The specific steps of S4 are as follows: S41: Obtain the virtual voltage response trajectory and the ideal voltage standard curve, calculate the sum of squares of the differences between the two at each corresponding time point and perform a square root operation to generate the Euclidean distance deviation that can quantify and evaluate the degree of voltage deviation; S42: Establish a particle swarm search space containing reactive power output values, set the Euclidean distance deviation as the optimization objective of the fitness function, initialize the position vector and velocity vector of the particle swarm, and find the global optimal position that minimizes the fitness function value through iterative updates. S43: Analyze the reactive power value corresponding to the global optimal position, convert it into control code that the device can execute, and generate the reactive power compensation command used to drive the flexible AC transmission device.
6. The power voltage simulation and regulation method based on digital twin according to claim 3, characterized in that, The calculation process of the sensitivity coefficient specifically includes: Obtain the estimated parameter vector and covariance matrix from the previous time step, and update the current gain matrix and estimated parameter vector using the following formula, combined with the current input vector: ; and ; in, Representative moment The gain matrix, Representative moment The covariance matrix, Representative moment The input data vector, This represents the forgetting factor used to adjust the weights of historical data. Representative moment The updated sensitivity coefficient, Representative moment The actual observed output value of the system.
7. The power voltage simulation and regulation method based on digital twin according to claim 5, characterized in that, The iterative update process for finding the global optimal position specifically includes: Obtain the current individual extreme value of each particle and the global extreme value of the entire population. Based on the preset inertia weight factor and learning factor, update the particle's velocity vector and position vector using the following formula: ; and ; in, Representing the The particle in the first The velocity vector at the next iteration The inertial weighting factor represents the inertia that maintains the particle's motion inertia. and The learning factor represents the step size of the particle's flight towards the individual and global maxima. and This represents a random number with a value between 0 and 1. Representing the The optimal position of each particle in its historical history. Represents the globally optimal position of the population. Representing the The particle in the first The position vector at the next iteration.
8. The power voltage simulation and regulation method based on digital twin according to claim 2, characterized in that, The process of establishing the real-time voltage state vector specifically includes: The analytical signal magnitude and phase angle of all monitoring nodes are obtained. The analytical signals of each node are arranged into column vectors according to the node number order. The column vectors are expanded into a high-dimensional tensor structure using the Kronecker product. A timestamp is embedded in the tensor structure to establish the real-time voltage state vector with spatiotemporal correlation characteristics.
9. The power voltage simulation and regulation method based on digital twin according to claim 4, characterized in that, The process of generating the virtual load perturbation sequence specifically includes: Typical daily load curves are obtained from the historical operation database of the power grid. The probability density function parameters of load fluctuations are fitted using the maximum likelihood estimation method. A Gaussian white noise generator is constructed based on the fitted mean and variance parameters to generate random disturbance components superimposed on the benchmark load curve, thereby combining to generate the virtual load disturbance sequence.
10. A power voltage simulation and regulation system based on digital twins, characterized in that, The system is used to implement the power voltage simulation and regulation method based on digital twins as described in any one of claims 1-9, and the system comprises: The data acquisition and topology reconstruction module is used to acquire voltage amplitude and phase data through synchronous phasor measurement devices distributed at key nodes of the power grid, map the voltage amplitude and phase data to Hilbert space, construct a real-time voltage state vector, and extract the power grid topology connection structure that defines the physical connection relationship at the current moment. The dynamic impedance modeling and updating module is used to construct the dynamic impedance coupling matrix based on the real-time voltage state vector and the power grid topology in a digital twin simulation environment, calculate the sensitivity coefficient describing the electrical correlation strength between nodes using a recursive least squares algorithm, and update the dynamic impedance coupling matrix reflecting the nonlinear mapping relationship in real time using the sensitivity coefficient. The virtual simulation and trajectory prediction module is used to generate the virtual load disturbance sequence that follows a normal distribution, input the virtual load disturbance sequence into the dynamic impedance coupling matrix for iterative calculation, simulate the node voltage change trend under different load conditions, and calculate the virtual voltage response trajectory that includes future time window information. The optimization decision and instruction execution module is used to calculate the Euclidean distance deviation between the virtual voltage response trajectory and the preset ideal voltage standard curve. Based on the Euclidean distance deviation, the reactive power compensation instruction that minimizes voltage fluctuation is solved in reverse through particle swarm optimization logic, and the reactive power compensation instruction is sent to the flexible AC transmission device.