Frequency safety assessment method and device considering source load uncertainty, equipment and medium

Through rolling prediction, uncertain source load scenarios and evaluation models are generated, combined with risk analysis and dynamic risk threshold setting, the problem of uncertain source load uncertainty in the power system is solved, and rapid assessment of the frequency safety of the power system and identification of high-risk events are achieved.

CN120146566APending Publication Date: 2025-06-13STATE GRID JIANGSU ELECTRIC POWER CO LTD RESEARCH INSTITUTE
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510210054.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing power system risk assessment methods are difficult to effectively account for source load uncertainty, especially in the context of strong uncertainty on both sides of the source load, the traditional static risk threshold setting method cannot adapt to the random characteristics of system source load differences in different operating periods.

Method used

A rolling prediction method is used to generate the source load scenario, combine future planning information to obtain an uncertain operating scenario set, and a time-divided frequency safety evaluation model is established a few days ago to evaluate the frequency safety under the uncertain operating scenario set. By introducing a risk analysis method, the risk of frequency offset exceeding limit is calculated, and the safety risk threshold is set, and the frequency safety dynamic risk threshold is defined characterized by the central moment of each order of the source load uncertainty.

Benefits of technology

It realizes a rapid assessment of the frequency safety of the power system under different operating periods in the future, and identifies high-risk events for frequency safety that will trigger low-frequency load reduction, and provides them to the prevention and control module to make effective control plans in advance, improving the accuracy and adaptability of risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146566A_ABST
    Figure CN120146566A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power system risk assessment, in particular to a frequency safety assessment method, device and equipment considering source load uncertainty and a medium, and the method comprises the steps: generating a source load scene at a future moment in a rolling manner based on source load data at a plurality of historical moments before the future moment, obtaining an uncertain operation scene set in combination with future plan information; establishing a time-phased frequency safety evaluation model before the day, evaluating the frequency safety under the uncertain operation scene set, and updating the time-phased frequency safety evaluation model based on a source load scene under the future moment of rolling refreshing; a risk analysis method is introduced, a frequency deviation out-of-limit risk is calculated based on an uncertain scene evaluation result, a safety risk threshold value is set, and a frequency safety dynamic risk threshold value represented by the central moment of each order of the uncertain quantity of the source load is defined through the relation between the safety risk threshold value and the uncertain quantity of the source load in different time periods. According to the method, the frequency safety in a large number of uncertain scenes can be quickly evaluated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system risk assessment, and particularly to a frequency security assessment method, device, equipment and medium considering the uncertainties of power sources and loads. Background Art

[0002] Traditional deterministic assessment methods for power systems mainly analyze the consequences caused by events in a deterministic scenario, ignoring the probabilities of event occurrence and the uncertainties of system operation modes. Risk-based power system security assessment takes into account the uncertain factors in the system such as the random fluctuations of new energy output and load, and the probability of fault occurrence, models the uncertainties and conducts quantitative analysis, and establishes risk security indicators to describe the impact of faults on the system.

[0003] The initial power system risk assessment methods mainly focused on considering accident uncertainties, and established risk indicators by taking into account both the probability of event occurrence and the loss cost. With the access of high-penetration new energy power generation, the system operation mode shows an increasingly strong uncertainty. Some studies have simultaneously considered the accident probability and the probability of future system scenarios to conduct power system security risk analysis. The risk gap method is used to calculate the system security risk index, and comparing it with the set risk threshold can identify high-level accidents, high-risk operation scenarios, etc. as risk assessment information.

[0004] Existing power system risk assessment methods mostly set static risk thresholds based on subjective experience or statistical experience, and compare the calculation results of corresponding risk indicators with the static thresholds to obtain future risk information of the system. In the context of strong uncertainties on both the power source and load sides of modern power systems, the random characteristics of system power sources and loads vary greatly in different operation periods, showing different probability distribution characteristics. Compared with the traditional static risk threshold setting method, how to take into account the differences in operation mode uncertainties in different periods, establish a dynamic risk threshold characterizing the random characteristics of system power sources and loads, and analyze and obtain more accurate and effective future security risk information of the power system is worthy of further research.

[0005] The information disclosed in this background art section is only intended to deepen the understanding of the overall background art of the present invention, and should not be regarded as an admission or any form of implication that this information constitutes the prior art known to those skilled in the art. Summary of the Invention

[0006] The present invention provides a frequency security assessment method, device, equipment and medium considering the uncertainties of power sources and loads, thus effectively solving the problems in the background art.

[0007] To achieve the above object, the technical solution adopted by the present invention is: a frequency security assessment method considering the uncertainties of power sources and loads, including the following steps:

[0008] Based on the source-load data at multiple historical moments before the future moment, generate the source-load scenarios at the future moment in a rolling manner, and combine with the future plan information to obtain a set of uncertain operation scenarios;

[0009] Establish a sub-period frequency security assessment model on a daily basis, evaluate the frequency security under the set of uncertain operation scenarios, and update the sub-period frequency security assessment model based on the source-load scenarios at the future moment that are refreshed in a rolling manner;

[0010] Introduce a risk analysis method, calculate the risk of frequency deviation exceeding the limit based on the evaluation results of uncertain scenarios, set a safety risk threshold, and define a dynamic risk threshold for frequency security characterized by the central moments of different orders of the source-load uncertainty through the relationship between the safety risk threshold and the source-load uncertainty at different periods.

[0011] Furthermore, the method of generating the source-load scenarios at the future moment based on the source-load data at multiple historical moments before the future moment includes the following steps:

[0012] Predict the future source-load scenarios based on a long short-term memory network;

[0013] Extract the sequence fluctuation characteristics reflecting the fluctuation degree of the source-load time series, and jointly constitute the constraint conditions of the conditional probability distribution of the source-load prediction error with the day-night type and season information;

[0014] Account for the constraint conditions to model the distribution of the conditional probability of the source-load prediction error; generate the future source-load prediction error distribution;

[0015] Combine the future source-load scenario prediction and the future source-load prediction error distribution to obtain the source-load scenarios at the future moment.

[0016] Furthermore, the prediction of the future source-load scenarios based on a long short-term memory network includes:

[0017] Input a multi-dimensional time series feature vector, where the multi-dimensional time series feature vector includes the output of each new energy power station and each load value;

[0018] Process the multi-dimensional time series feature vector through a long short-term memory network (LSTM); the long short-term memory network (LSTM) includes a forget gate, an input gate, an output gate, and a cell state;

[0019] The forget gate is used to determine how much of the previous period's state should be forgotten; the input gate is used to construct the input signal;

[0020] The output gate is used to obtain the output of the next period based on the output of the forget gate and the input of the input gate;

[0021] And determine the cell state of the next period.

[0022] Furthermore, the forget gate is based on the output h of the (t - 1)th period t-1 and the input z of the tth period t to form a signal f using the sigmoid activation function t to determine how much of the state C of the previous period t-1 should be forgotten. The expression of f is as follows t :

[0023] f t = σ(W fz z t + W fh h t-1 + b f );

[0024] where σ() is the sigmoid activation function, W fz , W fh are the weights of z t , h t-1 for f t , and b f is the bias;

[0025] The input gate constructs input signals i t-1 and g t, using the sigmoid and tanh activation functions based on h t and z t . Their expressions are as follows

[0026] i t = σ(W iz z t + W ih h t-1 + b i );

[0027] g t = tanh(W gz z t + W gh h t-1 + b g );

[0028] where tanh() is the tanh activation function, W iz , W ih , W gz , W gh , b i , b g are the corresponding weights and biases;

[0029] Multiply the two and add the output of the previous forget gate to obtain C t as follows

[0030] C t = g t i t + C t-1 f t ;

[0031] The output gate is based on h t-1 and z t , and obtains the output O at the t-th time period t :

[0032] O t = σ(W Oz z t + W Oh h t-1 + b o );

[0033] In the formula, W Oz 、W Oh are the corresponding weights, and b O is the bias;

[0034] Based on O t and C t , determine the hidden layer cell state h at the t-th time period t :

[0035] h t = tanh(C t )O t ;

[0036] The input multi-dimensional time series feature vector z t , is composed of the power outputs of each new energy power station and each load value at the t-th time period, and is expressed as z t = [z1 t,…,zNsc t]; where zit (i = 1,…,N sc ) represents the value of the i-th dimension feature at the t-th time period, and N sc is the feature dimension.

[0037] Furthermore, the sequence fluctuation feature that extracts and reflects the source-load time series fluctuation degree, together with the day-night type and season information, constitutes the constraint conditions of the source-load prediction error conditional probability distribution, including:

[0038] According to the source-load historical data before the future moment, judge the fluctuation stage of the source-load data to be predicted, and rearrange it;

[0039] Use the density-based spatial clustering of applications with noise method DBSCAN to cluster the source-load sequences with similar source-load sequence fluctuation characteristics into the same cluster;

[0040] Mark each source-load sequence fluctuation feature cluster, and combine and encode it with the day-night type and season information to obtain the constraint conditions of the final future source-load conditional probability distribution.

[0041] Further, judging the fluctuation stage of the source-load data to be predicted based on the historical source-load data before the future moment and rearranging it includes:

