Broadband oscillation mode recognition method, device and equipment and storage medium

Through segmented aggregation approximation and k-Shape clustering algorithm, the broadband oscillation data of the power grid is reduced in dimension, and the random forest model is used to solve the complexity of wideband oscillation pattern recognition in the power grid, and the accurate identification of the oscillation pattern is achieved, and the improvement of the improvement of the improvement of the oscillation pattern is achieved. The stability of the power system.

CN119226949APending Publication Date: 2024-12-31ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID QINGHAI ELECTRIC POWER COMPANY +2
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411099089.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Broadband oscillation in the power grid causes the disconnection of the new energy units and damage to the equipment, and its complex cross-regional characteristics make it difficult to accurately identify the oscillation mode, affecting the safe and stable power supply of the power system.

Method used

By obtaining the broadband oscillation data of the new energy grid, the segmented aggregation approximation algorithm and the k-Shape clustering algorithm are used to reduce the dimensions, and the random forest model is combined with the training of the pattern recognition model to achieve accurate identification of the broadband oscillation mode.

Benefits of technology

It realizes accurate identification of broadband oscillation data, reduces the risk of the power system, and improves the stability of the power grid and the safety of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226949A_ABST
    Figure CN119226949A_ABST
Patent Text Reader

Abstract

The invention provides a broadband oscillation mode identification method and device, equipment and a storage medium, and the method comprises the steps: firstly collecting new energy power grid oscillation data, segmenting the data, carrying out the dimension reduction processing, and simplifying the data through calculating the average value or characteristic value of each segment; then, classifying the data by using a k-Shape clustering algorithm, and constructing a classification data set; and randomly extracting various samples to train a random forest model to form a pattern recognition model. New data is input into the model after dimensionality reduction to obtain an oscillation mode. According to the method, through data dimension reduction, clustering database building and random forest rapid matching, accurate identification of broadband oscillation data is realized, historical, real-time and simulation data are integrated, and the identification efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of power grid broadband oscillation processing, and in particular, relates to a broadband oscillation pattern recognition method, device, equipment and storage medium. Background Art

[0002] In recent years, with the significant increase in the penetration rate of new energy sources such as wind power and photovoltaics in the power grid, the power grid has faced increasingly severe challenges of broadband oscillations. Such oscillations not only frequently cause new energy units to be disconnected from the grid and equipment to be damaged, but also seriously threaten the safe and stable power supply capabilities of the power system. Broadband oscillations are a complex problem that spans multiple regions and involves multiple electrical equipment. Their root cause lies in the divergent oscillations caused by negative damping, and they exhibit multi-modal and global characteristics. Therefore, accurate identification of oscillation modes is crucial to locating the oscillation source and implementing effective suppression strategies. Summary of the invention

[0003] The purpose of the present application is to overcome the problems existing in the above-mentioned prior art and to provide a broadband oscillation pattern recognition method, device, equipment and storage medium.

[0004] The present application provides a broadband oscillation pattern recognition method, comprising:

[0005] Obtain broadband oscillation data of different oscillation modes in the renewable energy grid;

[0006] Dividing the broadband oscillation data into a plurality of segments of equal length, calculating the average value or characteristic value of each segment of the broadband oscillation data, and obtaining the broadband oscillation data after dimension reduction;

[0007] Using a k-Shape clustering algorithm to classify the broadband oscillation data to generate a classified broadband oscillation data set;

[0008] Randomly extract samples from each category of the broadband oscillation data set as training data for a random forest model, and train the random forest model to obtain a pattern recognition model;

[0009] The broadband oscillation data after dimensionality reduction is processed by dimensionality reduction and input into the pattern recognition model to obtain the oscillation pattern of the new broadband oscillation number.

[0010] Optionally, the broadband oscillation data is expressed as:

[0011]

[0012] Among them, S n (t) is the frequency f of the broadband oscillation data n The oscillation mode, S noise (t) is the noise in the environment and signal acquisition process, S dc(t) is the DC component reflecting the steady state of S0(t).

[0013] Optionally, dividing the broadband oscillation data into a plurality of segments of equal length, calculating an average value or a characteristic value of each segment of the broadband oscillation data, and obtaining the broadband oscillation data after dimension reduction, comprises:

[0014] Obtaining the number of ramp events and the number of boundary points in each segment of the broadband oscillation data;

[0015] Setting a third threshold of a ramp event and a fourth threshold of a boundary point for each segment of the broadband oscillation data;

