New energy station primary frequency modulation optimization system and method and medium

By using the XGBoost algorithm for load prediction and integrated frequency modulation control in new energy stations, the problem of frequency modulation response lag in traditional methods is solved, faster and more accurate frequency adjustment is achieved, and the stability of the power system is enhanced.

CN120090224AActive Publication Date: 2025-06-03WUHAN NARI LIABILITY OF STATE GRID ELECTRIC POWER RES INST

Patent Information

Application Number
CN202510033584.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-06-03
Estimated Expiration
2045-01-09

AI Technical Summary

Technical Problem

Traditional load prediction methods and primary frequency regulation control strategies cannot accurately predict instantaneous frequency, resulting in lag in the frequency regulation response of new energy stations, which cannot effectively offset the frequency deviation, affecting the safe and stable operation of the system.

Method used

The ultimate gradient boost (XGBoost) algorithm is used to perform integrated load prediction, capture the nonlinear characteristics of load changes, and provide the variance of the prediction results. It is applied to the frequency modulation strategy to prepare for frequency modulation in advance to avoid frequency exceeding the limit.

Benefits of technology

The frequency regulation response speed and frequency regulation capabilities of new energy stations have been improved, the stability of the power system has been enhanced, and the frequency exceeds the limit is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120090224A_ABST
    Figure CN120090224A_ABST
Patent Text Reader

Abstract

The invention discloses a primary frequency modulation optimization system and method for a new energy station and a medium. The method comprises the following steps: performing principal component analysis on to-be-measured historical data to obtain dimension-reduced historical data; training a plurality of XGBoost models by using a sample set formed by the historical data after dimension reduction, obtaining data to be measured at the current moment, inputting the data to be measured at the current moment into the trained XGBoost models for net load prediction, and obtaining a predicted net load at the next moment; obtaining an expected value and a standard deviation of the predicted net load at the next moment according to the distribution of the predicted net load at the next moment, calculating a net load variable quantity at the next moment according to the expected value of the predicted net load at the next moment and the net load at the current moment, and calculating a frequency deviation according to the net load variable quantity at the next moment and an equivalent inertia constant; and performing frequency modulation control according to the frequency deviation and the standard deviation of the predicted net load at the next moment. According to the invention, high-precision prediction is carried out on the load by using the extreme gradient lifting algorithm, the frequency modulation response speed of the new energy generator set is improved, and the accuracy of frequency regulation is also enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of primary frequency regulation of new energy power stations in the field of electrical engineering, and particularly relates to a primary frequency regulation optimization system and method and medium for a new energy power station, and more particularly to a primary frequency regulation optimization system and method and medium for a new energy power station based on machine learning net load prediction. Background Art

[0002] With the continuous growth of global energy demand and the improvement of environmental awareness, new energy power generation technologies (such as wind energy and solar energy power generation) have developed rapidly. The large-scale access of these new energies has increased the proportion of clean energy in the power system and effectively reduced the dependence on fossil fuels. However, due to the randomness, intermittency and volatility of new energy power generation, its output power is easily significantly affected by meteorological conditions, thus bringing new challenges to the stable operation of the power system.

[0003] In a power system, frequency stability is an important indicator to measure the operation quality of the system. As the primary means to maintain system frequency stability, primary frequency regulation relies on the automatic adjustment of the active power output of generator sets to balance the mismatch between load and power generation. Traditional primary frequency regulation strategies mainly rely on conventional power sources such as thermal power and hydropower. These power sources have a large rotational inertia and good regulation performance, and can better maintain frequency stability. However, with the continuous increase in the proportion of new energy power generation, the equivalent inertia of the system decreases, and the frequency regulation ability of traditional power sources gradually becomes insufficient, making it difficult to meet the frequency stability requirements of the system under the condition of high proportion of new energy access.

[0004] Currently, new energy power stations usually adopt a primary frequency regulation control strategy with fixed parameters. This method does not fully consider the dynamic changes of the load and the randomness of new energy power generation output, resulting in a lag in frequency regulation response and being unable to effectively offset the frequency deviation, affecting the safe and stable operation of the system. In addition, traditional load prediction methods (such as time series analysis, grey model, etc.) are difficult to accurately capture the non-linear and random characteristics in load changes, and the prediction accuracy is limited, further increasing the complexity of frequency regulation work. And the prediction scheme based on machine learning usually only provides a single point value of the prediction result, and cannot determine the error range of the prediction. Summary of the Invention

[0005] The object of the present invention is to address the problem that the prediction accuracy of traditional load forecasting methods and primary frequency regulation control strategies in the prior art is limited, resulting in the inability to accurately predict the instantaneous frequency. Therefore, a primary frequency regulation optimization system, method and medium for a new energy power station are proposed. The present invention uses the Extreme Gradient Boosting (XGBoost) algorithm for integrated load forecasting, which can better capture the non-linear characteristics of load changes, provide the variance of the prediction results at the same time, and apply the prediction results to the frequency regulation strategy, so as to make frequency regulation preparations in advance and avoid the occurrence of frequency over-limit situations. By combining advanced machine learning algorithms and improved frequency regulation control strategies, the present invention effectively improves the frequency regulation response speed and frequency regulation ability of the new energy power station and enhances the stability of the power system.

[0006] To achieve this object, a primary frequency regulation optimization system for a new energy power station designed in the first aspect of the present invention includes a feature engineering processing module, a load forecasting module, and a frequency regulation control module;

[0007] The feature engineering processing module is used to perform principal component analysis on the historical meteorological data and historical load data of the power station to be measured, and obtain the historical meteorological data and historical load data after dimensionality reduction;

[0008] The load forecasting module is used to draw with replacement from the historical meteorological data and historical load data after dimensionality reduction to form a number of sample sets, and train the corresponding XGBoost models with the number of sample sets respectively to obtain a number of trained XGBoost models. Perform principal component analysis on the real-time meteorological data and real-time load data to obtain the real-time meteorological data and real-time load data after dimensionality reduction, and input the real-time meteorological data and real-time load data after dimensionality reduction into the corresponding number of trained XGBoost models respectively for net load forecasting to obtain a number of predicted net loads at the next moment;

