Simulation optimization method for micro-cooperative operation
By constructing a state feature vector matrix and dynamically correcting the tie line impedance parameters, combined with a delay penalty term to optimize power regulation, the deviation problem of the simulation model in the prior art is solved, achieving accurate power balance and stable control, and providing real-time visual monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-28
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, simulation models for coordinated operation of distribution and micro-networks suffer from voltage deviation calculation distortion and inaccurate network loss assessment due to dynamic drift of tie line impedance parameters and communication delay. This makes it difficult to accurately maintain dynamic balance of tie line power within a specified time, and control strategies are prone to failure.
By collecting and processing grid connection point voltage, tie line power, and communication delay data, a state feature vector matrix is constructed. Combining Kirchhoff's laws and the Long Short-Term Memory network algorithm, the tie line impedance parameters are dynamically corrected. A delay penalty term is added to the objective function, and a power adjustment command is generated using the particle swarm optimization algorithm to achieve simulation optimization.
It improves simulation accuracy and operational stability, ensures the precise maintenance of dynamic power balance of tie lines under complex time-varying conditions, prevents control oscillations and failures, and provides real-time visualization monitoring methods.
Smart Images

Figure CN121615513B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of simulation optimization technology, specifically relating to a simulation optimization method for the coordinated operation of matching and micro-operations. Background Technology
[0002] Distribution-microgrid coordinated operation is an important operating mode in the field of power system automation. Its core is the exchange of operational status data and the execution of coordinated control commands between the upper-level distribution network and the lower-level microgrid through a communication network. The distribution network is responsible for maintaining stable voltage and frequency at the point of common coupling and providing power deficit support, while the microgrid achieves regional energy autonomy through internal distributed power sources, energy storage devices, and flexible loads. Both sides implement hierarchical control based on global optimization objectives, enhancing the absorption capacity of high-penetration renewable energy through real-time interaction of source, grid, load, and storage resources and bidirectional energy regulation, thus ensuring the power balance of the distribution system and the reliability and economy of power supply. Currently, the industry mainly uses steady-state power flow calculation models based on fixed tie-line impedance parameters, combined with deterministic optimization algorithms under ideal communication environments, to conduct offline simulations to achieve distribution-microgrid coordinated operation simulation and control.
[0003] However, existing technologies have certain limitations. On the one hand, in actual operation, the tie line impedance parameters will dynamically drift with changes in source load state. Models with fixed parameters cannot adapt to this change in real time, resulting in parameter deviations in the simulation physical model. On the other hand, existing technologies do not fully consider the actual time delay of the communication network. Accumulated communication delays will cause lag in the response of power regulation commands, ultimately leading to distortion in the calculation of system voltage deviation and inaccurate network loss assessment. The generated cooperative control strategy is difficult to accurately maintain the dynamic balance of tie line power within the specified time, thus leading to control failure. Summary of the Invention
[0004] The purpose of this invention is to provide a simulation optimization method for the coordinated operation of distribution and micro-systems, which can eliminate the defects of voltage deviation calculation distortion and inaccurate network loss assessment, and improve the simulation accuracy and operational stability of distribution-micro-system coordination.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] The simulation optimization method for micro-cooperative operation includes the following steps:
[0007] Collect and preprocess grid connection point voltage data, tie line power data, and communication delay data at the common connection point to construct a state feature vector matrix;
[0008] Based on the preprocessed grid connection point voltage data and tie line power data, a power flow physical network of the distribution network following Kirchhoff's laws is constructed and a node state distribution matrix is output.
[0009] Based on the state feature vector matrix, a long short-term memory network algorithm is used to construct a microgrid source-load prediction model and output the source-load power prediction curve.
[0010] The initial model is generated by the state distribution matrix of the coupled nodes and the power prediction curve of the source load. The residual is calculated based on the state distribution matrix of the nodes and the preprocessed grid connection point voltage data. The tie line impedance parameters in the initial model are corrected by rolling the residual, and the corrected distribution-micro cooperative simulation optimization model is obtained.
[0011] Based on the preprocessed communication delay data, an objective function is set in the distribution-micro collaborative simulation optimization model. The particle swarm optimization algorithm is used to obtain the power regulation command that minimizes the objective function, so as to generate the simulated operating status data. The objective function includes voltage deviation term, network loss term, regulation cost term and delay penalty term. The delay penalty term is positively correlated with the delay and power regulation increment to constrain the regulation rate.
[0012] Preferably, after generating the simulation's running status data, visualization processing is performed:
[0013] Based on the simulated operating status data, the system judges the over-limit situation according to the preset safety threshold, and maps the grid connection point voltage distribution and tie line power flow status of each time step in the simulated operating status data into a two-dimensional visualization frame image according to the simulation time step sequence. The continuously generated two-dimensional visualization frame images are then synthesized in time sequence into a dynamic simulation video stream displayed through the visualization interface.
[0014] Preferably, the process of collecting and preprocessing grid connection point voltage data, tie-line power data, and communication delay data at the point of common coupling includes:
[0015] Voltage transformers and current transformers are installed at the common connection point between the distribution network and the microgrid. The signal input terminal of the synchronous phasor measurement device is connected to the secondary side port of the voltage transformer and the current transformer. Network monitoring probes are deployed at the communication interface between the distribution network master station control server and the microgrid energy management system server.
[0016] The grid connection point voltage data and tie line power data were collected using a synchronous phasor measurement device.
[0017] The high voltage and large current signal on the primary side at the point of common coupling are converted into a low voltage and small current analog signal on the secondary side by voltage transformers and current transformers.
[0018] The analog-to-digital converter is used to discretize the analog signals of low voltage and low current on the secondary side at a preset sampling frequency to obtain a digital sampling sequence.
[0019] Based on the digital sampling sequence, the discrete Fourier transform algorithm is applied to calculate the fundamental voltage phasor and the fundamental current phasor.
[0020] The instantaneous value of the grid connection point voltage is calculated based on the fundamental voltage phasor, and the instantaneous value of the tie-line power is calculated based on the fundamental voltage phasor and the fundamental current phasor.
[0021] By using the Global Navigation Satellite System to receive standard timing signals, microsecond-level time stamps are added to the instantaneous values of grid connection point voltage and tie line power, generating grid connection point voltage data and tie line power data;
[0022] Use network monitoring probes to collect communication latency data;
[0023] When the distribution network master station sends a data packet to the microgrid energy management system, the network monitoring probe located on the distribution network master station side records the sending time.
[0024] When the microgrid energy management system receives a data packet, the network monitoring probe located on the microgrid side records the moment of reception.
[0025] Calculate the time difference between the receiving time and the sending time to obtain the communication delay data for a single transmission;
[0026] The wavelet transform threshold denoising algorithm is used to process the grid connection point voltage data and tie-line power data;
[0027] Wavelet basis functions are selected to perform multi-scale decomposition on grid connection point voltage data and tie line power data, separating low-frequency approximation coefficients and high-frequency detail coefficients.
[0028] Low-frequency approximation coefficients are retained, and high-frequency detail coefficients are quantized using a threshold function;
[0029] The low-frequency approximation coefficients and the quantized high-frequency detail coefficients are used to perform inverse wavelet transform reconstruction, and the preprocessed grid connection point voltage data and tie-line power data are output.
[0030] The moving average filtering algorithm is used to smooth the communication delay data;
[0031] Establish a sliding window of length C, and store the communication delay data of the current sampling time and the previous C-1 consecutive sampling times into the sliding window;
[0032] Calculate the arithmetic mean of the communication delay data within the sliding window, and use it as the preprocessed communication delay data at the current sampling time.
[0033] Preferably, the process of constructing the state feature vector matrix includes:
[0034] A feature extraction window of a preset time length is extracted, and the voltage fluctuation rate and voltage sag depth are extracted from the preprocessed grid connection point voltage data within the feature extraction window.
[0035] The difference between the maximum and minimum values of the preprocessed grid-connected point voltage data within the feature extraction window is calculated, and the voltage fluctuation rate is obtained by dividing the difference by the rated value of the grid-connected point voltage.
[0036] The preprocessed grid-connected point voltage data within the feature extraction window that are below a preset voltage sag threshold are filtered out. The minimum amplitude of the preprocessed grid-connected point voltage data that are below the voltage sag threshold is obtained. The voltage sag depth is obtained by calculating the difference between the rated value and the minimum amplitude of the grid-connected point voltage.
[0037] Extract the power change slope and power peak-to-valley difference from the preprocessed tie-line power data within the feature extraction window;
[0038] Calculate the absolute value of the difference between the preprocessed tie-line power data at two adjacent sampling times within the feature extraction window, and divide the absolute value by the time interval between the two adjacent sampling times to obtain the power change slope.
[0039] The power peak-valley difference is obtained by calculating the difference between the maximum and minimum values of the preprocessed tie-line power data within the feature extraction window.
[0040] The voltage fluctuation rate, voltage sag depth, power change slope, power peak-to-valley difference, and preprocessed communication delay data corresponding to the same feature extraction window cutoff time are spliced together in a preset order to generate a single-moment state feature vector. The single-moment state feature vectors corresponding to consecutive feature extraction windows are stacked according to the time step sequence to generate a state feature vector matrix.
[0041] Preferably, the process of constructing a power flow physical network of a distribution network that follows Kirchhoff's laws and outputting the node state distribution matrix includes:
[0042] Obtain the topology data and line parameter data of the distribution network. The topology data includes the connection relationship of each node in the distribution network, and the line parameter data includes the resistance and reactance values of the branches connecting each node.
[0043] The node admittance matrix of the distribution network is constructed based on topology data and line parameter data. The node admittance matrix includes mutual admittance elements located off-diagonally and self admittance elements located diagonally.
[0044] For the mutual admittance element, calculate the reciprocal of the branch impedance connecting the two nodes and take the negative value as the off-diagonal element corresponding to the two nodes. The branch impedance consists of the resistance value and the reactance value.
[0045] For the self-admittance element, the reciprocal of the branch impedance of the branch directly connected to the target node is accumulated and used as the diagonal element corresponding to the target node.
[0046] The preprocessed grid connection point voltage data and tie line power data are introduced into the power flow physical network of the distribution network as boundary conditions. The preprocessed grid connection point voltage data is set as the voltage amplitude at the point of common coupling, and the preprocessed tie line power data is set as the injected active power and injected reactive power at the point of common coupling.
[0047] Based on the node admittance matrix, a node power balance equation following Kirchhoff's laws is constructed. Equations are established between the injected active power and the calculated active power, and between the injected reactive power and the calculated reactive power of the target node. The node power balance equation includes active power balance equation and reactive power balance equation.
[0048] When constructing the active power balance equation, the voltage amplitude of each node in the distribution network is obtained. The voltage amplitude of each node is combined with the product of the real part of the node admittance matrix element and the cosine of the voltage phase angle difference, and the product of the imaginary part of the node admittance matrix element and the sine of the voltage phase angle difference. The combined operation results are accumulated to obtain the first summation term. The voltage amplitude of the target node is multiplied by the first summation term to obtain the calculated active power. The voltage phase angle difference is composed of the voltage phase angle of the target node and the voltage phase angle of each node in the distribution network.
[0049] When constructing the reactive power balance equation, the voltage amplitude of each node in the distribution network is combined with the product of the real part of the node admittance matrix element and the sine of the voltage phase angle difference, and the product of the imaginary part of the node admittance matrix element and the cosine of the voltage phase angle difference. The combined operation results are accumulated to obtain the second summation term. The voltage amplitude of the target node is multiplied by the second summation term to obtain the calculated reactive power.
[0050] The Newton-Raphson iterative algorithm is used to solve the nodal power balance equations to obtain the voltage amplitude and voltage phase angle of each node in the distribution network except for the point of common coupling.
[0051] The voltage magnitude and voltage phase angle of the common connection point and all other nodes are arranged in order of node number to generate a node state distribution matrix.
[0052] Construct an n-row, 2-column matrix as the node state distribution matrix, where n is the total number of nodes in the distribution network. Store the voltage amplitude of the i-th node in the first column of the i-th row of the node state distribution matrix, and store the voltage phase angle of the i-th node in the second column of the i-th row of the node state distribution matrix.
[0053] Preferably, the process of constructing a microgrid source-load prediction model using a long short-term memory network algorithm and outputting the source-load power prediction curve includes:
[0054] Historical source-load power data of microgrids are retrieved from the historical database of the microgrid energy management system. The state feature vector matrix and the historical source-load power data of microgrids are divided into training datasets and test datasets, and the training datasets and test datasets are normalized.
[0055] According to the preset time series segmentation ratio, the state feature vector matrix and the historical source-load power data of the microgrid are divided into training input set, training target set, test input set and test target set;
[0056] The maximum-minimum normalization algorithm is used to process the training input set, training target set, test input set and test target set, and map the data to a preset numerical range to generate normalized state feature vectors and normalized microgrid historical source-load power data.
[0057] A microgrid source-load prediction model is constructed using a long short-term memory network algorithm, and the network weight parameters and bias parameters are initialized.
[0058] The microgrid source-load prediction model is set to include an input layer, a hidden layer and an output layer. The input layer is used to receive the normalized state feature vector. The hidden layer is composed of memory units expanded in time step order. Each memory unit includes a forget gate, an input gate and an output gate. The output layer is used to output the normalized source-load power prediction data.
[0059] The initial values of the forget gate, input gate, output gate, and weight matrix and bias vector in the cell state update process are set using a random initialization method.
[0060] The forward propagation computation process of the Long Short-Term Memory network algorithm is executed, and the memory unit is used to process the normalized state feature vector.
[0061] The hidden layer output state from the previous time step is concatenated with the normalized state feature vector of the input at the current time step. The concatenated vector is multiplied by the weight matrix of the forget gate and the bias vector of the forget gate is accumulated. The sigmoid activation function is applied to the accumulated result to obtain the forget gate output value with a dimension of 1.
[0062] The concatenated vector is multiplied by the weight matrix of the input gate and the bias vector of the input gate is accumulated. The sigmoid activation function is applied to the accumulated result to obtain the input gate output value with a dimension of 1.
[0063] The concatenated vector is multiplied by the weight matrix of the candidate cell state and the bias vector of the candidate cell state is accumulated. The hyperbolic tangent activation function is applied to the accumulated result to obtain the candidate cell state.
[0064] Calculate the product of the forget gate output value and the cell state at the previous time step, and the product of the input gate output value and the candidate cell state. Add the two products together to obtain the cell state at the current time step.
[0065] The concatenated vector is multiplied by the weight matrix of the output gate and the bias vector of the output gate is accumulated. The sigmoid activation function is applied to the accumulated result to obtain the output value of the output gate with a dimension of 1.
[0066] Apply the hyperbolic tangent activation function to the cell state at the current time step and multiply it with the output value of the output gate to obtain the hidden layer output state at the current time step.
[0067] The backpropagation algorithm is used to train the microgrid source-load prediction model, and the weight matrix and bias vector are updated iteratively by minimizing the loss function.
[0068] Normalized historical source-load power data of microgrids included in the training target set are selected as true values. The mean square error between the predicted value output by the microgrid source-load prediction model and the true value in the training target set is calculated, and the mean square error is used as the loss function.
[0069] Calculate the gradient of the loss function with respect to the weight matrix and the bias vector, and use the gradient descent optimization algorithm to update the weight matrix and the bias vector along the negative gradient direction until the loss function converges, thus obtaining the trained microgrid source-load prediction model.
[0070] The constructed state feature vector matrix is input into the trained microgrid source-load prediction model to obtain normalized source-load power prediction data. The normalized source-load power prediction data is then restored using the maximum-minimum inverse normalization algorithm, and the source-load power prediction curve containing the renewable energy generation power and load consumption power within the microgrid is output.
[0071] Preferably, the process of generating the initial model from the coupled node state distribution matrix and the source load power prediction curve includes:
[0072] The renewable energy generation power and load consumption power inside the microgrid are extracted from the source-load power prediction curve. The renewable energy generation power at the same time is subtracted from the load consumption power to obtain the net active power and net reactive power injected by the microgrid into the distribution network at the same time, which are used as the net injection power of the microgrid at each prediction time.
[0073] The net injected power is assigned as a boundary condition to the common connection point nodes connected to the microgrid in the power flow physical network of the distribution network, and the voltage magnitude and voltage phase angle in the node state distribution matrix are used as the initial state variables of the power flow physical network of the distribution network to achieve fast convergence of power flow calculation and generate an initial model.
[0074] Preferably, the process of obtaining the modified galvano-micro co-simulation optimization model includes:
[0075] The residual voltage is calculated based on the node state distribution matrix of the previous time step and the preprocessed grid connection point voltage data of the current time step.
[0076] Extract the voltage amplitude corresponding to the common connection point from the node state distribution matrix generated in the previous time step, and use it as the predicted value of the grid connection point voltage.
[0077] The instantaneous value of the grid connection point voltage at the current moment is obtained from the preprocessed grid connection point voltage data as the measured value of the grid connection point voltage;
[0078] Calculate the difference between the predicted voltage at the grid connection point and the measured voltage at the grid connection point, and obtain the residual voltage at the current moment;
[0079] The residuals are used to perform rolling correction on the tie line impedance parameters in the initial model to obtain the corrected tie line impedance parameters.
[0080] Retrieve the tie line impedance parameters stored in the previous time step. The tie line impedance parameters include the tie line resistance value and the tie line reactance value.
[0081] Impedance correction coefficients are constructed based on the residuals. The tie line resistance and reactance values of the previous time step are updated using the impedance correction coefficients. The corrected tie line resistance and reactance values are then calculated.
[0082] The corrected tie line impedance parameters are updated into the initial model, the node admittance matrix of the distribution network is reconstructed, and the corrected distribution-micro collaborative simulation optimization model is generated.
[0083] The reciprocal of the tie-line branch impedance is calculated using the corrected tie-line resistance and reactance values, and the negative value is used to update the mutual admittance elements between the common connection point and the main grid node in the node admittance matrix.
[0084] The reciprocal of the tie-line branch impedance is calculated using the corrected tie-line resistance and reactance values. The reciprocal is then added to the self-admittance element corresponding to the common connection point in the node admittance matrix. The output is a pair-micro co-simulation optimization model containing the updated node admittance matrix and the source-load power prediction curve.
[0085] Preferably, the process of setting the objective function in the matching-micro collaborative simulation optimization model, based on the preprocessed communication delay data, includes:
[0086] In the revised match-micro co-simulation optimization model, the decision variables and constraints to be optimized are set;
[0087] The active and reactive power outputs of controllable distributed power sources within the microgrid, as well as the charging and discharging power of energy storage devices, are set as decision variables, and these decision variables constitute power regulation commands.
[0088] Set constraints for power regulation commands, including upper and lower limits for distributed power output, upper and lower limits for the state of charge of energy storage devices, and upper and lower limits for tie-line power.
[0089] Construct an objective function that includes voltage deviation term, network loss term, regulation cost term, and delay penalty term;
[0090] Based on the node state distribution matrix in the modified distribution-micro cooperative simulation optimization model, the sum of squares of the deviations between the voltage amplitude of each node in the distribution network and the rated voltage of the distribution network is calculated to obtain the voltage deviation term.
[0091] Based on the power flow calculation results in the modified distribution-micro cooperative simulation optimization model, the sum of active power losses on the distribution network branches is calculated to obtain the network loss term;
[0092] Based on the power regulation command, calculate the operating cost of controllable distributed power sources and energy storage devices within the microgrid to obtain the regulation cost item;
[0093] Based on the preprocessed communication delay data, a delay penalty term is calculated. The delay penalty term is positively correlated with the product of the communication delay and the power adjustment increment.
[0094] The objective function is generated by weighted summation of the voltage deviation term, network loss term, regulation cost term, and delay penalty term.
[0095] Preferably, the process of using particle swarm optimization algorithm to obtain the power adjustment command that minimizes the objective function to generate simulated operating state data includes:
[0096] The particle swarm optimization algorithm is used to optimize the objective function and obtain the optimal power regulation command.
[0097] Initialize the particle swarm, set the total number of particles and the maximum number of iterations, initialize the position vector of each particle with a set of power adjustment commands, and initialize the velocity vector of each particle with random values;
[0098] The position vector of the particle is substituted into the modified distribution-micro cooperative simulation optimization model to perform power flow calculation, obtain the corresponding node state distribution matrix and the current amplitude of each branch of the distribution network, and calculate the objective function value of each particle in combination with the preprocessed communication delay data. The objective function value is used as the fitness value of the particle.
[0099] The individual and global extreme values of a particle are updated by comparing its current fitness value with the particle's historical best fitness value and the population's historical best fitness value.
[0100] The particle's velocity and position vectors are updated based on the individual and global extreme values. The maximum number of iterations is determined. If the maximum number of iterations has not been reached, the next iteration is performed. If the maximum number of iterations has been reached, the position vector corresponding to the global extreme value is output as the optimal power adjustment command.
[0101] The optimal power regulation command is input into the modified distribution-micro cooperative simulation optimization model to perform the final power flow calculation and output the simulated operating status data.
[0102] The beneficial effects of this invention are as follows:
[0103] This invention solves the problem of simulation physical model deviation caused by the solidification of model parameters in the prior art by using the residual rolling correction of tie line impedance parameters with the node state distribution matrix and the preprocessed grid connection point voltage data. It realizes the dynamic approximation of tie line impedance parameters with the change of source load state, eliminates the defects of voltage deviation calculation distortion and inaccurate network loss assessment, and improves the physical realism and calculation accuracy of the distribution-micro collaborative simulation optimization model under complex time-varying conditions.
[0104] This invention solves the problem of delayed power regulation command response caused by accumulated communication delay in existing technologies by collecting communication delay data and setting a delay penalty term in the objective function that is positively correlated with the delay and power regulation increment. When generating power regulation commands, the invention actively constrains the regulation rate to adapt to the current communication environment, preventing control oscillations and failures caused by delays in sending power regulation commands. This ensures that the cooperative control strategy can still accurately maintain the dynamic balance of tie-line power under communication-limited conditions.
[0105] This invention maps the grid connection point voltage distribution and tie line power flow status contained in the simulated operating status data into two-dimensional visual frame images and synthesizes them into a dynamic simulation video stream. This overcomes the limitation of traditional discrete numerical displays that cannot intuitively reflect the continuous dynamic evolution process. It provides maintenance personnel with a time-step-based visual monitoring method, which facilitates real-time understanding of the global operating status of the distribution-micro coupling system and rapid identification of over-limit situations. Attached Figure Description
[0106] Figure 1 This is a schematic flowchart of the method of the present invention;
[0107] Figure 2 This is a schematic diagram of the interface during the visualization phase of the verification of this invention;
[0108] Figure 3 This is a graph showing the change in tie line impedance parameters during the model parameter correction stage when verifying the present invention.
[0109] Figure 4This is a comparison chart of the measured and predicted values of the grid connection point voltage after model correction during the verification of this invention;
[0110] Figure 5 The diagram shows the optimized power adjustment command results considering the impact of communication latency during the verification of this invention. Detailed Implementation
[0111] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0112] Example 1: As Figure 1 As shown, this invention provides a simulation optimization method for co-operation of micro-operations, comprising the following steps:
[0113] Collect and preprocess grid connection point voltage data, tie line power data, and communication delay data at the common connection point to construct a state feature vector matrix;
[0114] Based on the preprocessed grid connection point voltage data and tie line power data, a power flow physical network of the distribution network following Kirchhoff's laws is constructed and a node state distribution matrix is output.
[0115] Based on the state feature vector matrix, a long short-term memory network algorithm is used to construct a microgrid source-load prediction model and output the source-load power prediction curve.
[0116] The initial model is generated by the state distribution matrix of the coupled nodes and the power prediction curve of the source load. The residual is calculated based on the state distribution matrix of the nodes and the preprocessed grid connection point voltage data. The tie line impedance parameters in the initial model are corrected by rolling the residual, and the corrected distribution-micro cooperative simulation optimization model is obtained.
[0117] Based on the preprocessed communication delay data, an objective function is set in the distribution-micro collaborative simulation optimization model. The particle swarm optimization algorithm is used to obtain the power regulation command that minimizes the objective function, so as to generate the simulated operating status data. The objective function includes voltage deviation term, network loss term, regulation cost term and delay penalty term. The delay penalty term is positively correlated with the delay and power regulation increment to constrain the regulation rate.
[0118] The process of collecting and preprocessing grid connection point voltage data, tie-line power data, and communication delay data at the point of common coupling includes:
[0119] Voltage transformers and current transformers are installed at the common connection point between the distribution network and the microgrid. The signal input terminal of the synchronous phasor measurement device is connected to the secondary side port of the voltage transformer and the current transformer. Network monitoring probes are deployed at the communication interface between the distribution network master station control server and the microgrid energy management system server.
[0120] The grid connection point voltage data and tie line power data are collected using a synchronous phasor measurement device.
[0121] Voltage and current transformers are used to convert the high voltage and high current signal on the primary side at the point of common coupling into a low voltage and low current analog signal on the secondary side.
[0122] The analog-to-digital converter is used to discretize the low-voltage and low-current analog signals on the secondary side at a preset sampling frequency to obtain a digital sampling sequence.
[0123] Based on the digital sampling sequence, the discrete Fourier transform algorithm is applied to calculate the fundamental voltage phasor and the fundamental current phasor.
[0124] The instantaneous value of the grid connection point voltage is calculated based on the fundamental voltage phasor, and the instantaneous value of the tie-line power is calculated based on the fundamental voltage phasor and the fundamental current phasor.
[0125] By using the Global Navigation Satellite System to receive standard timing signals, microsecond-level time stamps are added to the instantaneous values of grid connection point voltage and tie line power, generating grid connection point voltage data and tie line power data.
[0126] Use network monitoring probes to collect communication latency data.
[0127] When the distribution network master station sends a data packet to the microgrid energy management system, the network monitoring probe located on the distribution network master station side records the sending time.
[0128] When the microgrid energy management system receives a data packet, the network monitoring probe located on the microgrid side records the moment of reception.
[0129] Calculate the time difference between the receiving time and the sending time to obtain the communication delay data for a single transmission.
[0130] The wavelet transform threshold denoising algorithm is used to process the grid connection point voltage data and tie line power data.
[0131] Wavelet basis functions are selected to perform multi-scale decomposition on grid connection point voltage data and tie line power data, separating low-frequency approximation coefficients and high-frequency detail coefficients.
[0132] Low-frequency approximation coefficients are retained, and high-frequency detail coefficients are quantized using a threshold function.
[0133] The low-frequency approximation coefficients and the quantized high-frequency detail coefficients are used to perform inverse wavelet transform reconstruction, and the preprocessed grid connection point voltage data and tie-line power data are output.
[0134] The moving average filtering algorithm is used to smooth the communication delay data.
[0135] Establish a sliding window of length C, and store the communication delay data of the current sampling time and the previous C-1 consecutive sampling times into the sliding window.
[0136] Calculate the arithmetic mean of the communication delay data within the sliding window, and use it as the preprocessed communication delay data at the current sampling time.
[0137] The process of constructing the state feature vector matrix includes:
[0138] A feature extraction window of a preset time length is selected, and voltage fluctuation rate and voltage sag depth are extracted from the preprocessed grid connection point voltage data within the feature extraction window.
[0139] The difference between the maximum and minimum values of the preprocessed grid-connected point voltage data within the feature extraction window is calculated, and the voltage fluctuation rate is obtained by dividing the difference by the rated value of the grid-connected point voltage.
[0140] The preprocessed grid-connected point voltage data within the feature extraction window that are below a preset voltage sag threshold are filtered out. The minimum amplitude of the preprocessed grid-connected point voltage data that are below the voltage sag threshold is obtained. The voltage sag depth is obtained by calculating the difference between the rated value of the grid-connected point voltage and the minimum amplitude.
[0141] Extract the power change slope and power peak-to-valley difference from the preprocessed tie-line power data within the feature extraction window.
[0142] Calculate the absolute value of the difference between the preprocessed tie-line power data at two adjacent sampling times within the feature extraction window, and divide the absolute value by the time interval between the two adjacent sampling times to obtain the power change slope.
[0143] The power peak-valley difference is obtained by calculating the difference between the maximum and minimum values of the preprocessed tie-line power data within the feature extraction window.
[0144] The voltage fluctuation rate, voltage sag depth, power change slope, power peak-to-valley difference, and preprocessed communication delay data corresponding to the same feature extraction window cutoff time are spliced together in a preset order to generate a single-moment state feature vector. The single-moment state feature vectors corresponding to consecutive feature extraction windows are stacked according to the time step sequence to generate a state feature vector matrix.
[0145] The process of constructing a power flow physical network for a distribution network that follows Kirchhoff's laws and outputting the node state distribution matrix includes:
[0146] Obtain the topology data and line parameter data of the distribution network. The topology data includes the connection relationship of each node in the distribution network, and the line parameter data includes the resistance and reactance values of the branches connecting each node.
[0147] The node admittance matrix of the distribution network is constructed based on topology data and line parameter data. The node admittance matrix includes mutual admittance elements located off-diagonally and self admittance elements located diagonally.
[0148] For the mutual admittance element, calculate the reciprocal of the branch impedance connecting the two nodes and take the negative value. This is used as the off-diagonal element corresponding to the two nodes. The branch impedance consists of the resistance value and the reactance value.
[0149] For the self-admittance element, the reciprocal of the branch impedance of the branch directly connected to the target node is accumulated and used as the diagonal element corresponding to the target node.
[0150] The preprocessed grid connection point voltage data and tie line power data are introduced into the power flow physical network of the distribution network as boundary conditions. The preprocessed grid connection point voltage data is set as the voltage amplitude at the point of common coupling, and the preprocessed tie line power data is set as the injected active power and injected reactive power at the point of common coupling.
[0151] Based on the nodal admittance matrix, a nodal power balance equation following Kirchhoff's laws is constructed. Equations are established between the injected active power and the calculated active power, and between the injected reactive power and the calculated reactive power at the target node. The nodal power balance equation includes active power balance equation and reactive power balance equation.
[0152] When constructing the active power balance equation, the voltage amplitude of each node in the distribution network is obtained. The voltage amplitude of each node is combined with the product of the real part of the node admittance matrix element and the cosine of the voltage phase angle difference, and the product of the imaginary part of the node admittance matrix element and the sine of the voltage phase angle difference. The combined operation results are accumulated to obtain the first summation term. The voltage amplitude of the target node is multiplied by the first summation term to obtain the calculated active power. The voltage phase angle difference is composed of the voltage phase angle of the target node and the voltage phase angle of each node in the distribution network.
[0153] When constructing the reactive power balance equation, the voltage amplitude of each node in the distribution network is combined with the product of the real part of the node admittance matrix element and the sine of the voltage phase angle difference, and the product of the imaginary part of the node admittance matrix element and the cosine of the voltage phase angle difference. The combined operation results are accumulated to obtain the second summation term. The voltage amplitude of the target node is multiplied by the second summation term to obtain the calculated reactive power.
[0154] The Newton-Raphson iterative algorithm is used to solve the nodal power balance equations to obtain the voltage amplitude and voltage phase angle of each node in the distribution network except for the point of common coupling.
[0155] The voltage magnitudes and phase angles of the common connection point and all other nodes are arranged in order of node number to generate a node state distribution matrix.
[0156] Construct an n-row, 2-column matrix as the node state distribution matrix, where n is the total number of nodes in the distribution network. Store the voltage amplitude of the i-th node in the first column of the i-th row of the node state distribution matrix, and store the voltage phase angle of the i-th node in the second column of the i-th row of the node state distribution matrix.
[0157] The process of constructing a microgrid source-load prediction model using a long short-term memory network algorithm and outputting the source-load power prediction curve includes:
[0158] Historical source-load power data of the microgrid is retrieved from the historical database of the microgrid energy management system. The state feature vector matrix and the historical source-load power data of the microgrid are divided into training dataset and test dataset, and the training dataset and test dataset are normalized.
[0159] According to the preset time series segmentation ratio, the state feature vector matrix and the historical source-load power data of the microgrid are divided into training input set, training target set, test input set and test target set.
[0160] The maximum-minimum normalization algorithm is used to process the training input set, training target set, test input set, and test target set, mapping the data to a preset numerical range to generate normalized state feature vectors and normalized microgrid historical source-load power data.
[0161] A microgrid source-load prediction model is constructed using a long short-term memory network algorithm, and the network weight parameters and bias parameters are initialized.
[0162] The microgrid source-load prediction model is set to include an input layer, a hidden layer, and an output layer. The input layer is used to receive the normalized state feature vector. The hidden layer consists of memory units expanded in time step order. Each memory unit includes a forget gate, an input gate, and an output gate. The output layer is used to output the normalized source-load power prediction data.
[0163] The initial values of the forget gate, input gate, output gate, and weight matrix and bias vector in the cell state update process are set by a random initialization method.
[0164] The forward propagation computation process of the Long Short-Term Memory (LSTM) network algorithm is executed, and the normalized state feature vector is processed using memory units.
[0165] The hidden layer output state from the previous time step is concatenated with the normalized state feature vector of the input at the current time step. The concatenated vector is multiplied by the weight matrix of the forget gate and the bias vector of the forget gate is accumulated. The sigmoid activation function is applied to the accumulated result to obtain the forget gate output value with a dimension of 1.
[0166] The concatenated vector is multiplied by the weight matrix of the input gate and accumulated by the bias vector of the input gate. The sigmoid activation function is then applied to the accumulated result to obtain the input gate output value with a dimension of 1.
[0167] The concatenated vector is multiplied by the weight matrix of the candidate cell state and the bias vector of the candidate cell state is accumulated. The hyperbolic tangent activation function is applied to the accumulated result to obtain the candidate cell state.
[0168] Calculate the product of the forget gate output value and the cell state at the previous time step, and the product of the input gate output value and the candidate cell state. Add the two products together to obtain the cell state at the current time step.
[0169] The concatenated vector is multiplied by the weight matrix of the output gate and the bias vector of the output gate is accumulated. The sigmoid activation function is applied to the accumulated result to obtain the output value of the output gate with a dimension of 1.
[0170] Apply the hyperbolic tangent activation function to the cell state at the current time step and multiply it with the output value of the output gate to obtain the hidden layer output state at the current time step.
[0171] The backpropagation algorithm is used to train the microgrid source-load prediction model, and the weight matrix and bias vector are updated iteratively by minimizing the loss function.
[0172] Normalized historical source-load power data of microgrids included in the training target set are selected as true values. The mean square error between the predicted value output by the microgrid source-load prediction model and the true value in the training target set is calculated, and the mean square error is used as the loss function.
[0173] Calculate the gradient of the loss function with respect to the weight matrix and the bias vector, and use the gradient descent optimization algorithm to update the weight matrix and the bias vector along the negative gradient direction until the loss function converges, thus obtaining the trained microgrid source-load prediction model.
[0174] The constructed state feature vector matrix is input into the trained microgrid source-load prediction model to obtain normalized source-load power prediction data. The normalized source-load power prediction data is then restored using the maximum-minimum inverse normalization algorithm, and the source-load power prediction curve containing the renewable energy generation power and load consumption power within the microgrid is output.
[0175] The process of generating the initial model from the coupled node state distribution matrix and source load power prediction curve includes:
[0176] The renewable energy generation power and load consumption power within the microgrid are extracted from the source-load power prediction curve. The load consumption power is subtracted from the renewable energy generation power at the same time to obtain the net active power and net reactive power injected by the microgrid into the distribution network at the same time, which are used as the net injection power of the microgrid at each prediction time.
[0177] The net injected power is assigned as a boundary condition to the common connection point nodes connected to the microgrid in the power flow physical network of the distribution network, and the voltage magnitude and voltage phase angle in the node state distribution matrix are used as the initial state variables of the power flow physical network of the distribution network to achieve fast convergence of power flow calculation and generate an initial model.
[0178] The process of obtaining the corrected calibrator-micro co-simulation optimization model includes:
[0179] The residual voltage is calculated based on the node state distribution matrix of the previous time step and the preprocessed grid connection point voltage data of the current time step.
[0180] Extract the voltage amplitude corresponding to the common connection point from the node state distribution matrix generated in the previous time step, and use it as the predicted voltage value of the grid connection point. .
[0181] The instantaneous value of the grid connection point voltage at the current moment is obtained from the preprocessed grid connection point voltage data as the measured value of the grid connection point voltage. .
[0182] Calculate the predicted voltage at the grid connection point Measured value of grid connection point voltage The difference between them is used to obtain the residual voltage at the current moment. .
[0183] The residuals are used to perform rolling corrections on the tie line impedance parameters in the initial model to obtain the corrected tie line impedance parameters.
[0184] Retrieve the tie line impedance parameters stored at the previous time step. The tie line impedance parameters include the tie line resistance value. With tie line reactance value .
[0185] Based on residuals Construct an impedance correction factor, and use the impedance correction factor to adjust the tie line resistance value at the previous time step. With tie line reactance value Update and calculate the corrected tie-line resistance value. and the corrected tie line reactance value ,in, The gain coefficient is adjusted to the preset resistance. This is the preset reactance correction gain coefficient. This is the rated voltage at the point of common coupling.
[0186] The corrected tie-line impedance parameters are updated in the initial model, the node admittance matrix of the distribution network is reconstructed, and the corrected distribution-micro collaborative simulation optimization model is generated.
[0187] The reciprocal of the tie-line branch impedance is calculated using the corrected tie-line resistance and reactance values, and then the negative value is used to update the mutual admittance elements between the common connection point and the main grid node in the node admittance matrix.
[0188] The reciprocal of the tie-line branch impedance is calculated using the corrected tie-line resistance and reactance values. The reciprocal is then added to the self-admittance element corresponding to the common connection point in the node admittance matrix. The output is a pair-micro co-simulation optimization model containing the updated node admittance matrix and the source-load power prediction curve.
[0189] The process of setting the objective function in the PE-Micro collaborative simulation optimization model, based on the preprocessed communication delay data, includes:
[0190] In the modified calibrated-micro collaborative simulation optimization model, the decision variables and constraints to be optimized are set.
[0191] The active and reactive power outputs of controllable distributed power sources within the microgrid, as well as the charging and discharging power of energy storage devices, are set as decision variables, which constitute the power regulation command.
[0192] Set constraints for power regulation commands, including upper and lower limits for distributed power output, upper and lower limits for the state of charge of energy storage devices, and upper and lower limits for tie-line power.
[0193] Construct an objective function that includes voltage deviation, network loss, regulation cost, and delay penalty terms.
[0194] Based on the node state distribution matrix in the modified distribution-micro cooperative simulation optimization model, the voltage amplitude of each node in the distribution network is calculated. With rated voltage The sum of squares of the deviations between them yields the voltage deviation term. Where N is the total number of distribution network nodes and i is the index of the distribution network node.
[0195] Based on the power flow calculation results in the modified distribution-micro cooperative simulation optimization model, the sum of active power losses on the distribution network branches is calculated to obtain the network loss term. Where M is the total number of distribution network branches, Let J be the current amplitude of the j-th branch. Let be the resistance value of the j-th branch.
[0196] Based on the power regulation command, the operating costs of controllable distributed power sources and energy storage devices within the microgrid are calculated, resulting in the regulation cost item. ,in, Let the unit power adjustment cost of the k-th controllable device be . Let K be the active power output of the kth controllable device, where K represents the total number of controllable devices within the microgrid.
[0197] Combined with preprocessed communication delay data Calculate the delay penalty term The delay penalty term is positively correlated with the product of communication delay and power regulation increment, where, This represents the power adjustment command value for the k-th controllable device at the current moment. This represents the actual power value of the k-th controllable device at the previous time step. This is the absolute value of the power adjustment increment.
[0198] The objective function is generated by weighted summation of the voltage deviation term, network loss term, regulation cost term, and delay penalty term. ,in, These are the voltage deviation terms. Network loss items Adjustment cost item and delay penalty items The corresponding weighting coefficients.
[0199] The process of using particle swarm optimization to obtain the power regulation command that minimizes the objective function and generating simulated operating state data includes:
[0200] The particle swarm optimization algorithm is used to optimize the objective function and obtain the optimal power regulation command.
[0201] Initialize the particle swarm, set the total number of particles and the maximum number of iterations, initialize the position vector of each particle with a set of power adjustment commands, and initialize the velocity vector of each particle with random values.
[0202] The position vector of the particle is substituted into the modified distribution-micro cooperative simulation optimization model to perform power flow calculation, obtain the corresponding node state distribution matrix and the current amplitude of each branch of the distribution network, and calculate the objective function value of each particle in combination with the preprocessed communication delay data. The objective function value is used as the fitness value of the particle.
[0203] The individual and global extreme values of a particle are updated by comparing its current fitness value with the particle's historical best fitness value and the population's historical best fitness value.
[0204] The particle's velocity and position vectors are updated based on the individual and global extreme values. The maximum number of iterations is determined. If the maximum number of iterations has not been reached, the next iteration is performed. If the maximum number of iterations has been reached, the position vector corresponding to the global extreme value is output as the optimal power adjustment command.
[0205] The optimal power regulation command is input into the modified distribution-micro cooperative simulation optimization model to perform the final power flow calculation and output the simulated operating status data.
[0206] After generating the simulation's running status data, visualization processing is performed:
[0207] Based on the simulated operating status data, the system judges the over-limit situation according to the preset safety threshold, and maps the grid connection point voltage distribution and tie line power flow status of each time step in the simulated operating status data into a two-dimensional visualization frame image according to the simulation time step sequence. The continuously generated two-dimensional visualization frame images are then synthesized in time sequence into a dynamic simulation video stream displayed through the visualization interface.
[0208] One verification example is that, in order to verify the effectiveness and superiority of the method in this embodiment under complex time-varying operating conditions and communication-constrained conditions, a simulation model of a distribution network and microgrid coupled system with 6 nodes was constructed for testing.
[0209] The simulation verification objects are the voltage stability at the point of common coupling of the distribution network and the dynamic power balance of the tie lines. The experimental environment is set with high-proportion renewable energy fluctuations and random communication delay interference. The simulation results are as follows: Figures 2-5 As shown.
[0210] Figure 2 The system displays a two-dimensional visualization frame image of the coupled distribution network and microgrid system. The color changes of the node dots intuitively reflect the voltage distribution status at the grid connection point. The greater the deviation of the color from the 10kV reference color, the greater the voltage amplitude deviates from the rated value. The thickness of the lines connecting the nodes intuitively reflects the power flow status of the tie lines. The thicker the lines, the greater the power value flowing through the branches. Through continuous time step refresh, operation and maintenance personnel can intuitively grasp the dynamic evolution trend of the coupled distribution network and microgrid system.
[0211] Figure 3 In the diagram, the horizontal axis represents the time step sequence, and the vertical axis represents the impedance value. Figure 3 The simulation includes two dynamic curves with different markers. The curve with circular markers represents the tie line resistance value, and the curve with square markers represents the tie line reactance value. As the simulation time progresses, the tie line resistance and reactance values do not remain fixed, but fluctuate and adjust continuously according to the residuals. This indicates that the rolling correction mechanism of the present invention is working and can capture the dynamic drift of the physical parameters of the power distribution network and microgrid coupling system in real time.
[0212] Figure 4The diagram illustrates the comparison of grid-connected point voltage changes over time. The solid line represents the measured grid-connected point voltage, while the dashed line represents the predicted grid-connected point voltage. It can be seen that although the voltage fluctuates dramatically due to source-load fluctuations, the dashed line (predicted value) closely follows the solid line (measured value), with a high degree of overlap. The extremely small gap in between represents the residual region, indicating that after [further details needed for accurate translation], the voltage remains stable. Figure 3 After the tie line impedance parameters were corrected, the physical realism of the P-Micro co-simulation optimization model was significantly improved.
[0213] Figure 5 The dual-axis curves in the figure illustrate the relationship between the optimized power regulation command and the communication environment. The solid curve marked with a triangle represents the power regulation command (left axis), and the pure dashed curve represents the communication delay data (right axis). It can be observed that when the communication delay (dashed line) shows a peak or a sudden increase, the change in the power regulation command (solid line) is significantly constrained and behaves more smoothly. When the delay is low, the power regulation command responds more quickly. This verifies the effectiveness of the delay penalty term in the objective function, that is, actively constraining the regulation rate when communication is limited to prevent the power regulation command from lagging and causing system oscillation.
[0214] As can be seen from this verification example, the method of this embodiment effectively solves the problem of missing boundary conditions in the initial model construction by combining the source-load power prediction curve and the node state distribution matrix. By using residual rolling to correct the tie line impedance parameters, it eliminates the deviation of the simulation physical model caused by the solidification of model parameters, ensuring the high fidelity of the distribution-micro cooperative simulation optimization model under complex working conditions. By introducing a delay penalty term related to time delay in the objective function, it effectively suppresses the power adjustment command response lag caused by the accumulation of communication delay, ensuring the stability and robustness of the cooperative control strategy.
[0215] In summary, the simulation optimization method for the coordinated operation of the distribution and micro-systems proposed in this embodiment demonstrates excellent model adaptive correction and optimization control capabilities under the dual interference of source load fluctuations and communication delays. At the same time, by generating dynamic simulation video streams, an intuitive visualization interface for the coordinated operation of the distribution and micro-systems is constructed, which has significant engineering application value.
[0216] Example 2: Based on Example 1, the process of rolling correction of tie-line impedance parameters in the initial model using residuals further includes:
[0217] A multivariate residual fusion vector is constructed. The multivariate residual fusion vector is formed by dynamically weighting and fusing the residuals of voltage amplitude at the grid connection point, active power at the grid connection point, and voltage phase angle at the grid connection point. The weight coefficients of each residual component are adaptively adjusted according to the real-time operating status. The weight coefficient of voltage amplitude residual increases monotonically with the increase of the absolute value of voltage deviation, the weight coefficient of active power residual increases monotonically with the increase of tie line power fluctuation rate, and the weight coefficient of voltage phase angle residual increases exponentially when the phase angle deviation exceeds the preset threshold.
[0218] An adaptive fuzzy logic controller is used to dynamically generate impedance correction gain coefficients. The multivariate residual fusion vector, residual change rate, and preprocessed communication delay data are used as input variables for the fuzzy logic controller. The impedance correction gain coefficients are calculated in real-time using a pre-set fuzzy rule base. With reactance-corrected gain coefficient The fuzzy rule base is built on the basis of "if the residual is large and the residual changes rapidly and the communication delay is high, then a conservative correction strategy is adopted". The conservative correction strategy refers to limiting the upper limit of the magnitude of the correction gain coefficient.
[0219] Apply anti-saturation constraints to the impedance parameter correction amount, set the physical boundary range of the tie line resistance value and the tie line reactance value and the upper limit of the single correction rate. When the corrected resistance value or reactance value exceeds the physical boundary range, constrain the parameter value to the nearest boundary, and the single correction amount does not exceed the preset percentage of the parameter value at the previous moment.
[0220] Predictive feedforward correction is implemented based on sliding window analysis of historical residual sequences. A sliding window of length L is used to store the multivariate residual fusion vector of the most recent L time moments. The trend slope of the residual sequence is calculated by linear regression. When the trend slope continues to be in the same direction for more than a preset number of times, the impedance correction direction and magnitude are adjusted in advance to achieve advance correction.
Claims
1. A simulation optimization method for micro-cooperative operation, characterized in that, Includes the following steps: Collect and preprocess grid connection point voltage data, tie line power data, and communication delay data at the common connection point to construct a state feature vector matrix; Based on the preprocessed grid connection point voltage data and tie line power data, a power flow physical network of the distribution network following Kirchhoff's laws is constructed and a node state distribution matrix is output. Based on the state feature vector matrix, a long short-term memory network algorithm is used to construct a microgrid source-load prediction model and output the source-load power prediction curve. The initial model is generated by the state distribution matrix of the coupled nodes and the power prediction curve of the source load. The residual is calculated based on the state distribution matrix of the nodes and the preprocessed grid connection point voltage data. The tie line impedance parameters in the initial model are corrected by rolling the residual, and the corrected distribution-micro cooperative simulation optimization model is obtained. Based on the preprocessed communication delay data, an objective function is set in the distribution-micro collaborative simulation optimization model. The particle swarm optimization algorithm is used to obtain the power regulation command that minimizes the objective function, so as to generate the simulated operating status data. The objective function includes voltage deviation term, network loss term, regulation cost term and delay penalty term. The delay penalty term is positively correlated with the delay and power regulation increment to constrain the regulation rate.
2. The simulation optimization method for matching-micro cooperative operation according to claim 1, characterized in that, After generating the simulation's running status data, visualization processing is performed: Based on the simulated operating status data, the system judges the over-limit situation according to the preset safety threshold, and maps the grid connection point voltage distribution and tie line power flow status of each time step in the simulated operating status data into a two-dimensional visualization frame image according to the simulation time step sequence. The continuously generated two-dimensional visualization frame images are then synthesized in time sequence into a dynamic simulation video stream displayed through the visualization interface.
3. The simulation optimization method for matching-micro cooperative operation according to claim 1, characterized in that, The process of collecting and preprocessing grid connection point voltage data, tie-line power data, and communication delay data at the point of common coupling includes: Voltage transformers and current transformers are installed at the common connection point between the distribution network and the microgrid. The signal input terminal of the synchronous phasor measurement device is connected to the secondary side port of the voltage transformer and the current transformer. Network monitoring probes are deployed at the communication interface between the distribution network master station control server and the microgrid energy management system server. The grid connection point voltage data and tie line power data were collected using a synchronous phasor measurement device. The high voltage and large current signal on the primary side at the point of common coupling are converted into a low voltage and small current analog signal on the secondary side by voltage transformers and current transformers. The analog-to-digital converter is used to discretize the analog signals of low voltage and low current on the secondary side at a preset sampling frequency to obtain a digital sampling sequence. Based on the digital sampling sequence, the discrete Fourier transform algorithm is applied to calculate the fundamental voltage phasor and the fundamental current phasor. The instantaneous value of the grid connection point voltage is calculated based on the fundamental voltage phasor, and the instantaneous value of the tie-line power is calculated based on the fundamental voltage phasor and the fundamental current phasor. By using the Global Navigation Satellite System to receive standard timing signals, microsecond-level time stamps are added to the instantaneous values of grid connection point voltage and tie line power, generating grid connection point voltage data and tie line power data; Use network monitoring probes to collect communication latency data; When the distribution network master station sends a data packet to the microgrid energy management system, the network monitoring probe located on the distribution network master station side records the sending time. When the microgrid energy management system receives a data packet, the network monitoring probe located on the microgrid side records the moment of reception. Calculate the time difference between the receiving time and the sending time to obtain the communication delay data for a single transmission; The wavelet transform threshold denoising algorithm is used to process the grid connection point voltage data and tie-line power data; Wavelet basis functions are selected to perform multi-scale decomposition on grid connection point voltage data and tie line power data, separating low-frequency approximation coefficients and high-frequency detail coefficients. Low-frequency approximation coefficients are retained, and high-frequency detail coefficients are quantized using a threshold function; The low-frequency approximation coefficients and the quantized high-frequency detail coefficients are used to perform inverse wavelet transform reconstruction, and the preprocessed grid connection point voltage data and tie-line power data are output. The moving average filtering algorithm is used to smooth the communication delay data; Establish a sliding window of length C, and store the communication delay data of the current sampling time and the previous C-1 consecutive sampling times into the sliding window; Calculate the arithmetic mean of the communication delay data within the sliding window, and use it as the preprocessed communication delay data at the current sampling time.
4. The simulation optimization method for matching-micro cooperative operation according to claim 1, characterized in that, The process of constructing the state feature vector matrix includes: A feature extraction window of a preset time length is extracted, and the voltage fluctuation rate and voltage sag depth are extracted from the preprocessed grid connection point voltage data within the feature extraction window. The difference between the maximum and minimum values of the preprocessed grid-connected point voltage data within the feature extraction window is calculated, and the voltage fluctuation rate is obtained by dividing the difference by the rated value of the grid-connected point voltage. The preprocessed grid-connected point voltage data within the feature extraction window that are below a preset voltage sag threshold are filtered out. The minimum amplitude of the preprocessed grid-connected point voltage data that are below the voltage sag threshold is obtained. The voltage sag depth is obtained by calculating the difference between the rated value and the minimum amplitude of the grid-connected point voltage. Extract the power change slope and power peak-to-valley difference from the preprocessed tie-line power data within the feature extraction window; Calculate the absolute value of the difference between the preprocessed tie-line power data at two adjacent sampling times within the feature extraction window, and divide the absolute value by the time interval between the two adjacent sampling times to obtain the power change slope. The power peak-valley difference is obtained by calculating the difference between the maximum and minimum values of the preprocessed tie-line power data within the feature extraction window. The voltage fluctuation rate, voltage sag depth, power change slope, power peak-to-valley difference, and preprocessed communication delay data corresponding to the same feature extraction window cutoff time are spliced together in a preset order to generate a single-moment state feature vector. The single-moment state feature vectors corresponding to consecutive feature extraction windows are stacked according to the time step sequence to generate a state feature vector matrix.
5. The simulation optimization method for matching-micro cooperative operation according to claim 1, characterized in that, The process of constructing a power flow physical network for a distribution network that follows Kirchhoff's laws and outputting the node state distribution matrix includes: Obtain the topology data and line parameter data of the distribution network. The topology data includes the connection relationship of each node in the distribution network, and the line parameter data includes the resistance and reactance values of the branches connecting each node. The node admittance matrix of the distribution network is constructed based on topology data and line parameter data. The node admittance matrix includes mutual admittance elements located off-diagonally and self admittance elements located diagonally. For the mutual admittance element, calculate the reciprocal of the branch impedance connecting the two nodes and take the negative value as the off-diagonal element corresponding to the two nodes. The branch impedance consists of the resistance value and the reactance value. For the self-admittance element, the reciprocal of the branch impedance of the branch directly connected to the target node is accumulated and used as the diagonal element corresponding to the target node. The preprocessed grid connection point voltage data and tie line power data are introduced into the power flow physical network of the distribution network as boundary conditions. The preprocessed grid connection point voltage data is set as the voltage amplitude at the point of common coupling, and the preprocessed tie line power data is set as the injected active power and injected reactive power at the point of common coupling. Based on the node admittance matrix, a node power balance equation following Kirchhoff's laws is constructed. Equations are established between the injected active power and the calculated active power, and between the injected reactive power and the calculated reactive power of the target node. The node power balance equation includes active power balance equation and reactive power balance equation. When constructing the active power balance equation, the voltage amplitude of each node in the distribution network is obtained. The voltage amplitude of each node is combined with the product of the real part of the node admittance matrix element and the cosine of the voltage phase angle difference, and the product of the imaginary part of the node admittance matrix element and the sine of the voltage phase angle difference. The combined operation results are accumulated to obtain the first summation term. The voltage amplitude of the target node is multiplied by the first summation term to obtain the calculated active power. The voltage phase angle difference is composed of the voltage phase angle of the target node and the voltage phase angle of each node in the distribution network. When constructing the reactive power balance equation, the voltage amplitude of each node in the distribution network is combined with the product of the real part of the node admittance matrix element and the sine of the voltage phase angle difference, and the product of the imaginary part of the node admittance matrix element and the cosine of the voltage phase angle difference. The combined operation results are accumulated to obtain the second summation term. The voltage amplitude of the target node is multiplied by the second summation term to obtain the calculated reactive power. The Newton-Raphson iterative algorithm is used to solve the nodal power balance equations to obtain the voltage amplitude and voltage phase angle of each node in the distribution network except for the point of common coupling. The voltage magnitude and voltage phase angle of the common connection point and all other nodes are arranged in order of node number to generate a node state distribution matrix; Construct an n-row, 2-column matrix as the node state distribution matrix, where n is the total number of nodes in the distribution network. Store the voltage amplitude of the i-th node in the first column of the i-th row of the node state distribution matrix, and store the voltage phase angle of the i-th node in the second column of the i-th row of the node state distribution matrix.
6. The simulation optimization method for matching-micro cooperative operation according to claim 1, characterized in that, The process of constructing a microgrid source-load prediction model using a long short-term memory network algorithm and outputting the source-load power prediction curve includes: Historical source-load power data of microgrids are retrieved from the historical database of the microgrid energy management system. The state feature vector matrix and the historical source-load power data of microgrids are divided into training datasets and test datasets, and the training datasets and test datasets are normalized. According to the preset time series segmentation ratio, the state feature vector matrix and the historical source-load power data of the microgrid are divided into training input set, training target set, test input set and test target set; The maximum-minimum normalization algorithm is used to process the training input set, training target set, test input set and test target set, and map the data to a preset numerical range to generate normalized state feature vectors and normalized microgrid historical source-load power data. A microgrid source-load prediction model is constructed using a long short-term memory network algorithm, and the network weight parameters and bias parameters are initialized. The microgrid source-load prediction model is set to include an input layer, a hidden layer and an output layer. The input layer is used to receive the normalized state feature vector. The hidden layer is composed of memory units expanded in time step order. Each memory unit includes a forget gate, an input gate and an output gate. The output layer is used to output the normalized source-load power prediction data. The initial values of the forget gate, input gate, output gate, and weight matrix and bias vector in the cell state update process are set using a random initialization method. The forward propagation computation process of the Long Short-Term Memory network algorithm is executed, and the memory unit is used to process the normalized state feature vector. The hidden layer output state from the previous time step is concatenated with the normalized state feature vector of the input at the current time step. The concatenated vector is multiplied by the weight matrix of the forget gate and the bias vector of the forget gate is accumulated. The sigmoid activation function is applied to the accumulated result to obtain the forget gate output value with a dimension of 1. The concatenated vector is multiplied by the weight matrix of the input gate and accumulated by the bias vector of the input gate. The sigmoid activation function is applied to the accumulated result to obtain the input gate output value with a dimension of 1. The concatenated vector is multiplied by the weight matrix of the candidate cell state and the bias vector of the candidate cell state is accumulated. The hyperbolic tangent activation function is applied to the accumulated result to obtain the candidate cell state. Calculate the product of the forget gate output value and the cell state at the previous time step, and the product of the input gate output value and the candidate cell state. Add the two products together to obtain the cell state at the current time step. The concatenated vector is multiplied by the weight matrix of the output gate and the bias vector of the output gate is accumulated. The sigmoid activation function is applied to the accumulated result to obtain the output value of the output gate with a dimension of 1. Apply the hyperbolic tangent activation function to the cell state at the current time step and multiply it with the output value of the output gate to obtain the hidden layer output state at the current time step. The backpropagation algorithm is used to train the microgrid source-load prediction model, and the weight matrix and bias vector are updated iteratively by minimizing the loss function. Normalized historical source-load power data of microgrids included in the training target set are selected as true values. The mean square error between the predicted value output by the microgrid source-load prediction model and the true value in the training target set is calculated, and the mean square error is used as the loss function. Calculate the gradient of the loss function with respect to the weight matrix and the bias vector, and use the gradient descent optimization algorithm to update the weight matrix and the bias vector along the negative gradient direction until the loss function converges, thus obtaining the trained microgrid source-load prediction model. The constructed state feature vector matrix is input into the trained microgrid source-load prediction model to obtain normalized source-load power prediction data. The normalized source-load power prediction data is then restored using the maximum-minimum inverse normalization algorithm, and the source-load power prediction curve containing the renewable energy generation power and load consumption power within the microgrid is output.
7. The simulation optimization method for matching-micro cooperative operation according to claim 1, characterized in that, The process of generating the initial model from the coupled node state distribution matrix and source load power prediction curve includes: The renewable energy generation power and load consumption power inside the microgrid are extracted from the source-load power prediction curve. The renewable energy generation power at the same time is subtracted from the load consumption power to obtain the net active power and net reactive power injected by the microgrid into the distribution network at the same time, which are used as the net injection power of the microgrid at each prediction time. The net injected power is assigned as a boundary condition to the common connection point nodes connected to the microgrid in the power flow physical network of the distribution network, and the voltage magnitude and voltage phase angle in the node state distribution matrix are used as the initial state variables of the power flow physical network of the distribution network to achieve fast convergence of power flow calculation and generate an initial model.
8. The simulation optimization method for matching-micro cooperative operation according to claim 1, characterized in that, The process of obtaining the corrected calibrator-micro co-simulation optimization model includes: The residual voltage is calculated based on the node state distribution matrix of the previous time step and the preprocessed grid connection point voltage data of the current time step. Extract the voltage amplitude corresponding to the common connection point from the node state distribution matrix generated in the previous time step, and use it as the predicted value of the grid connection point voltage. The instantaneous value of the grid connection point voltage at the current moment is obtained from the preprocessed grid connection point voltage data as the measured value of the grid connection point voltage; Calculate the difference between the predicted voltage at the grid connection point and the measured voltage at the grid connection point, and obtain the residual voltage at the current moment; The residuals are used to perform rolling correction on the tie line impedance parameters in the initial model to obtain the corrected tie line impedance parameters. Retrieve the tie line impedance parameters stored in the previous time step. The tie line impedance parameters include the tie line resistance value and the tie line reactance value. Impedance correction coefficients are constructed based on the residuals. The tie line resistance and reactance values of the previous time step are updated using the impedance correction coefficients. The corrected tie line resistance and reactance values are then calculated. The corrected tie line impedance parameters are updated into the initial model, the node admittance matrix of the distribution network is reconstructed, and the corrected distribution-micro collaborative simulation optimization model is generated. The reciprocal of the tie-line branch impedance is calculated using the corrected tie-line resistance and reactance values, and the negative value is used to update the mutual admittance elements between the common connection point and the main grid node in the node admittance matrix. The reciprocal of the tie-line branch impedance is calculated using the corrected tie-line resistance and reactance values. The reciprocal is then added to the self-admittance element corresponding to the common connection point in the node admittance matrix. The output is a pair-micro co-simulation optimization model containing the updated node admittance matrix and the source-load power prediction curve.
9. The simulation optimization method for matching-micro cooperative operation according to claim 1, characterized in that, The process of setting the objective function in the PE-Micro collaborative simulation optimization model, based on the preprocessed communication delay data, includes: In the revised match-micro co-simulation optimization model, the decision variables and constraints to be optimized are set; The active and reactive power outputs of controllable distributed power sources within the microgrid, as well as the charging and discharging power of energy storage devices, are set as decision variables, and these decision variables constitute power regulation commands. Set constraints for power regulation commands, including upper and lower limits for distributed power output, upper and lower limits for the state of charge of energy storage devices, and upper and lower limits for tie-line power. Construct an objective function that includes voltage deviation term, network loss term, regulation cost term, and delay penalty term; Based on the node state distribution matrix in the modified distribution-micro cooperative simulation optimization model, the sum of squares of the deviations between the voltage amplitude of each node in the distribution network and the rated voltage of the distribution network is calculated to obtain the voltage deviation term. Based on the power flow calculation results in the modified distribution-micro cooperative simulation optimization model, the sum of active power losses on the distribution network branches is calculated to obtain the network loss term; Based on the power regulation command, calculate the operating cost of controllable distributed power sources and energy storage devices within the microgrid to obtain the regulation cost item; Based on the preprocessed communication delay data, a delay penalty term is calculated. The delay penalty term is positively correlated with the product of the communication delay and the power adjustment increment. The objective function is generated by weighted summation of the voltage deviation term, network loss term, regulation cost term, and delay penalty term.
10. The simulation optimization method for matching-micro cooperative operation according to claim 1, characterized in that, The process of using particle swarm optimization to obtain the power regulation command that minimizes the objective function and generating simulated operating state data includes: The particle swarm optimization algorithm is used to optimize the objective function and obtain the optimal power regulation command. Initialize the particle swarm, set the total number of particles and the maximum number of iterations, initialize the position vector of each particle with a set of power adjustment commands, and initialize the velocity vector of each particle with random values; The position vector of the particle is substituted into the modified distribution-micro cooperative simulation optimization model to perform power flow calculation, obtain the corresponding node state distribution matrix and the current amplitude of each branch of the distribution network, and calculate the objective function value of each particle in combination with the preprocessed communication delay data. The objective function value is used as the fitness value of the particle. The individual and global extreme values of a particle are updated by comparing its current fitness value with the particle's historical best fitness value and the population's historical best fitness value. The particle's velocity and position vectors are updated based on the individual and global extreme values. The maximum number of iterations is determined. If the maximum number of iterations has not been reached, the next iteration is performed. If the maximum number of iterations has been reached, the position vector corresponding to the global extreme value is output as the optimal power adjustment command. The optimal power regulation command is input into the modified distribution-micro cooperative simulation optimization model to perform the final power flow calculation and output the simulated operating status data.
Citation Information
Patent Citations
Dynamic optimization scheduling method for active power distribution network
CN110581571A
Power distribution network intra-day scheduling correction method, system and equipment considering photovoltaic power error, and medium
CN119419794A