[0016] If the number of the ramp events is less than the third threshold, and the number of the boundary points is less than the fourth threshold, the mean value in the segment of broadband oscillation data replaces the segment of broadband oscillation data;

[0017] If the number of the ramp events is greater than the third threshold, and the number of the boundary points is greater than the fourth threshold, retaining the segment of broadband oscillation data;

[0018] If the number of climbing events is less than the third threshold and the number of boundary points is greater than the fourth threshold, or if the number of climbing events is greater than the third threshold and the number of boundary points is less than the fourth threshold, the maximum value and the minimum value in the segment of broadband oscillation data are used to replace the segment of broadband oscillation data.

[0019] Optionally, the number of ramp events and the number of boundary points in each segment of the broadband oscillation data are obtained, wherein the identification of the ramp events and boundary points includes:

[0020] Calculating the difference between the maximum value and the minimum value in each segment of the broadband oscillation data, and if the difference is greater than a preset first threshold, determining that a ramp event exists in the segment of broadband oscillation data;

[0021] The slope difference between each data point and its left and right adjacent points is calculated. If the slope difference is greater than a preset second threshold, the point is determined to be a boundary point.

[0022] Optionally, it also includes:

[0023] Determining whether the broadband oscillation data after dimensionality reduction meets the expected dimensionality target includes:

[0024] If the expected dimension target is met, the dimension reduction is completed;

[0025] If the expected dimension target is not met, the third threshold and the fourth threshold are expanded according to a preset rule, and the average value or characteristic value of each segment of the broadband oscillation data is recalculated as the representative value of the segment.

[0026] Optionally, the broadband oscillation data is classified using a k-Shape clustering algorithm to generate a classified broadband oscillation data set, including:

[0027] Step 1: by removing the mean and dividing by the standard deviation, all data are converted into the broadband oscillation data with a mean of 0 and a standard deviation of 1;

[0028] Step 2: Randomly assign the broadband oscillation data to k different categories, and calculate the cluster center of each category;

[0029] Step 3: Calculate the distance between each broadband oscillation data and each cluster center;

[0030] Step 4: assigning each broadband oscillation data to the category to which the cluster center with the smallest distance belongs;

[0031] Step 5: For each of the categories, recalculate the cluster center;

[0032] Repeat steps 3 and 4 until the preset maximum number of iterations is reached or the clustering result no longer changes, and output the cluster center of each category and the category to which each broadband oscillation data belongs.

[0033] Optionally, randomly extracting samples from each category of the broadband oscillation data set as training data for a random forest model, and training the random forest model to obtain a pattern recognition model, comprising:

[0034] Dividing the broadband oscillation dataset into three parts: a training set, a validation set, and a test set;

[0035] Performing multiple random samplings on the training set, and generating a training subset each time;

[0036] For each of the training subsets, a decision tree is constructed using the Gini coefficient as a splitting criterion to generate a random forest model;

[0037] The validation set is input into the random forest model, and the model performance under different parameter combinations is evaluated by a cross-validation method;

[0038] According to the model performance, select the optimal parameter combination to retrain the random forest model;

[0039] Testing the random forest model on the test set and recording performance indicators;

[0040] The random forest model is optimized according to the performance index to generate the pattern recognition model.

[0041] Please refer to Figure 2As shown, the present application also provides a broadband oscillation pattern recognition device, comprising:

[0042] An acquisition module 201 is used to acquire broadband oscillation data of different oscillation modes in a new energy grid;

[0043] A dimension reduction module 202 divides the broadband oscillation data into a plurality of segments of equal length, calculates an average value or a characteristic value of each segment of the broadband oscillation data, and obtains the broadband oscillation data after dimension reduction;

[0044] A clustering module 203, using a k-Shape clustering algorithm to classify the broadband oscillation data to generate a classified broadband oscillation data set;

[0045] A training module 204 randomly extracts samples from each category of the broadband oscillation data set as training data for a random forest model, and trains the random forest model to obtain a pattern recognition model;

[0046] The recognition module 205 performs dimension reduction processing on the broadband oscillation data after dimension reduction, and inputs the data into the pattern recognition model to obtain the oscillation pattern of the new broadband oscillation data.

[0047] The present application also provides a broadband oscillation pattern recognition device, comprising:

[0048] Memory;