[0042] Judging the fluctuation stage of the source-load data to be predicted in the (t + 1)-th period according to the historical sequence [z t -l + 1,…,z t of the source-load data of the power system before the (t + 1)-th period; rearranging the source-load sequence according to the characteristic categories and writing it as α i denotes the sequence formed by the values of the i-th dimensional source-load characteristic from the (t - l + 1)-th period to the t-th period

[0043] Using the source-load sequence volatility K(α i ) reflecting the change trend of α i , the source-load sequence fluctuation standard deviation σ(α i ) reflecting the frequency of α i fluctuation, and the source-load sequence fluctuation degree R(α i ) reflecting the severity of α i fluctuation to form a source-load sequence fluctuation feature vector λ i =[K(α i ),σ(α i ),R(α i )] describing the fluctuation characteristics of α i ; K(α i ), σ(α i ), and R(α i ) are calculated as shown in the following formula:

[0044]

[0045]

[0046]

[0047] Further, using the density-based spatial clustering of applications with noise method DBSCAN to cluster the source-load sequences with similar source-load sequence fluctuation characteristics includes:

[0048] Clustering the T historical sequences [λ i ,…,λ i,1 ,…,λ i,T of the i-th dimensional source-load feature vector fluctuation feature λ i based on the DBSCAN algorithm to obtain the cluster label C i of each source-load sequence fluctuation feature λ

[0049] Furthermore, the conditional probability of the source-load prediction error is modeled by taking into account the constraint conditions; a future source-load prediction error distribution is generated, including:

[0050] Using a conditional generative adversarial network WGAN, the noise distribution and the constraint conditions are combined to form the input of the generator network, and an error distribution is obtained;

[0051] The discriminator network compares the error distribution with the true historical source-load error distribution, and determines whether the samples generated based on the error distribution satisfy the constraint conditions;

[0052] A loss function is set, and the generator and the discriminator are trained using the gradient descent method;

[0053] The trained generator is used to generate a future source-load prediction error distribution.

[0054] Furthermore, the loss function is:

[0055]

[0056] In the formula, P noise (e) is the noise distribution, G is the generator network, D is the discriminator network, P gen (e|c) is the error distribution; P hist (e) is the true historical source-load error distribution, V(G,D) represents the game value function under the generator G and the discriminator D, e his represents the historical scenario, P his (e) represents the distribution of the historical scenario, represents the sample e his under the expectation of conforming to the P his (e) distribution, e noise represents the noise sample, P noise (e) represents the distribution of the noise sample, represents the sample e noise under the expectation of conforming to the P noise (e) distribution.

[0057] Furthermore, the frequency security assessment model is established in advance for each time period to evaluate the frequency security under the set of uncertain operation scenarios, including the following steps:

[0058] A functional mapping relationship between the frequency security index and the input features is established, and a frequency security assessment model for each time period is established in advance;

[0059] The frequency security assessment model for each time period is co-trained based on the multi-task learning mechanism of the multi-gate mixture of experts MMOE.

[0060] Further, the multi-task learning mechanism based on the multi-gated mixture of experts (MMoE) co-trains the time-division frequency security assessment model, including:

[0061] Construct multiple multi-layer expert networks W ex i (i = 1, …, N ex ) and a gating network without hidden layers with the softmax function as the activation function N ex and N task are the number of expert networks and the number of tasks respectively;

[0062] For the k-th task, the final output y of the model k is:

[0063]

[0064] where x is the input feature, h k () is the regressor corresponding to the i-th task, is the output of the i-th expert network, is the weight of the i-th expert network output by the k-th gating neural network Gate;

[0065] Decompose the metric matrix A corresponding to the t-th operation period (t = 1, …, N ew ) into: t as:

[0066]

[0067] where B i (i = 1, …, N B ) is the shared parameter matrix in the process of establishing the evaluation model, corresponding to the expert network W in MMoE ex , w it is the corresponding weight;

[0068] Assign the same weight to the learning tasks at different times to obtain the intra-day learning loss function L based on the MMoE learning structure in as:

[0069]

[0070] where L t is the learning error of the t-th period.

[0071] Further, the source-load scenario at the future moment based on rolling refresh updates the time-division frequency security assessment model, including:

[0072] The source-load prediction scenario with intraday rolling refresh constitutes the target domain, and the actual source-load scenario constitutes the source domain. The domain adaptation DA method is used to measure the distribution difference between the target domain and the source domain;

[0073] Based on the distribution difference, when the frequency security assessment model is updated intraday, the frequency security assessment models in different time periods are clustered using the constraint propagation clustering method TCCPCA.

[0074] Furthermore, the use of the domain adaptation DA method to measure the distribution difference between the target domain and the source domain includes:

[0075] Use the maximum mean discrepancy MMD defined on the reproducing kernel Hilbert space RKHS to measure the source domain D S and the target domain D T The distribution difference between:

[0076]

[0077] In the formula, sup() represents the upper bound operation, and g∈G means that g is a function in the function domain G;

[0078] Restrict the function domain and define it as a vector within the unit ball in the reproducing Hilbert space, that is, ||g||<1; represent g(x) as:

[0079] g(x) = <Φ(x),g> H ;

[0080] In the formula, H represents the RKHS space, and Ф(x) represents the mapping of x in H;

[0081] Get:

[0082]

[0083] The unbiased estimate of MMD is:

[0084]

[0085] In the formula, n S and n T are the number of samples in D S and D T respectively.

[0086] Furthermore, the clustering of samples of the frequency security assessment models in different time periods using the constraint propagation clustering method TCCPCA includes:

[0087] In the stage of establishing the day-ahead frequency security assessment model, for samples (x i ,y i ) and (x j ,yj ), define that if |F(x i ) - y i | < e th and F(x j ) - y j | < e th , then (x i , y i ), (x j , y j ) ∈ M;

[0088] Define the constraint matrix R = (r ij ), and represent the must - connect constraint in matrix form. Its element r ij is:

[0089]

[0090] Introduce the propagation matrix U, and apply the supervised knowledge learned when establishing the day - ahead frequency security assessment model to the sample clustering during the intraday frequency security assessment model update. The matrix U is solved by the following formula:

[0091]

[0092] In the formula, the first term represents the distance between the propagation constraint condition and the original constraint condition, the second term represents the smoothness of the matrix U, γ > 0 is the trade - off coefficient, and w ij is the edge weight defined in the spectral clustering method;

[0093] Use the obtained U to adjust the edge weight matrix W in the spectral clustering as shown in the following formula:

[0094]

[0095] In the formula, w’ ij is the element in the adjusted edge weight matrix W’;

[0096] After adjusting the distance between samples, use the fuzzy k - means clustering method to complete the sample clustering, and establish an evaluation sub - model for each cluster respectively.

[0097] Furthermore, the introduced risk analysis method calculates the frequency deviation out - of - limit risk based on the uncertain scenario assessment results, and sets a safety risk threshold, including:

[0098] Assume a total of N E contingency events. Taking the traditional under - frequency load shedding triggered by the lowest frequency as an example, if the lowest frequency f min ≤ f th then the under - frequency load shedding device operates, where f th is the under - frequency load shedding action threshold;

[0099] For the anticipated event E i (i = 1, …, N E ), the following under-limit probability P i of event E obtained by Monte Carlo sampling is used as the event frequency safety risk index R Ei (f min ≤ f th ) as follows: i :

[0100]

[0101] In the formula, is the value of f min in the j-th scenario, and N S is the number of scenarios;

[0102] Set the frequency safety risk threshold R i th (1 ≤ i ≤ N E ), and based on the over-limit probability of f min under each event, high-frequency safety risk events are obtained, satisfying:

[0103]

[0104] Furthermore, based on the relationship between the frequency safety risk threshold and the uncertainty of source and load at different times, a frequency safety dynamic risk threshold characterized by the central moments of each order of the source and load uncertainty is defined, including:

[0105] In the identification of high-frequency safety risk events, an anticipated event E i is established for the frequency safety dynamic risk threshold index The k-th central moments of the future loads and new energy power station outputs of the system are introduced to characterize the uncertainty of the future operation mode of the system, and the relationship between the frequency safety dynamic risk threshold and the central moments of each order of the source and load uncertainty is as follows:

[0106]

[0107] In the formula, N load represents the number of loads, N new represents the number of new energy power stations, N mo represents the highest order of the central moments taken, a j,k represents the weight of the k-th central moment of the j-th load or new energy power station output on the calculated value of R i th , and M j,k represents the k-th central moment of the j-th load or new energy power station output;

[0108] At each historical time period, the maximum R LW when Pi th As the optimal frequency security risk threshold during this period, at this frequency security risk threshold, P LW = 0 and P FW is minimized;

[0109] Based on the perturbation method of first-order difference approximation sensitivity, solve for R near the optimal frequency security risk threshold that meets the error requirements i th As the final set frequency security threshold; the optimal frequency security risk threshold R obtained finally for the historical period i th,op is as follows:

[0110]

[0111] In the formula, R i th,max is the maximum frequency security risk threshold that satisfies P LW = 0, and ε is a small positive number;

[0112] Based on the optimal frequency security risk thresholds of each historical period, use the method of likelihood estimation to solve for a j,k , and the expression for setting the frequency security dynamic risk threshold for different periods can be solved. The log-likelihood function of likelihood estimation is:

[0113]

[0114] In the formula, T his is the number of historical periods, σ is the observation error, is the R i th,op at the t-th historical period, is the value of M j,k at the t-th historical period.

[0115] The present invention also includes a frequency security assessment device considering the uncertainty of power sources and loads. Using the method as described above, the device includes:

[0116] A power source and load scenario generation module, which is used to roll-generate power source and load scenarios at a future moment based on the power source and load data of multiple historical moments before the future moment, and combine the future plan information to obtain an uncertain operation scenario set;

[0117] A modeling and intraday update module, which is used to establish a sub-period frequency security assessment model before the day-ahead, evaluate the frequency security under the uncertain operation scenario set, and update the sub-period frequency security assessment model based on the power source and load scenarios at the rolling-refreshed future moment;

[0118] A risk identification module is used to introduce a risk analysis method, calculate the risk of frequency deviation exceeding the limit based on the evaluation results of uncertain scenarios, set a safety risk threshold, and define a frequency safety dynamic risk threshold characterized by the central moments of each order of the source-load uncertainty through the relationship between the safety risk threshold and the source-load uncertainty at different time periods.

[0119] The present invention further includes a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned method is implemented.

[0120] The present invention further includes a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned method is implemented.

[0121] The beneficial effects of the present invention are as follows: The source-load scenarios are generated in a rolling prediction manner, and the uncertain operation scenario set is obtained by combining future plan information. The research on the day-ahead establishment and intra-day update mechanism of the evaluation model is carried out to improve its adaptability to the continuously changing operation mode of the system under the rolling evaluation method, and quickly evaluate the frequency safety under a large number of uncertain scenarios. Based on the frequency safety evaluation results of a batch of uncertain scenarios, the risk analysis of frequency safety index exceeding the limit is carried out, and the high-frequency safety risk events that will trigger under-frequency load shedding and cause a large number of loads to be cut off passively in the future operation period are identified by comparing them with the dynamic risk threshold, and provided to the subsequent prevention and control module to make an effective control plan in advance. Description of the Drawings

[0122] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0123] Figure 1 It is the flowchart of the method in Embodiment 1;

[0124] Figure 2 It is the structural schematic diagram of the device in Embodiment 1;

[0125] Figure 3 It is the framework diagram of the rolling evaluation of frequency safety risk in Embodiment 2;

[0126] Figure 4 It is the structure diagram of LSTM in Embodiment 2;

[0127] Figure 5 It is the structure diagram of CWGAN in Embodiment 2;

[0128] Figure 6It is the structure diagram of shared-bottom and MMoE in Embodiment 2;

[0129] Figure 7 It is the structure schematic diagram of the computer device of the present invention. Specific embodiments

[0130] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments.

[0131] Embodiment 1:

[0132] As Figure 1 shown: A frequency security assessment method considering source-load uncertainty includes the following steps:

[0133] Based on the source-load data of multiple historical moments before the future moment, rolling generate the source-load scenarios at the future moment, and combine with the future plan information to obtain the set of uncertain operation scenarios;

[0134] Establish a sub-period frequency security assessment model on a daily basis, evaluate the frequency security under the set of uncertain operation scenarios, and update the sub-period frequency security assessment model based on the rolling refreshed source-load scenarios at the future moment;

[0135] Introduce a risk analysis method, calculate the frequency deviation over-limit risk based on the evaluation results of uncertain scenarios, set a safety risk threshold, and define a frequency security dynamic risk threshold characterized by the central moments of each order of the source-load uncertainty through the relationship between the safety risk threshold and the source-load uncertainty at different time periods.

[0136] Adopt a rolling prediction method to generate source-load scenarios, and combine with the future plan information to obtain the set of uncertain operation scenarios. Research the daily establishment and intra-day update mechanisms of the evaluation model to improve its adaptability to the continuously changing operation mode of the system under the rolling evaluation method, and quickly evaluate the frequency security under a large number of uncertain scenarios. Based on the frequency security evaluation results of a batch of uncertain scenarios, conduct an analysis of the risk of exceeding the frequency security index, and identify high-frequency security risk events that will trigger under-frequency load shedding and cause a large number of loads to be cut off passively in the future operation period by comparing it with the dynamic risk threshold, and provide it to the subsequent prevention and control module for early decision-making of effective control schemes.

[0137] In this embodiment, based on the source-load data of multiple historical moments before the future moment, rolling generate the source-load scenarios at the future moment, including the following steps:

[0138] Predict future source-load scenarios based on long short-term memory networks;

[0139] Extract the sequence fluctuation characteristics reflecting the fluctuation degree of the source-load time series, and jointly constitute the constraint conditions for the conditional probability distribution of the source-load prediction error with the day-night type and seasonal information;

[0140] Account for the constraint conditions to model the distribution of the conditional probability of the source-load prediction error; generate the future source-load prediction error distribution;

[0141] Combine the future source-load scenario prediction and the future source-load prediction error distribution to obtain the source-load scenario at the future moment.

[0142] Among them, the future source-load scenario prediction based on the long short-term memory network includes:

[0143] Input a multi-dimensional time series feature vector, where the multi-dimensional time series feature vector includes the output of each new energy power station and each load value;

[0144] Process the multi-dimensional time series feature vector through the long short-term memory network LSTM; the long short-term memory network LSTM includes a forget gate, an input gate, an output gate, and a cell state;

[0145] The forget gate is used to determine how much of the state in the previous time period should be forgotten; the input gate is used to construct the input signal;

[0146] The output gate is used to obtain the output of the next time period based on the output of the forget gate and the input of the input gate;

[0147] And determine the cell state of the next time period.

[0148] The forget gate is based on the output h of the (t - 1)th time period t-1 and the input z of the tth time period t Use the sigmoid activation function to form the signal f t to determine how much of the state C in the previous time period t-1 should be forgotten, and f t is expressed as follows:

[0149] f t = σ(W fz z t + W fh h t-1 + b f );

[0150] In the formula, σ() is the sigmoid activation function, W fz , W fh are the weights of z t , h t-1 for f t , and b f is the bias;

[0151] The input gate is based on h t-1 and zt, Construct the input signals i using the sigmoid and tanh activation functions t and g t , and their expressions are shown as follows:

[0152] i t = σ(W iz z t + W ih h t-1 + b i );

[0153] g t = tanh(W gz z t + W gh h t-1 + b g );

[0154] In the formula, tanh() is the tanh activation function, and W iz , W ih , W gz , W gh , b i , b g are the corresponding weight values and bias amounts;

[0155] Multiply the two and add the output of the previous forget gate to obtain C t as shown in the following formula:

[0156] C t = g t i t + C t-1 f t ;

[0157] The output gate is based on h t-1 and z t , and the output O t at the t-th time period is obtained:

[0158] O t = σ(W Oz z t + W Oh h t-1 + b o );

[0159] In the formula, W Oz , W Oh are the corresponding weights, and b O is the bias amount;

[0160] Based on O t and C t , determine the hidden layer cell state h t at the t-th time period:

[0161] h t = tanh(C t )O t ;

[0162] The input multi-dimensional time series feature vector z t , which is composed of the output of each new energy power station and each load value at the t-th period, is expressed as z t = [z1 t,..., zNsc t]; where zit (i = 1,..., N sc ) represents the value of the i-th dimensional feature at the t-th period, and N sc is the feature dimension.

[0163] In this embodiment, sequence fluctuation features reflecting the fluctuation degree of the source-load time series are extracted, and together with the day-night type and season information, they constitute the constraint conditions for the conditional probability distribution of the source-load prediction error, including:

[0164] Based on the source-load historical data before the future moment, judge the fluctuation stage of the source-load data to be predicted and rearrange it;

[0165] Use the density-based spatial clustering of applications with noise method DBSCAN to cluster source-load sequences with similar source-load sequence fluctuation characteristics into the same cluster;

[0166] Mark each source-load sequence fluctuation feature cluster and combine it with the day-night type and season information for coding to obtain the constraint conditions for the final future source-load conditional probability distribution.

[0167] Among them, based on the source-load historical data before the future moment, judging the fluctuation stage of the source-load data to be predicted and rearranging it includes:

[0168] Based on the historical sequence of power system source-load data [z t -l+1,..., z t before the (t + 1)-th period, judge the fluctuation stage of the source-load data to be predicted at the (t + 1)-th period; rearrange the source-load sequence by feature category and write it as α i represents the sequence formed by the values of the i-th dimensional source-load feature from the (t - l + 1)-th period to the t-th period

[0169] Use the source-load sequence volatility K(α i ) reflecting the change trend of α i , the source-load sequence fluctuation standard deviation σ(α i ) reflecting the frequency of α i fluctuation, and the source-load sequence fluctuation degree R(α i ) reflecting the severity of α i), constituting the description of α i The source-load sequence fluctuation feature vector λ that characterizes the fluctuation characteristics i = [K(α i ), σ(α i ), R(α i )]; K(α i ), σ(α i ), and R(α i ) are calculated as shown in the following formula:

[0170]

[0171]

[0172] Among them, using the density-based spatial clustering of applications with noise DBSCAN, source-load sequences with similar source-load sequence fluctuation characteristics are clustered into the same cluster, including:

[0173] Based on the DBSCAN algorithm, T historical sequences [λ i of the i-th dimensional source-load feature vector fluctuation feature λ i,1 , …, λ i,T are clustered to obtain the cluster label C i of each source-load sequence fluctuation feature λ i .

[0174] As a preference of the above embodiment, the conditional probability of the source-load prediction error is distributed and modeled considering the constraint conditions; generating the future source-load prediction error distribution, including:

[0175] Using the conditional generative adversarial network WGAN, combining the noise distribution and the constraint conditions to form the input of the generator network, and obtaining the error distribution;

[0176] The discriminator network compares the error distribution with the true source-load historical error distribution, and discriminates whether the samples generated based on the error distribution satisfy the constraint conditions;

[0177] Setting the loss function, and using the gradient descent method to train the generator and the discriminator;

[0178] Using the trained generator to generate the future source-load prediction error distribution.

[0179] Among them, the loss function is:

[0180]

[0181] In the formula, P noise (e) is the noise distribution, G is the generator network, D is the discriminator network, and P gen (e|c) is the error distribution; P hist(e) is the real historical error distribution of source and load. V(G, D) represents the game value function under the generator G and the discriminator D, and e his represents the historical scenario, and P his (e) represents the distribution of the historical scenario, represents the sample e his under the expectation that conforms to P his (e) distribution, and e noise represents the noise sample, and P noise (e) represents the distribution of the noise sample, represents the sample e noise under the expectation that conforms to P noise (e) distribution.

[0182] In this embodiment, a time - segmented frequency security assessment model is established before the day - ahead to evaluate the frequency security under the set of uncertain operation scenarios, including the following steps:

[0183] Establish a functional mapping relationship between the frequency security index and the input features, and establish a time - segmented frequency security assessment model before the day - ahead;

[0184] Co - train the time - segmented frequency security assessment model based on the multi - task learning mechanism of the multi - gated mixture of experts MMOE.

[0185] Co - train the time - segmented frequency security assessment model based on the multi - task learning mechanism of the multi - gated mixture of experts MMoE, including:

[0186] Construct multiple multi - layer expert networks W ex i (i = 1, …, N ex ) and a non - hidden - layer gating network with the softmax function as the activation function N ex and N task are the number of expert networks and the number of tasks respectively;

[0187] For the k - th task, the final output y of the model k is:

[0188]

[0189] In the formula, x is the input feature, h k () is the regressor corresponding to the i - th task, is the output of the i - th expert network, is the weight of the i - th expert network output by the k - th gating neural network Gate;

[0190] Decompose the metric matrix A corresponding to the t - th operation period (t = 1, …, N ew ) into: t as:

[0191]

[0192] Wherein, B i (i = 1, …, N B ) is the shared parameter matrix in the process of establishing the evaluation model, corresponding to the expert network W in MMoE ex , w it is the corresponding weight;

[0193] Assign the same weight to the learning tasks at different time periods to obtain the intra-day learning loss function L based on the MMoE learning structure in as follows:

[0194]

[0195] Wherein, L t is the learning error at the t-th time period.

[0196] Among them, the rolling-refresh-based future-time source-load scenario updated time-period frequency security assessment model includes:

[0197] Use the intra-day rolling-refresh source-load prediction scenario as the target domain and the actual source-load scenario as the source domain, and use the domain adaptation DA method to measure the distribution difference between the target domain and the source domain;

[0198] Based on the distribution difference, when the frequency security assessment model is updated intra-day, use the constrained propagation clustering method TCCPCA to cluster the samples of the frequency security assessment models at different time periods.

[0199] As the preference of the above embodiment, using the domain adaptation DA method to measure the distribution difference between the target domain and the source domain includes:

[0200] Use the maximum mean discrepancy MMD defined on the reproducing kernel Hilbert space RKHS to measure the source domain D S and the target domain D T between the distribution differences:

[0201]

[0202] Wherein, sup() represents the upper bound operation, and g ∈ G means that g is a function in the function domain G;

[0203] Restrict the function domain and define it as a vector within the unit ball in the reproducing Hilbert space, that is, ||g|| < 1; represent g(x) as:

[0204] g(x) = <Φ(x), g> H ;

[0205] where \(H\) represents the RKHS space, and \(\varPhi(x)\) represents the mapping of \(x\) in \(H\);

[0206] obtain:

[0207]

[0208] The unbiased estimate of MMD is:

[0209]

[0210] where \(n\) S and \(n\) T are the numbers of samples in \(D\) S and \(D\) T respectively.

[0211] In this embodiment, the frequency security assessment models at different time periods are clustered using the constraint propagation clustering method TCCPCA, including:

[0212] In the stage of establishing the day-ahead frequency security assessment model, for samples \((x\) i , \(y\) i ) and \((x\) j , \(y\) j ), it is defined that if \(|F(x\) i ) - y\) i | < \(e\) th and \(F(x\) j ) - y\) j | < \(e\) th , then \((x\) i , \(y\) i ), \((x\) j , \(y\) j ) \(\in M\);

