A power grid dynamic security assessment method and system based on a switching autoencoder
Patent Information
- Application Number
- CN202610983464.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2046-07-03
AI Technical Summary
现有特征提取方法,虽能够在一定程度上实现特征降维和特征表示学习,但均侧重于提取样本特征的整体分布规律,难以显式区分不同样本之间的共有特征与反映样本间显著差异信息的判别特征,导致提取得到的特征表示中仍包含较多与动态安全评估无关的冗余信息,从而影响评估模型的精度和泛化能力
在本发明中,利用目标相关切换式自编码器提取兼顾样本差异性和动态安全评估任务相关性的高阶特征,减少不同样本间的共有特征信息对电网动态安全评估结果的影响,提升特征表达的有效性,提升模型的评估精度和泛化能力;利用电网最新数据构建新训练样本,并利用新训练样本筛选出的关键训练样本对电网动态安全评估模型进行持续更新,在关键训练样本筛选中,新训练样本和初始训练样本的差异越明显,新训练样本包含的信息量越丰富对模型性能提升越有价值,在降低新训练样本标签获取的时间成本同时,也提升模型对新能源出力和负荷水平的不断变化的适应能力。
Smart Images

Figure CN122509708B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of power grid security assessment, and in particular relates to a method and system for dynamic power grid security assessment based on a switching self-encoder. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Dynamic safety assessment technology assesses the dynamic safety risks of the power grid under given operating modes and anticipated faults, identifies and warns of high-risk operating modes in advance, and provides guidance for control decisions. It is an important technology for ensuring the safe and stable operation of the power grid.
[0004] Data-driven dynamic safety assessment directly fits the mapping relationship between input features and system dynamic safety indicators using artificial intelligence methods such as machine learning, offering significant advantages in assessment efficiency. However, data-driven power grid dynamic safety assessment technology still faces two challenges. First, the sample features for dynamic safety assessment are typically composed of power grid operation characteristics such as source load power and bus voltage, resulting in high feature dimensionality and a large amount of redundant information. Different samples often share a large number of features, while the proportion of key features that truly reflect the differences in system dynamic safety indicators is low. Existing feature extraction methods, while achieving feature dimensionality reduction and feature representation learning to some extent, focus on extracting the overall distribution patterns of sample features, making it difficult to explicitly distinguish between common features and discriminative features that reflect significant differences between samples. This leads to the extracted feature representations still containing a lot of redundant information unrelated to dynamic safety assessment, thus affecting the accuracy and generalization ability of the assessment model. Secondly, due to the strong uncertainty of the output and load levels of new energy sources, the uncertainty of the sample set to be evaluated increases significantly. The evaluation accuracy of the trained dynamic safety assessment model is difficult to guarantee. It is necessary to generate new samples based on the latest source-load prediction data and use the new samples to continuously update the model. However, re-acquiring labels and updating the model using time-domain simulation for all new operating scenarios will generate a large computation time, which is difficult to meet the speed requirement of online assessment. Summary of the Invention
[0005] To overcome the shortcomings of the prior art, this invention provides a method and system for dynamic security assessment of power grids based on a switching autoencoder. This method reduces the time cost of acquiring new training sample labels while also improving the model's adaptability to the continuous changes in renewable energy output and load levels.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for dynamic security assessment of power grids based on a switching self-encoder, comprising: An initial training sample set was constructed based on historical operating data of new energy sources and loads, and day-ahead source-load forecast data. A target-related switching autoencoder is used to separate common features among different training samples and discriminative features that reflect the differences between the initial training samples in the feature space, resulting in a high-order feature representation; wherein, the training loss function of the target-related switching autoencoder includes a target-related loss, which is determined by the power grid security assessment result corresponding to the discriminative feature and the true label of the initial training sample; The power grid dynamic security assessment model is initially trained using the high-order feature representations corresponding to the initial training samples, and the security assessment is performed using the initially trained power grid dynamic security assessment model. New training samples are constructed based on the latest source-load prediction information. The new training samples are then selected based on the degree of difference between the new training samples and the initial training samples, as well as the amount of information contained in the new training samples, to obtain key training samples. Based on the high-order feature representations corresponding to the initial training samples and key training samples, the power grid dynamic security assessment model is updated, and the updated power grid dynamic security assessment model is used to conduct power grid dynamic security assessment.
[0007] Secondly, the present invention provides a power grid dynamic security assessment system based on a switching self-encoder, comprising: The initial training sample construction module is configured to: construct an initial training sample set based on historical operating data of new energy sources and loads and day-ahead source-load prediction data; The feature extraction module is configured to: use a target-related switching autoencoder to separate common features among different training samples and discriminative features that reflect the differences between the initial training samples in the feature space to obtain a high-order feature representation; wherein, the training loss function of the target-related switching autoencoder includes a target-related loss, which is determined by the power grid security assessment result corresponding to the discriminative feature and the true label of the initial training sample; The initial training and evaluation module is configured to: perform initial training on the power grid dynamic security assessment model using the high-order feature representations corresponding to the initial training samples, and perform security assessment using the initially trained power grid dynamic security assessment model. The sample selection module is configured to: construct new training samples based on the latest source load prediction information, and select the new training samples according to the degree of difference between the new training samples and the initial training samples, as well as the amount of information contained in the new training samples, to obtain key training samples. The model update module is configured to update the power grid dynamic security assessment model based on the high-order feature representations corresponding to the initial training samples and key training samples, and then use the updated power grid dynamic security assessment model to perform power grid dynamic security assessment.
[0008] Thirdly, the present invention provides an electronic device including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the method described in the first aspect.
[0009] Fourthly, the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in the first aspect.
[0010] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0011] The above one or more technical solutions have the following beneficial effects: In this invention, a target-related switching autoencoder is used to extract high-order features that take into account both sample differences and the relevance of the dynamic security assessment task. This reduces the impact of shared feature information among different samples on the dynamic security assessment results of the power grid, improves the effectiveness of feature representation, and enhances the model's assessment accuracy and generalization ability. New training samples are constructed using the latest power grid data, and the key training samples selected from these new training samples are used to continuously update the power grid dynamic security assessment model. In the selection of key training samples, the more significant the difference between the new training samples and the initial training samples, and the richer the information contained in the new training samples, the more valuable it is for improving model performance. This reduces the time cost of obtaining labels for new training samples while also improving the model's adaptability to the continuous changes in renewable energy output and load levels.
[0012] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0013] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0014] Figure 1 This is an overall flowchart of the power grid dynamic security assessment method based on a switching self-encoder in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the switching self-encoder network structure in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the target-related switching autoencoder network structure in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the overall model structure in Embodiment 1 of the present invention; Figure 5 This is the overall framework of the power grid dynamic security assessment system in Embodiment 1 of the present invention. Detailed Implementation
[0015] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0016] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0017] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0018] Example 1 This embodiment proposes a power grid dynamic security assessment method based on a switching self-encoder, including: An initial training sample set was constructed based on historical operating data of new energy sources and loads, and day-ahead source-load forecast data. A target-related switching autoencoder is used to separate common features among different training samples and discriminative features that reflect the differences between the initial training samples in the feature space, resulting in a high-order feature representation; wherein, the training loss function of the target-related switching autoencoder includes a target-related loss, which is determined by the power grid security assessment result corresponding to the discriminative feature and the true label of the initial training sample; The power grid dynamic security assessment model is initially trained using the high-order feature representations corresponding to the initial training samples, and the security assessment is performed using the initially trained power grid dynamic security assessment model. New training samples are constructed based on the latest source-load prediction information. The new training samples are then selected based on the degree of difference between the new training samples and the initial training samples, as well as the amount of information contained in the new training samples, to obtain key training samples. Based on the high-order feature representations corresponding to the initial training samples and key training samples, the power grid dynamic security assessment model is updated, and the updated power grid dynamic security assessment model is used to conduct power grid dynamic security assessment.
[0019] This embodiment utilizes a target-related switching autoencoder to extract high-order features that balance sample differences and the relevance of the dynamic security assessment task. This reduces the impact of shared feature information among different samples on the dynamic security assessment results of the power grid and improves the effectiveness of feature representation. New training samples are constructed using the latest power grid data, and the key training samples selected from these new training samples are used to continuously update the dynamic security assessment model of the power grid. In the selection of key training samples, the more significant the difference between the new training samples and the initial training samples, and the richer the information contained in the new training samples, the more valuable it is for improving model performance. This reduces the time cost of obtaining labels for new training samples while also improving the model's adaptability to the continuous changes in renewable energy output and load levels.
[0020] The following is a detailed description of the power grid dynamic security assessment method based on a switching self-encoder proposed in this embodiment: Step 1: Construct an initial training sample set based on historical operating data of new energy sources and loads and day-ahead source-load forecast data.
[0021] The initial training samples of the power grid dynamic security assessment model consist of sample features and sample labels. The sample features reflect the operating mode characteristics of the power system, and the sample labels reflect the dynamic security indicators of the system under the current operating mode.
[0022] Dynamic security assessment can be divided into dynamic security assessment under the stability domain and dynamic security assessment under the security domain. Dynamic security assessment under the stability domain uses pre-fault information and dynamic response information as input features of the power grid dynamic security assessment model. Dynamic security assessment under the security domain uses steady-state power flow information before a system fault as input features of the power grid dynamic security assessment model. Because dynamic security assessment under the security domain allows for timely preventative and control measures if the system has an instability risk, this embodiment focuses on dynamic security assessment under the security domain, using steady-state power flow information before a system fault as input features of the power grid dynamic security assessment model.
[0023] The initial training sample set is constructed as follows: Step 11: Based on historical operating data of new energy sources and loads and day-ahead source-load forecast data, adjust the output of synchronous generators according to the net load level and the upper and lower limits of synchronous generator output, perform power flow calculations, and generate multiple sets of system operation scenarios with power flow convergence.
[0024] Historical operating data refers to data collected and stored during the historical operation of the power grid, including active and reactive power from renewable energy sources and active and reactive power from loads. Day-ahead source-load forecast data refers to the forecast data of source and load output for each time period of the next day provided by the dispatching department or forecasting system, including active and reactive power from renewable energy sources and active and reactive power from loads, used to reflect possible future operating scenarios.
[0025] Step 12: For different fault scenarios, such as a three-phase short circuit on a line, the sample features include power system steady-state power flow information (such as source load power and bus voltage) and fault type features. The fault type features can be represented by discrete coding (such as one-hot coding or binary coding). Sample labels can be obtained through time-domain simulation using power angle stability margin indicators or system voltage safety indicators.
[0026] Among them, the dynamic safety indicators of the power system can be selected according to the actual application requirements, such as the power angle stability indicator or the voltage safety indicator.
[0027] The power angle stability index is the difference between the critical clearing time (CCT) and the fault clearing time, i.e.: (1) In the formula, η δ The stability margin index for the power angle; t CCT This refers to the maximum resection time. t cl This refers to the fault clearance time.
[0028] Voltage safety indicators can be based on a binary table {( u cr,1 , T cr,1 ),..., ( u cr,j , T cr,j ), ...., ( u cr,M , T cr,M )} Determined, among which M This represents the number of buses being evaluated in the system. u cr,j For the first j Voltage offset threshold value for each bus T cr,j For the first j The maximum permissible offset time of the bus voltage.
[0029] The voltage safety margin of a power system is determined by defining the transient voltage deviation acceptability (TVDA) index based on a binary table. In other words, the voltage safety characteristics of the power system are qualitatively determined by judging whether the voltage deviation of each bus in the power system does not exceed the allowable range for a certain period of time.
[0030] The power system voltage safety index based on the definition of transient voltage offset acceptability is: (2) In the formula, u′ cr,j In order to make the first j The time during which the voltage dynamic curve of each bus remains below this value is exactly the allowable deviation time. T cr,j The voltage value; u cr,j This is the voltage offset threshold value of the voltage safety binary table corresponding to the busbar; u N This is the voltage rating, which is 1.0 pu; η u =0 indicates that the system is in a critical voltage safe state.
[0031] The dynamic safety assessment model trained using the initial training sample set constructed above can adapt to different fault types.
[0032] Optionally, when training corresponding dynamic security assessment models for different fault types, the sample input only uses the steady-state power flow information of the power system before the fault (such as source load power and bus voltage), which is obtained through power flow calculation; the sample labels are the power angle stability margin or power system voltage security index obtained through offline time-domain simulation calculation.
[0033] Step 2: Use a target-related switching autoencoder to separate the common features between different training samples and the discriminative features that reflect the differences between training samples in the feature space to obtain a higher-order feature representation.
[0034] Switching autoencoders are a representation learning method based on autoencoders. The core idea is to select two training samples as inputs at the same time during the training process, and use feature decoupling and feature switching methods to separate the common features between different training samples and the discriminative features that can reflect the significant differences between samples in the feature space, thereby obtaining a deep feature representation that can reflect the differences between samples.
[0035] The switching autoencoder consists of three stages: feature encoding, feature decoupling, and sample reconstruction. Its structure is as follows: Figure 2 As shown.
[0036] During the feature encoding stage, the sample features of any two training samples in the power grid dynamic security assessment training sample set are input. x 1 and x2. First, feature perturbation is performed, which involves randomly selecting a portion of the original features and replacing them with values randomly sampled from the training sample set. This allows the model to extract more robust feature representations. The perturbed sample features are then input into the encoder with shared parameters. f s This yields the abstract feature representation of the first training sample. z Abstract feature representations of the first and second training samples z 2.
[0037] In the feature decoupling phase, the abstract feature representation of the first training sample... z Abstract feature representations of the first and second training samples z Both inputs are fed to two different projectors for feature decoupling. The projectors... p m Used to extract common features; projector p s Used to extract discriminative features. To achieve effective feature decoupling, the common features and discriminative features of the two input training samples are further switched and reassembled to construct four feature pairs, namely ( m 1, s 1), ( m 1, s 2), ( m 2, s 1) and ( m 2, s 2). Among them, m 1 and m 2 represents the common features of the first and second training samples, respectively. s 1 and s 2 represents the discriminant features of the first and second training samples, respectively.
[0038] During the sample reconstruction stage, all four feature pairs mentioned above are decoded using a shared parameter decoder. d s Decoding and reconstruction are performed to obtain reconstructed samples and switched reconstructed samples. The encoder, projector, and decoder can all adopt a feedforward neural network structure. Since the discriminative features mainly determine the individual differences of the samples, and the common features reflect the common attributes of different samples, both the reconstructed samples and the switched reconstructed samples should be consistent with the original samples that provided the discriminative features.
[0039] Based on the above constraints, the switching autoencoder is trained by minimizing the reconstruction error, and its loss function is... L recon It can be represented as: (3) In the formula,N The feature dimension of the training samples; x ij For the first i The first original training sample j The values of the dimensional features; ij For the first i The first reconstructed sample j The values of the dimensional features; ij For the first i The value of the j-th dimension feature of each switched and reconstructed sample.
[0040] Switching autoencoders can extract discriminative features that reflect significant differences between samples through feature decoupling and feature switching methods, and replace the original sample features with the extracted discriminative features.
[0041] However, switched autoencoders are essentially unsupervised learning methods and do not consider specific task objectives. Therefore, the extracted features may not fully reflect key information related to the dynamic security indicators of the power grid. To address this, this embodiment proposes a target-related switched autoencoder (TSAE), which guides the discriminative features extracted by the switched autoencoder to adapt to dynamic security assessment tasks by using dynamic security indicator information of the samples.
[0042] The structure of a target-dependent switching autoencoder is as follows: Figure 3 As shown, the features of the training samples are first encoded to obtain abstract feature representations. Then, common features and discriminative features of the training samples are extracted through feature decoupling. To ensure that the discriminative features not only reflect significant differences between samples but also focus on key information related to the system's dynamic safety indicators, the target-related switching autoencoder retains the reconstruction loss. L recon Simultaneously, a loss term related to dynamic safety assessment was added. Specifically, using discriminative features as input, a single-layer neural network is employed to obtain the power grid safety assessment results for the training samples corresponding to the discriminative features, and this is then compared with the actual training sample labels to construct a target-related loss. L tar Among these methods, using a single-layer neural network structure can reduce the interference of additional nonlinear transformations on feature representation.
[0043] Dynamic security assessment of power grids can be viewed as a classification task or a regression task. For classification tasks, the output of the dynamic security assessment model of power grids is either system stability or system instability.
[0044] Target-related loss function L tar Classification loss can be usedL cls express: (4) In the formula, y i For the first i The true labels of each training sample; ( c ) i For the first i The power grid dynamic security assessment result is obtained by predicting the discriminative features of the training samples through a classification network; wherein, the classification network adopts a single-layer neural network, with the first training sample as the first training sample. i The discriminative features of each training sample are used as input to a single-layer neural network, and the output value is obtained by mapping through the sigmoid function.
[0045] For regression tasks, the output of the power grid dynamic security assessment model is the specific value of the system's dynamic security index. The objective-related loss function can be represented by regression loss. L reg express: (5) In the formula, y i For the first i The true labels of each training sample; ( r ) i For the first i The power grid dynamic security assessment result is obtained by predicting the discriminative features of the training samples through a regression network; wherein, the regression network adopts a single-layer neural network, with the first training sample as the first training sample. i The discriminative features of each training sample serve as the input to a single-layer neural network, outputting a predicted value of a dynamic security index.
[0046] During the training of the target-related switching autoencoder, the reconstruction loss is jointly optimized. L recon Losses related to the target L tar We extract deep features that reflect both sample differences and are relevant to the dynamic security assessment task. The loss function is: (6) In the formula, L total This is the total loss function for TSAE; λ tar The weighting coefficients for the target-related loss.
[0047] This embodiment uses a switching autoencoder to extract features from power grid dynamic security assessment samples. By decoupling and switching features, common features and discriminative features in power grid operation samples are separated. This allows for the extraction of deep feature representations that reflect significant differences between different samples from high-dimensional operation features, reducing the impact of common feature information between different samples on dynamic security assessment results and improving the effectiveness of feature representation.
[0048] This embodiment proposes a target-related switching autoencoder. While retaining the feature decoupling capability of the switching autoencoder, it introduces supervisory information related to the dynamic security assessment task. This enables the extracted discriminative features to not only reflect the differences between samples, but also to reflect key information related to the dynamic security indicators of the system, thereby improving the assessment accuracy of the dynamic security assessment model.
[0049] Step 3: Use the high-order feature representations corresponding to the initial training samples to perform initial training on the power grid dynamic security assessment model, and then use the pre-trained power grid dynamic security assessment model to perform security assessment.
[0050] The structure of the power grid dynamic security assessment model is as follows: Figure 4 As shown. After TSAE training is complete, its encoder fs and discriminative feature projector are retained. p s The parameters were frozen to extract high-order feature representations from the dynamic security assessment samples. An integrated artificial neural network (ANN) was used to construct the power grid dynamic security assessment model.
[0051] In the initial training phase of the power grid dynamic security assessment model, a bootstrap resampling method is adopted. This involves constructing multiple sub-training sets with replacement from the initial training sample set, and training multiple ANN sub-classifiers based on each sub-training set. Each sub-classifier has the same network structure, and its parameters are learned independently through different sub-training sets, thereby enhancing the generalization ability of the power grid dynamic security assessment model.
[0052] For regression tasks, the continuous values output by each sub-learner are averaged to obtain the final evaluation result. For classification tasks, the continuous values output by each sub-learner are averaged and then compared with the value of the classification boundary to obtain the final evaluation result.
[0053] Step 4: Construct new training samples based on the latest source-load prediction information. Select key training samples based on the degree of difference between the new and initial training samples, and the amount of information contained within the new training samples. With the continuous changes in renewable energy output and load levels, the accuracy of dynamic security assessment models trained based on initial training sample sets is difficult to guarantee. Therefore, it is necessary to generate new training samples by combining the latest source-load forecast data, and to continuously update the power grid dynamic security assessment model using these new training samples to improve the model's adaptability to real-time online assessment of power grid dynamic security. The latest source-load forecast data and the day-ahead source-load forecast data have the same data type: active power and reactive power of renewable energy and loads.
[0054] However, obtaining sample labels for all newly generated samples using time-domain simulation results in significant computational time, which is insufficient to meet the efficiency requirements of online updates. Therefore, this embodiment employs an active learning-based method for selecting key training samples for dynamic security assessment. This method selects key training samples from the new training samples that are more valuable for improving the performance of the power grid dynamic security assessment model, and uses time-domain simulation to obtain sample labels for updating the power grid dynamic security assessment model.
[0055] For new samples x The dynamic security indicators are evaluated based on a trained power grid dynamic security assessment model. Assume the integrated ANN contains... K There are 1 ANN sub-learners, and the output of each sub-learner is [ 1, 2,…, K For regression tasks, the sub-learner outputs predicted values of dynamic security metrics; for classification tasks, the sub-learner outputs predicted probabilities of samples belonging to the corresponding categories.
[0056] Define the model divergence index D m for: (7) In the formula, y a This is the average value of the output results of each sub-learner; K This represents the number of ANN sub-learners.
[0057] Model divergence reflects the degree of consistency among different sub-learners in their evaluation results of the current sample. The greater the divergence, the richer the information contained in the sample, and the more valuable it is for improving model performance.
[0058] For new training samples x High-order feature representations are obtained based on a trained target-related switching autoencoder. z New sample x Compared with the training sample set i Feature distance between samples L iThe calculation formula is: (8) In the formula, d For higher-order feature representation z dimensionality; z j Representation of higher-order features of new samples z The j One element; z ij For the training sample set, the first i High-order feature representation of each training sample z The j Each element.
[0059] Define sample novelty index N s for: (9) In the formula, N This represents the total number of samples in the training set.
[0060] Sample novelty reflects the degree of similarity between current new training samples and historical training samples in the deep feature space. The greater the sample novelty, the more significant the difference between the current operating scenario and historical training samples, and the more valuable it is for improving model performance.
[0061] By combining the model divergence index and the sample novelty index, a sample value assessment index is constructed: (10) In the formula, S As an indicator for evaluating sample value; α and β These are the weighting coefficients for the model divergence index and the sample novelty index, respectively.
[0062] Multiple groups can be set. α and β The candidate weight combinations are selected, and a subset of samples from the initial training sample set are used as weight validation samples. For each candidate weight combination, a sample value evaluation index is calculated, and key samples are screened. The screened key samples are used to update the power grid dynamic security assessment model. The updated power grid dynamic security assessment model is then used to evaluate the weight validation samples, and the candidate weight combination that maximizes the dynamic security assessment accuracy or minimizes the prediction error is selected as the final candidate weight combination. α and β The value of .
[0063] Selecting new training samples S Sort by first M The new training samples are used as key training samples. MThe number of newly generated samples can be determined based on the total number of samples generated, or it can be set as a certain proportion of the total number of samples generated; or it can be determined based on the number of time-domain simulations allowed to be completed within the time period of a single update of the power grid dynamic security assessment model.
[0064] Step 5: Update the power grid dynamic security assessment model based on the high-order feature representations corresponding to the initial training samples and key training samples, and use the updated power grid dynamic security assessment model to conduct power grid dynamic security assessment.
[0065] This embodiment adopts a key training sample selection and model update strategy based on active learning technology. By combining model divergence and sample novelty, the key training samples that are most valuable for improving model performance are selected. The key training samples are then used to incrementally update the dynamic safety assessment model. This reduces the time cost of obtaining sample labels while improving the model's adaptability to the continuous changes in new energy output and load levels.
[0066] For the selected key training samples, time-domain simulation is used to obtain sample labels. When the cumulative number of selected key training samples reaches a preset threshold, a power grid dynamic security assessment model update process is triggered. To reduce the computational time of the power grid dynamic security assessment model update, the parameters of the target-related switching autoencoder are frozen during the power grid dynamic security assessment model update process, and only the trained target-related switching autoencoder is used to extract features from the selected key training samples. Then, the selected key training samples and the initial training samples are combined to form the updated training sample set, and the Bootstrap resampling method is used to construct multiple sub-training sets to update each ANN sub-learner.
[0067] Let the first k The parameters of the ANN sub-learners are: θ k The parameter update process can be represented as: (11) In the formula, θ k and θ ’ k These are the model parameters before and after the update, respectively; η The learning rate; L k For the first k The loss function of each ANN sub-learner.
[0068] After updating the parameters of each ANN sub-learner, the output results of each sub-learner are integrated to form an updated dynamic security assessment model, thereby improving the assessment accuracy of the dynamic security assessment model for the latest operating scenarios.
[0069] The power grid dynamic security assessment system consists of three parts: offline training, online assessment, and model updating. Its overall framework is as follows: Figure 5 As shown.
[0070] In the offline training phase, an initial training sample set is first generated based on historical operating data of new energy sources and loads and day-ahead source-load forecast data. Then, the target-related switching autoencoder and the power grid dynamic security assessment model are trained, and the trained power grid dynamic security assessment model is saved for online evaluation.
[0071] During the online evaluation phase, a sample set to be evaluated is generated based on new energy forecast information, load forecast information, and dispatch plan simulation. The sample set to be evaluated is then input into the trained power grid dynamic security evaluation model, which outputs dynamic security evaluation results and provides them to dispatchers to support preventive control decisions.
[0072] During the model update phase, a new training sample set is generated based on the latest source-load forecast information. Key training samples are selected using active learning techniques, and the integrated ANN parameters are updated while freezing the target-related switching autoencoder parameters to improve the accuracy of the power grid dynamic security assessment model for new operating scenarios. As the source-load forecast information is continuously updated, the process of selecting key samples and updating integrated ANN parameters is repeated to achieve continuous updating of the power grid dynamic security assessment model.
[0073] This embodiment combines a target-related switching autoencoder with an ensemble learning method, and uses the high-order features extracted by the target-related switching autoencoder to construct an ensemble dynamic security assessment model, thereby improving the stability and reliability of the model assessment results.
[0074] Example 2 The purpose of this embodiment is to provide a power grid dynamic security assessment system based on a switching self-encoder, including: The initial training sample construction module is configured to: construct an initial training sample set based on historical operating data of new energy sources and loads and day-ahead source-load prediction data; The feature extraction module is configured to: use a target-related switching autoencoder to separate common features among different training samples and discriminative features that reflect the differences between the initial training samples in the feature space to obtain a high-order feature representation; wherein, the training loss function of the target-related switching autoencoder includes a target-related loss, which is determined by the power grid security assessment result corresponding to the discriminative feature and the true label of the initial training sample; The initial training and evaluation module is configured to: perform initial training on the power grid dynamic security assessment model using the high-order feature representations corresponding to the initial training samples, and perform security assessment using the initially trained power grid dynamic security assessment model. The sample selection module is configured to: construct new training samples based on the latest source load prediction information, and select the new training samples according to the degree of difference between the new training samples and the initial training samples, as well as the amount of information contained in the new training samples, to obtain key training samples. The model update module is configured to update the power grid dynamic security assessment model based on the high-order feature representations corresponding to the initial training samples and key training samples, and then use the updated power grid dynamic security assessment model to perform power grid dynamic security assessment.
[0075] In further embodiments, the following is also provided: An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When executed by the processor, the computer instructions perform the method described in Embodiment 1. For brevity, further details are omitted here.
[0076] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0077] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of memory may also include non-volatile random access memory. For example, memory may also store information about the device type.
[0078] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in Embodiment 1.
[0079] The method in Embodiment 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not provided here.
[0080] A computer program product includes a computer program that, when executed by a processor, implements the method described in Embodiment 1.
[0081] The present invention also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product includes computer-executable instructions, such as instructions included in program modules, which execute in a device on a target real or virtual processor to perform the processes / methods described above. Typically, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., that perform specific tasks or implement specific abstract data types. In various embodiments, the functionality of program modules can be combined or divided among program modules as needed. The machine-executable instructions for the program modules can execute within a local or distributed device. In a distributed device, the program modules can reside in both local and remote storage media.
[0082] The computer program code used to implement the methods of the present invention may be written in one or more programming languages. This computer program code may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the computer or other programmable data processing device, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a computer, partially on a computer, as a stand-alone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server.
[0083] In the context of this invention, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, and the like. Examples of signals may include electrical, optical, radio, sound, or other forms of propagation signals, such as carrier waves, infrared signals, etc.
[0084] Those skilled in the art will recognize that the units and algorithm steps described in conjunction with the embodiments herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. 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 implementation should not be considered beyond the scope of this application.
[0085] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for power grid dynamic security assessment based on switched autoencoder, characterized in that, include: An initial training sample set was constructed based on historical operating data of new energy sources and loads, and day-ahead source-load forecast data. A target-related switching autoencoder is used to separate common features among different training samples and discriminative features that reflect the differences between the initial training samples in the feature space, resulting in a high-order feature representation; wherein, the training loss function of the target-related switching autoencoder includes a target-related loss, which is determined by the power grid security assessment result corresponding to the discriminative feature and the true label of the initial training sample; The power grid dynamic security assessment model is initially trained using the high-order feature representations corresponding to the initial training samples, and the security assessment is performed using the initially trained power grid dynamic security assessment model. New training samples are constructed based on the latest source-load prediction information. The new training samples are then selected based on the degree of difference between the new training samples and the initial training samples, as well as the amount of information contained in the new training samples, to obtain key training samples. Based on the high-order feature representations corresponding to the initial training samples and key training samples, the power grid dynamic security assessment model is updated, and the updated power grid dynamic security assessment model is used to conduct power grid dynamic security assessment.
2. The method of claim 1, wherein, New training samples are constructed based on the latest source-load prediction information. The new training samples are then selected based on the degree of difference between the new and initial training samples, as well as the amount of information contained within them, to obtain key training samples. Specifically: The amount of information contained in the new training samples is determined based on the degree of consistency of the power grid dynamic security assessment results of different sub-learners on the new training samples. The degree of difference between the new training samples and the initial training samples is determined based on the feature distance between the higher-order feature representations corresponding to the new training samples and the higher-order feature representations corresponding to the initial training samples. Based on the amount of information contained in the new training samples and the degree of difference between the new training samples and the initial training samples, the new training samples are ranked, and the key training samples are obtained by screening the new training samples according to the ranking results.
3. The method of claim 1, wherein the method further comprises: The process of target-related switching autoencoder in processing different training samples is as follows: The features of two different training samples are perturbed, and the perturbed training sample features are input into an encoder with shared parameters to obtain the abstract feature representation of the first training sample and the abstract feature representation of the second training sample. The abstract feature representations of the first and second training samples are input into different projectors to decouple the features. The common features and discriminative features of the training samples are switched and reassembled to obtain feature pairs. The obtained features are decoded and reconstructed using a decoder with shared parameters to obtain reconstructed samples and switch reconstructed samples.
4. The method of claim 1, wherein, Multiple sub-training sets are constructed using the Bootstrap resampling method. Each sub-learner is updated based on the sub-training sets to complete the parameter update of each sub-learner and obtain the trained power grid dynamic security assessment model. The output results of each sub-learner after parameter update are integrated to obtain the power grid dynamic security assessment result.
5. The method of claim 1-4, wherein, The training sample labels of the power grid dynamic security assessment model are dynamic security indicators that reflect the current operating mode of the power grid system. These dynamic security indicators are either power angle stability indicators or voltage security indicators.
6. The method of claim 1, wherein, In the update of the power grid dynamic security assessment model, only the parameters of the power grid dynamic security assessment model are updated, while the parameters of the target-related switching autoencoder are frozen. 7.A power grid dynamic security assessment system based on a switched autoencoder, characterized in that, include: The initial training sample construction module is configured to: construct an initial training sample set based on historical operating data of new energy sources and loads and day-ahead source-load prediction data; The feature extraction module is configured to: use a target-related switching autoencoder to separate common features among different training samples and discriminative features that reflect the differences between the initial training samples in the feature space to obtain a high-order feature representation; wherein, the training loss function of the target-related switching autoencoder includes a target-related loss, which is determined by the power grid security assessment result corresponding to the discriminative feature and the true label of the initial training sample; The initial training and evaluation module is configured to: perform initial training on the power grid dynamic security assessment model using the high-order feature representations corresponding to the initial training samples, and perform security assessment using the initially trained power grid dynamic security assessment model. The sample selection module is configured to: construct new training samples based on the latest source load prediction information, and select the new training samples according to the degree of difference between the new training samples and the initial training samples, as well as the amount of information contained in the new training samples, to obtain key training samples. The model update module is configured to update the power grid dynamic security assessment model based on the high-order feature representations corresponding to the initial training samples and key training samples, and then use the updated power grid dynamic security assessment model to perform power grid dynamic security assessment.
8. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, perform the method described in any one of claims 1-6.
10. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, implements the method described in any one of claims 1-6.
Citation Information
Patent Citations
Short-term wind-speed combination forecasting method
CN103400210A
Ship photovoltaic output power prediction method suitable for different weather conditions
CN111932008A