[0049] The processor is used to retrieve the computer executable program of the above-mentioned broadband oscillation pattern recognition method from the memory, and execute: obtaining broadband oscillation data of different oscillation modes in the new energy power grid; dividing the broadband oscillation data into multiple segments of equal length, calculating the average value or characteristic value of each segment of the broadband oscillation data, and obtaining the broadband oscillation data after dimensionality reduction; using the k-Shape clustering algorithm to classify the broadband oscillation data to generate a classified broadband oscillation data set; randomly extracting samples from each category of the broadband oscillation data set as training data of a random forest model, training the random forest model to obtain a pattern recognition model; performing dimensionality reduction processing on the broadband oscillation data after dimensionality reduction, and inputting it into the pattern recognition model to obtain the oscillation pattern of the new broadband oscillation data.

[0050] The present application also provides a storage medium, comprising: a computer executable program stored therein, wherein the computer executable program is used to be called by a processor to execute the steps of the above-mentioned broadband oscillation pattern recognition method.

[0051] The beneficial effects of this application are:

[0052] The present application provides a method for identifying a broadband oscillation pattern, including: obtaining broadband oscillation data of different oscillation modes in a new energy power grid; dividing the broadband oscillation data into multiple segments of equal length, calculating the average value or characteristic value of each segment of the broadband oscillation data, and obtaining the broadband oscillation data after dimensionality reduction; using the k-Shape clustering algorithm to classify the broadband oscillation data and generate a classified broadband oscillation data set; randomly extracting samples from each category of the broadband oscillation data set as training data for a random forest model, training the random forest model to obtain a pattern recognition model; performing dimensionality reduction processing on the broadband oscillation data after dimensionality reduction, and inputting it into the pattern recognition model to obtain the oscillation pattern of the new broadband oscillation number. The present application reduces the dimensionality of broadband data, uses k-Shape clustering to integrate historical, real-time and simulation data to build a database, and finally uses the random forest model to quickly match oscillation data and pattern parameters, thereby achieving accurate identification of broadband oscillation data. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a schematic diagram of the broadband oscillation mode recognition process in this application;

[0054] Figure 2 is a schematic diagram of a broadband oscillation mode recognition device in the present application;

[0055] Figure 3 It is a schematic diagram of a broadband oscillation mode recognition device in this application. DETAILED DESCRIPTION

[0056] The present application is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present application and implement it.

[0057] Please refer to Figure 1 As shown, the present application provides a method for identifying a broadband oscillation pattern, the steps of which include:

[0058] S101. Acquire broadband oscillation data of different oscillation modes in a new energy power grid.

[0059] Broadband oscillation signals are a complex and important phenomenon in power systems. They cover a variety of modes, from low-frequency oscillations to subsynchronous oscillations and even supersynchronous oscillations, which pose a potential threat to the stable operation of power systems. In order to accurately describe and analyze such signals, it is first necessary to establish a suitable broadband oscillation signal model.

[0060] Model definition: The broadband oscillation signal model can be comprehensively expressed in the following form:

[0061]

[0062] Among them, S n(t) is the frequency, which is f n The oscillation mode, S noise (t) is the noise in the environment and signal acquisition process, S dc (t) is the DC component reflecting the steady state of S0(t).

[0063] For each individual oscillation mode, a more detailed description can be given in the following form:

[0064]

[0065] Among them, U n , D n and are the initial amplitude, damping factor and phase of the nth oscillation mode, and t is the duration after the oscillation occurs. This expression clearly points out the law of change of each oscillation mode over time, including the attenuation of its amplitude, the periodic change of frequency and the influence of the initial phase.

[0066] S102 , dividing the broadband oscillation data into a plurality of segments of equal length, calculating an average value or a characteristic value of each segment of the broadband oscillation data, and obtaining the broadband oscillation data after dimensionality reduction.

[0067] This application is based on the PAA (Piecewise Aggregate Approximation) algorithm, combined with a data dimensionality reduction algorithm for ramp events and boundary point detection. This algorithm aims to effectively reduce the dimensionality of broadband oscillation data while retaining important dynamic features such as extreme values ​​and points with large slope changes, which are crucial for stability analysis and control of power systems.

[0068] First, broadband oscillation data is collected through PMU, and then climbing events and boundary points are detected in a sliding time window (segment). According to the comparison between the number of these feature points and the preset threshold, it is decided whether the data in the time window needs to be retained or simplified more finely. Finally, the improved segmented aggregation approximation (PAA) method is used to reduce the dimension of the data.

