Micro-grid stability discrimination method, device, equipment and medium
Patent Information
- Application Number
- CN202611320308.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-09-29
AI Technical Summary
[0005]本发明实施例提供了一种微电网稳定性判别方法、装置、设备及介质,旨在解决现有微电网稳定性判别方法的可靠性不足的问题
[0009]第四方面,本发明实施例还提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序当被处理器执行时可实现上述方法。
Smart Images

Figure CN122844136A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of microgrid technology, and in particular to a method, apparatus, device and medium for determining the stability of a microgrid. Background Technology
[0002] With the steady increase in the proportion of renewable energy in the power system, AC / DC hybrid microgrids with power electronics exhibit significant low inertia and dynamic coupling characteristics, making transient stability under disturbances a core factor restricting the safe operation of the system. To meet the stringent timeliness requirements of power dispatching, constructing analytical stability criteria using surrogate models has become the mainstream technical approach. However, existing microgrid stability assessment methods generally suffer from insufficient reliability when applied to power system optimization and dispatching scenarios, making it difficult to meet practical engineering needs.
[0003] Currently, microgrid stability assessment methods are mainly divided into analytical methods based on mechanism analysis and data-driven methods based on artificial intelligence. Analytical methods based on mechanism analysis typically employ differential passivity theory, mixed potential function theory, or the Lyapunov stability criterion to construct system stability criteria. However, these methods, based on global parameter adjustment, struggle to identify ambiguous regions in specific complex operating conditions, leading to insufficient accuracy in the local representation of stability decision boundaries. In modern microgrids with a high proportion of power electronic devices and varied topologies, the complex analytical derivation process is difficult to directly embed into efficient day-ahead dispatch optimization models. Data-driven methods based on artificial intelligence typically use machine learning models such as neural networks to classify microgrid operating conditions for stability. However, these methods follow symmetric discrimination logic at the algorithmic level, treating instability omissions and stability misjudgments as equivalent mathematical errors. They lack proactive defense capabilities against instability omission risks and cannot meet the extreme reliability requirements of grid dispatch for safety baselines when facing operating conditions with randomness and uncertainty.
[0004] Furthermore, existing microgrid stability assessment methods suffer from the following reliability issues in handling stability decision boundaries: First, while approximating the theoretical stability boundary improves the operational space mathematically, it compresses the physical safety margin in engineering applications. When this criterion is integrated into a proxy model with generalization errors, the excessive expansion of the boundary reduces the reliability of the assessment results and increases the risk of misjudgment in critical regions. Second, when facing regions where the model's understanding is weak, it cannot provide necessary safety buffer redundancy, resulting in a mismatch between the model's assessment confidence under critical conditions and the actual risk, leading to decreased assessment reliability and making it difficult for scheduling decision schemes to guarantee safe operation in real physical environments. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for determining the stability of a microgrid, aiming to address the reliability issues of existing microgrid stability determination methods.
[0006] In a first aspect, embodiments of the present invention provide a microgrid stability determination method, comprising: An initial sample set of the microgrid is obtained, and a neural network model is used to calculate the false positive probability of each operating condition sample in the initial sample set. The false positive probability refers to the probability that the operating condition sample in an unstable state is predicted by the neural network model to be in a stable state. Active sampling is performed based on the false positive probability to update the initial sample set and obtain the target sample set; The neural network model is trained, and during the training process, a conservative penalty term is constructed based on the target sample set. The neural network model is iteratively optimized according to the conservative penalty term until the convergence condition is met, thereby obtaining a stability discrimination model. The conservative penalty term is a penalty term determined based on the probability that a false positive sample is predicted as a stable state by the neural network model. The false positive sample is the operating condition sample whose stability label is unstable and which is predicted as a stable state by the neural network model. The stability of the microgrid's operating conditions is determined based on the stability discrimination model, and the discrimination results are obtained.
[0007] Secondly, embodiments of the present invention also provide a microgrid stability discrimination device, comprising: The computing unit is used to acquire an initial sample set of the microgrid and use a neural network model to calculate the false positive probability of each operating condition sample in the initial sample set. The false positive probability refers to the probability that the operating condition sample in an unstable state is predicted by the neural network model to be in a stable state. An update unit is used to actively sample based on the false positive probability to update the initial sample set to obtain a target sample set; The training unit is used to train the neural network model. During the training process, a conservative penalty term is constructed based on the target sample set. The neural network model is iteratively optimized according to the conservative penalty term until the convergence condition is met, thereby obtaining a stability discrimination model. The conservative penalty term is a penalty term determined based on the probability that a false positive sample is predicted as a stable state by the neural network model. The false positive sample is the operating condition sample whose stability label is unstable and which is predicted as a stable state by the neural network model. The discrimination unit is used to perform stability discrimination on the operating conditions of the microgrid based on the stability discrimination model and obtain the discrimination result.
[0008] Thirdly, embodiments of the present invention also provide a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described method.
[0009] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.
[0010] This invention provides a method, apparatus, device, and medium for determining the stability of a microgrid. The method includes: acquiring an initial sample set of the microgrid and calculating the false positive probability of each operating condition sample in the initial sample set using a neural network model, wherein the false positive probability refers to the probability that an operating condition sample in an unstable state is predicted as stable by the neural network model; actively sampling based on the false positive probabilities to update the initial sample set to obtain a target sample set; training the neural network model, and during the training process, constructing a conservative penalty term based on the target sample set, iteratively optimizing the neural network model according to the conservative penalty term until a convergence condition is met to obtain a stability determination model, wherein the conservative penalty term is a penalty term determined based on the probability that a false positive sample is predicted as stable by the neural network model; the false positive sample is an operating condition sample whose stability label is unstable and which is predicted as stable by the neural network model; and determining the stability of the microgrid's operating conditions based on the stability determination model to obtain a determination result. The technical solution of this invention guides active sampling by calculating the false positive probability, identifies and encrypts the collection of samples in high-risk areas of instability underreporting, and enhances the local representation accuracy of the stability decision boundary. During the training of the neural network model, a conservative penalty term is constructed to impose an asymmetric risk penalty on the instability underreporting behavior, guiding the discrimination boundary to shrink towards the safe domain, so that the discrimination confidence of the model under critical operating conditions matches the real risk, thereby improving the reliability of the microgrid stability discrimination method. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart illustrating a microgrid stability determination method according to an embodiment of the present invention. Figure 2This is a topology diagram of an AC / DC hybrid microgrid provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a sub-process of a microgrid stability determination method provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of another sub-process of a microgrid stability determination method provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of another sub-process of a microgrid stability determination method provided in an embodiment of the present invention; Figure 6 A schematic block diagram of a microgrid stability discrimination device provided in an embodiment of the present invention; Figure 7 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0015] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0016] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0017] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0018] Currently, existing microgrid stability assessment methods suffer from insufficient reliability. To address this issue, this invention proposes a new microgrid stability assessment method. This method guides active sampling by calculating the false positive probability, identifying and encrypting samples from high-risk areas of instability underreporting, thus enhancing the local representation accuracy of the stability decision boundary. During neural network model training, a conservative penalty term is constructed to impose asymmetric risk penalties on instability underreporting behavior, guiding the assessment boundary to shrink towards the safe region. This ensures that the model's assessment confidence under critical conditions matches the actual risk, improving the reliability of the microgrid stability assessment method. The invention is described in detail below through specific embodiments.
[0019] Please see Figure 1 , Figure 1 This is a flowchart illustrating a microgrid stability assessment method according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110-S140.
[0020] S110. Obtain an initial sample set of the microgrid and use a neural network model to calculate the false positive probability of each operating condition sample in the initial sample set, wherein the false positive probability refers to the probability that the operating condition sample in an unstable state is predicted by the neural network model to be in a stable state.
[0021] In this embodiment of the invention, a microgrid refers to an AC / DC hybrid microgrid, such as... Figure 2 As shown, the AC / DC hybrid microgrid includes an AC subgrid and a DC subgrid. The AC subgrid connects the diesel generator set and AC loads via an AC bus, while the DC subgrid connects photovoltaic units, energy storage systems, and DC loads via a DC bus. Power exchange between the AC and DC subgrids occurs through a bidirectional AC / DC converter. The photovoltaic units are connected to the DC bus via a unidirectional DC / DC converter, and the energy storage system is also connected to the DC bus via a bidirectional DC / DC converter. The rated voltage of the AC bus is [voltage value missing]. The rated voltage of the DC bus is .
[0022] However, AC / DC hybrid microgrids in islanded operation mode have the following problems: First, AC / DC hybrid microgrids exhibit low inertia and weak damping dynamic characteristics, resulting in weak system anti-disturbance capability; Second, the transient stability of AC / DC hybrid microgrids is highly sensitive to changes in control parameters and external disturbances, and system instability is easily triggered when operating condition variables such as DC-side damping, DC-side inertia, and power disturbances change; Third, the dynamic coupling effect between the AC bus voltage amplitude and the DC bus voltage amplitude is significant, increasing the complexity of stability judgment. Therefore, existing microgrid stability judgment methods are difficult to accurately characterize the transient stability boundary of the AC / DC hybrid microgrid.
[0023] It should be noted that random sampling is performed on the microgrid operating condition variable space to obtain multiple initial operating condition variables. and the stability label corresponding to each of the initial operating condition variables. The operating condition variables include, but are not limited to, DC-side damping, DC-side inertia, and power disturbance; the stability labels include stable and unstable states. Each initial operating condition variable is associated with its corresponding stability label to obtain multiple operating condition samples, where each operating condition sample includes the operating condition variable and the corresponding stability label. These multiple operating condition samples constitute an initial sample set. Understandably, each operating condition sample includes the operating condition variable and the corresponding stability label. A general-structured neural network model is selected, for example, an Input Convex Neural Network (ICNN), and the network parameters of the neural network model are randomly initialized.
[0024] Among them, such as Figure 3 As shown, step S110 specifically includes steps S111-S113: S111. For each operating condition sample in the initial sample set, input the operating condition sample into the neural network model to obtain the probability that the operating condition sample is predicted to be in a stable state. S112. Obtain the stability label of the operating condition sample, and determine the indicator function value as a first preset value when the stability label is in an unstable state, and determine the indicator function value as a second preset value when the stability label is in a stable state. S113. Calculate the product of the probability that the operating condition sample is predicted to be in a stable state and the corresponding indicator function value to obtain the false positive probability of the operating condition sample.
[0025] In this embodiment of the invention, the probability that a running condition sample is predicted to be in a stable state reflects the confidence level of the neural network model in the current running condition sample belonging to a stable state. The closer the probability is to 1, the more the neural network model tends to determine that the running condition sample is in a stable state; the closer the probability is to 0, the more the neural network model tends to determine that the running condition sample is in an unstable state. The stability label of the running condition sample is obtained. When the stability label indicates an unstable state, the indicator function value is determined to be a first preset value, which is typically set to 1. When the stability label indicates a stable state, the indicator function value is determined to be a second preset value, which is typically set to 0. The indicator function is used to filter out samples with the true label indicating an unstable state for subsequent false positive probability calculation.
[0026] It should be noted that, according to the formula: Calculate the false positive probability of the operating condition sample, where, Indicates the probability of a false positive. This represents the probability that the operating condition sample is predicted to be in a steady state. The indicator function takes a value of 1 if and only if the stability label of the operating condition sample is unstable. The false positive probability is used to characterize the risk that the unstable operating condition sample is misjudged as stable by the neural network model. The higher the false positive probability, the greater the risk that the unstable operating condition sample is misjudged. The false positive probability will be used as an evaluation index for subsequent active sampling to identify high-risk areas where the neural network model has weak cognition, thereby guiding the update of the initial sample set and the optimization of the model training process.
[0027] S120. Active sampling is performed based on the false positive probability to update the initial sample set and obtain the target sample set.
[0028] In embodiments of the present invention, such as Figure 4 As shown, step S120 specifically includes steps S121-S126: S121. Divide the initial sample set into a training set and a validation set, wherein the validation set includes unstable operating condition samples; S122. Obtain the false positive probability of the unstable operating condition samples in the verification set; S123. Select the unstable operating condition samples with false positive probabilities higher than a preset threshold as the anchor sample set; S124. Using each anchor point in the anchor point sample set as the center, define a high-incidence area of false positives in the input space composed of the operating condition variables according to a preset neighborhood radius. S125. Generate multiple candidate operating condition samples with the stability label in the area where false positives are frequent; S126. The candidate operating condition samples that meet the high false positive rate characteristic are incorporated into the training set to update the initial sample set, thereby obtaining the target sample set.
[0029] In this embodiment of the invention, the validation set includes unstable operating condition samples and stable operating condition samples. The division ratio can be flexibly adjusted according to the actual application scenario, typically using a 7:3 or 8:2 ratio. The training set is used for parameter updates and weight optimization of the neural network model, while the validation set is used to evaluate the discrimination performance of the neural network model in the current training phase and identify high-risk areas for false positives. Each unstable operating condition sample in the validation set is input into the neural network model, and the probability of the unstable operating condition sample being predicted as a stable state is calculated through forward propagation. Since the stability label of the unstable operating condition sample is unstable state, the indicator function value is 1, and the false positive probability is equal to the probability of being predicted as a stable state. The higher the false positive probability, the greater the risk that the neural network model will misclassify the unstable operating condition sample as a stable state. It should be noted that the preset threshold can be adjusted according to safety requirements. The higher the preset threshold, the lower the tolerance for misjudgment risk. The distribution of the anchor sample set in the operating condition variable space reflects the high-risk areas where the neural network model currently has weak cognition. It should also be noted that the preset neighborhood radius is determined based on the physical dimensions and value range of the operating condition variables. Specifically, the neighborhood range is defined according to a preset percentage, with the values of each operating condition variable in the anchor point sample set as the benchmark. For example, the preset neighborhood radius of DC-side damping is set to ±10% of the anchor point value, the preset neighborhood radius of DC-side inertia is set to ±15% of the anchor point value, and the preset neighborhood radius of power disturbance is set to ±20% of the anchor point value. The reason for setting different percentages for different variables is that each variable has different sensitivities to the transient stability of the system. Power disturbance has a more significant impact on stability, so a larger neighborhood range is set to fully explore the false positive high-incidence area. The false positive high-incidence area is represented in the input space as a hypercube or hypersphere region centered on the anchor point.
[0030] In one embodiment, such as this embodiment, step S125 includes: generating multiple candidate operating condition variables using the Latin hypercube sampling method within the high-false-positive area; performing time-domain simulation on each candidate operating condition variable to obtain transient stability information; and assigning a corresponding stability label to each candidate operating condition variable based on the transient stability information to obtain candidate operating condition samples with the stability labels. It should be noted that the Latin hypercube sampling method is a stratified sampling technique that can achieve uniform distribution of samples in a multidimensional parameter space. Compared to random sampling, it has better spatial coverage, ensuring that representative samples are collected from each sub-interval within the high-false-positive area. The number of samples can be flexibly set according to the complexity of the area and computational resources. Time-domain simulation numerically solves the differential-algebraic equations of the microgrid through a simulation engine, simulating the dynamic response process of the microgrid after being subjected to power disturbances, and outputting transient response curves. These transient response curves include curve data of key operating parameters such as voltage, frequency, and power changing over time. The simulation duration of the time-domain simulation is typically set to several seconds to tens of seconds after the fault occurs to fully capture the system's transient process.
[0031] Voltage deviation, frequency deviation, and power deviation are calculated based on transient response curves. Voltage deviation is the difference between the voltage and the rated voltage, frequency deviation is the difference between the frequency and the rated frequency, and power deviation is the difference between the power and the rated power. These deviations are then compared to preset stability operating limits. These preset stability operating limits are stability criterion thresholds set according to the microgrid type and dispatch requirements, including at least one of voltage deviation limits, frequency deviation limits, and recovery time limits. If the voltage deviation, frequency deviation, and power deviation recover to within the allowable range within the recovery time limit, they are determined to be within the preset stability operating limits, and the corresponding stability label is "stable state." If the voltage deviation, frequency deviation, and power deviation continuously exceed the preset stability operating limits or cannot recover within the recovery time limit, they are determined to be outside the preset stability operating limits, and the corresponding stability label is "instability state." In essence, generating stability labels completes the physical truth filling of weak areas in the model's understanding, ultimately yielding candidate operating condition samples with stability labels for subsequent training set updates and neural network model iterative optimization.
[0032] In one embodiment, such as this embodiment, the high-false-positive characteristic condition is that the stability label of the candidate operating condition sample is in an unstable state, and the probability of the stable state predicted by the neural network model for the candidate operating condition sample is higher than a preset probability threshold. It should be noted that the high-false-positive characteristic condition is used to screen candidate operating condition samples that meet the false-positive characteristics. Samples that meet both conditions are considered false-positive samples, representing high-risk areas where the neural network model's understanding is weak. Incorporating such operating condition samples into the training set to update the initial sample set and enter the next round of active sampling and model training iterations can achieve targeted strengthening of the model's discrimination boundary, reduce the risk of missed instability detection, and improve the overall reliability of the microgrid stability discrimination method. Operating condition samples that do not meet the above conditions are discarded to avoid diluting training efficiency with invalid samples, ensuring that each operating condition sample in the training set can effectively strengthen the neural network model's ability to extract features of unstable states near the decision boundary.
[0033] S130. The neural network model is trained, and during the training process, a conservative penalty term is constructed based on the target sample set. The neural network model is iteratively optimized according to the conservative penalty term until the convergence condition is met, thereby obtaining a stability discrimination model. The conservative penalty term is a penalty term determined based on the probability that a false positive sample is predicted as a stable state by the neural network model. The false positive sample is the operating condition sample whose stability label is unstable and which is predicted as a stable state by the neural network model.
[0034] In embodiments of the present invention, such as Figure 5 As shown, step S130 specifically includes steps S131-S136: S131. Select the operating condition samples with the stability label of unstable state from the training set in the target sample set to obtain the first sample set; S132. Select the operating condition samples that are predicted to be in a stable state by the neural network model from the training set of the target sample set to obtain a second sample set; S133. Determine the intersection of the first sample set and the second sample set to obtain the false positive sample set; S134. Determine the conservative penalty term based on the probability that each of the operating condition samples in the false positive sample set is predicted to be in a stable state; S135. The conservative penalty term and the classification loss function are weighted and fused to obtain the total loss function; S136. The neural network model is iteratively optimized based on the total loss function until the convergence condition is met, wherein the convergence condition is that the false positive probability on the validation set is lower than a preset safety threshold.
[0035] In this embodiment of the invention, the first sample set This includes all operating condition samples labeled as unstable, used for risk sample location in subsequent conservative penalty term calculations. First sample set. The formula is as follows: in, is the stability label, and i is the sample index.
[0036] Second sample set This includes all operating condition samples determined to be in a stable state by the neural network model, used to identify the subset of samples predicted to be stable by the model. Second sample set. The formula is as follows: Where i is the sample index. This is the probability value that the neural network model predicts the i-th operating condition sample as a steady state, and its value ranges from 0 to 1; The threshold used to determine whether a sample of operating conditions is considered to be in a stable state by the neural network model.
[0037] The intersection of the first sample set and the second sample set is determined to obtain the false positive sample set, denoted as . The operating condition samples in the false positive sample set have the characteristic of being labeled as unstable but misjudged as stable by the model, representing high-risk samples that need to be severely punished.
[0038] It should be noted that the conservative penalty item The calculation formula is: , in, Describes the first sample set The number of samples under operating conditions; Used for conservative penalties Normalization is performed; i is the sample index in the false positive sample set; This is the probability value that the neural network model predicts the i-th operating condition sample as a steady state, and its value ranges from 0 to 1.
[0039] It should also be noted that by applying an asymmetric risk penalty to the underreporting behavior of instability during gradient descent training through a conservative penalty term, the penalty is greater when the false positive probability is higher. This guides the discrimination boundary of the neural network model to actively shrink towards the safe operating domain, reducing the underreporting probability of high-risk instability samples, improving the overall reliability of the microgrid stability discrimination method, and avoiding the loss of operational economy caused by global threshold shift.
[0040] It should be further explained that the conservative penalty term and the classification loss function are weighted and fused to obtain the total loss function, and the formula for calculating the total loss function is as follows:
[0041] Where L_total represents the total loss function, This represents the binary cross-entropy loss function, used to measure the classification error between the prediction result of a neural network model and the stability label. This represents the weighting factor of the conservative penalty term, used to control the strength of the conservative penalty. This indicates a conservative penalty, used to impose asymmetric risk penalties on unstable underreporting behavior.
[0042] The calculation formula is as follows: Where N represents the total number of operating condition samples included in the current training batch.
[0043] The gradient descent algorithm is used to calculate the gradient of the total loss function with respect to the weights of each layer of the neural network model. The network parameters are updated through backpropagation, so that the value of the total loss function gradually decreases. The convergence condition is that the false positive probability on the validation set is lower than a preset safety threshold. The preset safety threshold is set according to the microgrid dispatch safety requirements. When the false positive probability on the validation set is lower than the preset safety threshold for multiple consecutive training rounds, the model training is determined to be converged, the iterative optimization is stopped, and a stability discrimination model is output for the transient stability discrimination of microgrid operating conditions.
[0044] S140. Based on the stability discrimination model, the operating conditions of the microgrid are subjected to stability discrimination to obtain the discrimination result.
[0045] In this embodiment of the invention, a stability discrimination model with conservative characteristics is encapsulated as a stability discrimination interface. Operating condition variables such as DC-side damping, DC-side inertia, and power disturbances of the microgrid are collected in real time. These operating condition variables are input into the stability discrimination model through the stability discrimination interface for stability discrimination, generating a stability discrimination result. The discrimination result includes two types: stable state and unstable state. If the discrimination result is a stable state, the current scheduling scheme is allowed to execute; if the discrimination result is an unstable state, an alarm is triggered and the scheduling scheme is readjusted to ensure the stable operation of the microgrid within the safe operating domain. Understandably, since the stability discrimination model has achieved localized and precise contraction of the discrimination boundary during the training phase through active sampling of false positive probability and asymmetric risk penalty, the stability discrimination interface can be directly embedded as a safety constraint into the upper-level optimized scheduling model. This ensures that the generated scheduling scheme can reliably avoid potential transient instability risks, guarantee the stable operation of the microgrid within the safe operating domain, and improve the reliability and security of power system optimized scheduling.
[0046] It should be noted that the experimental results show that, compared with existing microgrid stability discrimination methods, the microgrid stability discrimination method in this embodiment can effectively reduce the probability of high-risk errors such as instability underreporting.
[0047] In summary, the microgrid stability discrimination method in this invention guides active sampling by using false positive probability, identifies and densifies the collection of samples from high-risk areas of instability underreporting, enhances the local representation accuracy of the stability decision boundary, and solves the problem of insufficient boundary representation accuracy in existing methods. Meanwhile, during training, a conservative penalty term is constructed based on the target sample set to impose an asymmetric risk penalty on instability and missed reporting behavior, guiding the discrimination boundary to shrink towards the safe domain and solving the problem of lack of active defense capability. Furthermore, the neural network model is iteratively optimized through the total loss function until the convergence condition is met, so that the false positive probability index on the validation set is lower than the preset safety threshold, improving the discrimination confidence and the matching degree of real risk under critical operating conditions. In addition, the neural network with conservative characteristics is encapsulated as a stability discrimination interface and embedded as a safety constraint in the upper-level optimization scheduling model to ensure that the generated scheduling scheme can reliably avoid potential transient instability risks, thereby solving the problem of insufficient reliability of microgrid stability discrimination methods and improving the operational economy under the premise of ensuring the absolute safety of microgrids.
[0048] Figure 6 This is a schematic block diagram of a microgrid stability discrimination device 200 provided in an embodiment of the present invention. Figure 6 As shown, corresponding to the above microgrid stability determination method, the present invention also provides a microgrid stability determination device 200. This microgrid stability determination device 200 includes a unit for executing the above-described microgrid stability determination method, and the device can be configured in a computer device. Specifically, please refer to... Figure 6 The microgrid stability discrimination device 200 includes an acquisition and calculation unit 201, an update unit 202, a training unit 203, and a discrimination unit 204. Detailed descriptions of each functional module are as follows: The acquisition calculation unit 201 is used to acquire an initial sample set of the microgrid and use a neural network model to calculate the false positive probability of each operating condition sample in the initial sample set. The false positive probability refers to the probability that the operating condition sample in an unstable state is predicted by the neural network model to be in a stable state. Update unit 202 is used to perform active sampling based on the false positive probability to update the initial sample set to obtain the target sample set; Training unit 203 is used to train the neural network model. During the training process, a conservative penalty term is constructed based on the target sample set. The neural network model is iteratively optimized according to the conservative penalty term until the convergence condition is met, thereby obtaining a stability discrimination model. The conservative penalty term is a penalty term determined based on the probability that a false positive sample is predicted as a stable state by the neural network model. The false positive sample is the operating condition sample whose stability label is unstable and which is predicted as a stable state by the neural network model. The discrimination unit 204 is used to perform stability discrimination on the operating conditions of the microgrid based on the stability discrimination model to obtain a discrimination result.
[0049] In some embodiments, such as this one, the acquisition calculation unit 201 is specifically used for: For each operating condition sample in the initial sample set, the operating condition sample is input into the neural network model to obtain the probability that the operating condition sample is predicted to be in a steady state. Obtain the stability label of the operating condition sample, and determine the indicator function value as a first preset value when the stability label is in an unstable state, and determine the indicator function value as a second preset value when the stability label is in a stable state; The false positive probability of the operating condition sample is obtained by multiplying the probability that the operating condition sample is predicted to be in a stable state with the corresponding indicator function value.
[0050] In some embodiments, such as this one, the update unit 202 is specifically used for: The initial sample set is divided into a training set and a validation set, wherein the validation set includes samples of unstable operating conditions; Obtain the false positive probability of the unstable operating condition samples in the validation set; The unstable operating condition samples with a false positive probability higher than a preset threshold are selected as the anchor sample set; Centered on each anchor point in the anchor point sample set, a high-incidence area for false positives is defined in the input space composed of the operating condition variables according to a preset neighborhood radius; Multiple candidate operating condition samples with the stability label are generated in the high-incidence area of false positives; The candidate operating condition samples that meet the high false positive rate characteristic are incorporated into the training set to update the initial sample set, thus obtaining the target sample set.
[0051] In some embodiments, such as this one, the update unit 202 is further configured to: In the region with a high incidence of false positives, the Latin hypercube sampling method was used to generate multiple candidate operating condition variables; Transient stability information is obtained by performing time-domain simulation on each of the candidate operating condition variables. Based on the transient stability information, a corresponding stability label is assigned to each candidate operating condition variable to obtain the candidate operating condition sample with the stability label.
[0052] In some embodiments, such as this one, the update unit 202 is further configured to: The high-false-positive characteristic condition is that the stability label of the candidate operating condition sample is in an unstable state, and the probability of a stable state predicted by the neural network model for the candidate operating condition sample is higher than a preset probability threshold.
[0053] In some embodiments, such as this one, the training unit 203 is specifically used for: From the training set in the target sample set, the operating condition samples with the stability label of unstable state are selected to obtain the first sample set; The second sample set is obtained by selecting the operating condition samples that are predicted to be in a stable state by the neural network model from the training set of the target sample set; The intersection of the first sample set and the second sample set is determined to obtain the false positive sample set; The conservative penalty term is determined based on the probability that each of the operating condition samples in the false positive sample set is predicted to be in a stable state; The total loss function is obtained by weighting and fusing the conservative penalty term with the classification loss function; The neural network model is iteratively optimized based on the total loss function until a convergence condition is met, wherein the convergence condition is that the false positive probability on the validation set is lower than a preset safety threshold.
[0054] The aforementioned microgrid stability determination device can be implemented as a computer program, which can, for example... Figure 7 It runs on the computer device shown.
[0055] Please see Figure 7 , Figure 7 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device 300 is a device capable of determining the stability of a microgrid.
[0056] See Figure 7 The computer device 300 includes a processor 302, a memory, and a network interface 305 connected via a system bus 301. The memory may include a non-volatile storage medium 303 and internal memory 304.
[0057] The non-volatile storage medium 303 can store an operating system 3031 and a computer program 3032. When the computer program 3032 is executed, it causes the processor 302 to execute a microgrid stability assessment method.
[0058] The processor 302 provides computing and control capabilities to support the operation of the entire computer device 300.
[0059] The internal memory 304 provides an environment for the operation of the computer program 3032 in the non-volatile storage medium 303. When the computer program 3032 is executed by the processor 302, the processor 302 can execute a microgrid stability determination method.
[0060] This network interface 305 is used for network communication with other devices. Those skilled in the art will understand that... Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 300 to which the present invention is applied. The specific computer device 300 may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0061] The processor 302 is used to run a computer program 3032 stored in a memory to implement any embodiment of the microgrid stability determination method described above.
[0062] It should be understood that, in this embodiment of the invention, the processor 302 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0063] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by a processor in the computer system to implement the process steps of the embodiments of the above methods.
[0064] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform any embodiment of the microgrid stability determination method described above.
[0065] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0066] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0067] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0068] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0069] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0070] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0071] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.
[0072] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for determining the stability of a microgrid, characterized in that, include: An initial sample set of the microgrid is obtained, and a neural network model is used to calculate the false positive probability of each operating condition sample in the initial sample set. The false positive probability refers to the probability that the operating condition sample in an unstable state is predicted by the neural network model to be in a stable state. Active sampling is performed based on the false positive probability to update the initial sample set and obtain the target sample set; The neural network model is trained, and during the training process, a conservative penalty term is constructed based on the target sample set. The neural network model is iteratively optimized according to the conservative penalty term until the convergence condition is met, thereby obtaining a stability discrimination model. The conservative penalty term is a penalty term determined based on the probability that a false positive sample is predicted as a stable state by the neural network model. The false positive sample is the operating condition sample whose stability label is unstable and which is predicted as a stable state by the neural network model. The stability of the microgrid's operating conditions is determined based on the stability discrimination model, and the discrimination results are obtained.
2. The method according to claim 1, characterized in that, The operating condition samples include operating condition variables and stability labels corresponding to the operating condition variables; the step of calculating the false positive probability of each operating condition sample in the initial sample set using a neural network model includes: For each operating condition sample in the initial sample set, the operating condition sample is input into the neural network model to obtain the probability that the operating condition sample is predicted to be in a steady state. Obtain the stability label of the operating condition sample, and determine the indicator function value as a first preset value when the stability label is in an unstable state, and determine the indicator function value as a second preset value when the stability label is in a stable state; The false positive probability of the operating condition sample is obtained by multiplying the probability that the operating condition sample is predicted to be in a stable state with the corresponding indicator function value.
3. The method according to claim 2, characterized in that, The step of actively sampling based on the false positive probability to update the initial sample set to obtain the target sample set includes: The initial sample set is divided into a training set and a validation set, wherein the validation set includes samples of unstable operating conditions; Obtain the false positive probability of the unstable operating condition samples in the validation set; The unstable operating condition samples with a false positive probability higher than a preset threshold are selected as the anchor sample set; Centered on each anchor point in the anchor point sample set, a high-incidence area for false positives is defined in the input space composed of the operating condition variables according to a preset neighborhood radius; Multiple candidate operating condition samples with the stability label are generated in the high-incidence area of false positives; The candidate operating condition samples that meet the high false positive rate characteristic are incorporated into the training set to update the initial sample set, thus obtaining the target sample set.
4. The method according to claim 3, characterized in that, The step of generating multiple candidate operating condition samples with the stability label in the high-incidence area of false positives includes: In the region with a high incidence of false positives, the Latin hypercube sampling method was used to generate multiple candidate operating condition variables; Transient stability information is obtained by performing time-domain simulation on each of the candidate operating condition variables. Based on the transient stability information, a corresponding stability label is assigned to each candidate operating condition variable to obtain the candidate operating condition sample with the stability label.
5. The method according to claim 3, characterized in that, The high-false-positive characteristic condition is that the stability label of the candidate operating condition sample is in an unstable state, and the probability of a stable state predicted by the neural network model for the candidate operating condition sample is higher than a preset probability threshold.
6. The method according to claim 3, characterized in that, The step of constructing a conservative penalty term based on the target sample set includes: From the training set in the target sample set, the operating condition samples with the stability label of unstable state are selected to obtain the first sample set; The second sample set is obtained by selecting the operating condition samples that are predicted to be in a stable state by the neural network model from the training set of the target sample set; The intersection of the first sample set and the second sample set is determined to obtain the false positive sample set; The conservative penalty term is determined based on the probability that each of the operating condition samples in the false positive sample set is predicted to be in a stable state.
7. The method according to claim 3, characterized in that, The step of iteratively optimizing the neural network model based on the conservative penalty term until the convergence condition is met includes: The total loss function is obtained by weighting and fusing the conservative penalty term with the classification loss function; The neural network model is iteratively optimized based on the total loss function until a convergence condition is met, wherein the convergence condition is that the false positive probability on the validation set is lower than a preset safety threshold.
8. A microgrid stability determination device, characterized in that, include: The computing unit is used to acquire an initial sample set of the microgrid and use a neural network model to calculate the false positive probability of each operating condition sample in the initial sample set. The false positive probability refers to the probability that the operating condition sample in an unstable state is predicted by the neural network model to be in a stable state. An update unit is used to actively sample based on the false positive probability to update the initial sample set to obtain a target sample set; The training unit is used to train the neural network model. During the training process, a conservative penalty term is constructed based on the target sample set. The neural network model is iteratively optimized according to the conservative penalty term until the convergence condition is met, thereby obtaining a stability discrimination model. The conservative penalty term is a penalty term determined based on the probability that a false positive sample is predicted as a stable state by the neural network model. The false positive sample is the operating condition sample whose stability label is unstable and which is predicted as a stable state by the neural network model. The discrimination unit is used to perform stability discrimination on the operating conditions of the microgrid based on the stability discrimination model and obtain the discrimination result.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-7.