Electric power system oscillation mechanism identification method and model construction method
By constructing an end-to-end mechanism identification framework based on deep belief networks, the problems of poor adaptability in distinguishing oscillation types and the influence of noise in new power systems are solved, and high-precision oscillation source localization and type identification are achieved in complex power grid environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THREE GORGES JINSHAJIANG CHUANYUN HYDROPOWER DEV CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies have poor adaptability to new power systems due to topology/parameter changes, and cannot distinguish oscillation types under weakly damped conditions. Furthermore, measurement data-driven technologies have low oscillation source location accuracy in non-ideal data environments such as noise, multi-frequency aliasing, and missing data.
An end-to-end mechanism identification framework based on deep belief networks (DBN) is constructed. By collecting active power data of generators and tie lines in the power system, normalizing and reducing the dimensionality, and using DBN for feature extraction and classification, a unified modeling and supervised fine-tuning of negative damped oscillations and forced power oscillations is achieved.
It improves the model's adaptability to complex disturbance conditions in real power grids, effectively suppresses the impact of noise and amplitude differences on recognition accuracy, and realizes automatic identification of the intrinsic characteristics of data and accurate classification of oscillation types.
Smart Images

Figure CN121997144A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of low-frequency oscillations in power systems, specifically to a method for identifying power system oscillation mechanisms and a method for constructing models. Background Technology
[0002] The statements in this section are provided only as background information in connection with this disclosure and may not constitute prior art.
[0003] Low-frequency oscillations are mainly studied in two categories: negatively damped free oscillations and forced oscillations. The treatment methods for these two types of oscillations differ. When negatively damped free oscillations occur, adjusting the operating mode to increase system damping will quell the oscillation. When forced oscillations occur, the oscillation can only be quelled by eliminating the disturbance source. Therefore, accurate oscillation type identification is a crucial basis for emergency control decision-making in low-frequency oscillations.
[0004] Currently, research on low-frequency oscillation type identification has developed into several technical approaches, which can be mainly divided into the following categories: 1. Model-based analytical and feature-comparison methods: These methods start from the physical essence of oscillations. For example, by deriving the analytical expression for forced oscillations, their unique characteristics, consisting of the superposition of free and forced components, are revealed, and they are distinguished by analyzing response components (such as damping ratio). Based on WAMS measured data, the dynamic characteristics of the two types of oscillations throughout the entire process are compared.
[0005] 2. Methods based on signal time-domain waveform characteristics: These methods focus on analyzing the morphological characteristics of the oscillation waveform, including the extreme value variation patterns and envelope shape during the oscillation initiation stage, to achieve rapid discrimination. For example, the quadratic difference method can be used to quickly discriminate by analyzing the sign of the power extreme point difference sequence within a dozen cycles after oscillation initiation; focusing on the shape of the oscillation envelope, the Hilbert-Huang transform is used to extract the envelope and support vector machine is used for concavity / convexity identification, and a comprehensive judgment is made by analyzing the amplitude variation pattern and the damping ratio obtained from EMD decomposition.
[0006] 3. Frequency domain analysis-based methods: These methods study the spectral characteristics of signals and identify different oscillations by utilizing the differences in their frequency domain performance. These methods typically have strong noise interference resistance.
[0007] The methods described above all rely on a single characteristic of free oscillation versus forced oscillation as the basis for type differentiation. While theoretically rigorous, they require stringent oscillation measurement data, which is sometimes difficult to obtain, making it challenging to achieve ideal results in practical system applications. Furthermore, if the system damping is very small, either weakly damped or near-undamped, all state variables exhibit constant-amplitude oscillations, making differentiation impossible based solely on oscillation phenomena. Moreover, when the system is frequently subjected to random disturbances, actual measurement signals often contain noise and multi-frequency aliasing, potentially reducing the accuracy of oscillation mechanism identification when directly applying these methods. Summary of the Invention
[0008] The purpose of this invention is to provide a method for identifying power system oscillation mechanisms and a model construction method, addressing the problems existing in the prior art, and solving the following technical problems: 1. To address the poor adaptability of model-dependent technologies in new power systems due to topology / parameter changes, and the inability to distinguish oscillation types under weakly damped conditions; 2. Solve the problem of low oscillation source positioning accuracy in non-ideal data environments such as noise, multi-frequency aliasing, and missing data in measurement data-driven technology; 3. Construct an end-to-end mechanism identification framework, and perform unified modeling and training on negative damped oscillation and forced power oscillation samples, and achieve mechanism category discrimination based on supervised fine-tuning; 4. By adopting a normalization and feature reconstruction mechanism, the impact of noise and amplitude differences on recognition accuracy is effectively suppressed, and the adaptability of the model to complex disturbance conditions of the actual power grid is improved.
[0009] The technical solution of the present invention is as follows: A method for identifying power system oscillation mechanisms includes: Step S1: Collect active power data of generators and tie lines in the power system; Step S2: Preprocess the collected data to obtain multidimensional time series data, which is used as the sample data to be tested; the preprocessing includes: normalization and dimensionality reduction. Step S3: Input the test sample data into the pre-trained oscillation mechanism recognition model, use the model to extract the deep features of the test sample data and classify them, and output the oscillation mechanism recognition result; the oscillation mechanism recognition result includes negative damping oscillation mechanism and forced power oscillation mechanism; The oscillation mechanism identification model is constructed based on a deep belief network (DBN).
[0010] Furthermore, in step S2, the data is normalized using a linear normalization method, including: Step S21: Combine the collected generator active power and tie line active power data in chronological order to construct multidimensional time series data; Step S22: The multidimensional time series data is processed using a linear normalization method to map the data values to the [0,1] interval, thereby obtaining the multidimensional time series data after linear normalization.
[0011] Furthermore, in step S2, principal component analysis is used to perform dimensionality reduction on the data, specifically including: Step S23: Calculate the mean covariance matrix of the multidimensional time series data after linear normalization; Step S24: Calculate the eigenvalues of the average covariance matrix and the corresponding normalized eigenvectors; Step S25: Based on the preset variance action rate, select the eigenvectors corresponding to the first p eigenvalues to construct a low-dimensional projection space; Step S26: Map the multidimensional time series data after linear normalization to the low-dimensional projection space to obtain the dimensionality-reduced multidimensional time series data, and input it as the test sample data into the oscillation mechanism identification model.
[0012] Furthermore, the Deep Belief Network (DBN) includes: Input layer: used to receive preprocessed multidimensional time series data, the number of which is determined by the dimension of the multidimensional time series data; Feature extraction layer: Composed of multiple Restricted Boltzmann Machines (RBMs) stacked from bottom to top, used to learn oscillatory intrinsic features from the multidimensional time series data through unsupervised layer-by-layer pre-training; each RBM layer includes a visible layer and a hidden layer, and adjacent RBM layers are connected by a weight matrix. connect; Top-level classifier: Connected to the top of the feature extraction layer, it is used to classify the extracted oscillation features based on supervised parameter fine-tuning and output the corresponding oscillation mechanism category label.
[0013] This invention also proposes a method for constructing a power system oscillation mechanism identification model, which is used to construct the aforementioned oscillation mechanism identification model, and includes the following steps: Step M1: Construct a training dataset containing oscillation mechanism labels; the training dataset contains generator active power and tie-line active power data, and the oscillation mechanism labels include negative damping oscillation mechanism and forced power oscillation mechanism; Step M2: Perform linear normalization and dimensionality reduction on the data in the training dataset; Step M3: Construct the initial structure of the Deep Belief Network (DBN), which includes an input layer, a feature extraction layer, and a top-level classifier; the feature extraction layer is composed of multiple Restricted Boltzmann Machines (RBMs) stacked from bottom to top; Step M4: Based on the multidimensional time series data processed in step M2, the DBN is pre-trained layer by layer using an unsupervised greedy algorithm. The output of the current layer RBM is used as the input of the next layer RBM, and each RBM is trained in turn to initialize the network parameters of the DBN. Step M5: Using the oscillation mechanism label, the pre-trained DBN is fine-tuned using the backpropagation algorithm to update the network parameters and obtain the trained oscillation mechanism recognition model.
[0014] Furthermore, in step M4, the unsupervised greedy algorithm uses a contrastive divergence algorithm to train each layer of the Restricted Boltzmann Machine (RBM), specifically including the following steps: Step M41: Initialize the network parameters of the current layer RBM and input data. Assign the activation probability of each hidden unit in the hidden layer to the visible layer, use the sigmoid activation function to calculate the activation probability of each hidden unit, and sample the hidden layer state. ; Step M42: Set the hidden layer state The network parameters are passed back to the visual layer as input, and the activation probability of each visual unit in the visual layer is calculated using the network parameters. The reconstructed visual layer state is then obtained by sampling. ; Step M43: Reconstruct the visual layer state The input is passed back to the hidden layer to calculate the activation probability of each hidden unit, thus obtaining the activation probability of the reconstructed hidden layer. ; Step M44: Based on the input data With hidden layer state The positive correlation statistics, and the reconstructed visual layer state With the activation probability of reconstructed hidden layers The negative correlation statistics are used to calculate the gradient and update the weight matrix, visible layer bias vector, and hidden layer bias vector of the current layer RBM. Step M45: Determine whether the reconstruction error meets the preset conditions or whether the number of iterations has reached the preset maximum value. If yes, end the training of the RBM layer; otherwise, return to step M41 for the next iteration.
[0015] Furthermore, the top-level classifier is a Softmax classifier; in step M5, the supervised fine-tuning specifically includes: Forward computation step: Input the multidimensional time series data processed in step M2 into the DBN pre-trained in step M4, extract features layer by layer through the feature extraction layer, and use the hidden layer output of the top RBM as the input of the Softmax classifier; Error calculation steps: Use the Softmax classifier to output the predicted probability distribution of each oscillation mechanism category, and calculate the classification error between the predicted probability distribution and the oscillation mechanism label; Backward fine-tuning step: Based on the classification error, the gradient is calculated from top to bottom using the backpropagation algorithm, and the weight matrix, visible layer bias vector, and hidden layer bias vector of each layer in the DBN are updated.
[0016] Furthermore, before constructing the initial structure of the Deep Belief Network (DBN) in step M3, a parameter setting step is included. This parameter setting step is used to initialize the training hyperparameters of the DBN, which include: Momentum factor, learning rate, maximum number of iterations for a single RBM layer, total number of fine-tuning training iterations for the DBN network, and number of hidden layer nodes in each RBM layer.
[0017] Furthermore, in step M1, the determination of the oscillation mechanism label is based on the following criteria: Negative damped oscillation mechanism: The upper envelope of its power oscillation curve is concave, and the corresponding oscillation mechanism is labeled as 0. Forced power oscillation mechanism: The upper envelope of its power oscillation curve is characterized by an upward convex shape or a straight line shape, and the corresponding oscillation mechanism is labeled as 1.
[0018] The present invention also proposes an electronic device, comprising: At least one processor; and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the instructions stored in the memory to perform the method described above.
[0019] Compared with existing technologies, the advantages of this invention are: 1. This invention addresses the oscillation mechanism characteristics of power systems by constructing an oscillation type identification model that automatically identifies the inherent characteristics of data. This model can automatically identify and classify the inherent characteristics of massive amounts of data without requiring manual setting of specific requirements. It is applicable to the identification of power system oscillation mechanisms.
[0020] 2. This invention introduces a deep belief network (DBN) model, which utilizes its layer-by-layer unsupervised feature extraction capability to achieve self-learning and automatic identification of deep features of oscillating data, avoiding the uncertainty of manually selected features.
[0021] 3. This invention constructs an end-to-end mechanism identification framework, which unifies the modeling and training of negative damped oscillation and forced power oscillation samples, and achieves mechanism category discrimination based on supervised fine-tuning.
[0022] 4. By adopting a normalization and feature reconstruction mechanism, the impact of noise and amplitude differences on recognition accuracy is effectively suppressed, and the adaptability of the model to complex disturbance conditions of the actual power grid is improved. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in the embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0024] Figure 1 A general block diagram for identifying the low-frequency oscillation mechanism of power systems based on DBN; Figure 2 For the RBM hidden layer cell reconstruction process; Figure 3 This is a power oscillation characteristic analysis diagram; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0025] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0026] The features and performance of the present invention will be further described in detail below with reference to embodiments.
[0027] Example 1 This embodiment proposes a method for identifying the oscillation mechanism of a power system, which includes the following three steps in its implementation: feature selection, data preprocessing, and feature extraction. in: The selection of feature quantities includes: Representative characteristic parameters are selected to accurately determine the oscillation mechanism; The data processing stage includes: The oscillation mechanism definition step is used to clearly identify the type; The data acquisition stage is used for model training and predictive classification. The data dimensionality reduction process is used to reduce training time and improve effectiveness. The feature extraction step includes: The initial value setting stage is used for the initial run of the entire model; The selection of the number of RBM iterations is used to more accurately identify data types and reduce training time costs. The selection of DBN training iterations is used to reduce training time and improve model accuracy.
[0028] In this embodiment, it should be noted that the selected characteristic quantities are: generator active power and tie line active power; The data processing stage includes two limitations: 1. The definition of oscillation mechanism needs to clearly define the limitations on oscillation types; 2. In the dimensionality reduction process, the data needs to be linearly normalized and combined into multidimensional time series data; specifically, the dimensionality reduction method adopts principal component analysis.
[0029] In this embodiment, the core of the feature extraction process lies in the deep feature extraction capability of the Deep Belief Network (DBN), which is manifested in the layer-by-layer learning capability of the Stacked Restricted Boltzmann Machine (RBM). The specific implementation process and principle include the following steps: (1) Data access and normalization: The preprocessed (normalized and dimensionality reduced) multidimensional time series data is used as input data and mapped to the [0,1] interval to facilitate network operation and convergence.
[0030] (2) Network structure initialization: The number of nodes in the underlying RBM visual layer (first layer) is determined based on the dimension of the input data.
[0031] (3) First-layer feature learning: The input data is fed into the visual layer of the first RBM, and training is performed using specific rules such as the contrastive divergence algorithm to learn the state of the first hidden layer. It reconstructs the data and fixes the network parameters learned by this layer. During this process, data features are initially compressed and extracted.
[0032] (4) Layer-by-layer stacked feature extraction: The hidden layer states obtained from training the previous RBM are used as the input to the next RBM visual layer. For example, the hidden layer states of the first layer are used as the input to the next RBM visual layer. The input is fed into the visible layer of the second RBM, and training is performed again to learn the state of the second hidden layer. It also reconstructs the data and records the parameters of that layer. Repeat this step until all layers of the RBM training are complete; Through this layer-by-layer greedy learning, the input of the untrained higher-level RBM always comes from the output of the trained lower-level RBM, thus realizing the extraction of abstract features from the original data from shallow to deep.
[0033] (5) DBN network construction and fine-tuning: After training all RBMs layer by layer, all RBMs are unfolded and stacked to build a complete DBN network. Then, using the backpropagation algorithm, the parameters of the entire network are fine-tuned in a supervised manner based on the labeled data to obtain the final feature extraction and classification model.
[0034] (6) Comparison and evaluation of differences: During feature extraction, a difference comparison mechanism is introduced to evaluate the reconstruction capability of the RBM. That is, the input data... and reconstructing data By comparing them, we can discover the differences between the two.
[0035] Specifically, the input data passes through the visible layer to the hidden layer (compression), and then is reconstructed back to the visible layer from the hidden layer (decompression / reconstruction). The model effectively extracts the inherent features of the data by calculating the fit or error between the original input curve (constructed based on the mean of the input data features) and the reconstructed curve (constructed based on the mean of the reconstructed data features).
[0036] In this embodiment, for details, please refer to... Figure 1 A method for identifying the oscillation mechanism of a power system, specifically including the following steps: Step S1: Collect active power data of generators and tie lines in the power system; Step S2: Preprocess the collected data to obtain multidimensional time series data, which is used as the sample data to be tested; the preprocessing includes: normalization and dimensionality reduction. Step S3: Input the test sample data into the pre-trained oscillation mechanism recognition model, use the model to extract the deep features of the test sample data and classify them, and output the oscillation mechanism recognition result; the oscillation mechanism recognition result includes negative damping oscillation mechanism and forced power oscillation mechanism; The oscillation mechanism identification model is constructed based on a deep belief network (DBN).
[0037] In this embodiment, specifically, step S2 uses a linear normalization method to normalize the data, including: Step S21: Combine the collected generator active power and tie line active power data in chronological order to construct multidimensional time series data; Step S22: The multidimensional time series data is processed using a linear normalization method to map the data values to the [0,1] interval, thereby obtaining the multidimensional time series data after linear normalization.
[0038] In this embodiment, specifically, in step S2, principal component analysis is used to reduce the dimensionality of the data. Principal component analysis is a good method to reduce the dimensionality of multidimensional time series data, and it has three important advantages: the first prominent advantage is that it reduces the dimensionality of the multidimensional data matrix; the second advantage is that the data after dimensionality reduction still has a one-to-one correspondence with the original data, and there is no problem of changes in the correlation between variables after sample reduction; the third advantage is that it can discover the relationship between different variables in multidimensional time series data.
[0039] Multiple feature quantities (e.g., generator speed, generator relative power angle, receiving-end node voltage amplitude and voltage phase angle) are sampled continuously at the same time interval, where each feature quantity corresponds to one dimension of a multi-dimensional time series.
[0040] In this embodiment, a multidimensional time series is specifically defined. sample, The sample size is denoted as , and each multidimensional time series sample is . .
[0041] In this embodiment, specifically, step S2 employs principal component analysis to perform dimensionality reduction on the data, which includes the following: Step S23: Calculate the mean covariance matrix of the multidimensional time series data after linear normalization; First, calculate the covariance matrix of the multidimensional time series samples:
[0042] Since each sample in a multidimensional time series has the same dimension Therefore, only the sample length They may be different; As can be seen from the above formula, It is The matrix, Representing the In the nth multidimensional time series sample The first variable and the second The covariance among the variables; then the average of the covariance matrices of all samples is calculated:
[0043] Step S24: Calculate the mean covariance matrix eigenvalues and the corresponding normalized feature vector ; Specifically, and Satisfy the following formula:
[0044] Step S25: Based on the preset variance action rate, select the eigenvectors corresponding to the first p eigenvalues to construct a low-dimensional projection space; Specifically, assuming the average covariance matrix eigenvalues The variance action rate is defined as follows:
[0045] when When large enough, by eigenvectors The resulting space can be considered a low-dimensional projected space, thereby achieving the goal of reducing dimensionality.
[0046] Step S26: Map the multidimensional time series data after linear normalization to the low-dimensional projection space to obtain the dimensionality-reduced multidimensional time series data, and input it as the test sample data into the oscillation mechanism identification model.
[0047] In this embodiment, specifically, such as Figure 2 As shown, the Deep Belief Network (DBN) includes: Input layer: used to receive preprocessed multidimensional time series data, the number of which is determined by the dimension of the multidimensional time series data; Feature extraction layer: Composed of multiple Restricted Boltzmann Machines (RBMs) stacked from bottom to top, used to learn oscillatory intrinsic features from the multidimensional time series data through unsupervised layer-by-layer pre-training; each RBM layer includes a visible layer and a hidden layer, and adjacent RBM layers are connected by a weight matrix. connect; Top-level classifier: Connected to the top of the feature extraction layer, it is used to classify the extracted oscillation features based on supervised parameter fine-tuning and output the corresponding oscillation mechanism category label.
[0048] In this embodiment, the energy function expression of the Restricted Boltzmann Machine (RBM) is as follows:
[0049] In the formula, The first in the visible layer Each visible unit can take a value. The value is the j-th hidden unit in the hidden layer. The value is 1 for activated units and 0 for inactive units. The parameters in a Restricted Boltzmann Machine (RBM) include: , , (In the formulas below, it is uniformly denoted as) ),in, This represents the connection weights between the visible layer and the hidden layer. Represents the visible layer bias vector. It is represented as the hidden layer bias vector.
[0050] Example 2 Example 2 proposes a method for constructing a power system oscillation mechanism identification model, which is used to construct the oscillation mechanism identification model proposed in Example 1. The method includes the following steps: Step M1: Construct a training dataset containing oscillation mechanism labels; the training dataset contains generator active power and tie line active power data, and the oscillation mechanism labels include negative damping oscillation mechanism and forced power oscillation mechanism; in this embodiment, it should be noted that 80% of the data in the training dataset can be divided into a training set for training and 20% of the data can be divided into a test set for testing model performance. In this embodiment, it should be noted that when power oscillations occur in the power system, the relevant electrical quantities of the system will also oscillate, such as the generator rotor angle, speed, power, voltage, and current. The line power can be expressed by the following formula:
[0051] In the formula: Indicates the oscillation mode of the connecting line. Participating factors; Indicates the system's first Initial values for each state variable; The system's first The oscillation pattern has the following general form:
[0052] in: This indicates the attenuation characteristics of power oscillations; Reflecting the oscillation frequency characteristics, the damping ratio of the oscillation mode is defined as:
[0053] If in At this time, any small disturbance to the system may trigger amplified oscillations, at which point the system will experience negative damped oscillations.
[0054] If in When the system encounters an external periodic disturbance with a frequency close to the system's natural oscillation frequency, resonance may occur, at which point the system experiences forced power oscillation.
[0055] Typically, the expression for a negatively damped oscillation curve is:
[0056] Its upper envelope expression is: Taking its second derivative, we know that:
[0057] As can be seen from the above equation, whether the system damping is positive or negative does not affect the sign of the second derivative of the envelope function on the negatively damped oscillation curve; it is always positive. This also indicates that the upper envelope of the negatively damped oscillation curve is always a concave curve. Figure 3 As shown in (a).
[0058] For forced power oscillation, the expression for its oscillation power is:
[0059] In the formula: This is expressed as the inherent oscillation amplitude of the system; This is expressed as the amplitude of forced power oscillation; This is expressed as the inherent oscillation frequency of the system; This is expressed as the forced power oscillation frequency; The initial phase angle represents the inherent oscillation (free component) of the system; This represents the initial phase angle of the forced power oscillation (forced component).
[0060] Figure 3 (b) shows the main manifestation of the forced power oscillation curve. It can be seen that the upper envelope is predominantly convex or straight, which is significantly different from the concave upper envelope of the negative damping oscillation curve. Although the shape of the upper envelope of the power oscillation curve is affected by the system oscillation frequency, damping ratio, and oscillation amplitude, its concavity / convexity remains unaffected. Therefore, the characteristics of the upper envelope of the curve can be used to distinguish between negative damping oscillations and forced power oscillations in power systems.
[0061] In this embodiment, it should be noted that before using a deep belief network to identify low-frequency oscillations of different mechanisms, it is necessary to clarify the mechanism identification object and category. The mechanisms to be identified in this paper are negative damping oscillation mechanism and forced power oscillation, which are defined as two categories, with forced power oscillation marked as 1 and negative damping oscillation mechanism marked as 0.
[0062] In this embodiment, specifically, in step M1, the determination of the oscillation mechanism label is based on the following criteria: Negative damped oscillation mechanism: The upper envelope of its power oscillation curve is concave, and the corresponding oscillation mechanism is labeled as 0. Forced power oscillation mechanism: The upper envelope of its power oscillation curve is characterized by an upward convex shape or a straight line shape, and the corresponding oscillation mechanism is labeled as 1; In this embodiment, specifically, to verify the effectiveness of the model and obtain high-quality sample data, a power system simulation method was used to construct the training dataset. Specifically, the simulation data was generated based on a classic four-machine, two-zone system model, and the simulation experimental platform used Matlab 2020b. The computer hardware environment configuration used for model training and testing was: Intel Core 2.3GHz CPU and 8GB RAM.
[0063] Step M2: Perform linear normalization and dimensionality reduction on the data in the training dataset; wherein, data dimensionality reduction is used to reduce training time and effectiveness; the detailed steps of this step can be found in Example 1.
[0064] Step M3: Construct the initial structure of the Deep Belief Network (DBN), which includes an input layer, a feature extraction layer, and a top-level classifier; the feature extraction layer is composed of multiple Restricted Boltzmann Machines (RBMs) stacked from bottom to top; In this embodiment, specifically, before constructing the initial structure of the Deep Belief Network (DBN) in step M3, a parameter setting step is included. This parameter setting step is used to initialize the training hyperparameters of the DBN, and the training hyperparameters include: Momentum factor, learning rate, maximum number of iterations for a single RBM layer, total number of fine-tuning training iterations for the DBN network, and number of hidden layer nodes in each RBM layer.
[0065] Step M4: Based on the multidimensional time series data processed in step M2, the DBN is pre-trained layer by layer using an unsupervised greedy algorithm. The output of the current layer RBM is used as the input of the next layer RBM, and each RBM is trained in turn to initialize the network parameters of the DBN. In this embodiment, the Contrastive Divergence (CD) algorithm is specifically used to train each layer of the Restricted Boltzmann Machine (RBM). It is assumed that the visible layer in the RBM contains... Each visible unit, the hidden layer contains Each hidden unit has model parameters including the connection weight matrix between the visible layer and the hidden layer. Visible layer offset vector Hidden layer bias vector The energy function of an RBM is defined as:
[0066] In the formula, The first in the visible layer Each visible unit can take a value. The value is the j-th hidden unit in the hidden layer. The value is 1 for activated units and 0 for inactive units. These are network parameters.
[0067] The specific training process includes the following sub-steps: Step M41: Initialize the network parameters of the current layer RBM and input data. Assign the activation probability of each hidden unit in the hidden layer to the visible layer, use the sigmoid activation function to calculate the activation probability of each hidden unit, and sample the hidden layer state. Specifically, initialization parameters Set the initial values of each visible unit in the visible layer. According to conditional probability distribution Calculate the hidden layer 1 The probability of a hidden unit being activated:
[0068] in: Use the Sigmoid activation function; The hidden units are sampled based on the calculated probabilities to obtain the hidden layer states. ; Step M42: Set the hidden layer state The network parameters are passed back to the visual layer as input, and the activation probability of each visual unit in the visual layer is calculated using the network parameters. The reconstructed visual layer state is then obtained by sampling. Specifically, based on the hidden layer states obtained from sampling... According to the conditional probability distribution Calculate the visible layer The probability of a visual unit being activated:
[0069] Based on this probability, the visible units are sampled to obtain the reconstructed visible layer state. (i.e., reconstructing the data); Step M43: Reconstruct the visual layer state The input is passed back to the hidden layer to calculate the activation probability of each hidden unit, thus obtaining the activation probability of the reconstructed hidden layer. Specifically, the reconstructed visual layer state is utilized again. Calculate the activation probability of hidden layer units:
[0070] This step is used to obtain statistics for the "negative phase"; Step M44: Based on the input data With hidden layer state The positive correlation statistics, and the reconstructed visual layer state With the activation probability of reconstructed hidden layers The negative correlation statistics are used to calculate the gradient and update the weight matrix, visible layer bias vector, and hidden layer bias vector of the current layer RBM. Specifically, the parameters are corrected using the approximate gradient update formula of the contrastive divergence algorithm, as follows:
[0071]
[0072]
[0073] In the formula: The preset learning rate; The expected statistic representing the data distribution (positive phase); The expected statistic representing the model distribution (negative phase); Step M45: Determine whether the reconstruction error meets the preset conditions or whether the number of iterations has reached the preset maximum value. If yes, end the training of this layer of RBM; otherwise, return to step M41 for the next iteration. Compare the original input data. With reconstructing data The difference between the parameters is used to evaluate the reconstruction error. When the error is less than a threshold or the number of iterations meets the requirements, the trained parameters are output. And use it as the final parameter of the RBM layer.
[0074] In this embodiment, to further illustrate the feature extraction and reconstruction mechanism of the Restricted Boltzmann Machine (RBM) and the evaluation criteria for its training effect more intuitively, please refer to [link to relevant documentation]. Figure 2 .
[0075] like Figure 2 As shown, the input data first passes through the visible layer (visual unit), is mapped to the hidden layer (hidden unit) through the weight matrix, and finally returns to the reconstructed visible unit through the weight matrix. In this process, the high-dimensional input data is first compressed to extract features, and then reconstructed. Clearly, after the reconstruction process, there will be some differences between the original input data and the reconstructed data.
[0076] In this embodiment, a difference comparison mechanism is introduced to quantitatively evaluate the feature extraction capability of RBM.
[0077] Let the input data be Reconstruct the data as The number of data samples is composed of This indicates that the number of data features is determined by... To quantify the difference between the input data and the reconstructed data, the following evaluation metrics are defined: Definition 1: Input data feature mean; given a single feature, the mean of the i-th input data sample. Take the average of the features :
[0078] Definition 2: Mean of reconstructed data features; given a single feature, the mean of the first feature of all reconstructed data samples. Take the average of the features :
[0079] Definition 3: Original input curve; Based on Definition 1, the x-axis is the number of features (dimension indices 1 to m) of the input data, and the y-axis is the corresponding mean vector. Using the vertical axis as the ordinate, construct the original input curve.
[0080] Definition 4: Reconstruction Curve; Based on Definition 2, the number of features (dimension indices 1 to m) of the reconstructed data is used as the x-axis, and the corresponding mean vector is used as the y-axis. Using the vertical axis as the ordinate, construct the reconstructed curve.
[0081] Based on the above definition, the distribution characteristics of the input data are intuitively represented as the original input curve, while the data characteristics after reconstruction of the hidden layer units are represented as the reconstruction curve. During model training, by directly analyzing or calculating the degree of fit between the original input curve and the reconstruction curve (i.e., difference comparison), it can serve as an auxiliary basis for evaluating the feature extraction capability of the current layer RBM, and thereby verify whether the reconstruction error in step M45 meets the requirements.
[0082] Step M5: Using the oscillation mechanism label, the pre-trained DBN is fine-tuned using the backpropagation algorithm to update the network parameters and obtain the trained oscillation mechanism recognition model.
[0083] In this embodiment, it should be noted that the entire process of building a data classification model based on Deep Belief Network (DBN) includes two key steps: parameter setting and supervised parameter fine-tuning, in addition to the unsupervised layer-by-layer pre-training mentioned above. 1. Parameter Setting Stage: Before constructing the initial structure of the Deep Belief Network (DBN) (i.e., before step M3), the training hyperparameters of the model need to be initialized. These hyperparameters mainly include: momentum factor, learning rate, maximum number of iterations for a single-layer RBM, overall fine-tuning training count of the DBN network, and the number of nodes in the hidden layers. Furthermore, the number of nodes in the input layer needs to be determined based on the dimensionality of the input data, and the number of nodes in the output layer needs to be determined based on the number of categories for oscillation mechanism classification (2 categories in this example). Reasonable parameter settings are a prerequisite for ensuring model convergence speed and recognition accuracy.
[0084] 2. Unsupervised Layer-by-Layer Pre-training Stage: As described above (step M4), after parameter settings are completed, each layer of the RBM is trained using a layer-by-layer greedy algorithm. The hidden layer output of the lower-level RBM is used as the input of the visible layer of the higher-level RBM, and this process is passed up layer by layer until the top-level RBM is trained. This process enables self-learning from the original data and extracting deep abstract features.
[0085] 3. Supervised Parameter Fine-Tuning Stage: The unsupervised pre-training process only utilizes the distribution characteristics of the data and does not utilize label information. To improve the accuracy of the classification results, this step introduces labeled training data (i.e., data containing the label "0" for negative damped oscillation mechanism and the label "1" for forced power oscillation mechanism) to perform supervised fine-tuning of the entire network.
[0086] In this embodiment, specifically, the top-level classifier is a Softmax classifier; In step M5, the supervised fine-tuning specifically includes: Forward computation step: Input the multidimensional time series data processed in step M2 into the DBN pre-trained in step M4, extract features layer by layer through the feature extraction layer, and use the hidden layer output of the top RBM as the input of the Softmax classifier; Error calculation steps: The Softmax classifier outputs the predicted probability distribution of each oscillation mechanism category, and the classification error between the predicted probability distribution and the oscillation mechanism label is calculated; that is, the Softmax classifier is used to calculate the predicted probability distribution of the sample belonging to each oscillation mechanism category, and the classification error is calculated by combining the actual oscillation mechanism label (for example, by using the cross-entropy loss function). The reverse fine-tuning step is as follows: Based on the classification error, the gradient is calculated from top to bottom using the backpropagation algorithm, and the weight matrices, visible layer bias vectors, and hidden layer bias vectors of each layer in the DBN are updated; that is, based on the classification error, the gradient is calculated from top to bottom using the backpropagation (BP) algorithm, and the gradient is passed to each layer's RBM; according to the calculated gradient, the weight matrices of all layers in the DBN network are adjusted. Visible layer offset vector and hidden layer bias vector Perform global updates and fine-tuning until the network converges or reaches the preset number of fine-tuning training iterations.
[0087] Once the model has been trained using the above steps and its parameters are fixed, it can be used for identifying the oscillation mechanism of a power system (corresponding to the method described in claim 1). Specifically, the active power data of the generators and tie lines in the power system to be tested are preprocessed in the same way (linear normalization and dimensionality reduction) and then input as test data into the trained DBN model. The model will automatically extract features and output classification results ("0" or "1"), thereby achieving accurate identification of the negative damped oscillation or forced power oscillation mechanism.
[0088] Example 3 Based on the same technical concept, this embodiment provides an electronic device that can implement the power system oscillation mechanism identification method provided in the above embodiments of the present invention. In one embodiment, the electronic device can be a server, a terminal device, or other electronic devices. Figure 4 As shown, the electronic device may include: At least one processor and a memory connected to the at least one processor. In this embodiment of the invention, the specific connection medium between the processor and the memory is not limited. Figure 4 The example used is the connection between the processor and memory via a bus. The bus... Figure 4The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. Buses can be divided into address buses, data buses, control buses, etc., but for ease of representation, [the specific bus type is not shown here]. Figure 4 The processor is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, a processor can also be called a controller; there are no restrictions on the name.
[0089] In this embodiment of the invention, the memory stores instructions executable by at least one processor. By executing the instructions stored in the memory, the at least one processor can perform the power system oscillation mechanism identification method described above. The processor can implement... Figure 4 The functions of each module in the device shown.
[0090] The processor is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory and calling data stored in memory, it can monitor the device's various functions and process data, thereby enabling overall monitoring of the device.
[0091] In an alternative design, the processor may include one or more processing units. The processor may integrate an application processor and a modem processor, wherein the application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles wireless communication. It is understood that the modem processor may also not be integrated into the processor. In some embodiments, the processor and memory may be implemented on the same chip; in some embodiments, they may also be implemented separately on separate chips.
[0092] The processor can be a general-purpose processor, such as a CPU, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the power system oscillation mechanism identification method disclosed in the embodiments of this invention can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0093] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia cards, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), and electrically erasable programmable read-only memory (EPROM). Only memory (EEPROM), magnetic storage, magnetic disks, optical disks, etc. A memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures, and accessible by a computer, but is not limited thereto. The memory in embodiments of this invention can also be a circuit or any other device capable of performing storage functions for storing program instructions and / or data.
[0094] By designing and programming the processor, the code corresponding to the power system oscillation mechanism identification method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute the steps of the method described in the foregoing embodiments during operation. How to design and program the processor is a technique well-known to those skilled in the art and will not be elaborated upon here.
[0095] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.
[0096] This background section is provided to generally present the context of the invention. The work of the currently named inventors, the work to the extent described in this background section, and aspects of this section that did not constitute prior art at the time of application are neither expressly nor impliedly acknowledged as prior art to the invention.
Claims
1. A method for identifying the oscillation mechanism of a power system, characterized in that, include: Step S1: Collect active power data of generators and tie lines in the power system; Step S2: Preprocess the collected data to obtain multidimensional time series data, which is used as the sample data to be tested; the preprocessing includes: normalization and dimensionality reduction. Step S3: Input the test sample data into the pre-trained oscillation mechanism recognition model, use the model to extract the deep features of the test sample data and classify them, and output the oscillation mechanism recognition result; the oscillation mechanism recognition result includes negative damping oscillation mechanism and forced power oscillation mechanism; The oscillation mechanism identification model is constructed based on a deep belief network (DBN).
2. The method for identifying the oscillation mechanism of a power system according to claim 1, characterized in that, Step S2 involves normalizing the data using a linear normalization method, including: Step S21: Combine the collected generator active power and tie line active power data in chronological order to construct multidimensional time series data; Step S22: The multidimensional time series data is processed using a linear normalization method to map the data values to the [0,1] interval, thereby obtaining the multidimensional time series data after linear normalization.
3. The method for identifying the oscillation mechanism of a power system according to claim 2, characterized in that, Step S2 employs principal component analysis to reduce the dimensionality of the data, specifically including: Step S23: Calculate the mean covariance matrix of the multidimensional time series data after linear normalization; Step S24: Calculate the eigenvalues of the average covariance matrix and the corresponding normalized eigenvectors; Step S25: Based on the preset variance action rate, select the eigenvectors corresponding to the first p eigenvalues to construct a low-dimensional projection space; Step S26: Map the multidimensional time series data after linear normalization to the low-dimensional projection space to obtain the dimensionality-reduced multidimensional time series data, and input it as the test sample data into the oscillation mechanism identification model.
4. The method for identifying the oscillation mechanism of a power system according to claim 3, characterized in that, The Deep Belief Network (DBN) includes: Input layer: used to receive preprocessed multidimensional time series data, the number of which is determined by the dimension of the multidimensional time series data; Feature extraction layer: Composed of multiple Restricted Boltzmann Machines (RBMs) stacked from bottom to top, used to learn oscillatory intrinsic features from the multidimensional time series data through unsupervised layer-by-layer pre-training; each RBM layer includes a visible layer and a hidden layer, and adjacent RBM layers are connected by a weight matrix. connect; Top-level classifier: Connected to the top of the feature extraction layer, it is used to classify the extracted oscillation features based on supervised parameter fine-tuning and output the corresponding oscillation mechanism category label.
5. A method for constructing a power system oscillation mechanism identification model, used to construct the oscillation mechanism identification model as described in claim 1, characterized in that, Includes the following steps: Step M1: Construct a training dataset containing oscillation mechanism labels; the training dataset contains generator active power and tie-line active power data, and the oscillation mechanism labels include negative damping oscillation mechanism and forced power oscillation mechanism; Step M2: Perform linear normalization and dimensionality reduction on the data in the training dataset; Step M3: Construct the initial structure of the Deep Belief Network (DBN), which includes an input layer, a feature extraction layer, and a top-level classifier; the feature extraction layer is composed of multiple Restricted Boltzmann Machines (RBMs) stacked from bottom to top; Step M4: Based on the multidimensional time series data processed in step M2, the DBN is pre-trained layer by layer using an unsupervised greedy algorithm. The output of the current layer RBM is used as the input of the next layer RBM, and each RBM is trained in turn to initialize the network parameters of the DBN. Step M5: Using the oscillation mechanism label, the pre-trained DBN is fine-tuned using the backpropagation algorithm to update the network parameters and obtain the trained oscillation mechanism recognition model.
6. The method for constructing a power system oscillation mechanism identification model according to claim 5, characterized in that, In step M4, the unsupervised greedy algorithm uses the contrastive divergence algorithm to train each layer of the Restricted Boltzmann Machine (RBM), specifically including the following steps: Step M41: Initialize the network parameters of the current layer RBM and input data. Assign the activation probability of each hidden unit in the hidden layer to the visible layer, use the sigmoid activation function to calculate the activation probability of each hidden unit, and sample the hidden layer state. ; Step M42: Set the hidden layer state The network parameters are passed back to the visual layer as input, and the activation probability of each visual unit in the visual layer is calculated using the network parameters. The reconstructed visual layer state is then obtained by sampling. ; Step M43: Reconstruct the visual layer state The input is passed back to the hidden layer to calculate the activation probability of each hidden unit, thus obtaining the activation probability of the reconstructed hidden layer. ; Step M44: Based on the input data With hidden layer state The positive correlation statistics, and the reconstructed visual layer state With the activation probability of reconstructed hidden layers The negative correlation statistics are used to calculate the gradient and update the weight matrix, visible layer bias vector, and hidden layer bias vector of the current layer RBM. Step M45: Determine whether the reconstruction error meets the preset conditions or whether the number of iterations has reached the preset maximum value. If yes, end the training of the RBM layer; otherwise, return to step M41 for the next iteration.
7. The method for constructing a power system oscillation mechanism identification model according to claim 5, characterized in that, The top-level classifier is a Softmax classifier; in step M5, the supervised fine-tuning specifically includes: Forward computation step: Input the multidimensional time series data processed in step M2 into the DBN pre-trained in step M4, extract features layer by layer through the feature extraction layer, and use the hidden layer output of the top RBM as the input of the Softmax classifier; Error calculation steps: Use the Softmax classifier to output the predicted probability distribution of each oscillation mechanism category, and calculate the classification error between the predicted probability distribution and the oscillation mechanism label; Backward fine-tuning step: Based on the classification error, the gradient is calculated from top to bottom using the backpropagation algorithm, and the weight matrix, visible layer bias vector, and hidden layer bias vector of each layer in the DBN are updated.
8. The method for constructing a power system oscillation mechanism identification model according to claim 5, characterized in that, Before constructing the initial structure of the Deep Belief Network (DBN) in step M3, a parameter setting step is included. This parameter setting step is used to initialize the training hyperparameters of the DBN, which include: Momentum factor, learning rate, maximum number of iterations for a single RBM layer, total number of fine-tuning training iterations for the DBN network, and number of hidden layer nodes in each RBM layer.
9. The method for constructing a power system oscillation mechanism identification model according to claim 5, characterized in that, In step M1, the determination of the oscillation mechanism label is based on the following criteria: Negative damped oscillation mechanism: The upper envelope of its power oscillation curve is concave, and the corresponding oscillation mechanism is labeled as 0. Forced power oscillation mechanism: The upper envelope of its power oscillation curve is characterized by an upward convex shape or a straight line shape, and the corresponding oscillation mechanism is labeled as 1.
10. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which executes the instructions stored in the memory to perform the method as described in any one of claims 1-4.