[0213] Define the constraint matrix \(R=(r\) ij ), and represent the must-link constraint in matrix form, where its element \(r\) ij is:

[0214]

[0215] Introduce the propagation matrix \(U\), and apply the supervised knowledge learned when establishing the day-ahead frequency security assessment model to the sample clustering during the update of the intra-day frequency security assessment model. The matrix \(U\) is solved by the following formula:

[0216]

[0217] where the first term represents the distance between the propagation constraint condition and the original constraint condition, the second term represents the smoothness of the matrix \(U\), \(\gamma>0\) is a trade-off coefficient, and \(w\) ij is the edge weight defined in the spectral clustering method;

[0218] Use the obtained U to adjust the edge weight matrix W in spectral clustering as shown in the following formula:

[0219]

[0220] In the formula, w’ ij is the element in the adjusted edge weight matrix W’;

[0221] After adjusting the distance between samples, use the fuzzy k-means clustering method to complete sample clustering, and establish an evaluation sub-model for each cluster respectively.

[0222] As an optimization of the above embodiment, introduce a risk analysis method, calculate the frequency deviation out-of-limit risk based on the evaluation results of uncertain scenarios, and set a safety risk threshold, including:

[0223] Assume a total of N E anticipated events. Taking the traditional under-frequency load shedding triggered at the lowest frequency as an example, if the lowest frequency f min ≤f th then the under-frequency load shedding device operates, where f th is the under-frequency load shedding operation threshold;