[0069] Ramp event detection: within a time window, if the difference between the maximum and minimum values ​​of the oscillation sequence is greater than a preset first threshold, it is considered that a ramp event exists within the time window.

[0070] For example: Set the time window size (W). Calculate the maximum and minimum values ​​of the data sequence within the time window.

[0071] If the maximum value-minimum value>the first threshold value, the time window is marked as containing a hill climbing event.

[0072] Boundary point detection: A boundary point refers to a point whose slope change rate is significantly greater than a preset threshold.

[0073] For example, perform differential processing on the data in the time window to obtain a slope sequence. Calculate the slope difference between each point and its left and right adjacent points (or one side, depending on the boundary conditions).

[0074] If the slope difference of a point is greater than the second threshold, the point is marked as a boundary point.

[0075] Specifically, the number of PAA segments (k) is determined according to the time window size and the total data volume. In a time window containing more climbing events or boundary points, the number of PAA segments is reduced or a more refined partitioning strategy is adopted to retain more details.

[0076] For other time windows, the data in each segment are aggregated into a representative value (such as mean, median, etc.) according to the conventional PAA method.

[0077] Use the aggregated data segments to reconstruct the reduced-dimensionality data sequence.

[0078] The first threshold of the ramping event should be set according to system characteristics and analysis requirements to distinguish normal fluctuations from significant oscillation events.

[0079] The second threshold at the boundary point should be able to capture significant points of slope change while avoiding excessive sensitivity to noise.

[0080] In the processing and analysis of broadband oscillation data, in order to optimize the efficiency of data storage and processing while retaining the important dynamic features in the data, a specific threshold is set for each segment of broadband oscillation data to determine whether the segment contains significant climbing events or boundary points. These thresholds help us make decisions during the data dimensionality reduction process to decide whether to retain the original data, replace it with the mean, or simplify it with extreme values ​​(maximum and minimum values).

[0081] The third threshold of the ramp event: This threshold is used to determine the significance of the ramp event in a certain section of broadband oscillation data. If the number of detected ramp events is less than this threshold, it is considered that the ramp phenomenon of this section of data is not obvious.

[0082] The fourth threshold of boundary points: This threshold is used to determine whether the number of boundary points in a certain segment of broadband oscillation data is sufficient to indicate that there is a significant slope change in the data. If the number of boundary points is less than this threshold, it is considered that the slope change of this segment of data is not significant.

[0083] Case 1: If the number of ramp events is less than the third threshold, and the number of boundary points is also less than the fourth threshold, it indicates that the overall trend of the broadband oscillation data is relatively stable, without obvious ramps and slope changes. Therefore, the mean of the data segment can be used to replace the entire data segment, thereby achieving data dimensionality reduction while retaining basic statistical information.

[0084] Case 2: If the number of ramp events is greater than the third threshold, and the number of boundary points is also greater than the fourth threshold, it indicates that the broadband oscillation data contains significant dynamic features, such as strong ramping and slope changes. In order to retain this important information, the original form of the broadband oscillation data should be retained without dimensionality reduction.

[0085] Case 3: If the relationship between the number of ramp events and the number of boundary points does not satisfy the above two conditions, that is, one is greater than the threshold and the other is less than the threshold, it indicates that the data segment shows a certain imbalance in ramping and slope change. In order to simplify the representation while retaining the extreme value information of the data (this information may represent the important dynamic range of the data), the maximum and minimum values ​​in the broadband oscillation data segment can be used to replace the entire segment of data. Although this method will lose some details, it can maintain the representativeness of the data in terms of extreme values, as shown below:

[0086] Define the number of data ramping events in the jth segment as ψ j , the number of boundary points of the jth segment of data is ε j , the third threshold is σ1, the fourth threshold is σ2, then:

[0087]

[0088] ①, the mean value of the jth segment data is used to replace the data of that segment;

[0089] ②, the maximum and minimum values ​​of the jth segment data are used to replace the data of that segment;

[0090] ③, the maximum and minimum values ​​of the jth segment of data are used to replace the data in that segment;

[0091] ④, keep the original data.

[0092] After applying the improved piecewise aggregation approximation, the dimensionality of the processed dataset needs to be calculated. The dimensionality here usually refers to the number of data points, but other measures can also be considered, such as the number of independent variables, the degrees of freedom in the data, etc. For oscillating datasets, the degree of dimensionality reduction will directly affect the efficiency of subsequent processing and the visualization of the data.