[0009] The frequency regulation control module obtains the expected value and standard deviation of the predicted net load at the next moment through the distribution of the number of predicted net loads at the next moment, calculates the net load change amount at the next moment according to the expected value of the predicted net load at the next moment and the real-time net load at the current moment, and calculates the frequency deviation of the system to be frequency regulated according to the net load change amount at the next moment and the equivalent inertia constant, and performs frequency regulation control through the frequency deviation of the system to be frequency regulated and the standard deviation of the predicted net load at the next moment.

[0010] Preferably, the specific method for performing principal component analysis on the historical meteorological data and historical load data of the station to be measured to obtain the reduced-dimensional historical meteorological data and historical load data is as follows: Standardize the historical meteorological data and historical load data of the station to be measured to obtain the standardized data, calculate the covariance matrix of the data using the standardized data, and perform eigenvalue decomposition on the covariance matrix of the data to obtain the eigenvalues and corresponding eigenvectors of each principal component. Calculate the variance contribution rate of each principal component using the eigenvalues of each principal component. Sort the eigenvalues to be obtained from largest to smallest. If the sum of the variance contribution rates of the current k principal components reaches the set threshold, then the first k principal components are the selected principal components, and project the standardized data onto the selected principal components to obtain the reduced-dimensional historical meteorological data and historical load data.

[0011] More preferably, the calculation formula for standardizing the historical meteorological data and historical load data of the station to be measured to obtain the standardized data is as shown in the following formula:

[0012]

[0013] In the formula, Z i is the characteristic variable after standardizing the historical meteorological data or historical load data, X i is the characteristic variable of the historical meteorological data or historical load data, μ is the mean value of the corresponding historical meteorological data or historical load data, and σ is the standard deviation of the corresponding historical meteorological data or historical load data;

[0014] The calculation formula for calculating the covariance matrix of the data using the standardized data is as shown in the following formula:

[0015]

[0016] In the formula, Z Cov is the covariance matrix to be obtained, n is the total number of sample points of the collected historical meteorological data and historical load data, the matrix Z is the matrix composed of the standardized characteristic variables Z i and Z T is the transpose matrix of the matrix Z;

[0017] The calculation formula for performing eigenvalue decomposition on the covariance matrix of the data to obtain the eigenvalues and corresponding eigenvectors of each principal component is as shown in the following formula:

[0018] Z Cov ·v = λ·v

[0019] In the formula, Z Cov is the covariance matrix to be obtained, v is the eigenvector to be obtained, and λ is the eigenvalue to be obtained;

[0020] The calculation formula for calculating the variance contribution rate of each principal component using the eigenvalue of each principal component is as follows:

[0021]

[0022] In the formula, V i is the variance contribution rate of the i-th principal component, λ i is the eigenvalue of the i-th principal component, n is the total number of principal components, and λ j is the eigenvalue of the j-th principal component;

[0023] When the sum of the variance contribution rates of several principal components reaches a set threshold, the specific method for the several principal components to be the selected principal components is: sort the eigenvalues to be calculated from largest to smallest. When the sum of the variance contribution rates of the first k principal components reaches the set threshold, the first k principal components are the selected principal components. The calculation formula for the sum of the variance contribution rates of the first k principal components is as follows:

[0024]

[0025] In the formula, V Σ,k is the cumulative variance contribution rate of the first k principal components, V i is the variance contribution rate of the i-th principal component, and k is the number of selected principal components;

[0026] The formula for projecting the standardized data onto the selected principal components to obtain the dimension-reduced historical meteorological data and historical load data is as follows:

[0027] Y = Z · W

[0028] In the formula, Y is the dimension-reduced historical meteorological data and historical load data, Z is the matrix composed of the standardized characteristic variables Z i and W is the matrix composed of the eigenvectors corresponding to the selected principal components.

[0029] Preferably, the objective function of the XGBoost model includes a loss function and a regularization term. Among them, the calculation formula of the loss function is as follows:

[0030]

[0031] In the formula, L oss represents the loss function of the XGBoost model, y i is the actual dependent variable load value of the i-th data point, is the predicted value of the dependent variable load of the i-th data point, and n is the total number of sample points of the collected historical meteorological data and historical load data;

[0032] The calculation formula of the regularization term is as follows:

[0033]

[0034] Wherein, Ω represents the regularization term of the XGBoost model, γ represents the penalty term for splitting, λ represents the L2 regularization term, T is the number of leaf nodes of the decision tree, and ω j is the weight of the j-th leaf node;

[0035] The calculation formula for the split gain of nodes in the decision tree of the XGBoost model is as follows:

[0036]

[0037] Wherein, G represents the split gain of nodes in the decision tree, and g i represents the first derivative of the loss function L oss with respect to the predicted value h i represents the first derivative of the loss function L oss with respect to the predicted value γ represents the penalty term for splitting, λ represents the L2 regularization term, I represents the current sample set, and I L represents the sample set of the left subtree, and I R represents the sample set of the right subtree.

[0038] More preferably, the load prediction module optimizes the hyperparameters of the XGBoost model through the Bayesian algorithm, and trains the corresponding XGBoost models with the several sample sets respectively to obtain several trained XGBoost models.

[0039] Further preferably, the specific method for optimizing the hyperparameters of the XGBoost model using the Bayesian algorithm is: constructing a surrogate model equivalent to the objective function of the XGBoost model, using the surrogate model to select the next sampling point to continuously optimize the objective function of the XGBoost model, and using a Gaussian process as the surrogate model. The relationship between the surrogate model and the objective function of the XGBoost model is as follows:

[0040] f(x)~G(m(x), k(x, x)) x∈R d