[0224] For the anticipated event E i (i = 1,…,N E ), use Monte Carlo sampling to calculate the following out-of-limit probability P i of the event E Ei (f min ≤f th ) as the event frequency safety risk index R i :

[0225]

[0226] In the formula, is the value of f min in the j-th scenario, and N S is the number of scenarios;

[0227] Set the frequency safety risk threshold R i th (1≤i≤N E ), and obtain the frequency safety high-risk events based on the out-of-limit probability of f min in each event, satisfying:

[0228]

[0229] In this embodiment, through the relationship between the frequency safety risk threshold and the source-load uncertainty at different times, define the frequency safety dynamic risk threshold characterized by the central moments of each order of the source-load uncertainty amount, including:

[0230] Establish the contingency event E in the identification of high-risk events for frequency security i Frequency security dynamic risk threshold index Introduce the k-th central moments of future loads and new energy power station outputs in the system to characterize the uncertainty of the future operation mode of the system, and establish the relationship between the frequency security dynamic risk threshold and the central moments of various orders of the source-load uncertainty as follows:

[0231]

[0232] In the formula, N load represents the number of loads, N new represents the number of new energy power stations, N mo represents the highest order of the central moments taken, a j,k represents the weight of the k-th central moment of the output of the j-th load or new energy power station on the calculation value of R i th Calculation value weight, M j,k represents the k-th central moment of the output of the j-th load or new energy power station;

[0233] At each historical time period, take the maximum R when P LW = 0 i th As the optimal frequency security risk threshold for this time period, at this frequency security risk threshold, P LW = 0 and P FW is the smallest;

[0234] Based on the perturbation method of first-order difference approximation sensitivity, solve for R near the optimal frequency security risk threshold that meets the error requirements i th As the final set frequency security threshold; the optimal frequency security risk threshold R obtained finally at the historical time period i th,op is as follows:

[0235]

[0236] In the formula, R i th,max is the maximum frequency security risk threshold that satisfies P LW = 0, and ε is a small positive number;

[0237] Based on the optimal frequency security risk threshold of each historical time period, use the method of likelihood estimation to solve for a j,k , and then the expression for setting the frequency security dynamic risk threshold at different time periods can be solved. The log-likelihood function of likelihood estimation is:

[0238]

[0239] where T his is the number of historical time periods, σ is the observation error, is R at the t-th historical time period i th,op , is the value of M at the t-th historical time period j,k .

[0240] As Figure 2 shown, this embodiment further includes a frequency security assessment device considering source-load uncertainty. Using the method as described above, the device includes:

[0241] A source-load scenario generation module, configured to generate source-load scenarios at a future time by rolling based on source-load data at multiple historical times before the future time, and obtain an uncertain operation scenario set in combination with future plan information;

[0242] A modeling and intraday update module, configured to establish a sub-period frequency security assessment model on a daily basis, evaluate the frequency security under the uncertain operation scenario set, and update the sub-period frequency security assessment model based on the source-load scenarios at the rolling-refreshed future time;

[0243] A risk identification module, configured to introduce a risk analysis method, calculate the risk of frequency deviation exceeding the limit based on the uncertain scenario assessment results, set a safety risk threshold, and define a frequency security dynamic risk threshold characterized by the central moments of each order of the source-load uncertainty amount through the relationship between the safety risk threshold and the source-load uncertainty at different time periods.

[0244] Embodiment 2:

[0245] The purpose of this embodiment is to propose a rolling assessment method for frequency security risk considering source-load uncertainty, quickly evaluate the frequency security under a large number of uncertain scenarios, identify high-risk frequency security events, and thus make an advance decision on an effective control plan.

[0246] There are uncertainties on both the source and load sides of the power system, and there are a large number of possible operating modes at future times. This method studies the frequency security risk assessment method considering source-load uncertainties, and timely identifies high-frequency security risk events that will trigger under-frequency load shedding actions and provides them to the subsequent prevention and control module. The prediction accuracy of source-load uncertainties on both sides increases as the prediction lead time scale decreases. Therefore, a rolling prediction method is adopted to generate source-load scenarios, and an uncertain operation scenario set is obtained by combining future plan information. The research on the day-ahead establishment and intra-day update mechanism of the evaluation model is carried out to improve its adaptability to the continuously changing operating mode of the system under the rolling evaluation method, and quickly evaluate the frequency security under a large number of uncertain scenarios. Based on the frequency security assessment results of a batch of uncertain scenarios, the risk analysis of frequency security indicators exceeding the limit is carried out. By comparing them with the dynamic risk threshold, high-frequency security risk events that will trigger under-frequency load shedding and cause a large number of loads to be cut off passively in the future operation period are identified and provided to the subsequent prevention and control module to make an effective control plan in advance.

[0247] The research includes three core modules, namely the future source-load scenario generation module, the day-ahead establishment and intra-day update module of the frequency security assessment model, and the high-frequency security risk event identification module based on frequency deviation risk analysis.

[0248] This embodiment has the following advantages:

[0249] Research on the rolling assessment method of frequency security risk considering future source-load scenario uncertainties.

[0250] (1) Combine the use of Long Short Term Memory (LSTM) and Conditional Wasserstein Generative Adversarial Network (CWGAN) for rolling prediction of source-load scenarios, and then generate uncertain scenarios reflecting the possible future operating modes of the system for subsequent frequency security risk assessment;

[0251] (2) Establish a segmented frequency security assessment model based on the Multi-gate Mixture Of Experts (MMOE) multi-task learning structure, and use a semi-supervised learning algorithm to update the model intra-day based on the rolling refreshed source-load prediction information to improve the adaptability of the frequency security assessment model to the continuously changing operating mode of the power system under the frequency security rolling assessment mode;

[0252] (3) Use the frequency security dynamic threshold setting method and risk analysis method to accurately identify high-frequency security risk events that will trigger the under-frequency load shedding action of the system and cause a large number of loads to be cut off passively based on the frequency security assessment results of a batch of uncertain scenarios, and provide them to the subsequent prevention and control module to make an effective control plan in a timely manner;

[0253] The proposed rolling assessment method for frequency security risks can fully consider the uncertainty and time-variability of the future operation mode of the system, and effectively identify high-risk events of frequency security.

[0254] A rolling assessment method for frequency security risks considering the uncertainty of power sources and loads, the core modules of which include the following three parts: the future power source and load scenario generation module, the day-ahead establishment and intra-day update module of the frequency security assessment model, and the high-risk event identification module of frequency security based on frequency deviation risk analysis.

[0255] (1) Overall framework;

[0256] The rolling assessment framework for frequency security risks is as Figure 3 shown. The future load of the power system and the output of new energy units are random and volatile, and the future change law of power sources and loads may not be completely consistent with the historical law. Existing prediction methods cannot accurately predict their future values. Considering the uncertainty of future power sources and loads, a probabilistic prediction method is used to generate a batch of power source and load scenarios reflecting the probability distribution of the future power sources and loads of the system for frequency security risk assessment. The accuracy of power source and load prediction increases as the prediction lead time decreases. Therefore, a rolling prediction method for power source and load scenario generation is adopted, and the prediction information of power source and load scenarios at the future moment is refreshed based on the power source and load data at multiple historical moments before the future moment.

[0257] Combining the rolling-refreshed power source and load prediction information and the planned data, the future uncertain operation scenario set can be generated. A data-driven frequency security assessment model is used to quickly assess the frequency security under a large number of operation scenarios. Combining the future operation scenario probability information and the frequency security assessment results after power perturbation under the corresponding scenarios, a risk analysis method is introduced to calculate the frequency deviation risk index, which is used to identify high-risk events of frequency security that will trigger the low-frequency load shedding action and cause a large number of loads to be cut off passively, and provided to the subsequent prevention and control module.

[0258] To assess the frequency security of the system under different future operation periods based on a rolling manner, the adaptability of the frequency security assessment model to the continuously changing operation mode of the power system needs to be considered. An assessment model is established according to the learning mechanism of "establishing by time periods day-ahead and rolling updating intra-day" so as to adapt to the frequency security assessment in the rolling mode and improve the accuracy of frequency security assessment. To avoid the dependence of the generation of labeled samples on time-domain simulation, a semi-supervised learning algorithm is used when updating the model intra-day.