[0093] Compare the calculated dimensionality with the expected dimensionality target. The expected dimensionality target may be determined based on a variety of factors, such as storage space constraints, processing time requirements, data visualization needs, etc. If the dimensionality of the processed dataset meets or is lower than this expected target, then the effect of the piecewise aggregation approximation can be considered satisfactory.

[0094] If the dimensionality of the processed dataset does not meet the expected goal, that is, the dimensionality is still too high, then it is necessary to adjust the parameters in the segmentation aggregation approximation algorithm, especially the third and fourth thresholds related to the segmentation criteria. These thresholds together determine the characteristics of each segment. By expanding these thresholds (i.e., relaxing the conditions for segmentation), the segments can be made sparser, thereby reducing the number of data points and reducing the dimensionality of the dataset.

[0095] After adjusting the threshold, the piecewise aggregation approximation algorithm is applied again and the dimensionality of the dataset is recalculated. This new dimensionality is then compared to the expected target. If the target is still not met, the threshold is further adjusted and the process is repeated until the dimensionality of the dataset meets or is below the expected target.

[0096] S103 , classifying the broadband oscillation data using a k-Shape clustering algorithm to generate a classified broadband oscillation data set.

[0097] The k-Shape clustering algorithm is particularly suitable for clustering time series data. It clusters based on the shape similarity of time series. The algorithm uses the cross-correlation method to calculate the shape distance (Shape-Based Distance, SBD) between two time series to measure the similarity between time series.

[0098] For two time series X and Y, each of which has a length of m, the k-Shape algorithm calculates the shape distance between them by means of a sliding window.

[0099] Specifically, slide the X or Y sequence relative to the other sequence w-1 times (where w=2m-1) to cover all possible alignments. The expression is as follows:

[0100]

[0101] For each alignment, the cross-correlation between the two sequences is calculated, and the largest cross-correlation value is selected as the similarity measure under this alignment.

[0102] However, in k-Shape, instead of computing cross-correlation values ​​directly, a cross-correlation based distance metric (SBD) is usually used, which may involve some transformation or normalization of the cross-correlation to ensure that the distance is additive and non-negative.

[0103] The calculation of cluster centers is an optimization problem, the goal is to minimize the SBD sum of all time series to their corresponding cluster centers. The objective function formula can be expressed as:

[0104]

[0105] in, is the cluster center of the kth class, P k is the kth type of oscillation data set, u i is the kth type of oscillation data.

[0106] Detailed process of k-Shape algorithm:

[0107] Step 1: All data are converted into broadband oscillation data with a mean of 0 and a standard deviation of 1 by removing the mean and dividing by the standard deviation.

[0108] Data normalization is an important step in data preprocessing, which aims to scale all features to the same scale so that each feature has the same importance in data analysis or machine learning algorithms. For broadband oscillatory data, normalization usually means converting the data to a distribution with a mean of 0 and a standard deviation of 1.

[0109] First, the mean of the entire broadband oscillation data set is calculated.

[0110] Then, calculate the standard deviation of the data set.

[0111] For each data point in the data set, the mean is subtracted from its original value and then divided by the standard deviation. This way, the mean of the processed data set becomes 0 and the standard deviation becomes 1.

[0112] Step 2: Randomly distribute the broadband oscillation data into k different categories, and calculate the cluster center of each category.

[0113] The broadband oscillation data is randomly assigned to k different classes, which is the starting point of the k-means clustering algorithm.

[0114] Randomly select k data points from the data set as cluster centers. These points can be any points in the data set, but when selecting them, try to ensure that the initial distance between them is relatively large to speed up the convergence of the algorithm.

[0115] For each data point in the dataset, calculate its distance to all k cluster centers (e.g., using Euclidean distance) and assign it to the class to which the closest cluster center belongs.

[0116] Step 3: Calculate the distance between each broadband oscillation data and each cluster center.

[0117] Purpose: In each iteration, the distance between each broadband oscillation data and all cluster centers needs to be recalculated.

[0118] Use an appropriate distance metric (such as Euclidean distance) to calculate the distance between each data point and all cluster centers.

[0119] Step 4: Allocate each broadband oscillation data to the category to which the cluster center with the smallest distance belongs.

[0120] Based on the distance calculated in step 3, each data point is reassigned to the category to which the cluster center closest to it belongs.

[0121] For each data point, find the cluster center with the smallest distance to it and assign the data point to the category to which the cluster center belongs.

[0122] Step 5: For each of the categories, recalculate the cluster center.