[0041] Wherein, f(x) represents the objective function of the XGBoost model, G(m(x), k(x, x')) represents the Gaussian function, m(x) represents the mean function, k(x, x') represents the covariance function, x and x' respectively represent two hyperparameter sets of the XGBoost model to be optimized, where x is the hyperparameter set of the XGBoost model being optimized, and x' is the hyperparameter set of another XGBoost model waiting to be optimized, and R dis the hyperparameter decision space, d is the decision dimension, and ~ represents that the random variable follows a Gaussian distribution;

[0042] In the process of using the surrogate model to select the next sampling point to continuously optimize the objective function of the XGBoost model, expected improvement is used as the acquisition function to guide the selection of the hyperparameter sampling points of the XGBoost model, and its relationship is as follows:

[0043] EI(x) = E[max(f(x) - f(x + ), 0)]

[0044] In the formula, EI(x) represents the expected improvement function, E represents the expected calculation operation, f(x + ) represents the optimal set in the hyperparameter set of the XGBoost model being optimized, f(x) represents the objective function of the XGBoost model, and x is the hyperparameter set of the XGBoost model being optimized.

[0045] Preferably, the calculation formulas for the expected value and standard deviation of the predicted net load at the next moment are obtained from the distributions of the predicted net loads at several next moments as shown in the following formula:

[0046]

[0047] In the formula, μ t is the expected value of the predicted net load at the next moment, B is the number of bootstrap times, that is, the number of trained XGBoost models, is the predicted power at the next moment obtained by the i-th trained XGBoost model, and σ t is the standard deviation of the predicted net load at the next moment.

[0048] Preferably, the calculation formula for calculating the net load change amount at the next moment according to the expected value of the predicted net load at the next moment and the real-time net load at the current moment is as shown in the following formula:

[0049] Δμ t = μ t - P t-1

[0050] In the formula, Δμ t is the net load change amount at the next moment, μ t is the expected value of the predicted net load at the next moment, and P t-1 is the real-time net load at the current moment;

[0051] The formula for calculating the frequency deviation of the system to be frequency-regulated according to the net load change amount at the next moment and the equivalent inertia constant is as follows:

[0052]

[0053] In the formula, is the frequency deviation of the system to be frequency - modulated, Δμ t is the change in net load at the next moment, and H is the equivalent inertia constant of the system;

[0054] The calculation formula for frequency - modulation control through the frequency deviation of the system to be frequency - modulated and the standard deviation of the predicted net load at the next moment is shown as follows:

[0055]

[0056] In the formula, ΔP t is the primary frequency - modulation power adjustment amount, K is the frequency - modulation gain coefficient, is the frequency deviation of the system to be frequency - modulated, α is the load variance gain coefficient, σ t is the standard deviation of the predicted net load at the next moment.

[0057] A new - energy power station primary frequency - modulation optimization method designed in the second aspect of the present invention includes the following:

[0058] Perform principal - component analysis on the historical meteorological data and historical load data of the power station to be measured, and obtain the historical meteorological data and historical load data after dimensionality reduction;

[0059] Sample with replacement from the historical meteorological data and historical load data after dimensionality reduction to form a number of sample sets, and train the corresponding XGBoost models with the number of sample sets respectively to obtain a number of trained XGBoost models. Perform principal - component analysis on the real - time meteorological data and real - time load data to obtain the real - time meteorological data and real - time load data after dimensionality reduction, and input the real - time meteorological data and real - time load data after dimensionality reduction into the corresponding number of trained XGBoost models respectively for net - load prediction to obtain a number of predicted net loads at the next moment;

[0060] Obtain the expected value and standard deviation of the predicted net load at the next moment through the distribution of the number of predicted net loads at the next moment, calculate the change in net load at the next moment according to the expected value of the predicted net load at the next moment and the real - time net load at the current moment, calculate the frequency deviation of the system to be frequency - modulated according to the change in net load at the next moment and the equivalent inertia constant, and perform frequency - modulation control through the frequency deviation of the system to be frequency - modulated and the standard deviation of the predicted net load at the next moment.

[0061] A computer - readable storage medium designed in the third aspect of the present invention stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method described above.

[0062] The beneficial effects of the present invention:

[0063] (1) The present invention significantly enhances the model's ability to represent input data through PCA (Principal Component Analysis). PCA effectively extracts the main features in the load data, reduces the data dimension, removes noise and irrelevant features, thereby simplifying the model complexity and improving the computational efficiency. This feature selection technique enables the model to maintain high prediction accuracy and stability when facing large-scale data. At the same time, simplifying the data can reduce the possibility of model overfitting, improving the model's generalization ability and prediction accuracy.

[0064] (2) The present invention adopts an XGBoost integrated prediction model based on the bootstrap inference method. This model can not only provide the single-point load prediction value of the sample to be measured, but also output the variance of this prediction value, thereby providing a confidence interval. This feature enables the model to evaluate the uncertainty of the prediction, providing richer information support for the frequency modulation decision. Through the variance analysis of the prediction results, the system can effectively identify potential prediction errors, enhance the resistance to prediction uncertainty, avoid the failure of frequency modulation measures caused by noise interference at a single prediction point, and ultimately avoid the problem of system frequency over-limit. The advantage of this model is that it improves the prediction accuracy and robustness through the integrated learning method, making the new energy power station more flexible and stable in dealing with frequency fluctuations. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 is a structural block diagram of a primary frequency modulation optimization system for a new energy power station according to an embodiment of the present invention;

[0066] Figure 2 is an operation schematic diagram of the bootstrap inference method in the present invention;

[0067] Figure 3 is a flowchart of the Bayesian optimization algorithm in the present invention;

[0068] Figure 4 is a flowchart of a primary frequency modulation optimization method for a new energy power station according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0069] The following further describes the present invention in detail with reference to the drawings and specific embodiments:

[0070] Embodiment 1

[0071] A primary frequency modulation optimization system for a new energy power station, as Figure 1 shown, it includes a feature engineering processing module, a load prediction module, and a frequency modulation control module;

[0072] The feature engineering processing module is used to perform principal component analysis on the historical meteorological data and historical load data of the power station to be measured, obtaining the dimension-reduced historical meteorological data and historical load data;

[0073] The load prediction module is used to extract with replacement from the historical meteorological data and historical load data after dimensionality reduction to form several sample sets, and train the corresponding XGBoost models with the several sample sets to obtain several trained XGBoost models, obtain the real-time meteorological data and real-time load data of the station to be tested at the current moment, and perform principal component analysis on the real-time meteorological data and real-time load data to obtain the real-time meteorological data and real-time load data after dimensionality reduction, and input the real-time meteorological data and real-time load data after dimensionality reduction into the corresponding several trained XGBoost models to perform net load prediction, and obtain several predicted net loads at the next moment;