[0259] (2) Rolling generation of future power source and load scenarios;

[0260] Based on the source and load data at multiple historical moments before a future moment, the source and load scenarios at the future moment are generated in a rolling manner. When predicting the source and load scenarios, first, the Long Short-Term Memory (LSTM) network is used to predict the future source and load scenarios of the system. Considering the prediction errors caused by the random volatility of the source and load itself and the relationship between the prediction error distribution and the fluctuation characteristics of the source and load time series, the Conditional Wasserstein Generative Adversarial Network (CWGAN) is used to model the conditional probability distribution of the prediction errors under corresponding constraints, and the future source and load scenarios of the system are obtained.

[0261] 1. Prediction of future source and load scenarios based on the Long Short-Term Memory network;

[0262] As an improved model of the traditional Recurrent Neural Network (RNN), LSTM has a unique memory and forgetting mode, and can more effectively learn the temporal characteristics of new energy output and load in each period. Therefore, the LSTM network is used to predict the future source and load scenarios. LSTM is composed of multiple units connected in series, and each unit is combined with three gating units: the cell state, the forget gate, the input gate, and the output gate. Its structure is as Figure 4 shown. Where Ct is the cell state at time t, that is, the memory unit of LSTM, and it is read and modified by controlling the input gate, the forget gate, and the output gate.

[0263] The forget gate is based on the output h at the (t - 1)th period t-1 and the input z at the tth period t to form a signal f using the sigmoid activation function t to determine how much of the previous period's state C t-1 should be forgotten. The expression of f t is shown in Equation (3-1):

[0264] f t = σ(W fz z t + W fh h t-1 + b f ) (3-1)

[0265] where σ() is the sigmoid activation function, and W fz and W fh are for z t and h t-1 to ft Weight, b f is the bias term.

[0266] The input gate is based on h t-1 and z t, Using the sigmoid and tanh activation functions, the input signals i t and g t are constructed, and their expressions are shown in Equations (3-2) and (3-3) respectively.

[0267] i t = σ(W iz z t + W ih h t-1 + b i ) (3-2)

[0268] g t = tanh(W gz z t + W gh h t-1 + b g ) (3-3)

[0269] where tanh() is the tanh activation function, and W iz 、W ih 、W gz 、W gh 、b i 、b g are the corresponding weights and bias terms.

[0270] After multiplying the two and adding the output of the previous forget gate, C t is obtained as shown in Equation (3-4).

[0271] C t = g t i t + C t-1 f t (3-4)

[0272] The output gate is based on h t-1 and z t to obtain the output O t at the t-th time period:

[0273] O t = σ(W Oz z t + W Oh h t-1 + b o ) (3-5)

[0274] where W Oz 、W Ohis the corresponding weight, and b O is the bias.

[0275] Based on O t and C t , the hidden layer cell state h t at the t-th time period can be determined as follows:

[0276] h t = tanh(C t )O t (3-6)

[0277] In this paper, the input of the LSTM network is a multi-dimensional time series feature vector z t , which is composed of the power outputs of each new energy power station and each load value at the t-th time period, and is expressed as where represents the value of the i-th dimension feature at the t-th time period, and N sc is the feature dimension. Based on the source-load time series information of multiple historical time periods before the prediction time, the source-load information at the prediction time can be predicted by rolling.

[0278] 2. Construction of the constraint condition for the probability distribution of source-load prediction error;