[0123] At the end of each iteration, the cluster center of each category is recalculated based on the data points in the current category.

[0124] For each category, calculate the mean (or other suitable centrality measure) of all data points in that category and use it as the new cluster center.

[0125] Repeat steps 3, 4, and 5 until a certain stopping condition is met.

[0126] The stopping conditions include: reaching a preset maximum number of iterations; and the clustering result no longer changes, that is, in the current iteration, no data points are reallocated to different categories.

[0127] Output the cluster centers of each category, which represent the central tendency of the data points in that category.

[0128] Output the category to which each broadband oscillation data belongs, that is, the cluster label of the data point.

[0129] S104. Randomly extract samples from each category of the broadband oscillation data set as training data for a random forest model, and train the random forest model to obtain a pattern recognition model.

[0130] A pattern recognition model for all categories of oscillation data was constructed using the Random Forest (RF) algorithm.

[0131] Principle of random forest algorithm:

[0132] Random forest uses the Bagging (Bootstrap Aggregating) method to generate multiple subsets of training data. These subsets are obtained by randomly sampling samples with replacement from the original training set, and each subset is independently used to train a decision tree.

[0133] When constructing each decision tree, the extracted subset is gradually split into smaller subsets according to the data characteristics until the stopping condition is met (such as reaching the maximum depth, too few node samples, etc.). In this process, the Gini coefficient is used as a splitting criterion to help the algorithm select the optimal splitting features and splitting points.

[0134] In a random forest, the classification results of all decision trees are combined through majority voting, and the category with the most votes is selected as the final classification result. This method effectively reduces the overfitting problem that may occur in a single decision tree and improves the overall classification accuracy.

[0135] In order to effectively train and evaluate the random forest model, the broadband oscillation dataset is first divided into three parts: training set, validation set and test set. The training set is used to train the model, the validation set is used to adjust the model parameters (such as the number of trees, maximum depth, etc.), and the test set is used to finally evaluate the performance of the model.

[0136] The training set is randomly sampled multiple times, and each sampling generates a training subset. Then, for each training subset, a decision tree is constructed using the Gini coefficient as the splitting criterion, and finally these decision trees are combined into a random forest model.

[0137] The validation set is input into the random forest model, and the model performance under different parameter combinations is evaluated by cross-validation (such as k-fold cross-validation). Cross-validation helps reduce the risk of overfitting and find the optimal parameter combination. Based on the validation results, the optimal parameter combination is selected to retrain the random forest model.

[0138] The optimized random forest model is tested on the test set, and the performance indicators (such as accuracy, recall, F1 score, etc.) are recorded. Based on the test results, the model can be further optimized, such as adjusting feature selection, improving data preprocessing, etc., to generate the final pattern recognition model.

[0139] The Gini coefficient plays an important role in the random forest model. It is an indicator of the purity of the data set. Specifically, the Gini coefficient represents the probability of randomly selecting a sample in the sample set and misclassifying it. By calculating the Gini coefficient of each feature, the algorithm can select the features and split points that minimize the Gini coefficient of the split subset, thereby building a more accurate and stable decision tree. In the application, the specific calculation formula of the Gini coefficient is:

[0140]

[0141] The calculation is performed based on the ratio of data feature p and its value k, which ensures the scientificity and rationality of the model during the construction process.

[0142] S105 , performing dimensionality reduction processing on the broadband oscillation data after dimensionality reduction, and inputting the data into the pattern recognition model to obtain the oscillation pattern of the new broadband oscillation data.

[0143] The dimension reduction is performed using the same method as step S102.

[0144] The present application also provides a broadband oscillation mode recognition device, comprising:

[0145] An acquisition module, for acquiring broadband oscillation data of different oscillation modes in a new energy grid;

[0146] A dimension reduction module, which divides the broadband oscillation data into a plurality of segments of equal length, calculates an average value or a characteristic value of each segment of the broadband oscillation data, and obtains the broadband oscillation data after dimension reduction;

[0147] A clustering module, using a k-Shape clustering algorithm to classify the broadband oscillation data to generate a classified broadband oscillation data set;

[0148] A training module randomly extracts samples from each category of the broadband oscillation data set as training data for a random forest model, and trains the random forest model to obtain a pattern recognition model;

[0149] The recognition module performs dimension reduction processing on the broadband oscillation data after dimension reduction, and inputs the data into the pattern recognition model to obtain the oscillation pattern of the new broadband oscillation data.