[0074] The frequency modulation control module obtains the expected value and standard deviation of the predicted net load at the next moment through the distribution of the predicted net loads at the next moment, calculates the net load change at the next moment according to the expected value of the predicted net load at the next moment and the real-time net load at the current moment (obtained through telemetry), calculates the frequency deviation of the system to be frequency regulated according to the net load change at the next moment and the equivalent inertia constant, and performs frequency control through the frequency deviation of the system to be frequency regulated and the standard deviation of the predicted net load at the next moment.

[0075] In the above technical solution, the system also includes a data collection and processing module, which is used to collect various data related to load forecasting and normalize the data. In this article, the various data related to load forecasting include historical meteorological data (such as temperature, humidity, rainfall, wind speed, etc.) and historical load data (historical load data of the whole year or longer in the area to be predicted, including timestamps and load values), etc. Specifically, the historical meteorological data can be obtained through meteorological stations or archived data, etc., to reflect the relevant situation of new energy power generation, and the historical load data can be collected through smart meters, load monitoring systems, etc., and the time range covers historical load changes.

[0076] In the process of data collection, in order to ensure the integrity and continuity of the data, linear interpolation is used to fill in the missing data, and its expression is as follows:

[0077]

[0078] Where, X t is the missing data at time t, X t-1 is the data at time t-1, X t+1 is the data at time t+1.

[0079] After completing the data, the 3σ principle is used to detect and remove outliers. A data point should be removed if and only if it satisfies the following expression:

[0080] |Xt -μ X || > 3σ X

[0081] where X t is the missing data at time t, and μ X is the data mean; σ X is the standard deviation of the data.

[0082] After collecting the data, to ensure data consistency and reduce model bias, min-max normalization is used for data standardization, that is, data normalization operation, and its expression is as follows:

[0083]

[0084] where X norm is the normalized data point, X min and X max are the minimum and maximum values in the original data respectively, and X is the original data point. By scaling all data points between 0 and 1, standardization helps to maintain the relative relationship between data, and this process can also effectively prevent the situation of low model training efficiency or instability caused by too large differences in variable scales.

[0085] In the above technical solution, the feature engineering processing module further includes performing a smoothing periodic transformation on the periodic variables in the time series of historical meteorological data and historical load data, and its specific method usually uses a sine function to implement, and the expression is as follows:

[0086]

[0087] where Y sin is the sine value after the transformation of the data point, representing the periodic attribute of the original data, Y is the periodic data to be transformed, such as time, month, etc., Y max is the maximum value of the data to be transformed, such as 23h, December, etc. Performing a smoothing periodic transformation on the periodic variables in the time series can enable the model to better understand and utilize the periodic features in the data, and avoid adverse effects on the model prediction ability caused by numerical jumps such as from 23h to 0h.

[0088] In the above technical solution, in order to reduce the dimension of the data and reduce the model complexity and the possibility of overfitting, it is necessary to reduce the dimension of the data using the PCA technique, that is, to perform principal component analysis on the historical meteorological data and historical load data of the station to be measured. The specific method for obtaining the reduced-dimensional historical meteorological data and historical load data is as follows: standardize the historical meteorological data and historical load data of the station to be measured to obtain the standardized data, calculate the covariance matrix of the data using the standardized data, and perform eigenvalue decomposition on the covariance matrix of the data to obtain the eigenvalues and corresponding eigenvectors of each principal component. Calculate the variance contribution rate of each principal component using the eigenvalues of each principal component. When the sum of the variance contribution rates of several principal components reaches a set threshold, the several principal components are the selected principal components, and project the standardized data onto the selected principal components to obtain the reduced-dimensional historical meteorological data and historical load data.

[0089] In this article, the original high-dimensional data is transformed into a new set of uncorrelated variables, which are called principal components. These principal components are sorted according to their contribution to the data variance, so as to achieve the purpose of data dimensionality reduction, noise reduction and feature extraction.

[0090] In the above technical solution, the historical meteorological data and historical load data of the station to be measured are standardized so that the mean of each feature is 1 and the standard deviation is 1. The calculation formula for the standardized data is shown in the following formula:

[0091]

[0092] In the formula, Z i is the characteristic variable after standardization of the historical meteorological data or historical load data, X i is the characteristic variable of the historical meteorological data or historical load data, μ is the mean of the corresponding historical meteorological data or historical load data, and σ is the standard deviation of the corresponding historical meteorological data or historical load data.

[0093] In the above technical solution, after standardization, calculate the covariance matrix of the data to understand the correlation between each feature. The calculation formula for calculating the covariance matrix of the data using the standardized data is shown in the following formula:

[0094]

[0095] In the formula, Z Cov is the covariance matrix to be calculated, n is the total number of sample points of the collected historical meteorological data and historical load data, the matrix Z is the matrix composed of the standardized characteristic variables Z i , and Z T is the transpose matrix of the matrix Z.

[0096] In the above technical solution, the covariance matrix of the data is subjected to eigenvalue decomposition, and the calculation formulas for the eigenvalues and corresponding eigenvectors of each principal component are as shown in the following formula:

[0097] Z Cov ·v = λ·v

[0098] In the formula, Z Cov is the covariance matrix to be solved, v is the eigenvector to be solved, and λ is the eigenvalue to be solved. The eigenvalue represents the importance of each principal component, and the eigenvector represents the direction of the principal component.

[0099] In the above technical solution, the calculation formula for calculating the variance contribution rate of each principal component using the eigenvalue of each principal component is as shown in the following formula:

[0100]

[0101] In the formula, V i is the variance contribution rate of the principal component i, λ i is the eigenvalue of the i-th principal component, n is the total number of principal components, and λ j is the eigenvalue of the j-th principal component. The eigenvalue reflects the magnitude of the variance that the corresponding eigenvector (principal component) can explain. The larger the eigenvalue, the greater the variability of the principal component in the data and the greater its role. The variance contribution rate represents the proportion of each principal component among all principal components.