[0279] The magnitude of the source-load prediction error is closely related to the fluctuation degree of the source-load time series. Extract the sequence fluctuation features reflecting the fluctuation degree of the source-load time series, and jointly construct the constraint conditions for the conditional probability distribution of the source-load prediction error with the day-night type and season information. Taking a single time period as the forward-looking time period as an example, according to the historical sequence [z t-l+1 ,…,z t of the source-load data of the power system before the (t + 1)-th time period, the fluctuation stage of the source-load data to be predicted at the (t + 1)-th time period can be judged. Rearrange the source-load sequence by feature category and write it as α i represents the sequence formed by the values of the i-th dimension source-load feature from the (t - l + 1)-th to the t-th time periods such as the time series of the wind power output of a certain wind farm. Use the source-load sequence volatility K(α i ) reflecting the change trend of α i , the source-load sequence fluctuation standard deviation σ(α i ) reflecting the frequency of α i fluctuation, and the source-load sequence fluctuation degree R(α i ) reflecting the severity of α i fluctuation to form a source-load sequence fluctuation feature vector λ i = [K(α i ), σ(α i ), R(αi ), R(α i )]. K(α i ), σ(α i ), and R(α i ) are calculated as shown in Equations (3-7), (3-8), and (3-9):

[0280]

[0281] The future prediction error distributions of historical source-load data sequences with similar fluctuation characteristics are close. The Density-Based Spatial Clustering of Application with Noise (DBSCAN) is used to cluster source-load sequences with similar fluctuation characteristics of the source-load sequences into the same cluster. Based on the DBSCAN algorithm, the T historical sequences [λ i of the fluctuation characteristics λ i,1 , …, λ i,T of the i-th dimensional source-load feature vector are clustered to obtain the cluster label C i of the fluctuation characteristics λ i of each source-load sequence. After that, it is combined with the day-night type and season information for one-hot encoding to obtain the constraint condition c of the final future source-load conditional probability distribution. The obtained cluster label combined with the day-night type and season information is used as the one-hot encoding, which is used as the constraint condition c of the final source-load conditional probability distribution.

[0282] 3. Modeling the conditional probability distribution of source-load prediction errors considering the constraint conditions;

[0283] The Conditional Wasserstein Generative Adversarial Network (CWGAN) can add the source-load probability distribution conditional constraint on the basis of the traditional WGAN and is applicable to generating the future source-load prediction error distribution under the corresponding constraint conditions. CWGAN combines the noise distribution P noise (e) with the conditional constraint information c of the future source-load prediction error probability distribution to form the input of the generator network G(·; W G ), so as to obtain the future source-load prediction error distribution P gen (e|c) considering the constraint of condition c. The discriminator network D(·; W D |c) compares the similarity between P gen (e|c) and the true source-load historical error distribution P hist (e), and at the same time discriminates whether the samples generated based on P gen (e|c) satisfy the condition c. The CWGAN structure for generating new energy output and load prediction errors is asFigure 5 as shown

[0284] The CWGAN loss function is as shown in Equation (3-10):

[0285]

[0286] Based on the above loss function, the gradient descent method is used to train the source-load prediction error generator and the discriminator. Eventually, a generator that can generate a future source-load prediction error distribution close to the actual one and meet the relevant source-load error prediction constraint conditions is obtained. Based on the future source-load prediction error distribution generated by the generator and combined with the LSTM network to generate the future source-load prediction value, a batch of source-load scenarios reflecting the future source-load uncertainty of the power system can be obtained.

[0287] (3) The frequency security assessment model for adapting to rolling assessment is established daily and updated intraday;

[0288] 1. The mechanism for daily establishment and intraday update of the frequency security assessment model;

[0289] To evaluate the frequency security of the system at different future operation periods based on a rolling manner, it is necessary to consider the adaptability of the frequency security assessment model to the continuously changing operation mode of the power system. The power system is in a dynamic process of change and development on daily, monthly, annual, and longer time scales. Various factors such as the unit start-stop mode, network topology structure, power generation load pattern, and new energy proportion of the system are all in dynamic changes. The operation mode of the power system has complex time-varying characteristics, and the characteristics of the system operation mode at different periods vary greatly. If the evaluation model in the previous module is directly applied to the rolling assessment of frequency security involving different operation periods in the "offline training daily, online application intraday" mode, it will lead to large evaluation errors.

[0290] To improve the adaptability of the frequency security assessment model to the continuously changing operation mode of the power system and thus apply it to the rolling assessment of frequency security involving multiple different future operation periods of the system, the mechanism for daily establishment and intraday update of the model is studied. By establishing a sub-period frequency security assessment model daily and updating the model in a timely manner based on the rolling and refreshed source-load prediction information, the adaptability of the frequency security assessment model applied to the rolling assessment of frequency security involving multiple future operation periods is improved.

[0291] A time-segment frequency safety assessment model is established in the day-ahead stage, and the establishment of the assessment model for each time period is regarded as a learning task of the functional mapping relationship between multiple learning frequency safety indicators and input features. The MMoE multi-task learning mechanism is introduced to share parameters and training samples for similar learning tasks. By sharing training samples between similar tasks, the utilization efficiency of training samples is improved and the problem of sparse training samples is avoided. At the same time, the establishment of frequency safety assessment models for each time period based on the multi-task mechanism can share knowledge between different tasks, avoiding the repeated learning process of establishing corresponding models for each time period, and improving the efficiency of model learning.

[0292] Compared with the day-ahead forecast, the intraday forecast has a shorter forward time scale and the system source and load rolling forecast results are more accurate. This paper updates the frequency safety assessment model based on the intraday source and load rolling forecast information to further improve the accuracy of frequency safety assessment. If the supervised learning method is used to update the model intraday, it is necessary to generate a batch of new training samples based on time domain simulation. The detailed time domain simulation process after power disturbances in a large number of different operating scenarios used to generate training samples is difficult to complete in a short period of time. It is difficult to obtain a batch of labeled samples based on time domain simulation within a day and use supervised learning methods to update the model. Therefore, this paper uses a semi-supervised learning method to update the model based on the supervised knowledge of the day-ahead training samples and the unsupervised knowledge of the source and load scenario forecast information that is rolled out during the day, avoiding the dependence of supervised learning on labeled samples.

[0293] 2. A frequency assessment model based on the MMoE structure was established recently;

[0294] The essence of the frequency safety assessment model is to establish a functional mapping relationship between frequency safety indicators and input features. In the process of establishing the frequency safety assessment model for different time periods, compared with establishing an assessment model for each time period to learn the functional mapping relationship between frequency safety indicators and input features, the collaborative training of the frequency safety assessment model for each time period based on the multi-task learning structure can achieve the sharing of training samples and parameters, and try to avoid the occurrence of sparse problems and model overfitting problems, thereby improving the generalization ability of the frequency safety assessment model. At the same time, based on the multi-task learning mechanism, the collaborative training of the frequency safety assessment model for each time period can achieve knowledge sharing between the learning processes of the functional mapping relationship between frequency safety indicators and input features in different operating periods, avoid the repeated learning process of establishing the corresponding model for each time period, and improve the training efficiency of the frequency safety assessment model.

[0295] Parameter sharing is a mainstream way to achieve multi-task learning. The shared-bottom structure is widely used in multi-task learning frameworks based on parameter sharing, such as Figure 6As shown. When each learning task has a strong correlation, sharing the underlying network in the shared-bottom structure for different tasks can reduce the risk of model overfitting. However, for the training of the frequency security assessment model for each time period in this paper, due to the significant differences in the operating mode characteristics such as the spinning reserve level and inertia level of the system in different time periods, the frequency dynamic processes after power system power disturbances are quite different, and the functional mapping relationships between frequency security indicators and input features in different operating scenarios may have significant differences. Co-training the frequency security assessment models for each time period based on the shared-bottom structure may lead to serious negative transfer problems.

[0296] The proposed multi-gate mixture of experts (MMOE) multi-task learning structure is precisely to solve the problem that when the correlations of each learning task are small, sharing the underlying network based on the shared-bottom structure may lead to serious negative transfer. The MMOE multi-task learning structure is as Figure 6 shown. It constructs multiple expert networks and gating networks corresponding to each learning task, retaining their respective differences while sharing relevant information among each learning task, avoiding the negative transfer problems that may occur when using the shared-bottom structure when different learning tasks have large differences. This paper is based on the MMOE multi-task learning structure to establish a time-period frequency security assessment model considering the differences in the functional mapping relationships between frequency security indicators and input features in different time periods.

[0297] MMoE constructs multiple multi-layer expert networks W ex i (i = 1, …, N ex ) and a gating network without a hidden layer with the softmax function as the activation function N ex and N task are the number of expert networks and tasks respectively. For the k-th task, the final output y k of the model is:

[0298]

[0299] where x is the input feature, h k () is the regressor corresponding to the i-th task, is the output of the i-th expert network, is the weight of the i-th expert network output by the k-th gating neural network Gate.

[0300] The evaluation model is established based on the method in Chapter 2. Referring to the MMoE structure, the metric matrix obtained by MLKR learning is used as the shared parameter among different tasks. For the t-th operation period (t = 1, …, N ew ), the corresponding metric matrix A t is decomposed into:

[0301]

[0302] where B i (i = 1, …, N B ) is the shared parameter matrix in the process of establishing the evaluation model, corresponding to the expert network W in MMoE ex , and w it is the corresponding weight.

[0303] The accuracy of the frequency security evaluation model for each period is of the same importance. The same weight is assigned to the learning tasks in different periods, and the intra-day MLKR learning loss function L in is obtained as:

[0304]

[0305] where L t is the MLKR learning error for the t-th period.

[0306] 3. Intra-day update of the frequency evaluation model based on semi-supervised learning;

[0307] If a supervised learning method is used for intra-day model update, it is difficult to complete the time-domain simulation for generating labeled training samples within a short time on the same day. Therefore, when performing intra-day model update, this paper uses semi-supervised learning methods of domain adaptation (DA) and transitive closure based constraint propagation clustering approach (TCCPCA), and based on the model established on the previous day and the source-load prediction information refreshed intra-day, the intra-day update of the model is carried out to avoid the dependence on labeled samples in supervised learning.

[0308] The input feature space X and the distribution P(x) of the feature x on X constitute the domain D, that is, D = {X, P(x)}. The input feature space of historical samples and the feature distribution in the space constitute the source domain (SD) D S = {X S , P S (x)}, and the feature space of the scenario to be evaluated and the feature distribution in the space constitute the target domain (TD) D T = {XT , P T (x)}. Traditional machine learning methods assume that D S = D T , and learn the functional relationship y = F(x) between the evaluation metric y and x on D S and directly apply it to the evaluation on D T .

[0309] For the establishment of the frequency security evaluation model in this paper, D S and D T correspond to the same input feature space. However, due to the existence of source-load prediction errors, there are differences between the predicted power system operation mode and the actual power system operation mode, and P S (x) ≠ P T (x), resulting in D S ≠ D T . If the frequency security evaluation model learned on D S is directly applied to D T , it may lead to a large generalization error in the frequency security evaluation model. In this paper, the DA method is used for the intraday update of the frequency security evaluation model to further reduce the generalization error of the frequency security evaluation model caused by the inconsistency between D S and D T .

[0310] The DA method uses the Maximum Mean Discrepancy (MMD) defined on the Reproducing Kernel Hilbert Space (RKHS) to measure the distribution difference between D S and D T :

[0311]

[0312] where sup() represents the upper bound operation, and g ∈ G means that g is a function in the function domain G.

[0313] Considering that if G is an arbitrary function domain, it is always possible to find g ∈ G such that the MMD distance between two similar distributions is infinite. Therefore, the function domain is restricted and defined as the vector within the unit ball in the reproducing Hilbert space, i.e., ||g|| < 1. Thus, g(x) can be expressed as:

[0314] g(x) = <Φ(x), g> H (3-15)

[0315] where H represents the RKHS space, and Ф(x) represents the mapping of x in H.

[0316] Thus, we have:

[0317]

[0318] The unbiased estimate of MMD is:

[0319]

[0320] where n S and n T are the numbers of samples in D S and D T respectively.

[0321] Taking into account the differences between the source domain and the target domain and the MLKR learning objective simultaneously, the MLKR learning is transformed into a domain adaptation metric learning (DAML) problem, and its loss function is shown in Equation (3-18). For the DAML problem with Equation (3-18) as the loss function, the kernel principal component analysis (KPCA) method can be further used for solution.

[0322]

[0323] where μ > 0 is the trade-off parameter.

[0324] Compared with the day-ahead prediction results, the intraday prediction has a shorter look-ahead time, and the rolling prediction results of the source-load scenarios obtained are more accurate. Therefore, in this paper, the source-load prediction scenarios updated intraday are used to form D T . It can be seen from Equation (3-18) that the DAML learning process only requires the supervised information of the samples on D S and the unsupervised information of the scenarios on D T , avoiding relying on detailed time-domain simulation to simulate the frequency dynamic process after power disturbance to generate new training samples during the intraday stage.

[0325] When the model is established in the day-ahead stage, if the same frequency security sub-evaluation model is used to evaluate the samples in the same cluster, the errors are all small, indicating that the corresponding samples are correctly clustered. When the frequency security evaluation model is updated intraday, they should still be clustered into the same cluster. Taking this as the supervised knowledge, TCCPCA is used for sample clustering when updating the intraday frequency security evaluation model to further improve the accuracy of frequency security evaluation.

[0326] In the TCCPCA clustering method, the corresponding samples must be clustered into the same cluster, which is defined as the must-link constraint (MC). Under the must-link constraint, the samples x i and x j belong to the must-link set M. During the establishment stage of the day-ahead frequency security evaluation model for the samples (xi , y i ), and (x j , y j ), it is defined that if |F(x i ) - y i | < e th and F(x j ) - y j | < e th , then (x i , y i ), (x j , y j ) ∈ M.

[0327] Define the constraint matrix R = (r ij ), express the must - connect constraint in matrix form, and its element r ij is:

[0328]

[0329] In the TCCPA clustering, introduce the propagation matrix (Propagation Matrix, PM) U, and apply the supervised knowledge learned when establishing the day - ahead frequency security assessment model to the sample clustering during the update of the intra - day frequency security assessment model. The matrix U is solved by Equation (3 - 20):

[0330]

[0331] where the first term represents the distance between the propagation constraint condition and the original constraint condition, the second term represents the smoothness of the matrix U, γ > 0 is a trade - off coefficient, and w ij is the edge weight defined in the spectral clustering method.

[0332] Use the obtained U to adjust the edge weight matrix W in the spectral clustering as shown in Equation (3 - 21). After adjusting the distance between samples, the fuzzy k - means clustering method can be used to complete the sample clustering, and an evaluation sub - model is established for each cluster respectively.

[0333]

[0334] where w’ ij is the element in the adjusted edge weight matrix W’.

[0335] (IV) Identification of high - risk events of frequency security based on frequency deviation risk analysis;

[0336] Introduce a risk analysis method, calculate the risk of frequency deviation exceeding the limit based on the evaluation results of uncertain scenarios, and screen out the high-frequency safety risk events that will trigger the low-frequency load shedding action and cause a large number of loads to be cut off passively during the corresponding period by comparing the frequency safety risk index with the set frequency safety risk threshold, and provide them to the subsequent prevention and control links. Considering the relationship between the frequency safety risk threshold and the uncertainty of the source and load under different periods, define the frequency safety dynamic risk threshold characterized by the central moments of each order of the source and load uncertainty. Compared with the static risk threshold, the dynamic risk threshold takes into account the changes in the uncertainty characteristics of the source and load under different periods, which is beneficial to reducing the false alarm rate and missed alarm rate of high-frequency safety risk event identification.

[0337] 1. Identification of high-risk events based on risk threshold comparison;

[0338] The event-driven control decision can be started after detecting the occurrence of an event, specifically for specific large-power disturbance events, providing emergency power support for the power grid, and having the characteristics of early trigger time and fast response speed. Considering the frequency safety evaluation results of future uncertain scenarios, give the frequency deviation risk index of each contingency event, and then screen out the high-frequency safety risk events and provide them to the subsequent event-driven emergency control scheme decision-making.

[0339] After the system suffers a severe power disturbance, the frequency deviates severely, which may trigger the UFLS action and then cause a large number of loads to be cut off passively, resulting in serious consequences. In this paper, whether the UFLS is triggered after the corresponding event occurs is used as a criterion to define high-frequency safety risk events. The low-frequency load shedding scheme includes traditional schemes based on the starting frequency and action delay, adaptive schemes based on ROCOF, etc. It is necessary to select the corresponding frequency safety index according to the specific type of low-frequency load shedding scheme, and use the frequency safety evaluation model for rapid evaluation to judge whether the system low-frequency load shedding is triggered. The system has uncertainties on both the source and load sides, and there are a large number of possible operating scenarios in the future. Based on the evaluation results of a batch of uncertain scenarios, give the risk index of the system frequency safety index exceeding the limit under the contingency, and identify the high-frequency safety risk events by comparing it with the threshold.

[0340] Assume a total of N E contingency events. Taking the traditional low-frequency load shedding triggered by the lowest frequency as an example, if the lowest frequency f min ≤f th , then the low-frequency load shedding device acts, where f th is the low-frequency load shedding action threshold. For the contingency event E i (i = 1,…,N E ), use Monte Carlo sampling to calculate the exceeding probability P i under the event E Ei (f min ≤f th ) as the event frequency safety risk index Ri .

[0341]

[0342] Among them, is the f value in the jth scenario, min N S is the number of scenarios.

[0343] Further set the frequency safety risk threshold R i th (1 ≤ i ≤ N E ), the frequency safety high-risk events can be obtained based on the over-limit probability of f under each event, satisfying: min

[0344]

[0345] 2. Setting the dynamic risk threshold of frequency deviation;

[0346] The frequency safety high-risk events are screened based on the relationship between the frequency deviation over-limit risk and the frequency safety risk threshold R under event E i . The reasonable setting of R i th plays an important role in the effective identification of frequency safety high-risk events. Different from the commonly used subjective assignment method, this paper introduces the frequency safety missed alarm rate and false alarm rate indicators, and reasonably sets the dynamic risk threshold with the goal of minimizing the missed alarm rate and false alarm rate of frequency safety high-risk event identification. i th

[0347] In the identification of frequency safety high-risk events, the false alarm rate P FW and the missed alarm rate P LW of frequency safety high-risk events in each time period are defined as shown in Equations (3-24) and (3-25) respectively:

[0348]

[0349] Among them, T FW and T LW are the number of false alarm time periods and the number of missed alarm time periods of frequency safety high-risk events under the corresponding contingency events respectively, and T total is the total number of time periods.

[0350] ​​Specifically, a false alarm period refers to a period during which the system frequency safety index does not actually exceed the limit after an expected event occurs, but is mistakenly judged to exceed the limit during risk analysis; a missed alarm period refers to a period during which the frequency safety index will exceed the limit after an expected event occurs, but is mistakenly judged to not exceed the limit during risk analysis. For expected events that may cause the system frequency safety index to exceed the limit, they should be accurately identified as high-risk frequency safety events, so that effective control measures can be formulated for the corresponding events to ensure the safe operation of the system. Once a missed alarm occurs, effective control measures cannot be taken after a high-risk frequency safety event occurs, which seriously affects the safety and stability of the system frequency. Therefore, when setting the frequency safety risk threshold, the first consideration should be to minimize the missed alarm rate index P. LW , to avoid missing high-risk frequency safety events in each period. FW If the value is too high, events that will not cause the frequency safety index to exceed the limit will also be screened as high-risk frequency safety events and provided to subsequent prevention and control decisions, which will bring unnecessary calculation burden. Therefore, when setting R i th P should also be minimized FW Based on the above analysis, we should prioritize minimizing P LW Minimize P as much as possible based on FW The principle of setting the risk threshold R i th .

[0351] Frequency safety risk threshold R i th It is used to determine whether the frequency safety anticipated event in the corresponding period is a high-risk frequency safety event, and the operation mode of the system in the future period is uncertain. Compared with the traditional static risk threshold setting method, the dynamic risk threshold setting method that takes into account the differences in the random characteristics of source and load in different periods is more reasonable. Therefore, the anticipated event E is established in the identification of high-risk frequency safety events. i Frequency safety dynamic risk threshold indicator The k-order central moments of the future loads and the output of new energy stations are introduced to characterize the uncertainty of the future operation mode of the system, and the relationship between the frequency safety dynamic risk threshold and the central moments of each order of source load uncertainty is established as shown in formula (3-26):

[0352]

[0353] Among them, N load Indicates the load number, N new Represents the number of new energy stations, N mo Indicates the highest order of the central moment taken, a j,k It represents the k-th central moment of the j-th load or the output of the new energy station to R i th The weight of the calculated value, Mj,k Denote the k-th central moment of the output of the j-th load or new energy power station.

[0354] R i th The smaller the set value, the smaller the possibility of missing alarms for high-frequency safety risk events and the greater the possibility of false alarms, that is, P LW 、P FW and R i th There is a monotonic functional relationship. At each historical time period, take the maximum R LW when P i th =0 as the optimal frequency safety risk threshold for this time period. At this frequency safety risk threshold, P LW =0 and P FW is the smallest. Since the optimal frequency safety risk threshold is difficult to solve directly, in actual calculations, based on the perturbation method of first-order difference approximation sensitivity, solve for R i th near the optimal frequency safety risk threshold that meets the error requirements as the final set frequency safety threshold. The optimal frequency safety risk threshold R i th,op obtained finally satisfies Equation (3-27):

[0355]

[0356] where R i th,max is the maximum frequency safety risk threshold that satisfies P LW =0, and ε is a small positive number.

[0357] Based on the optimal frequency safety risk threshold of each historical time period, use Equation (3-28) as the log-likelihood function and adopt the method of likelihood estimation to solve a j,k , and then the expression for setting the frequency safety dynamic risk threshold in different time periods can be solved.

[0358]

[0359] where T his is the number of historical time periods, σ is the observation error, is the R i th,op in the t-th historical time period, is the value of M j,k in the t-th historical time period.

[0360] Please refer to Figure 7Schematic structural diagram of a computer device provided by an embodiment of the present application. A computer device 400 provided by an embodiment of the present application includes: a processor 410 and a memory 420. The memory 420 stores a computer program executable by the processor 410. When the computer program is executed by the processor 410, the above method is executed.

[0361] An embodiment of the present application also provides a storage medium 430. A computer program is stored on the storage medium 430. When the computer program is run by the processor 410, the above method is executed.

[0362] Among them, the storage medium 430 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (abbreviated as SRAM), electrically erasable programmable read-only memory (abbreviated as EEPROM), erasable programmable read-only memory (abbreviated as EPROM), programmable read-only memory (abbreviated as PROM), read-only memory (abbreviated as ROM), magnetic memory, flash memory, a magnetic disk or an optical disc.

[0363] In the description of the present invention, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The meaning of "a plurality" is two or more, unless otherwise specifically defined.

[0364] In the present invention, unless otherwise clearly specified and limited, terms such as "installation", "connection", "connection", "fixation" and the like should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0365] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0366] Any process or method description represented in a flowchart or described in other ways herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process, and the scope of the preferred embodiments of the present invention includes additional implementations, where the functions can be executed in a manner not shown or discussed, including in a substantially simultaneous manner according to the functions involved or in a reverse order, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.

