Power grid power flow estimation method and device, computer equipment and storage medium
By rapidly calculating power flow distribution through machine learning models and combining electromagnetic coupling and equipment loss assessment, the problem of slow data acquisition after power quality disturbance events in the power grid is solved, enabling rapid power quality assessment and governance effect analysis, thereby improving the safety of power grid operation and user satisfaction.
Patent Information
- Application Number
- CN202210660111.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-06-13
AI Technical Summary
Existing technologies suffer from slow multiphysics simulation speeds after power quality disturbances in the power grid, making it difficult to quickly provide comparative data and affecting power quality assessment and governance effectiveness analysis.
A machine learning model is used to quickly calculate the power flow distribution. Through electromagnetic coupling relationship and equipment loss assessment, the power flow distribution is quickly corrected and stabilized. The Monte Carlo method is combined for stochastic simulation and data analysis.
It enables rapid acquisition of power flow distribution after power quality disturbance events, supports efficient power quality assessment and governance effect analysis, and improves the safety of power grid operation and user satisfaction.
Smart Images

Figure CN115276012B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electricity, in particular to a power grid power flow estimation method and device, computer equipment, storage medium and computer program product. BACKGROUND
[0002] With the gradual popularity of renewable energy power generation equipment in the power grid, the large introduction of energy storage equipment, the frequency and quality of power quality problems have increased year by year, threatening the safety of power supply and significantly reducing user satisfaction.
[0003] Because the users connected to the distribution network have increasingly high requirements for power quality. Therefore, it is necessary to objectively evaluate the treatment effect and benefit of the treatment scheme adopted by the distribution network, and this process must involve comparative analysis of the power quality of the network with and without treatment under the same disturbance event; and the actual network in operation is only in one of the two states at the same time, so the power quality of the other network state must be investigated by simulation.
[0004] At present, multi-physical field simulation is very slow and can only give comparative data after a long time after the power quality disturbance event occurs. SUMMARY
[0005] Therefore, it is necessary to provide a power grid power flow estimation method, device, computer equipment, computer readable storage medium and computer program product capable of quickly obtaining power flow distribution under a power quality disturbance event.
[0006] In a first aspect, the present application provides a power grid power flow estimation method, which comprises:
[0007] Obtaining sampling data;
[0008] According to the sampling data, the power flow distribution at the current time is calculated;
[0009] According to the power flow distribution at the current time, the power flow correction value at the current time is calculated, and the power flow distribution at the current time is corrected according to the power flow correction value at the current time;
[0010] When the corrected power flow distribution at the current time is stable, output the power flow data.
[0011] In one of the embodiments, the power flow correction value at the current time is calculated according to the power flow distribution at the current time, which comprises:
[0012] According to the power flow distribution at the current time, the electromagnetic coupling relationship at the current time is calculated;
[0013] According to the electromagnetic coupling relationship at the current time, the power flow correction value at the current time is obtained.
[0014] In one embodiment, the above-mentioned correction of the current power flow distribution based on the current power flow correction value includes:
[0015] When the current power flow correction value meets the correction condition, determine whether the current power flow distribution is stable.
[0016] When the current power flow correction value does not meet the correction condition, the current power flow distribution is updated based on the current power flow correction value, and a new power flow correction value is calculated based on the updated current power flow distribution, until the current power flow correction value meets the correction condition.
[0017] In one embodiment, when the corrected power flow distribution at the current moment is stable, the power flow data is output, including:
[0018] When the corrected power flow distribution at the current moment satisfies the stability condition, the corrected power flow distribution at the current moment is determined to be stable, and the power flow data is output.
[0019] If the current power flow distribution after correction does not meet the stability condition, calculate the power flow distribution at the next moment until the power flow distribution at the next moment is stable.
[0020] In one embodiment, after outputting the power flow data when the corrected power flow distribution at the current moment is stable, the process includes:
[0021] Calculate equipment wear and tear based on tidal data;
[0022] Power quality is assessed based on equipment losses and power flow data.
[0023] In one embodiment, the power flow distribution at the current moment is calculated based on a pre-trained first model, the training process of which includes:
[0024] Acquire trend sample data, which carries trend tags;
[0025] The current flow sample data is input into the first initial model for training to obtain the initial current flow prediction data;
[0026] Based on the deviation between the trend label and the initial trend prediction data, adjust the model parameters of the first initial model until training is completed and the first model is obtained.
[0027] The aforementioned electromagnetic coupling relationship was calculated based on a pre-trained second model. The training process of the second model includes:
[0028] Acquire tidal current simulation sample data, which carries electromagnetic tags;
[0029] The power flow simulation sample data is input into the second initial model for training to obtain the initial electromagnetic prediction data;
[0030] Based on the deviation between the electromagnetic tags and the initial electromagnetic prediction data, the model parameters of the second initial model are adjusted until the training is completed and the second model is obtained.
[0031] The aforementioned equipment losses were calculated based on a pre-trained third model. The training process of the third model includes:
[0032] Acquire tidal current simulation sample data, which carries an electrothermal tag;
[0033] The power flow simulation sample data is input into the third initial model for training to obtain the initial electrothermal prediction data;
[0034] Based on the deviation between the electrothermal label and the initial electrothermal prediction data, the model parameters of the third initial model are adjusted until the training is completed and the third model is obtained.
[0035] Secondly, this application also provides a power grid flow estimation device, which includes:
[0036] The acquisition module is used to acquire sampled data;
[0037] The power flow calculation module is used to calculate the power flow distribution at the current moment based on the sampled data;
[0038] The power flow correction module is used to calculate the power flow correction value at the current moment based on the power flow distribution at the current moment, and to correct the power flow distribution at the current moment based on the power flow correction value.
[0039] The power flow output module is used to output power flow data when the corrected power flow distribution at the current moment is stable.
[0040] Thirdly, this application also provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in any of the above methods.
[0041] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above methods.
[0042] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above methods.
[0043] The aforementioned power flow estimation method, device, computer equipment, storage medium, and computer program product first acquire sampled data, then calculate the power flow distribution at the current moment based on the sampled data, then calculate the power flow correction value at the current moment based on the power flow distribution at the current moment, and then correct the power flow distribution at the current moment based on the power flow correction value at the current moment. Finally, when the corrected power flow distribution at the current moment is stable, the output power flow data can quickly obtain the power flow distribution of the power grid. Attached Figure Description
[0044] Figure 1 This is a diagram illustrating the application environment of the power flow estimation method in one embodiment;
[0045] Figure 2 This is a flowchart illustrating a power flow estimation method in one embodiment;
[0046] Figure 3 This is a schematic diagram of the basic process of neural network training in one embodiment;
[0047] Figure 4 This is a schematic diagram of model training in another embodiment;
[0048] Figure 5 This is a schematic diagram of neural network training in one embodiment;
[0049] Figure 6 This is a schematic diagram of the power flow estimation process in one embodiment;
[0050] Figure 7 This is a block diagram of a power grid flow estimation device in one embodiment;
[0051] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0053] The power flow estimation method provided in this application embodiment can be applied to, for example, Figure 1The application environment shown is illustrated. Terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. First, sampled data is acquired. Then, the power flow distribution at the current moment is calculated based on the sampled data. Next, the power flow correction value for the current moment is calculated based on the power flow distribution at the current moment, and the power flow distribution at the current moment is corrected based on the power flow correction value. When the corrected power flow distribution at the current moment is stable, the power flow data is output. Terminal 102 can be, but is not limited to, various voltage detection devices, current detection devices, etc. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.
[0054] In one embodiment, such as Figure 2 As shown, a power flow estimation method for a power grid is provided, which can be applied to... Figure 1 Taking server 104 as an example, the following steps are included:
[0055] S202, Obtain sampling data.
[0056] Sampling data refers to data that the service obtains from the database. For example, data sampled from the database can also be data obtained by performing time-domain mathematical modeling of various power quality disturbance events, such as a power quality disturbance event model, and then sampling data from the mathematical model. The data in the database is uploaded by the terminal.
[0057] Optionally, the server can sample from the mathematical model using the Monte Carlo method to obtain the sampled data model. This is because the Monte Carlo method can perform random simulations of various power quality events, and the analysis based on the simulation data can overcome the shortcomings of the actual measurement method.
[0058] S204, Calculate the power flow distribution at the current moment based on the sampled data.
[0059] Among them, power flow distribution refers to the power distribution of the distribution network, such as at what time, at what node, on what line, how much power is generated, and whether it is flowing in or out.
[0060] The server calculates the current power flow distribution based on the sampled data. Optionally, it can be obtained through a pre-trained first model, which refers to a pre-trained machine learning model that can predict the power flow distribution.
[0061] Optionally, the current network topology data is input into the first model. The first model predicts the power flow distribution at the current moment based on the sampled data. Here, network topology data refers to abstracting each component in the power grid into nodes independent of their physical form, and abstracting the power lines connecting these nodes into lines. The relationships between these nodes are then represented in the form of a topology graph, which includes data for each component, such as component type and power, as well as data between components.
[0062] For example, assuming a power quality disturbance occurs at time t0, the first model predicts the power flow distribution at the current time, i.e., the power flow distribution at time t1, based on the sampled data at time t0, which is the sampled data at the previous time.
[0063] S206. Calculate the current power flow correction value based on the current power flow distribution, and correct the current power flow distribution based on the current power flow correction value.
[0064] Among them, the tidal current correction value refers to the numerical value used to correct the tidal current distribution, which is calculated based on the coupling relationship of the tidal current distribution.
[0065] Optionally, the server can calculate the electromagnetic coupling relationship at the current moment based on the current power flow distribution; and obtain the current power flow correction value based on the current electromagnetic coupling relationship. Alternatively, the server can use a second model to calculate the current electromagnetic coupling relationship based on the current power flow distribution, and then obtain the current power flow correction value based on this relationship. Specifically, based on the electromagnetic coupling relationship between components and the coupling law between electricity and heat as the current-carrying capacity changes, the maximum allowable operating temperature of the component is set as the thermal limit of the component's load capacity (e.g., temperature limit), which is then converted into electrical quantity limits (current-carrying capacity and power limits). Electrical quantities exceeding these limits are corrected based on these limits, thereby achieving the purpose of power flow correction, and the current power flow distribution is corrected using the current power flow correction value. Here, the second model refers to a pre-trained machine learning model capable of predicting electromagnetic coupling relationships.
[0066] Optionally, the current network topology data is input into the second model. The second model calculates the electromagnetic coupling relationship at the current moment based on the power flow distribution at the current moment according to the current network topology data, and then calculates the power flow correction value at the current moment based on the electromagnetic coupling relationship at the current moment.
[0067] Optionally, the server can use the current power flow correction value to replace the current power flow distribution and correct the current power flow distribution.
[0068] In some embodiments, the server can correct the current power flow distribution by adding or subtracting from the current power flow correction value. It should be noted that in other embodiments, the power flow distribution can also be corrected based on the current power flow correction value using multiplication, division, variance, etc., and this is not specifically limited here.
[0069] S208: Output power flow data when the corrected power flow distribution at the current moment is stable.
[0070] When the server determines that the power flow distribution is stable at the current moment, it can output power flow data. This power flow data refers to the power flow distribution from the time of the power quality disturbance event to the time when the power flow distribution stabilizes. For example, if a power quality disturbance event occurs at time t0 and the power flow distribution stabilizes at time t3, then the power flow data is the power flow distribution from time t0 to time t3.
[0071] Optionally, the server can determine whether the power flow distribution is stable at the current moment by setting stability conditions. When the power flow distribution is unstable at the current moment, the server calculates the power flow distribution at the next moment until the power flow distribution at the next moment is stable.
[0072] Optionally, after outputting power flow data, the server can also calculate the equipment losses caused by heat generation in each device based on the power flow data. In this way, the server can perform quality evaluation on the data in the power flow estimation of the entire power grid, that is, evaluate the quality of the power flow data, the power flow correction values at each time point, and the equipment losses.
[0073] In the above embodiment, sampling data is first acquired, then the power flow distribution at the current moment is calculated based on the sampling data, then the power flow correction value at the current moment is calculated based on the power flow distribution at the current moment, and the power flow distribution at the current moment is corrected based on the power flow correction value at the current moment. Finally, when the corrected power flow distribution at the current moment is stable, the power flow data can be output to quickly obtain the power flow distribution of the power grid.
[0074] In one embodiment, the above-mentioned correction of the current power flow distribution based on the current power flow correction value includes: when the current power flow correction value meets the correction condition, determining whether the current power flow distribution is stable; when the current power flow correction value does not meet the correction condition, updating the current power flow distribution based on the current power flow correction value, and calculating a new power flow correction value based on the updated current power flow distribution, until the current power flow correction value meets the correction condition.
[0075] The correction condition refers to a pre-set indicator used to determine whether the power flow distribution needs to be corrected. For example, if the power flow correction value at the current moment is greater than the correction condition, it is determined that the power flow correction value at the current moment does not meet the correction condition, and the power flow distribution at the current moment is corrected. Conversely, if the power flow correction value at the current moment is less than the correction condition, it is determined that the power flow correction value at the current moment meets the correction condition.
[0076] The server compares the current power flow correction value with the correction conditions. If the current power flow correction value meets the correction conditions, it proceeds to the next step: determining whether the current power flow distribution is stable. If the current power flow correction value does not meet the correction conditions, the current power flow distribution is updated based on the current power flow correction value. Then, the updated electromagnetic coupling relationship is calculated based on the updated current power flow distribution, and the updated current power flow correction value is obtained based on the updated electromagnetic coupling relationship. This updated current power flow correction value is compared with the correction conditions; if it does not meet the conditions, the current power flow distribution is updated based on the updated current power flow correction value until the current power flow correction value meets the correction conditions.
[0077] Optionally, the correction condition can be set to a preset value, such as 10^(-6). The reason for setting the preset value so small is that the influence of electromagnetic coupling on power flow distribution can be reduced to a sufficiently small value.
[0078] In the above embodiments, the influence of electromagnetic coupling on power flow distribution is reduced by comparing the current power flow correction value with the correction conditions.
[0079] In one embodiment, the above-mentioned outputting power flow data when the corrected power flow distribution at the current moment is stable includes: when the corrected power flow distribution at the current moment meets the stability condition, determining that the corrected power flow distribution at the current moment is stable and outputting power flow data; when the corrected power flow distribution at the current moment does not meet the stability condition, calculating the power flow distribution at the next moment until the power flow distribution at the next moment is stable.
[0080] Among them, the stability condition refers to the pre-set index used to judge whether the power flow distribution is stable. It can be a threshold or a model, and the specific setting can be determined according to the application scenario. No specific limitation is made here.
[0081] Optionally, the server can compare the difference between the corrected current power flow distribution and the corrected previous power flow distribution to see if a stability condition is met. For example, the stability condition can be set as a preset threshold. When the difference between the corrected current power flow distribution and the corrected previous power flow distribution is less than the preset threshold, the server determines that the corrected current power flow distribution is stable and outputs the power flow data. Otherwise, it calculates the power flow distribution for the next time step, until the power flow distribution for the next time step is stable.
[0082] Optionally, the next moment can be obtained by setting the step size and the number of iterations. For example, k can be set as the number of iterations and Δt as the step size. If the current moment is t0 and k is 1, then t1 = t0 + 1 * Δt. If the power flow distribution at the next moment still does not meet the stability condition in the power flow estimation, then add 1 to the number of iterations corresponding to the power flow distribution at the next moment, and so on, until the power flow distribution is stable.
[0083] In the above embodiments, the power flow distribution is compared with the stability conditions to output the power flow data after the power flow distribution has stabilized.
[0084] In one embodiment, after outputting power flow data when the power flow distribution at the corrected current moment is stable, the process includes: calculating equipment losses based on the power flow data; and evaluating power quality based on the equipment losses and the power flow data.
[0085] Once the current power flow distribution stabilizes, power flow data will be output. The server will then calculate equipment losses based on this data. Optionally, a third model can be used to calculate the equipment losses caused by heat generation during the power flow estimation process. This third model refers to a pre-trained machine learning model capable of predicting equipment electrothermal losses.
[0086] Based on equipment wear and power flow data, the server can assess power quality. The accuracy of the equipment wear and power flow data will affect the assessment of power quality.
[0087] In the above embodiments, the heat loss can be obtained based on the power flow data, and then the power quality can be more accurately evaluated based on the power flow data and the heat loss.
[0088] In one embodiment, the current current distribution is calculated based on a pre-trained first model. The training process of the first model includes: acquiring current sample data, which carries current labels; inputting the current sample data into a first initial model for training to obtain initial current prediction data; and adjusting the model parameters of the first initial model based on the deviation between the current labels and the initial current prediction data until training is completed and the first model is obtained.
[0089] Here, trend sample data refers to the data used to train the first model, and trend label refers to the actual trend distribution of the trend sample data.
[0090] The server inputs tidal flow sample data into the first initial model, which can be any machine learning model, such as a Back Propagation Neural Network (BPNN, a multi-layer feedforward network trained by backpropagation of errors). The first initial model yields initial tidal flow prediction data, which refers to the tidal flow distribution predicted by the first initial model. Therefore, based on the tidal flow labels, the deviation of the initial tidal flow prediction data is obtained, which is the difference between the predicted tidal flow distribution and the actual tidal flow. Based on the difference between the predicted and actual tidal flow distributions, the server adjusts the model parameters of the first initial model. Optionally, gradient descent can be used to adjust the parameters until the deviation between the predicted tidal flow distribution and the tidal flow labels is less than a target value. At this point, training is considered complete, and the first model is obtained. The target value is a pre-set standard used to determine whether the first initial model has been successfully trained.
[0091] Optionally, the power flow sample data is obtained by performing time-domain mathematical modeling on various power quality disturbance events recorded in big data, resulting in a power quality disturbance event model, and then performing Monte Carlo sampling based on the recording frequency of the disturbance events.
[0092] Optionally, the power flow labels can be obtained through a perturbation power flow simulation tool, which is a tool for simulating power flow distribution. This is necessary because power flow sample data may lack a true power flow distribution. It should be noted that network topology data also needs to be input when inputting power flow sample data into the perturbation power flow simulation tool.
[0093] In one embodiment, the electromagnetic coupling relationship is calculated based on a pre-trained second model. The training process of the second model includes: acquiring power flow simulation sample data, which carries electromagnetic tags; inputting the power flow simulation sample data into the second initial model for training to obtain initial electromagnetic prediction data; and adjusting the model parameters of the second initial model based on the deviation between the electromagnetic tags and the initial electromagnetic prediction data until the training is completed and the second model is obtained.
[0094] In this system, the power flow simulation sample data refers to the data used to train the second and third models, and the electromagnetic labels refer to the actual electromagnetic coupling relationships within the power flow simulation sample data. The server inputs the power flow simulation sample data into the second initial model, which can be any machine learning model, such as a backpropagation (BP) neural network. This second initial model yields initial electromagnetic prediction data, which represents the electromagnetic coupling relationships predicted by the second initial model. Therefore, there is a deviation between the electromagnetic labels and the initial electromagnetic prediction data—that is, the difference between the predicted electromagnetic coupling relationships and the actual electromagnetic coupling relationships. Based on this difference, the server adjusts the model parameters of the second initial model. Optionally, this adjustment can be achieved using gradient descent until the deviation between the electromagnetic coupling relationships predicted by the second initial model and the electromagnetic labels is less than a second target value. At this point, training is considered complete, and the second model is obtained. The second target value is a pre-set standard used to determine whether the second initial model has been successfully trained.
[0095] Alternatively, power flow simulation sample data can also be obtained through perturbation power flow simulation tools, since there is no real power flow distribution, and therefore simulation tools are needed.
[0096] Alternatively, the electromagnetic tag can be obtained from power flow simulation results using an electromagnetic coupling simulation tool.
[0097] In one embodiment, the aforementioned equipment loss is calculated based on a pre-trained third model. The training process of the third model includes: acquiring power flow simulation sample data, which carries electrothermal tags; inputting the power flow simulation sample data into the third initial model for training to obtain initial electrothermal prediction data; and adjusting the model parameters of the third initial model based on the deviation between the electrothermal tags and the initial electrothermal prediction data until training is completed and the third model is obtained.
[0098] Among them, the electrothermal tag refers to the actual electrothermal activity in the current flow simulation sample data. Since electrothermal activity causes equipment wear and tear, the equipment wear and tear can be calculated based on the electrothermal activity.
[0099] The server inputs the power flow simulation sample data into the third initial model, which can be any machine learning model, such as a backpropagation (BP) neural network. This third initial model yields initial electrothermal prediction data, which refers to the predicted electrothermal readings. Therefore, there is a discrepancy between the electromagnetic tag and the initial electrothermal prediction data—the difference between the predicted and actual electrothermal readings. Based on this discrepancy, the server adjusts the parameters of the third initial model. Optionally, gradient descent can be used to adjust the parameters until the deviation between the predicted and actual electrothermal readings is less than a third target value. At this point, training is considered complete, and the third model is obtained. The third target value is a pre-set standard used to determine whether the third initial model has been successfully trained.
[0100] Alternatively, the electrothermal tag can be obtained based on the power flow simulation results using an electrothermal simulation tool.
[0101] In the above embodiments, first, second and third models for predicting power flow distribution, electromagnetic coupling and electrothermal effects can be obtained through model training.
[0102] Combination Figure 3 As shown, Figure 3 This is a schematic diagram of the basic neural network training process in one embodiment, where NN-Flow, NN-Mag, and NN-Therm are responsible for simulating the physical characteristics of power flow, electromagnetic coupling, and electrothermal coupling, respectively. First, time-domain mathematical modeling is performed on various power quality disturbance events recorded in large datasets to obtain a power quality disturbance event model. Then, Monte Carlo sampling is performed on the power quality disturbance event model based on the recording frequency of the disturbance events to construct a large-scale event feature sample. Along with network topology parameters, this sample is input into a time-domain power flow simulation platform. Through high-resolution simulation, a set of power flow simulation results at each time point after each disturbance event occurs is obtained. The power flow simulation results are then input into a time-domain electromagnetic coupling and electrothermal coupling simulation platform, where high-resolution simulation yields the corresponding electromagnetic and electrothermal simulation results.
[0103] The power flow simulation results, electromagnetic simulation results, and electrothermal simulation results serve as labeled data for the training data of predicting power flow distribution, predicting electromagnetic coupling relationships, and predicting electrothermal effects, respectively; these are designated as power flow labels, electromagnetic labels, and electrothermal labels. These labels can be used during the training of the first, second, and third models. Figure 4 The model shown is trained and combined with Figure 4 As shown, Figure 4 This is a schematic diagram of model training in one embodiment. In this embodiment, an approximation method is used to train the neural network. For any neural network, a large amount of sample data should be used for training. In a set of samples, the time-domain simulation result y0 It should correspond one-to-one with the disturbance input parameter vector x. The neural network under training accepts x as input, and its output vector y(t) at time t after the power quality disturbance occurs (t from time 0 to the time when the power flow stabilizes) corresponds to the time domain simulation result vector y. 0 The difference (t) is used as another parameter input to the neural network approximator to adjust the connection weights. x refers to the feature vector of the input model, such as the feature vector of power flow simulation data, and y 0 (t) refers to the power flow simulation results, electromagnetic and electrothermal simulation results.
[0104] Combination Figure 5 As shown, Figure 5 This is a schematic diagram of neural network training in one embodiment. Each neural network contains three layers from left to right. The leftmost layer is the input layer, which receives the input from the simulation of each neural network and input parameters within the range of 1 to i during training. The middle layer is the hidden layer of the neural network, containing j nodes. The number of nodes should be at least 1.5 times the number of nodes in the distribution network. This is to minimize the "overfitting" phenomenon during training and ensure sufficiently high network performance and generalization ability. Each node is responsible for storing and iterating the connection weights for each input parameter and the output layer. ij w represents the connection weight between the j-th hidden layer node and the input parameter i. jl This indicates the connection weights between the j-th hidden layer node and the l-th output node. Output vectors y1~y2 l This includes the numerical results of each simulation parameter, which incorporates the sequential timing sequence.
[0105] After each round of sample input, the connection weights of the hidden layer and the input layer after k+1 iterations are shown in formula (1):
[0106] w ij (k+1)=w ij (k)+Δw ij +α(w ij (k)-w ij (k-1)) (1)
[0107] The connection weights between the hidden layer and the output layer after k+1 iterations are shown in formula (2):
[0108] w jk (k+1)=w jl (k)+Δw jl +α(wjl(k)-wjk(k-1)) (2)
[0109] Δw ij and Δw jt The formulas for updating the weights of the two types mentioned above are as follows:
[0110]
[0111] Δw jl =ηe l x j (4)
[0112] Where α∈[0,1] is the momentum factor, η∈[0,1] is the learning rate, and e l The error between the output of the l-th BP network and the ideal value is calculated as shown in formula (5).
[0113]
[0114] Let y be the time series of the l-th parameter in the time-domain simulation. l Let be the time series of the l-th output parameter of the neural network.
[0115] x' j The output of the hidden layer neurons is calculated using formula (6).
[0116]
[0117] The partial derivative of the i-th input temporal vector with respect to the connection weights between it and the j-th hidden layer node.
[0118]
[0119] In one embodiment, combined Figure 6 As shown, Figure 6The diagram illustrates the power flow estimation process in one embodiment. First, the NN-Flow and NN-Mag networks read the network topology data, setting the iteration count K to 0. Assuming a power quality disturbance occurs at time t0, the sampled power quality disturbance event model is imported into the NN-Flow network, which calculates the power flow distribution at time t1. The power flow result is then input into the NN-Mag neural network, which simulates electromagnetic coupling based on the power flow and topology. The network then obtains the power flow correction value at time t1 based on the electromagnetic coupling simulation and evaluates the correction value. If the correction value at time t1 is sufficiently small (i.e., it meets the correction condition), the stability of the power flow distribution at time t1 is assessed. If the correction value does not meet the correction condition, the power flow distribution at time t1 is updated based on the correction value. A new correction value for time t1 is calculated based on the updated distribution, and the correction value again checks if it meets the correction condition. This power flow correction process iterates until a new correction value for time t1 meets the correction condition. The stability of the power flow distribution at time t1 is assessed by comparing the distribution at t1 with that at t1-Δt. If the calculation shows that the power flow has reached a steady state after the disturbance, it indicates that the power quality problem caused by the disturbance has disappeared. At this point, the precise power flow data obtained at each time point during the entire disturbance period is output, i.e., the power flow data from t0 to the point of stable power flow, for NN-Therm to calculate the lifespan loss caused by equipment overheating. If the calculation shows that the power flow is still unstable after the disturbance, t1 is increased by Δt to calculate the power flow at the next time point. All the above data are ultimately used to calculate power quality and equipment lifespan loss in the comparison scenario and for further comparative evaluation.
[0120] In the above embodiments, time-domain physical simulation software is used to simulate power flow, electromagnetic coupling, and electrothermal relationship, and three neural networks are trained respectively to simulate the three physical fields. The output results of the three are iterated to realize the rapid simulation of accurate power flow of the distribution network under power quality disturbance events, providing highly timely comparative data for the evaluation of power quality management effects and benefits.
[0121] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0122] Based on the same inventive concept, this application also provides a power flow estimation device for implementing the power flow estimation method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more power flow estimation device embodiments provided below can be found in the limitations of the power flow estimation method described above, and will not be repeated here.
[0123] In one embodiment, such as Figure 7 As shown, a power flow estimation device is provided, comprising: an acquisition module 100, a power flow calculation module 200, a power flow correction module 300, and a power flow output module 400, wherein:
[0124] The acquisition module 100 is used to acquire sampled data.
[0125] The power flow calculation module 200 is used to calculate the power flow distribution at the current moment based on the sampled data.
[0126] The power flow correction module 300 is used to calculate the power flow correction value at the current moment based on the power flow distribution at the current moment, and to correct the power flow distribution at the current moment based on the power flow correction value.
[0127] The power flow output module 400 is used to output power flow data when the corrected power flow distribution at the current moment is stable.
[0128] In one embodiment, the power flow correction module 300 includes:
[0129] The electromagnetic coupling relationship unit is used to calculate the electromagnetic coupling relationship at the current moment based on the power flow distribution at the current moment.
[0130] The correction unit is used to obtain the power flow correction value at the current moment based on the electromagnetic coupling relationship at the current moment.
[0131] In one embodiment, the power flow correction module 300 includes:
[0132] The judgment unit is used to determine whether the power flow distribution is stable at the current moment when the power flow correction value at the current moment meets the correction condition.
[0133] The update correction unit is used to update the current power flow distribution based on the current power flow correction value when the current power flow correction value does not meet the correction conditions, and to calculate a new power flow correction value based on the updated current power flow distribution, until the current power flow correction value meets the correction conditions.
[0134] In one embodiment, the power flow output module 400 includes:
[0135] The output unit is used to determine that the power flow distribution at the current moment is stable when the corrected power flow distribution at the current moment meets the stability condition, and then outputs the power flow data.
[0136] The power flow stabilization unit is used to calculate the power flow distribution at the next moment when the corrected power flow distribution at the current moment does not meet the stability condition, until the power flow distribution at the next moment is stable.
[0137] In one embodiment, the above-mentioned apparatus includes:
[0138] The trend sample acquisition unit is used to acquire trend sample data, which carries trend tags.
[0139] The first training unit is used to input power flow simulation sample data into the second initial model for training, so as to obtain initial electromagnetic prediction data.
[0140] The first optimization unit is used to adjust the model parameters of the first initial model based on the deviation between the current label and the initial current prediction data, until the first model is obtained after training is completed.
[0141] The first tidal current simulation sample acquisition unit is used to acquire tidal current simulation sample data, which carries an electromagnetic tag.
[0142] The second training unit is used to input power flow simulation sample data into the second initial model for training to obtain initial electromagnetic prediction data.
[0143] The second optimization unit is used to adjust the model parameters of the second initial model based on the deviation between the electromagnetic tag and the initial electromagnetic prediction data, until the training is completed and the second model is obtained.
[0144] The second tidal current simulation sample acquisition unit is used to acquire tidal current simulation sample data, which carries an electrothermal tag.
[0145] The third training unit is used to input power flow simulation sample data into the third initial model for training to obtain initial electrothermal prediction data.
[0146] The third optimization unit is used to adjust the model parameters of the third initial model based on the deviation between the electrothermal label and the initial electrothermal prediction data, until the training is completed and the third model is obtained.
[0147] Each module in the aforementioned power flow estimation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0148] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores sampled data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a power flow estimation method.
[0149] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0150] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring sampled data; calculating the power flow distribution at the current moment based on the sampled data; calculating the power flow correction value at the current moment based on the power flow distribution at the current moment, and correcting the power flow distribution at the current moment based on the power flow correction value; and outputting power flow data when the corrected power flow distribution at the current moment is stable.
[0151] In one embodiment, the process of the processor executing a computer program to calculate the power flow correction value at the current moment based on the power flow distribution at the current moment includes: calculating the electromagnetic coupling relationship at the current moment based on the power flow distribution at the current moment; and obtaining the power flow correction value at the current moment based on the electromagnetic coupling relationship at the current moment.
[0152] In one embodiment, the process of the processor executing a computer program to correct the power flow distribution at the current moment based on the power flow correction value at the current moment includes: when the power flow correction value at the current moment meets the correction condition, determining whether the power flow distribution at the current moment is stable; when the power flow correction value at the current moment does not meet the correction condition, updating the power flow distribution at the current moment based on the power flow correction value at the current moment, and calculating a new power flow correction value based on the updated power flow distribution at the current moment, until the power flow correction value at the current moment meets the correction condition.
[0153] In one embodiment, when the processor executes a computer program, the function of outputting power flow data when the corrected power flow distribution at the current moment is stable includes: when the corrected power flow distribution at the current moment satisfies the stability condition, determining that the corrected power flow distribution at the current moment is stable and outputting power flow data; when the corrected power flow distribution at the current moment does not satisfy the stability condition, calculating the power flow distribution at the next moment until the power flow distribution at the next moment is stable.
[0154] In one embodiment, when the processor executes a computer program to output power flow data after the power flow distribution at the corrected current moment is stable, the process includes: calculating equipment losses based on the power flow data; and evaluating power quality based on the equipment losses and the power flow data.
[0155] In one embodiment, the power flow distribution at the current moment, as realized by the processor executing the computer program, is calculated based on a pre-trained first model, the training process of which includes:
[0156] Acquire trend sample data, which carries trend tags;
[0157] The current flow sample data is input into the first initial model for training to obtain the initial current flow prediction data;
[0158] Based on the deviation between the trend label and the initial trend prediction data, adjust the model parameters of the first initial model until training is completed and the first model is obtained.
[0159] The aforementioned electromagnetic coupling relationship is calculated based on a pre-trained second model. The training process of the second model includes: acquiring power flow simulation sample data, which carries electromagnetic tags; inputting the power flow simulation sample data into the second initial model for training to obtain initial electromagnetic prediction data; adjusting the model parameters of the second initial model based on the deviation between the electromagnetic tags and the initial electromagnetic prediction data until training is complete and the second model is obtained. The aforementioned equipment loss is calculated based on a pre-trained third model. The training process of the third model includes: acquiring power flow simulation sample data, which carries electrothermal tags; inputting the power flow simulation sample data into the third initial model for training to obtain initial electrothermal prediction data; adjusting the model parameters of the third initial model based on the deviation between the electrothermal tags and the initial electrothermal prediction data until training is complete and the third model is obtained.
[0160] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: acquiring sampled data; calculating the power flow distribution at the current moment based on the sampled data; calculating the power flow correction value at the current moment based on the power flow distribution at the current moment, and correcting the power flow distribution at the current moment based on the power flow correction value at the current moment; and outputting power flow data when the corrected power flow distribution at the current moment is stable.
[0161] In one embodiment, the process of calculating the power flow correction value at the current moment based on the power flow distribution at the current moment, implemented by the computer program when executed by the processor, includes: calculating the electromagnetic coupling relationship at the current moment based on the power flow distribution at the current moment; and obtaining the power flow correction value at the current moment based on the electromagnetic coupling relationship at the current moment.
[0162] In one embodiment, when the computer program is executed by the processor, the process of correcting the power flow distribution at the current moment based on the power flow correction value at the current moment includes: when the power flow correction value at the current moment meets the correction condition, determining whether the power flow distribution at the current moment is stable; when the power flow correction value at the current moment does not meet the correction condition, updating the power flow distribution at the current moment based on the power flow correction value at the current moment, and calculating a new power flow correction value based on the updated power flow distribution at the current moment, until the power flow correction value at the current moment meets the correction condition.
[0163] In one embodiment, when the computer program is executed by the processor, the function of outputting power flow data when the corrected power flow distribution at the current moment is stable includes: when the corrected power flow distribution at the current moment satisfies the stability condition, determining that the corrected power flow distribution at the current moment is stable and outputting power flow data; when the corrected power flow distribution at the current moment does not satisfy the stability condition, calculating the power flow distribution at the next moment until the power flow distribution at the next moment is stable.
[0164] In one embodiment, when the computer program is executed by the processor, after outputting power flow data when the corrected power flow distribution at the current moment is stable, the program includes: calculating equipment losses based on the power flow data; and evaluating power quality based on the equipment losses and the power flow data.
[0165] In one embodiment, the current power flow distribution is calculated based on a pre-trained first model. The training process of the first model includes: acquiring power flow sample data, which carries a power flow tag; inputting the power flow sample data into a first initial model for training to obtain initial power flow prediction data; adjusting the model parameters of the first initial model based on the deviation between the power flow tag and the initial power flow prediction data until training is complete and the first model is obtained. The electromagnetic coupling relationship is calculated based on a pre-trained second model. The training process of the second model includes: acquiring power flow simulation sample data, which carries an electromagnetic tag; inputting the power flow simulation sample data into a second initial model for training to obtain initial electromagnetic prediction data; adjusting the model parameters of the second initial model based on the deviation between the electromagnetic tag and the initial electromagnetic prediction data until training is complete and the second model is obtained. The equipment loss is calculated based on a pre-trained third model. The training process of the third model includes: acquiring power flow simulation sample data, which carries an electrothermal tag; inputting the power flow simulation sample data into a third initial model for training to obtain initial electrothermal prediction data; adjusting the model parameters of the third initial model based on the deviation between the electrothermal tag and the initial electrothermal prediction data until training is complete and the third model is obtained.
[0166] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring sampled data; calculating the power flow distribution at the current moment based on the sampled data; calculating the power flow correction value at the current moment based on the power flow distribution at the current moment, and correcting the power flow distribution at the current moment based on the power flow correction value at the current moment; and outputting power flow data when the corrected power flow distribution at the current moment is stable.
[0167] In one embodiment, the process of calculating the power flow correction value at the current moment based on the power flow distribution at the current moment, implemented by the computer program when executed by the processor, includes: calculating the electromagnetic coupling relationship at the current moment based on the power flow distribution at the current moment; and obtaining the power flow correction value at the current moment based on the electromagnetic coupling relationship at the current moment.
[0168] In one embodiment, when the computer program is executed by the processor, the process of correcting the power flow distribution at the current moment based on the power flow correction value at the current moment includes: when the power flow correction value at the current moment meets the correction condition, determining whether the power flow distribution at the current moment is stable; when the power flow correction value at the current moment does not meet the correction condition, updating the power flow distribution at the current moment based on the power flow correction value at the current moment, and calculating a new power flow correction value based on the updated power flow distribution at the current moment, until the power flow correction value at the current moment meets the correction condition.
[0169] In one embodiment, when the computer program is executed by the processor, the function of outputting power flow data when the corrected power flow distribution at the current moment is stable includes: when the corrected power flow distribution at the current moment satisfies the stability condition, determining that the corrected power flow distribution at the current moment is stable and outputting power flow data; when the corrected power flow distribution at the current moment does not satisfy the stability condition, calculating the power flow distribution at the next moment until the power flow distribution at the next moment is stable.
[0170] In one embodiment, when the computer program is executed by the processor, after outputting power flow data when the corrected power flow distribution at the current moment is stable, the program includes: calculating equipment losses based on the power flow data; and evaluating power quality based on the equipment losses and the power flow data.
[0171] In one embodiment, the current power flow distribution is calculated based on a pre-trained first model. The training process of the first model includes: acquiring power flow sample data, which carries a power flow tag; inputting the power flow sample data into a first initial model for training to obtain initial power flow prediction data; adjusting the model parameters of the first initial model based on the deviation between the power flow tag and the initial power flow prediction data until training is complete and the first model is obtained. The electromagnetic coupling relationship is calculated based on a pre-trained second model. The training process of the second model includes: acquiring power flow simulation sample data, which carries an electromagnetic tag; inputting the power flow simulation sample data into a second initial model for training to obtain initial electromagnetic prediction data; adjusting the model parameters of the second initial model based on the deviation between the electromagnetic tag and the initial electromagnetic prediction data until training is complete and the second model is obtained. The equipment loss is calculated based on a pre-trained third model. The training process of the third model includes: acquiring power flow simulation sample data, which carries an electrothermal tag; inputting the power flow simulation sample data into a third initial model for training to obtain initial electrothermal prediction data; adjusting the model parameters of the third initial model based on the deviation between the electrothermal tag and the initial electrothermal prediction data until training is complete and the third model is obtained.
[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0173] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0174] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A power flow estimation method for power grids, characterized in that, The method includes: Acquire sampling data; Calculate the power flow distribution at the current moment based on the sampled data; Based on the current power flow distribution, calculate the current power flow correction value, and correct the current power flow distribution based on the current power flow correction value. When the corrected power flow distribution at the current moment stabilizes, power flow data is output; the power flow data refers to the power flow distribution between the time of the power quality disturbance event and the time when the power flow distribution stabilizes. Calculate equipment losses based on the aforementioned power flow data; The step of calculating the power flow correction value at the current moment based on the power flow distribution at the current moment includes: Based on the power flow distribution at the current moment, the electromagnetic coupling relationship at the current moment is calculated; Based on the electromagnetic coupling relationship at the current moment, the power flow correction value at the current moment is obtained; The current power flow distribution is calculated based on a pre-trained first model, the training process of which includes: Acquire trend sample data, wherein the trend sample data carries trend tags; The current flow sample data is input into the first initial model for training to obtain initial current flow prediction data; Based on the deviation between the trend label and the initial trend prediction data, adjust the model parameters of the first initial model until training is completed and the first model is obtained. The electromagnetic coupling relationship is calculated based on a pre-trained second model, the training process of which includes: Acquire current flow simulation sample data, wherein the current flow simulation sample data carries an electromagnetic tag; The power flow simulation sample data is input into the second initial model for training to obtain initial electromagnetic prediction data; Based on the deviation between the electromagnetic tag and the initial electromagnetic prediction data, the model parameters of the second initial model are adjusted until training is completed and the second model is obtained. The equipment loss is calculated based on a pre-trained third model, the training process of which includes: Acquire the current flow simulation sample data, which carries an electrothermal tag; The power flow simulation sample data is input into the third initial model for training to obtain initial electrothermal prediction data; Based on the deviation between the electrothermal label and the initial electrothermal prediction data, the model parameters of the third initial model are adjusted until the training is completed and the third model is obtained.
2. The method according to claim 1, characterized in that, The step of correcting the power flow distribution at the current moment based on the power flow correction value at the current moment includes: When the current power flow correction value meets the correction condition, determine whether the current power flow distribution is stable. When the current power flow correction value does not meet the correction condition, the current power flow distribution is updated based on the current power flow correction value, and a new power flow correction value is calculated based on the updated current power flow distribution, until the current power flow correction value meets the correction condition.
3. The method according to claim 1, characterized in that, When the corrected power flow distribution at the current moment is stable, power flow data is output, including: When the corrected power flow distribution at the current moment satisfies the stability condition, the corrected power flow distribution at the current moment is determined to be stable, and the power flow data is output. If the corrected power flow distribution at the current moment does not meet the stability condition, calculate the power flow distribution at the next moment until the power flow distribution at the next moment is stable.
4. The method according to claim 1, characterized in that, After calculating the equipment loss based on the power flow data, the process includes: The power quality is assessed based on the equipment losses and the power flow data.
5. A power grid flow estimation device, characterized in that, The steps for performing the method as described in any one of claims 1-4; The power flow estimation device includes: The acquisition module is used to acquire sampled data; The power flow calculation module is used to calculate the power flow distribution at the current moment based on the sampled data; The power flow correction module is used to calculate the power flow correction value at the current moment based on the power flow distribution at the current moment, and to correct the power flow distribution at the current moment based on the power flow correction value. The power flow output module is used to output power flow data when the corrected power flow distribution at the current moment is stable; the power flow data refers to the power flow distribution between the time of the power quality disturbance event and the time when the power flow distribution is stable. The power flow output module is also used to calculate equipment losses based on the power flow data; The aforementioned power flow correction module includes: The electromagnetic coupling relationship unit is used to calculate the electromagnetic coupling relationship at the current moment based on the power flow distribution at the current moment. The correction unit is used to obtain the power flow correction value at the current moment based on the electromagnetic coupling relationship at the current moment; A trend sample acquisition unit is used to acquire trend sample data, wherein the trend sample data carries trend tags; The first training unit is used to input the current flow sample data into the first initial model for training to obtain initial current flow prediction data. The first optimization unit is used to adjust the model parameters of the first initial model according to the deviation between the current label and the initial current prediction data, until the first model is obtained after training is completed. The first tidal current simulation sample acquisition unit is used to acquire tidal current simulation sample data, wherein the tidal current simulation sample data carries an electromagnetic tag. The second training unit is used to input the power flow simulation sample data into the second initial model for training to obtain initial electromagnetic prediction data. The second optimization unit is used to adjust the model parameters of the second initial model according to the deviation between the electromagnetic tag and the initial electromagnetic prediction data, until the training is completed and the second model is obtained. The second tidal current simulation sample acquisition unit is used to acquire the tidal current simulation sample data, wherein the tidal current simulation sample data carries an electrothermal tag. The third training unit inputs the power flow simulation sample data into the third initial model for training to obtain initial electrothermal prediction data. The third optimization unit is used to adjust the model parameters of the third initial model based on the deviation between the electrothermal label and the initial electrothermal prediction data, until the training is completed and the third model is obtained.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Load flow calculation method and system of distributed power supply
CN112421617A
Electric power system load flow calculation method and device, computer equipment and storage medium
CN113592361A