[0102] In the above technical solution, in order to select an appropriate number of principal components, the cumulative variance contribution rate is usually calculated. The cumulative variance contribution rate refers to the sum of the variance contribution rates of the first k principal components, that is, the prefix sum of the variance contribution rates. The specific method for selecting an appropriate number of principal components is as follows: When the sum of the variance contribution rates of several principal components reaches a set threshold, then the several principal components are the selected principal components. The specific method is: Sort the eigenvalues to be solved from large to small. When the sum of the variance contribution rates of the first k principal components reaches the set threshold, then the first k principal components are the selected principal components. The calculation formula for the sum of the variance contribution rates of the first k principal components is as follows:

[0103]

[0104] In the formula, V Σ,k is the cumulative variance contribution rate of the first k principal components, V i is the variance contribution rate of the principal component i, and k is the number of selected principal components. In this article, the set threshold is usually set to 80% or 90%.

[0105] In the above technical solution, the standardized data is projected onto the selected principal components, and the calculation formulas for the dimension-reduced historical meteorological data and historical load data are as follows:

[0106] Y = Z·W

[0107] Wherein, Y is the historical meteorological data and historical load data after dimensionality reduction, Z is the matrix composed of the standardized feature variable Z i matrix, and W is the matrix composed of the eigenvectors corresponding to the selected principal components. Thus, through linear transformation, the data is mapped from the high-dimensional space to the low-dimensional space while retaining as much variability of the original data as possible.

[0108] In this paper, sampling with replacement from the historical meteorological data and historical load data after dimensionality reduction means that after each sample is drawn, it is put back into the sample set so that the sample still has a chance to be drawn in the next draw.

[0109] In this paper, performing principal component analysis on the real-time meteorological data and real-time load data to obtain the real-time meteorological data and real-time load data after dimensionality reduction has the same feature engineering as when processing historical meteorological data and historical load data in the feature engineering processing module and retains the same principal components.

[0110] In the above technical solution, the core mechanism of the XGBoost model is to gradually build multiple decision trees, and the goal of each tree is to correct the prediction error of the previous tree. First, it is necessary to clarify the objective function of the XGBoost algorithm, which is composed of a loss function and a regularization term. The specific form of the objective function of the XGBoost model is as follows:

[0111] F = L oss + Ω

[0112] Wherein, F represents the objective function of the XGBoost model, and L oss represents the loss function of the XGBoost model. The loss function L oss is used to measure the difference between the predicted value and the true value of the model, and Ω represents the regularization term of the XGBoost model. The regularization term Ω is used to control the complexity of the model to avoid overfitting.

[0113] In the above technical solution, the calculation formula of the loss function L oss is shown as follows:

[0114]

[0115] Wherein, L oss represents the loss function of the XGBoost model, y i is the actual dependent variable load value of the i-th data point, is the predicted value of the dependent variable load of the i-th data point, and n is the total number of sample points of the collected historical meteorological data and historical load data;

[0116] In the above technical solution, the calculation formula of the regularization term Ω is shown as follows:

[0117]

[0118] In the formula, Ω represents the regularization term of the XGBoost model, γ represents the penalty term for splitting, λ represents the L2 regularization term, T is the number of leaf nodes of the decision tree, and ω j is the weight of the j-th leaf node, and ω j ^2 represents the L 2 norm of the leaf output score.

[0119] The construction of the tree in the XGBoost model is the core part of the algorithm. This process involves the gradual construction and splitting of the decision tree. At each step, the algorithm will select the best splitting point to add a new tree. This process is based on the splitting gain of the nodes in the decision tree. In the above technical solution, the calculation formula of the splitting gain of the nodes in the decision tree of the XGBoost model is:

[0120]

[0121] In the formula, G represents the splitting gain of the nodes in the decision tree, and g i represents the first-order derivative of the loss function L oss with respect to the predicted value , and h i represents the second-order derivative of the loss function L oss with respect to the predicted value . Both the first-order derivative and the second-order derivative are for each data point i, reflecting the sensitivity of the model to the prediction error of each data point at the current node; γ represents the penalty term for splitting, which is used to control the judgment of whether to perform node splitting in the decision tree. When the splitting gain is less than γ, splitting will not occur. This helps to avoid overfitting and control the complexity of the model. λ represents the L2 regularization term (the penalty factor for weights), which prevents the model from being too complex by penalizing the weights of the leaf nodes and plays a role in regularization. I represents the current sample set, I L represents the sample set of the left subtree, I R represents the sample set of the right subtree, I L and I R are divided according to the splitting rule considered currently. The core idea of this formula is to evaluate the utility of splitting by comparing the reduction of the error before and after splitting, and provides a standard for XGBoost to decide how to construct the decision tree by quantifying the actual improvement brought by splitting.

[0122] In the above technical solution, the bootstrap inference method is used, such as Figure 2As shown, samples are drawn with replacement from the dimension-reduced historical meteorological data and historical load data to form a number of sample sets, and the number of sample sets are respectively used to train a number of XGBoost models to obtain a number of trained XGBoost models.

[0123] In this paper, the XGBoost model supports a variety of optimization methods and can be updated using Newton's method. The specific formula is as follows:

[0124]

[0125] In the formula, θ t+1 represents the parameter set at the (t + 1)-th time, θt represents the parameter set at the t-th time, g represents the first-order derivative of the loss function with respect to the predicted value, h represents the second-order derivative of the loss function with respect to the predicted value, and λ represents the L2 regularization term.

[0126] In the above technical solution, the Bayesian Optimization (BO) algorithm is used to optimize each model hyperparameter. As Figure 3 shown, the BO algorithm is a commonly used hyperparameter tuning algorithm that can effectively balance efficiency and effectiveness, find a better hyperparameter combination with fewer computing resources and time, and optimize the model performance to the optimal. Its core idea is to construct a surrogate model to approximate the objective function, and then use the surrogate model to select the location of the next sampling, thereby continuously optimizing the objective function. Since the relationship between the loss function and the hyperparameters involves the prediction of XGBoost and is difficult to explain by analytical methods, it is usually assumed that the objective function is a stochastic process and estimated through finite sampling. A Gaussian process is used as the surrogate model, and its expression mechanism for the objective function is as follows:

[0127] f(x) ∼ G(m(x), k(x, x')) x ∈ R d

[0128] In the formula, f(x) represents the objective function of the XGBoost model, G(m(x), k(x, x')) represents the Gaussian function, m(x) represents the mean function, k(x, x') represents the covariance function, x and x' respectively represent two hyperparameter sets of the XGBoost model to be optimized, where x is the hyperparameter set of the XGBoost model being optimized, x' is the hyperparameter set of another XGBoost model waiting to be optimized, R d is the hyperparameter decision space, d is the decision dimension, and ∼ represents that the random variable follows a Gaussian distribution.

[0129] In this paper, the statistical meanings of the mean function m(x) and the covariance function k(x, x') are shown in the following formulas respectively:

[0130] m(x) = E[f(x)]

[0131] In the formula, m(x) represents the mean function, f(x) represents the objective function of the XGBoost model, and E represents the expectation calculation operation. In this article, the expectation calculation operation conforms to the general mathematical definition, that is:

[0132]

[0133] In the formula, p(f(x)) represents the probability distribution function of f(x), that is, in the Bayesian optimization process, the objective function f(x) follows a certain Gaussian process prior distribution G.

[0134] k(x, x') = E[(f(x) - m(x))(f(x') - m(x'))]

[0135] In the formula, k(x, x') represents the covariance function, x and x' respectively represent two sets of hyperparameters of the XGBoost model to be optimized, where x is the set of hyperparameters of the XGBoost model being optimized, x' is the set of hyperparameters of another XGBoost model waiting to be optimized, f(x) represents the objective function of the XGBoost model, m(x) represents the mean function, f(x') represents the value of the objective function at x', and m(x') represents the value of the mean function at x'.

[0136] In the decision-making process, expected improvement is used as the acquisition function to guide the selection of hyperparameter sample points and balance the exploration and exploitation of the algorithm. Specifically, expected improvement is used as the acquisition function to guide the selection of hyperparameter sampling points of the XGBoost model, and its relationship is as follows:

[0137] EI(x) = E[max(f(x) - f(x + ), 0)]

[0138] In the formula, EI(x) represents the expected improvement function, E represents the expectation calculation operation, f(x + ) represents the optimal set in the set of hyperparameters of the XGBoost model being optimized, f(x) represents the objective function of the XGBoost model, and x is the set of hyperparameters of the XGBoost model being optimized.

[0139] In the above technical solution, the values predicted by different XGBoost models are different. Using these predicted values to simulate the calculation distribution, that is, calculating the mean and variance of the predicted values. Specifically, the calculation formulas for the expected value and standard deviation of the predicted net load at the next moment are obtained from the distribution of the predicted net loads at the several next moments as shown in the following formula:

[0140]

[0141] where μ t is the expected value of the predicted net load at the next moment, B is the number of bootstrap times, that is, the number of trained XGBoost models, is the predicted power at the next moment obtained by the i-th trained XGBoost model, and σ t is the standard deviation of the predicted net load at the next moment.

[0142] In the above technical solution, the calculation formula for calculating the change amount of the net load at the next moment according to the expected value of the predicted net load at the next moment and the real-time net load at the current moment is shown in the following formula:

[0143] Δμ t = μ t - P t-1

[0144] where Δμ t is the change amount of the net load at the next moment, μ t is the expected value of the predicted net load at the next moment, and P t-1 is the real-time net load at the current moment, and P t-1 is measured by telemetry of the grid operator.

[0145] In the above technical solution, the formula for calculating the frequency deviation of the system to be frequency modulated according to the change amount of the net load at the next moment and the equivalent inertia constant is as follows:

[0146]

[0147] where is the frequency deviation of the system to be frequency modulated, Δμ t is the change amount of the net load at the next moment, H is the equivalent inertia constant of the system, which reflects the inertial response ability of the system to frequency changes. The equivalent inertia constant depends on the actual setting and is an input value. In this article, the equivalent inertia constant can be taken as 2s * rated capacity. For example, for 100 MW, it is 200 s * MW.

[0148] In the above technical solution, the calculation formula for frequency modulation control through the frequency deviation of the system to be frequency modulated and the standard deviation of the predicted net load at the next moment is shown in the following formula:

[0149]

[0150] where ΔP t is the primary frequency modulation power adjustment amount, and K is the frequency modulation gain coefficient, which determines the intensity of the frequency modulation response. In this article, the frequency modulation gain coefficient can be taken as 200 s * MW, is the frequency deviation of the system to be frequency - modulated, α is the load variance gain coefficient, which reflects the influence degree of load prediction uncertainty on frequency - modulation control. In this paper, the load variance gain coefficient can take the value of 1 (should be set according to simulation, set arbitrarily here), and σ t is the standard deviation of the predicted net load at the next moment. By introducing the expected value and variance of the load, the frequency - modulation control can not only respond to the frequency deviation of the current system to be frequency - modulated, but also make adjustments in advance according to the load prediction, improve the timeliness and accuracy of the frequency - modulation response, and reduce the risk of frequency over - limit.

[0151] In the above - mentioned technical solution, the system further includes a control and feedback module. First, the adjusted target power generation is used as a control instruction and sent to the new - energy generator set through the control system interface to perform the power - adjustment operation to ensure that the generator set adjusts according to the instruction. Then, key parameters such as frequency, actual load, and output power are monitored in real time for feedback control.

[0152] Embodiment 2

[0153] An optimization method for primary frequency modulation of a new - energy power station yard, as Figure 4 shown, it includes the following steps:

[0154] Perform principal - component analysis on the historical meteorological data and historical load data of the yard to be measured to obtain the dimensionality - reduced historical meteorological data and historical load data;

[0155] Sample with replacement from the dimensionality - reduced historical meteorological data and historical load data to form a number of sample sets, and train the corresponding XGBoost models with the number of sample sets respectively to obtain a number of trained XGBoost models. Obtain the real - time meteorological data and real - time load data of the yard to be measured at the current moment, and perform principal - component analysis on the real - time meteorological data and real - time load data to obtain the dimensionality - reduced real - time meteorological data and real - time load data. Input the dimensionality - reduced real - time meteorological data and real - time load data into a number of trained XGBoost models respectively for net - load prediction to obtain a number of predicted net loads at the next moment;

[0156] Obtain the expected value and standard deviation of the predicted net load at the next moment through the distribution of the number of predicted net loads at the next moment. Calculate the net - load change amount at the next moment according to the expected value of the predicted net load at the next moment and the real - time net load at the current moment, and calculate the frequency deviation of the system to be frequency - modulated according to the net - load change amount at the next moment and the equivalent inertia constant. Perform frequency - modulation control through the frequency deviation of the system to be frequency - modulated and the standard deviation of the predicted net load at the next moment.

[0157] Embodiment 3

[0158] A computer-readable storage medium stores a computer program, characterized in that: when the computer program is executed by a processor, the steps of the above method are implemented.

[0159] The present invention uses XGBoost to perform high-precision prediction on the load, obtains the predicted value and confidence interval of the load, and applies the prediction result to the optimization of the primary frequency regulation strategy in real time. By predicting potential frequency fluctuations before the change in the net load, the system can take frequency regulation measures in advance, reduce the frequency fluctuations caused suddenly by the change in the net load, and thus enable the new energy power station to make preparations for frequency regulation in advance; this method enhances the frequency regulation response ability of the new energy generating units and improves the frequency stability of the power system by combining advanced machine learning algorithms and improved frequency regulation control strategies.

[0160] This strategy specifically targets the power output fluctuations common in new energy power generation, especially the frequency instability that may occur during the power ramp process. By performing frequency regulation in advance, the system can effectively shorten the frequency regulation delay and avoid frequency over-limit problems caused by untimely power fluctuations or power ramp regulation. This method greatly improves the frequency regulation response ability of the new energy power station, optimizes the frequency regulation efficiency, and ensures the safe and stable operation of the system under large-scale new energy access.

[0161] The content not described in detail in this specification belongs to the prior art well-known to those skilled in the art.

Claims

1. A new energy station primary frequency modulation optimization system, characterized by: It includes feature engineering processing module, load forecasting module and frequency modulation control module; The feature engineering processing module is used to perform principal component analysis on the historical meteorological data and historical load data of the station to be tested to obtain the historical meteorological data and historical load data after dimension reduction; The load forecasting module is used to extract with replacement from the reduced-dimensional historical meteorological data and historical load data to form a number of sample sets, and train the corresponding XGBoost models with the sample sets to obtain the trained XGBoost models, perform principal component analysis on the real-time meteorological data and the real-time load data to obtain the reduced-dimensional real-time meteorological data and the real-time load data, and input the reduced-dimensional real-time meteorological data and the real-time load data into the corresponding trained XGBoost models to perform net load forecasting to obtain the predicted net loads at the next moment; The frequency modulation control module obtains the expected value and standard deviation of the predicted net load at the next moment through the distribution of the predicted net loads at the next moment, calculates the net load change at the next moment according to the expected value of the predicted net load at the next moment and the real-time net load at the current moment, calculates the frequency deviation of the system to be frequency regulated according to the net load change at the next moment and the equivalent inertia constant, and performs frequency control through the frequency deviation of the system to be frequency regulated and the standard deviation of the predicted net load at the next moment.

2. The primary frequency modulation optimization system for new energy stations according to claim 1 is characterized in that: The specific method of performing principal component analysis on the historical meteorological data and historical load data of the station to be tested to obtain the historical meteorological data and historical load data after dimensionality reduction is as follows: performing data standardization on the historical meteorological data and historical load data of the station to be tested to obtain standardized data, using the standardized data to calculate the covariance matrix of the data, and performing eigenvalue decomposition on the covariance matrix of the data to obtain the eigenvalue and corresponding eigenvector of each principal component, using the eigenvalue of each principal component to calculate the variance contribution rate of each principal component, sorting the eigenvalues ​​to be calculated from large to small, and when the sum of the variance contribution rates of the current k principal components reaches the set threshold, the first k principal components are selected as the principal components, and the standardized data are projected onto the selected principal components to obtain the historical meteorological data and historical load data after dimensionality reduction.

3. The primary frequency modulation optimization system for new energy stations according to claim 2 is characterized in that: The historical meteorological data and historical load data of the station to be tested are standardized, and the calculation formula for the standardized data is as follows: In the formula, Z i is the characteristic variable after the historical meteorological data or historical load data is standardized, X i is the characteristic variable of historical meteorological data or historical load data, μ is the mean of the corresponding historical meteorological data or historical load data, and σ is the standard deviation of the corresponding historical meteorological data or historical load data; The formula for calculating the covariance matrix of the data using standardized data is as follows: In the formula, Z Cov is the covariance matrix to be determined, n is the total number of sample points of historical meteorological data and historical load data collected, and matrix Z is the standardized characteristic variable Z i The matrix composed of T is the transposed matrix of matrix Z; Perform eigenvalue decomposition on the covariance matrix of the data to obtain the eigenvalue of each principal component and the corresponding eigenvector calculation formula as shown below: Z Cov ·v=λ·v (3) In the formula, Z Cov is the covariance matrix to be determined, v is the eigenvector to be determined, and λ is the eigenvalue to be determined; The calculation formula for calculating the variance contribution rate of each principal component using the eigenvalue of each principal component is as follows: Where V i is the variance contribution rate of principal component i, λ i is the eigenvalue of the i-th principal component, n is the total number of principal components, λ j is the eigenvalue of the jth principal component; When the sum of the variance contribution rates of several principal components reaches a set threshold, the specific method for selecting the principal components is as follows: sort the eigenvalues ​​to be determined from large to small, and when the sum of the variance contribution rates of the current k principal components reaches the set threshold, the first k principal components are selected as the principal components, and the calculation formula for the sum of the variance contribution rates of the first k principal components is as follows: Where V Σ,k is the cumulative variance contribution rate of the first k principal components, V i is the variance contribution rate of principal component i, and k is the number of principal components selected; The standardized data is projected onto the selected principal component to obtain the calculation formula of the historical meteorological data and historical load data after dimension reduction as follows: Y=Z·W (6) In the formula, Y is the historical meteorological data and historical load data after dimension reduction, and Z is the standardized characteristic variable Z i W is a matrix composed of the eigenvectors corresponding to the selected principal components.

4. The primary frequency modulation optimization system for new energy stations according to claim 3 is characterized in that: The objective function of the XGBoost model includes a loss function and a regularization term, wherein the calculation formula of the loss function is as shown below: Where, L oss Represents the loss function of the XGBoost model, y i is the actual dependent variable loading value of the ith data point, is the dependent variable load forecast value of the ith data point, and n is the total number of sample points of the collected historical meteorological data and historical load data; The calculation formula of the regularization term is as follows: In the formula, Ω represents the regularization term of the XGBoost model, γ represents the penalty term for splitting, λ represents the L2 regularization term, T is the number of leaf nodes in the decision tree, ω j is the weight of the jth leaf node; The calculation formula for the split gain of a node in the decision tree of the XGBoost model is: In the formula, G represents the splitting gain of the node in the decision tree, g i Represents the loss function L oss About the predicted value The first derivative of i Represents the loss function L oss About the predicted value The second-order derivative of , γ represents the penalty term for splitting, λ represents the L2 regularization term, I represents the current sample set, I L Represents the sample set of the left subtree, I R Represents the sample set of the right subtree.

5. The primary frequency modulation optimization system for new energy stations according to claim 4 is characterized in that: The load forecasting module optimizes the XGBoost model hyperparameters through the Bayesian algorithm, trains the corresponding XGBoost models with the several sample sets respectively, and obtains several trained XGBoost models.

6. The primary frequency modulation optimization system for new energy stations according to claim 5 is characterized in that: The specific method of using the Bayesian algorithm to optimize the hyperparameters of the XGBoost model is as follows: construct a proxy model equivalent to the objective function of the XGBoost model, use the proxy model to select the next sampling point to continuously optimize the objective function of the XGBoost model, and use the Gaussian process as the proxy model. The relationship between the proxy model and the objective function of the XGBoost model is as follows: f(x)~G(m(x),k(x,x′)) x∈R d (10) Where f(x) represents the objective function of the XGBoost model, G(m(x), k(x, x')) represents the Gaussian function, m(x) represents the mean function, k(x, x') represents the covariance function, x and x' represent the two hyperparameter sets of the XGBoost model to be optimized, where x is the hyperparameter set of the XGBoost model being optimized, and x' is the hyperparameter set of another XGBoost model to be optimized. d is the hyperparameter decision space, d is the decision dimension, and ~ represents that the random variable follows a Gaussian distribution; In the process of using the proxy model to select the next sampling point to continuously optimize the objective function of the XGBoost model, the expected boost is used as the acquisition function to guide the selection of the hyperparameter sampling points of the XGBoost model, and the relationship is as follows: EI(x)=E[max(f(x)-f(x + ),0)] (11) Where EI(x) represents the expected improvement function, E represents the expected computation operation, and f(x + ) represents the optimal set of hyperparameters of the XGBoost model being optimized, f(x) represents the objective function of the XGBoost model, and x is the hyperparameter set of the XGBoost model being optimized.

7. The primary frequency regulation optimization system for new energy stations according to claim 6 is characterized in that: The calculation formula for obtaining the expected value and standard deviation of the predicted net load at the next moment by the distribution of the predicted net loads at the next moment is as follows: In the formula, μ t is the expected value of the net load predicted at the next moment, B is the number of bootstrap times, that is, the number of XGBoost models after training, is the next moment prediction power obtained by the i-th trained XGBoost model, σ t The standard deviation of the net load forecast for the next moment.

8. The primary frequency modulation optimization system for new energy stations according to claim 7 is characterized in that: The calculation formula for calculating the net load change at the next moment based on the expected value of the predicted net load at the next moment and the real-time net load at the current moment is as follows: Dm t =μ t -P t-1 (14) In the formula, Δμ t is the net load change at the next moment, μ t is the expected value of the net load predicted at the next moment, P t-1 The real-time net load at the current moment; The formula for calculating the frequency deviation of the system to be regulated based on the net load change at the next moment and the equivalent inertia constant is as follows: In the formula, is the frequency deviation of the system to be modulated, Δμ t is the net load change at the next moment, and H is the equivalent inertia constant of the system; The calculation formula for frequency regulation control based on the frequency deviation of the frequency regulation system and the standard deviation of the net load predicted at the next moment is as follows: Where ΔP t is the primary frequency modulation power adjustment, K is the frequency modulation gain coefficient, is the frequency deviation of the frequency-regulated system, α is the load variance gain coefficient, σ t The standard deviation of the net load forecast for the next moment.

9. A method for optimizing primary frequency regulation of a new energy station, characterized in that: It includes the following: Perform principal component analysis on the historical meteorological data and historical load data of the station to be tested to obtain the historical meteorological data and historical load data after dimension reduction; Extract with replacement from the reduced-dimensional historical meteorological data and historical load data to form several sample sets, and respectively train the corresponding XGBoost models with the several sample sets to obtain several trained XGBoost models, perform principal component analysis on the real-time meteorological data and real-time load data to obtain reduced-dimensional real-time meteorological data and real-time load data, and respectively input the reduced-dimensional real-time meteorological data and real-time load data into the corresponding several trained XGBoost models to perform net load prediction, and obtain several predicted net loads at the next moment; The expected value and standard deviation of the predicted net load at the next moment are obtained through the distribution of the predicted net loads at the next moment, the net load change at the next moment is calculated according to the expected value of the predicted net load at the next moment and the real-time net load at the current moment, and the frequency deviation of the system to be frequency regulated is calculated according to the net load change at the next moment and the equivalent inertia constant, and frequency control is performed through the frequency deviation of the system to be frequency regulated and the standard deviation of the predicted net load at the next moment.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 9 are implemented.

Citation Information

Patent Citations

  • Frequency modulation capacity demand distribution method considering multiple frequency modulation resources

    CN110994703A

  • Housing for electronic device with different metal assembly and the manufacturing method thereof

    KR1020220165965A

  • Alignmnet Tool for Gas Turbine

    KR103000545B1

  • Coordinated control method, system, and device for primary frequency modulation of wind storage system, and storage medium

    WO2023036344A1

Cited By

  • A new energy station primary frequency modulation optimization system and method and medium

    CN120090224B