[0367] The logic and / or steps represented in a flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing a logical function, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in connection with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of the computer-readable medium include the following: an electrical connection portion having one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other appropriate processing as necessary, and then stored in a computer memory.

[0368] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following technologies well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0369] Those of ordinary skill in the art can understand that all or part of the steps carried by the method of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0370] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A frequency security assessment method taking into account source load uncertainty, characterized in that: The steps include: Based on the source-load data of multiple historical moments before the future moment, the source-load scenarios at the future moment are generated in a rolling manner, and the uncertain operation scenario set is obtained by combining the future plan information; Establishing a time-based frequency security assessment model in the day ahead to assess the frequency security under the uncertain operation scenario set, and updating the time-based frequency security assessment model based on the rolling refreshed source-load scenario at the future moment; A risk analysis method is introduced to calculate the frequency offset over-limit risk based on the uncertain scenario assessment results, and a safety risk threshold is set. Through the relationship between the safety risk threshold and the source load uncertainty in different time periods, the frequency safety dynamic risk threshold represented by the central moment of each order of source load uncertainty is defined.

2. The frequency security assessment method taking into account source load uncertainty according to claim 1, characterized in that: The method of rollingly generating a source load scenario at a future moment based on source load data at multiple historical moments before the future moment includes the following steps: Predict future source-load scenarios based on long short-term memory networks; Extract the sequence fluctuation characteristics that reflect the fluctuation degree of the source load time series, and together with the day and night type and seasonal information, form the constraint conditions of the conditional probability distribution of the source load prediction error; Taking the constraints into account, a distribution model is performed on the conditional probability of the source load prediction error; and a future source load prediction error distribution is generated; The future source-load scenario prediction and the future source-load prediction error distribution are combined to obtain the source-load scenario at the future moment.

3. The frequency security assessment method taking into account source load uncertainty according to claim 2, characterized in that: The future source-load scenario prediction based on the long short-term memory network includes: Input a multidimensional time series feature vector, wherein the multidimensional time series feature vector includes outputs of various new energy stations and various load values; The multidimensional time series feature vector is processed by a long short-term memory network LSTM; the long short-term memory network LSTM includes a forget gate, an input gate, an output gate and a cell state; The forget gate is used to determine how much of the state of the previous period should be forgotten; the input gate is used to construct an input signal; The output gate is used to obtain the output of the next period based on the output of the forget gate and the input of the input gate; And determine the cell state for the next period of time.

4. The frequency security assessment method taking into account source load uncertainty according to claim 3, characterized in that: The forget gate is based on the output h of the t-1 period t-1 and the input z at time period t t Use the sigmoid activation function to construct the signal f t To determine the state C of the previous period t-1 How much should be forgotten? t The expression is as follows: f t =σ(W fz z t +W fh h t-1 +b f ); Where σ() is the sigmoid activation function, W fz , W fh For z t 、h t-1 f t Weight, b f is the offset; The input gate is based on h t-1 and z t, Use sigmoid and tanh activation functions to construct the input signal i t and g t , the two expressions are shown as follows: i t =σ(W iz z t +W ih h t-1 +b i ); g t =tanh(W gz z t +W gh h t-1 +b g ); Where tanh() is the tanh activation function, W iz , W ih , W gz , W gh , b i , b g are the corresponding weights and biases; After multiplying the two, add the output of the previous forget gate to get C t As shown below: C t =g t i t +C t-1 f t ; The output gate is based on h t-1 and z t , and get the output O of the tth period t : ABOUT t =σ(W Oz With t +W Oh h t-1 +b o ); Where W Oz , W Oh is the corresponding weight, b O is the offset; Based on O t and C t , determine the hidden layer cell state h of the tth period t : h t =tanh(C t )O t ; The input multidimensional time series feature vector z t , which is composed of the output of each renewable energy station and each load value in the tth period, expressed as z t =[z1 t,…,zNsc t]; where zi t(i=1,…,N sc ) represents the value of the i-th dimension feature at the t-th time period, N sc is the feature dimension.

5. The frequency security assessment method taking into account source load uncertainty according to claim 2, characterized in that: The extraction of sequence fluctuation characteristics reflecting the fluctuation degree of the source load time series, together with the day and night type and seasonal information, constitutes the constraint conditions of the conditional probability distribution of the source load prediction error, including: According to the historical data of source load before the future moment, determine the fluctuation stage of the source load data to be predicted and rearrange it; The density-based noise application spatial clustering method DBSCAN is used to cluster the source-charge sequences with similar fluctuation characteristics into the same cluster; The fluctuation characteristic clusters of each source load sequence are marked and encoded in combination with the day and night type and seasonal information to obtain the constraints of the final future source load conditional probability distribution.