[0150] Please refer to Figure 3 As shown, the present application also provides a broadband oscillation pattern recognition device, comprising:

[0151] Memory 301;

[0152] The processor 302 is used to retrieve the computer executable program of the above-mentioned broadband oscillation pattern recognition method from the memory, and execute: obtaining broadband oscillation data of different oscillation modes in the new energy power grid; dividing the broadband oscillation data into multiple segments of equal length, calculating the average value or characteristic value of each segment of the broadband oscillation data, and obtaining the broadband oscillation data after dimensionality reduction; using the k-Shape clustering algorithm to classify the broadband oscillation data to generate a classified broadband oscillation data set; randomly extracting samples from each category of the broadband oscillation data set as training data of the random forest model, training the random forest model to obtain a pattern recognition model; performing dimensionality reduction processing on the broadband oscillation data after dimensionality reduction, and inputting it into the pattern recognition model to obtain the oscillation pattern of the new broadband oscillation data.

[0153] The present application also provides a storage medium, comprising: a computer executable program stored therein, wherein the computer executable program is used to be called by a processor to execute the steps of the above-mentioned broadband oscillation pattern recognition method.

[0154] The embodiments and / or implementation methods described above are only used to illustrate the preferred embodiments and / or implementation methods for realizing the technology of the present invention, and are not intended to limit the implementation methods of the technology of the present invention in any form. Any technical personnel in this field may make slight changes or modifications to other equivalent embodiments without departing from the scope of the technical means disclosed in the content of the present invention, but they should still be regarded as technologies or embodiments that are essentially the same as the present invention.

[0155] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and its core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression and the objective existence of infinite specific structures, ordinary technicians in this technical field can make some improvements, modifications or changes without departing from the principles of this application, and combine the above technical features in an appropriate manner; the improvements, modifications, changes or combinations, or the direct application of the concept and technical solution of the invention to other occasions without improvement, should be regarded as the scope of protection of this application.

Claims

1. A broadband oscillation pattern recognition method, characterized in that: include: Obtain broadband oscillation data of different oscillation modes in the renewable energy grid; Dividing the broadband oscillation data into a plurality of segments of equal length, calculating the average value or characteristic value of each segment of the broadband oscillation data, and obtaining the broadband oscillation data after dimension reduction; Using a k-Shape clustering algorithm to classify the broadband oscillation data to generate a classified broadband oscillation data set; Randomly extract samples from each category of the broadband oscillation data set as training data for a random forest model, and train the random forest model to obtain a pattern recognition model; The broadband oscillation data after dimensionality reduction is processed by dimensionality reduction and input into the pattern recognition model to obtain the oscillation pattern of the new broadband oscillation number.

2. The broadband oscillation pattern recognition method according to claim 1, characterized in that: The broadband oscillation data is expressed as: Among them, S n (t) is the oscillation mode of the frequency of the broadband oscillation data, S noise (t) is the noise in the environment and signal acquisition process, S dc (t) is the DC component reflecting the steady state of S0(t).

3. The broadband oscillation pattern recognition method according to claim 1, characterized in that: Dividing the broadband oscillation data into a plurality of segments of equal length, calculating the average value or characteristic value of each segment of the broadband oscillation data, and obtaining the broadband oscillation data after dimension reduction, comprises: Obtaining the number of ramp events and the number of boundary points in each segment of the broadband oscillation data; Setting a third threshold of a ramp event and a fourth threshold of a boundary point for each segment of the broadband oscillation data; If the number of the ramp events is less than the third threshold, and the number of the boundary points is less than the fourth threshold, the mean value in the segment of broadband oscillation data replaces the segment of broadband oscillation data; If the number of the ramp events is greater than the third threshold, and the number of the boundary points is greater than the fourth threshold, retaining the segment of broadband oscillation data; If the number of climbing events is less than the third threshold and the number of boundary points is greater than the fourth threshold, or if the number of climbing events is greater than the third threshold and the number of boundary points is less than the fourth threshold, the maximum value and the minimum value in the segment of broadband oscillation data are used to replace the segment of broadband oscillation data.

4. The broadband oscillation pattern recognition method according to claim 3, characterized in that: Acquire the number of ramp events and the number of boundary points in each segment of the broadband oscillation data, wherein the identification of the ramp events and boundary points includes: Calculating the difference between the maximum value and the minimum value in each segment of the broadband oscillation data, and if the difference is greater than a preset first threshold, determining that a ramp event exists in the segment of broadband oscillation data; The slope difference between each data point and its left and right adjacent points is calculated. If the slope difference is greater than a preset second threshold, the point is determined to be a boundary point.