6. The frequency security assessment method taking into account source load uncertainty according to claim 5, characterized in that: The step of determining the fluctuation stage of the source load data to be predicted based on the source load historical data before the future time, and rearranging the data, includes: According to the historical sequence of power system source and load data before the t+1 period [z t-l+1 ,…,z t ], determine the fluctuation stage of the source load data to be predicted in the t+1 period; Rearrange by feature category and write α i Represents the sequence of values ​​of the source-charge characteristic of the i-th dimension from the t-l+1th to the tth time period Use Reflect alpha i The volatility K(α i ), reflects α i The standard deviation of the source load sequence fluctuation frequency σ(α i ) and reflects α i The volatility of the source load sequence R(α i ), constitutes the description α i The source load sequence of fluctuation characteristics is the fluctuation characteristic vector λ i =[K(α i ),σ(α i ),R(α i )]; K(α i ),σ(α i ) and R(α i ) is calculated as follows:

7. The frequency security assessment method taking into account source load uncertainty according to claim 6, characterized in that: The method of using density-based noise application spatial clustering method DBSCAN to cluster source-charge sequences with similar fluctuation characteristics into the same cluster includes: Based on the DBSCAN algorithm, the fluctuation characteristics λ of the i-th dimension source-charge feature vector are i T historical sequences [λ i,1 ,…,λ i,T ] to cluster and obtain the fluctuation characteristics λ of each source load sequence i Cluster marker C i .

8. The frequency security assessment method taking into account source load uncertainty according to claim 2, characterized in that: The conditional probability of source load prediction error is distributed modeled taking into account the constraint conditions; Generate future source load forecast error distribution, including: Using a conditional generative adversarial network (WGAN), the noise distribution is combined with the constraint condition to form the input of the generator network, and an error distribution is obtained; The discriminator network compares the error distribution with the real source-load historical error distribution, and determines whether the sample generated based on the error distribution satisfies the constraint condition; Setting a loss function and using a gradient descent method to train the generator and the discriminator; Use the trained generator to generate future source load forecast error distributions.

9. The frequency security assessment method taking into account source load uncertainty according to claim 8, characterized in that: The loss function is: Where P noise (e) is the noise distribution, G is the generator network, D is the discriminator network, P gen (e|c) is the error distribution; P hist (e) is the historical error distribution of the real source load, V(G,D) represents the game value function under the generator G and the discriminator D, e his Represents a historical scene, P his (e) represents the distribution of historical scenes, Represents sample e his In accordance with P his (e) The expectation under the distribution, e noise represents the noise sample, P noise (e) represents the distribution of noise samples, Represents sample e noise In accordance with P noise (e) Expectation under the distribution.

10. The frequency security assessment method taking into account source load uncertainty according to claim 1, characterized in that: The step of establishing a time-period frequency security assessment model in the day before to assess the frequency security under the uncertain operation scenario set includes the following steps: Establish a functional mapping relationship between frequency security indicators and input features, and establish a time-based frequency security assessment model in the day ahead; The time-segmented frequency safety assessment model is collaboratively trained by a multi-task learning mechanism based on multi-gated hybrid experts (MMOE).

11. The frequency security assessment method taking into account source load uncertainty according to claim 10, characterized in that: The multi-task learning mechanism based on multi-gated hybrid experts (MMoE) collaboratively trains the time-segmented frequency security assessment model, including: Construct multiple multi-layer expert networks W ex i (i=1,…,N ex ) and a gated network without hidden layers using the softmax function as the activation function N ex and N task are the number of expert networks and tasks, respectively; For the kth task, the final output of the model is y k for: In the formula, x is the input feature, h k () is the regressor corresponding to the i-th task, is the output of the i-th expert network, is the weight of the i-th expert network output by the k-th gated neural network Gate; The tth running period (t=1,…,N ew ) corresponds to the metric matrix A t Disassembled into: In the formula, B i (i=1,…,N B ) is the shared parameter matrix in the evaluation model building process, corresponding to the expert network W in MMoE ex , w it is the corresponding weight; Assign the same weight to the learning tasks in different time periods, and obtain the intraday learning loss function L based on the MMoE learning structure in for: Where, L t is the learning error in the tth period.

12. The frequency security assessment method taking into account source load uncertainty according to claim 10, characterized in that: The updating of the time-divided frequency safety assessment model based on the source-load scenario at the future moment in the rolling refresh includes: The target domain is composed of the source load prediction scenario that is refreshed daily, and the source domain is composed of the actual source load scenario. The domain adaptive DA method is used to measure the distribution difference between the target domain and the source domain. Based on the distribution differences, when the frequency safety assessment model is updated daily, the frequency safety assessment models of different time periods are clustered using the constrained propagation clustering method TCCPCA.

13. The frequency security assessment method taking into account source load uncertainty according to claim 12, characterized in that: The domain adaptation DA method is used to measure the distribution difference between the target domain and the source domain, including: The source domain D is measured using the maximum mean difference (MMD) defined on the reproducing kernel Hilbert space RKHS. S and the target domain D T The distribution difference between: In the formula, sup() means taking the upper bound operation, g∈G means g is a function in the function domain G; The function domain is restricted and defined as a vector in the unit ball in the regenerated Hilbert space, that is, ||g||<1; g(x) is expressed as: g(x)=<Φ(x),g> H ; Where H represents the RKHS space, Ф(x) represents the mapping of x in H; get: The unbiased estimate of MMD is: Where n S With n T D S With D T The number of samples in .

14. The frequency security assessment method taking into account source load uncertainty according to claim 12, characterized in that: The frequency safety assessment model of different time periods is clustered using the constrained propagation clustering method TCCPCA, including: In the stage of establishing the day-ahead frequency security assessment model, for the sample (x i ,y i ) and (x j ,y j ), defined if |F(x i )-y i | <e th And F(x j )-y j | <e th , then (x i ,y i ), (x j ,y j )∈M; Define the constraint matrix R = (r ij ), the must-connect constraint is expressed as a matrix, whose element r ij for: The propagation matrix U is introduced, and the supervision knowledge learned when the frequency security assessment model was established a few days ago is applied to the sample clustering when the frequency security assessment model is updated within a day. The matrix U is solved by the following formula: Where the first term represents the distance between the propagation constraint and the original constraint, the second term represents the smoothness of the matrix U, γ>0 is the trade-off coefficient, and w ij is the edge weight defined in the spectral clustering method; Use the solved U to adjust the edge weight matrix W in spectral clustering as shown in the following formula: In the formula, w' ij is the element in the edge weight matrix W' after adjustment; After adjusting the distance between samples, the fuzzy k-means clustering method was used to complete the sample clustering, and an evaluation sub-model was established for each cluster.

15. The frequency security assessment method taking into account source load uncertainty according to claim 1, characterized in that: The risk analysis method is introduced to calculate the frequency offset over-limit risk based on the uncertain scenario assessment result and set the safety risk threshold, including: Assume that N E For example, if the minimum frequency f min ≤f th Then the low frequency load reduction device is activated, where f th It is the low frequency load shedding action threshold value; For the expected event E i (i=1,…,N E ), Monte Carlo sampling is used to calculate the event E as shown below i Lower crossing probability P Ei (f min ≤f th ) as the event frequency safety risk indicator R i : In the formula, f is the jth scenario min Value, N S is the number of scenes; Set the frequency safety risk threshold R i th (1≤i≤N E ), based on each event min The over-limit probability is used to obtain a high-risk frequency safety event, which satisfies:

16. The frequency security assessment method taking into account source load uncertainty according to claim 15, characterized in that: The relationship between the frequency security risk threshold and the source load uncertainty in different time periods is used to define the frequency security dynamic risk threshold represented by the central moments of each order of source load uncertainty, including: Establishing expected events E in the identification of high-risk frequency safety events i Frequency safety dynamic risk threshold index R t i h , the k-order central moments of the future loads and the output of new energy stations are introduced to characterize the uncertainty of the future operation mode of the system, and the relationship between the frequency security dynamic risk threshold and the central moments of each order of source load uncertainty is established as follows: Where N load Indicates the load number, N new Represents the number of new energy stations, N mo Indicates the highest order of the central moment taken, a j,k It represents the k-th central moment of the j-th load or the output of the new energy station to R i th The weight of the calculated value, M j,k Represents the k-th central moment of the j-th load or new energy station output; Each historical period takes the order P LW =0 maximum R i th As the optimal frequency safety risk threshold in this period, under this frequency safety risk threshold, P LW = 0 and P FW Minimum; Based on the perturbation method of first-order difference approximate sensitivity, the optimal frequency safety risk threshold R that meets the error requirements is solved. i th As the final frequency safety threshold, the optimal frequency safety risk threshold R in the historical period is finally obtained. i th,op As shown below: In the formula, R i th,max To satisfy P LW =The maximum frequency safety risk threshold of 0, ε is a small positive number; Based on the optimal frequency safety risk threshold in each historical period, the likelihood estimation method is used to solve a j,k , we can solve the expression for setting the frequency safety dynamic risk threshold in different time periods, and the log-likelihood function of the likelihood estimate is: Where, T his is the number of historical periods, σ is the observation error, is R in the tth historical period i th,op , is M in the tth historical period j,k Get the value.

17. A frequency security assessment device taking into account source load uncertainty, characterized in that: Using the method according to any one of claims 1 to 16, the device comprises: The source-load scenario generation module is used to generate the source-load scenario at the future moment in a rolling manner based on the source-load data of multiple historical moments before the future moment, and obtain the uncertain operation scenario set in combination with the future plan information; A modeling and intraday updating module, which is used to establish a time-based frequency security assessment model before the day, assess the frequency security under the uncertain operation scenario set, and update the time-based frequency security assessment model based on the source-load scenario at the future moment of rolling refresh; The risk identification module is used to introduce a risk analysis method, calculate the frequency offset over-limit risk based on the uncertain scenario assessment results, set a safety risk threshold, and define a frequency safety dynamic risk threshold represented by the central moment of each order of source load uncertainty through the relationship between the safety risk threshold and the source load uncertainty in different time periods.

18. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 16 is implemented.

19. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.

Citation Information

Cited By

  • Power system frequency parameter rolling setting method and system and medium

    CN122495432A

  • A power system frequency parameter rolling setting method, system and medium

    CN122495432B