5. The broadband oscillation pattern recognition method according to claim 3, characterized in that: Also includes: Determining whether the broadband oscillation data after dimensionality reduction meets the expected dimensionality target includes: If the expected dimension target is met, the dimension reduction is completed; If the expected dimension target is not met, the third threshold and the fourth threshold are expanded according to a preset rule, and the average value or characteristic value of each segment of the broadband oscillation data is recalculated as the representative value of the segment.

6. The broadband oscillation pattern recognition method according to claim 1, characterized in that: The broadband oscillation data is classified using a k-Shape clustering algorithm to generate a classified broadband oscillation data set, including: Step 1: by removing the mean and dividing by the standard deviation, all data are converted into the broadband oscillation data with a mean of 0 and a standard deviation of 1; Step 2: Randomly assign the broadband oscillation data to k different categories, and calculate the cluster center of each category; Step 3: Calculate the distance between each broadband oscillation data and each cluster center; Step 4: assigning each broadband oscillation data to the category to which the cluster center with the smallest distance belongs; Step 5: For each of the categories, recalculate the cluster center; Repeat steps 3 and 4 until the preset maximum number of iterations is reached or the clustering result no longer changes, and output the cluster center of each category and the category to which each broadband oscillation data belongs.

7. The broadband oscillation pattern recognition method according to claim 1, characterized in that: Randomly extracting samples from each category of the broadband oscillation data set as training data for a random forest model, and training the random forest model to obtain a pattern recognition model, including: Dividing the broadband oscillation dataset into three parts: a training set, a validation set, and a test set; Performing multiple random samplings on the training set, and generating a training subset each time; For each of the training subsets, a decision tree is constructed using the Gini coefficient as a splitting criterion to generate a random forest model; The validation set is input into the random forest model, and the model performance under different parameter combinations is evaluated by a cross-validation method; According to the model performance, select the optimal parameter combination to retrain the random forest model; Testing the random forest model on the test set and recording performance indicators; The random forest model is optimized according to the performance index to generate the pattern recognition model.

8. A broadband oscillation pattern recognition device, characterized in that: include: An acquisition module, for acquiring broadband oscillation data of different oscillation modes in a new energy grid; A dimension reduction module, which divides the broadband oscillation data into a plurality of segments of equal length, calculates an average value or a characteristic value of each segment of the broadband oscillation data, and obtains the broadband oscillation data after dimension reduction; A clustering module, using a k-Shape clustering algorithm to classify the broadband oscillation data to generate a classified broadband oscillation data set; A training module randomly extracts samples from each category of the broadband oscillation data set as training data for a random forest model, and trains the random forest model to obtain a pattern recognition model; The recognition module performs dimension reduction processing on the broadband oscillation data after dimension reduction, and inputs the data into the pattern recognition model to obtain the oscillation pattern of the new broadband oscillation data.

9. A broadband oscillation pattern recognition device, characterized in that: include: Memory; A processor, used to retrieve from the memory a computer executable program of a method for identifying a broadband oscillation pattern according to any one of claims 1 to 7, and execute: obtaining broadband oscillation data of different oscillation modes in a new energy grid; dividing the broadband oscillation data into a plurality of segments of equal length, calculating an average value or a characteristic value of each segment of the broadband oscillation data, and obtaining the broadband oscillation data after dimensionality reduction; and classifying the broadband oscillation data using a k-Shape clustering algorithm to generate a classified broadband oscillation data set; Randomly extract samples from each category of the broadband oscillation data set as training data for the random forest model, and train the random forest model to obtain a pattern recognition model; perform dimensionality reduction processing on the broadband oscillation data after dimensionality reduction, and input it into the pattern recognition model to obtain the oscillation pattern of the new broadband oscillation number.

10. A storage medium, characterized in that: include: A computer executable program is stored, and the computer executable program is used to be called by a processor to execute the steps of a broadband oscillation pattern recognition method as claimed in any one of claims 1 to 7.

Citation Information

Cited By

  • Broadband oscillation classification method based on deep reinforcement learning and pattern mining

    CN119513670A

  • Wideband Oscillation Classification Method Based on Deep Reinforcement Learning and Pattern Mining

    CN119513670B

  • Method and device for identifying modal continuity of multi-modal oscillation data

    CN120705622A