Power system inertia estimation method based on ridge regression and direct preference optimization

By using ridge regression and direct preference optimization methods, frequency and power signal features of the power system are extracted, and an inertia estimation model is constructed. This solves the problem of accuracy in power system inertia assessment, achieves efficient inertia estimation in noisy environments, and improves the system's anti-disturbance capability and frequency regulation effect.

CN121840666APending Publication Date: 2026-04-10GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

As the proportion of traditional synchronous generator sets decreases, the inertia level of the power system decreases, frequency regulation becomes more difficult, and the ability to resist disturbances weakens. Existing technologies are unable to accurately assess the inertia distribution and identify weak links.

Method used

The power system inertia estimation method based on ridge regression and direct preference optimization extracts multidimensional statistical features of frequency and power signals to construct a ridge regression baseline model, and uses the loss function of direct preference optimization to iteratively update weights and biases to achieve accurate inertia assessment.

Benefits of technology

In noisy scenarios, the system can quickly obtain the optimal configuration of hyperparameters, achieve accurate estimation of power system inertia, and improve the capacity for renewable energy absorption and system safety and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121840666A_ABST
    Figure CN121840666A_ABST
Patent Text Reader

Abstract

The invention discloses a power system inertia estimation method based on ridge regression and direct preference optimization, and the method comprises the following steps: S1, reading frequency and power signal data generated by a disturbance event of a power system, and calculating frequency and power deviations; respectively extracting root mean square, change rate, skewness, kurtosis and peak factors of the frequency and power signals as characteristic quantities and carrying out standardization processing; s2, constructing a ridge regression baseline model by using the extracted features, and obtaining initial inertia estimation and weight vector and bias; and S3, taking a baseline model inertia estimation result as a reference value of direct preference optimization, setting a loss function, randomly searching hyper-parameters of direct preference optimization for multiple times, updating a weight vector through gradient descent and determining ridge regression optimal configuration through offset, and realizing accurate evaluation of the inertia of the power system. According to the method, the characteristics of high training stability and high optimization efficiency of direct preference optimization are utilized, the optimal configuration of hyper-parameters is quickly obtained, and accurate estimation of the inertia of the power system in the noisy scene is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of new power systems, in particular to a power system inertia estimation method based on ridge regression and direct preference optimization. BACKGROUND

[0002] Under the background of energy structure adjustment and power transmission technology upgrading, a large number of new power generation methods and power electronic devices continue to be connected to the power grid, and the proportion of traditional synchronous generators in the system decreases year by year, resulting in a significant decrease in the overall inertia level of the power system, an increase in frequency regulation difficulty, and a decrease in anti-disturbance ability. In view of this trend, timely evaluation of the inertia distribution of each region and identification of low-inertia weak links are of great significance for the implementation of accurate safety monitoring and reasonable allocation of inertia support resources. This not only helps to improve the consumption capacity of new energy, but also provides support for the safe and stable operation of the power system. Therefore, the present application proposes a power system inertia estimation method based on ridge regression and direct preference optimization. SUMMARY

[0003] To achieve the above-mentioned purpose, the technical solution provided by the present application is as follows: The power system inertia estimation method based on ridge regression and direct preference optimization comprises the following steps: S1: reading the frequency and power signal data generated by the power system disturbance event and calculating the frequency and power deviation, extracting the root mean square, rate of change, skewness, kurtosis and peak factor of the frequency and power signal as characteristic quantities and performing standardization processing; S2: constructing a ridge regression baseline model with the extracted characteristics to obtain preliminary inertia estimation and weight vector and bias; S3: taking the baseline model inertia estimation result as the reference value of direct preference optimization and setting the loss function, randomly searching the hyperparameters of direct preference optimization multiple times, updating the weight vector and bias through gradient descent to determine the optimal configuration of ridge regression, and realizing accurate evaluation of the inertia of the power system; The specific steps of step S1 are as follows: S1-1: obtaining the time series data of the frequency and power of each unit after the occurrence of the power system disturbance, discretizing the data and calculating the frequency deviation and power deviation: (1) In formula (1), subscript is the th sampling point , is the th sampling time, is the frequency deviation of the unit at the sampling point , is the unit instantaneous frequency at the sampling point , It is the rated frequency of the unit. Sampling points Power deviation of the unit Sampling points The per-unit value of the instantaneous power of the unit. It is the unit's steady-state power; S1-2: Add Gaussian white noise to the frequency deviation and power deviation signals of equation (1): (2) In equation (2), This is the frequency deviation after adding Gaussian white noise. It is the first The noise term superimposed on the original frequency and power deviation signals at each sampling point follows a mean of 0 and a variance of . The Gaussian distribution, where It is the noise standard deviation. This is the power deviation after adding Gaussian white noise; The signal after adding noise is smoothed to obtain smoothed frequency deviation and power deviation signals, which are then combined column-wise into a matrix: (3) In equation (3), yes A combined signal matrix of order 1, The number of sampling points. and These are the smoothed frequency deviation and power deviation signals, respectively. S1-3: Combining signal matrix Extract and calculate features for each column separately: (4) In equation (4), the subscript Representative combined signal matrix The List, The root mean square of the deviation signal, Representing the The frequency or power deviation signal after smoothing at each sampling point The root mean square of the rate of change of the deviation signal. Representing the The frequency or power deviation signal after smoothing at each sampling point Represents the sampling time interval. This represents the skewness of the deviation signal. and These represent the mean and standard deviation of the deviation signal, respectively. Kurtosis represents the deviation signal. The peak factor representing the deviation signal. Represents the maximum absolute value of the signal; For the Taiwanese unit conducts The feature values ​​extracted after each Monte Carlo experiment are combined to form a feature vector: (5) In equation (5), Representing the The unit conducted its first The eigenvectors obtained from the Monte Carlo trials ( ), The root mean square of the frequency deviation. The root mean square of the rate of change of frequency. The root mean square of the power deviation and the root mean square of the rate of change of power are represented by . The skewness represents the frequency deviation. Kurtosis represents the frequency deviation. Peak factor representing frequency deviation, The skewness represents the power deviation. Kurtosis, representing power deviation Peak factor representing power deviation; S1-4: All sample feature vectors Arrange them in order to construct the characteristic matrix. : (6) In equation (6), the subscript Representing the One sample ( ,in (representing the total number of units), each sample contains the first... The unit conducted its first The results of the Monte Carlo experiment, subscript Representing the eigenvalues ​​( ), Represents the characteristic matrix, Representing the The unit conducted its first The eigenvectors obtained from the Monte Carlo experiment The One eigenvalue; S1-5: Standardized Feature Matrix (7) In equation (7), Representative characteristic matrix The standard feature matrix, and Representing the first The mean and standard deviation of each feature.

[0004] The specific steps of step S2 are as follows: S2-1: Set the learning rate for each hyperparameter Temperature parameters Regularization coefficient Number of training sessions The search range, setting the number of hyperparameter sampling times. ; S2-2: Standardized feature matrix obtained using equation (7) Constructing the feature augmentation matrix Add a column of all 1s as an offset term to calculate the intercept; S2-3: Beginning the... The hyperparameters are sampled once, and the values ​​of each hyperparameter are randomly searched within a set range. Ridge regression with a bias term is then used to solve for the weight vector, and the model is started at this sampling number. Rotation training: (8) In equation (8), Represents the weight vector matrix, where The weights of each feature quantity in equation (5) are respectively assigned. It is the intercept, i.e., the bias of each feature quantity, representing the baseline inertia estimate when all features are 0. Representative feature augmented matrix, It is an eigenvalue augmented matrix transpose, This represents the identity matrix with the last diagonal element set to 0. Represents the target inertia matrix, where Represents the actual inertia of each unit in the power system; S2-4: From the weight vector matrix Separate the first The weight vectors and biases from each training round are used to calculate the baseline inertia estimate. (9) In equation (9), The inertia of each unit in the power system represented by the ridge regression baseline estimate. Representative at the The model under the sampling is the first The weight vector for each round of training.

[0005] The specific steps of step S3 are as follows: S3-1: Set an evaluation metric for direct preference optimization, and replace the traditional preference difference with the squared difference of error to make the loss function more closely resemble the error structure of the regression scenario: (10) In equation (10), The difference index representing the loss function, i.e., the first The squared error of the estimation for each sample is used to measure the improvement of the current model relative to the baseline model. Represents the current model in the th... The inertia estimate on each sample, i.e., the inertia estimate obtained after benchmark regression and preference optimization. Representing the The inertia of each unit in the power system estimated by ridge regression baseline for a sample. , Representing the The true labeled value of each sample, that is, the true inertia of each unit; S3-2: The steps for constructing the preference probability function are as follows: S3-2-1: Define the Sigmoid function: (11) In equation (11), That is, the general form of the Sigmoid function. The input values ​​of the function; S3-2-2: The squared difference of the estimation error obtained from equation (10) Substituting into equation (11), we get: (12) In equation (12), Represents the preference probability of the sample. Represents temperature parameter; S3-3: The steps for calculating the gradient of the loss with respect to the estimate are as follows: S3-3-1: Calculate the preference probability For the current model in the th Inertia estimation on a sample The derivative is: (13) S3-3-2: Define the gradient of the loss: (14) In equation (14), The representative loss function is the first... Squared error of the estimation of each sample gradient, The representative model in the Inertia estimation on a sample The gradient; S3-4: The steps for updating model parameters are as follows: S3-4-1: Accumulate and normalize the gradient: (15) In equation (15), The loss function represents the model's... Weight vectors for each round of training gradient, Represents the total number of samples ( ,in Represents the total number of generating units. (representing the number of Monte Carlo experiments) The loss function represents the model's... Bias of round training The gradient; S3-4-2: Update model parameters according to the learning rate: (16) In equation (16), and Representing the first The model under the sampling is the first The weight vectors and biases for each round of training; S3-5: Update the inertia estimation function: (17) In equation (17), The ridge regression model represents the first time. After the second sampling The estimated inertia of each unit in the power system after the training; S3-6: Continue model training until the maximum number of training epochs is reached, and obtain the ridge regression model at the hyperparameter level. Estimated function after training under random sampling: (18) In equation (18), The ridge regression model represents the first time. After the second sampling The estimated inertia of each unit in the power system after this training. and Representing respectively in the The model under the second sampling was... Weight vectors and biases after each round of training; S3-7: Initiate a new round of hyperparameter sampling and repeat the aforementioned training and evaluation process until the preset sampling limit is reached. Then, compare the training results of the hyperparameter combinations obtained from each round of sampling, select the optimal hyperparameter combination based on the criterion of minimum relative error, and output the power system inertia estimation result corresponding to the optimal model. (19) In equation (19), The inertia of each unit in the power system represented by the final estimate from the ridge regression. and These represent the final weight vector and bias of the ridge regression, respectively; S3-8: Output the inertia of each unit in the power system obtained by the final estimation of the ridge regression as the inertia estimation result, complete the entire process of the power system inertia estimation method, and the program ends.

[0006] Compared with the prior art, the principles and advantages of the present invention are as follows: This invention first extracts multi-dimensional statistical features such as root mean square, rate of change, skewness, kurtosis, and peak factor from frequency and power deviation signals collected after power system disturbances, constructs a standardized feature matrix, and establishes an inertia estimation baseline model using regularized ridge regression. Next, a prediction error difference index is constructed using the baseline model as a reference. Then, the preference probability is obtained through the Sigmoid function, a direct preference optimization loss function is established, and the weights, biases, and related hyperparameters are iteratively updated to output the power system inertia estimate. This invention leverages the strong stability and high efficiency of direct preference optimization training to quickly obtain the optimal hyperparameter configuration, achieving accurate power system inertia estimation in noisy scenarios. Attached Figure Description

[0007] Figure 1 This is a flowchart illustrating the steps of the power system inertia estimation method based on ridge regression and direct preference optimization in this embodiment of the invention. Figure 2 This is a topology diagram of an IEEE 10-machine, 39-node power system in an embodiment of the present invention. Figure 3 This is an error result diagram of the model under the condition of 60dB signal-to-noise ratio in an embodiment of the present invention; Figure 4 This is an error result diagram of the model under the condition of 45dB signal-to-noise ratio in this embodiment of the invention; Figure 5 This is a comparison chart of the error results of the model in the embodiment of the invention. Detailed Implementation

[0008] The present invention will be further described below with reference to specific embodiments: Figure 1The flowchart illustrates the steps of a power system inertia estimation method based on ridge regression and direct preference optimization, including the following steps: S1: Read the frequency and power signal data generated by the power system disturbance event and calculate the frequency and power deviation. Extract the root mean square, rate of change, skewness, kurtosis and peak factor of the frequency and power signals as feature quantities and perform standardization processing. S2: Construct a ridge regression baseline model using the extracted features to obtain preliminary inertia estimates, weight vectors, and biases; S3 uses the baseline model inertia estimation results as a reference value for direct preference optimization and sets a loss function. It then randomly searches for hyperparameters for direct preference optimization multiple times, updates the weight vector and bias through gradient descent, and determines the optimal configuration for ridge regression to achieve accurate assessment of power system inertia. The specific steps of step S1 are as follows: S1-1: Obtain the time series data of frequency and power of each unit after the power system disturbance occurs, discretize them, and calculate the frequency deviation and power deviation: (20) In equation (20), the subscript It is the first sampling points ( ), It is the first Each sampling time, Sampling points Frequency deviation of the unit Sampling points The per-unit value of the instantaneous frequency of the generator unit. It is the rated frequency of the unit. Sampling points Power deviation of the unit Sampling points The per-unit value of the instantaneous power of the unit. It is the unit's steady-state power; S1-2: Add Gaussian white noise to the frequency deviation and power deviation signals of equation (20): (twenty one) In equation (21), This is the frequency deviation after adding Gaussian white noise. It is the first The noise term superimposed on the original frequency and power deviation signals at each sampling point follows a mean of 0 and a variance of . The Gaussian distribution, where It is the noise standard deviation. This is the power deviation after adding Gaussian white noise; The signal after adding noise is smoothed to obtain smoothed frequency deviation and power deviation signals, which are then combined column-wise into a matrix: (twenty two) In equation (22), yes A combined signal matrix of order 1, The number of sampling points. and These are the smoothed frequency deviation and power deviation signals, respectively. S1-3: Combining signal matrix Extract and calculate features for each column separately: (twenty three) In equation (23), the subscript Representative combined signal matrix The List, The root mean square of the deviation signal, Representing the The frequency or power deviation signal after smoothing at each sampling point The root mean square of the rate of change of the deviation signal. Representing the The frequency or power deviation signal after smoothing at each sampling point Represents the sampling time interval. This represents the skewness of the deviation signal. and These represent the mean and standard deviation of the deviation signal, respectively. Kurtosis represents the deviation signal. The peak factor representing the deviation signal. Represents the maximum absolute value of the signal; For the Taiwanese unit conducts The feature values ​​extracted after each Monte Carlo experiment are combined to form a feature vector: (twenty four) In equation (24), Representing the The unit conducted its first The eigenvectors obtained from the Monte Carlo trials ( ), The root mean square of the frequency deviation. The root mean square of the rate of change of frequency. The root mean square of the power deviation and the root mean square of the rate of change of power are represented by . The skewness represents the frequency deviation. Kurtosis represents the frequency deviation. Peak factor representing frequency deviation, The skewness represents the power deviation. Kurtosis, representing power deviation Peak factor representing power deviation; S1-4: All sample feature vectors Arrange them in order to construct the characteristic matrix. : (25) In equation (25), the subscript Representing the One sample ( ,in (representing the total number of units), each sample contains the first... The unit conducted its first The results of the Monte Carlo experiment, subscript Representing the eigenvalues ​​( ), Represents the characteristic matrix, Representing the The unit conducted its first The eigenvectors obtained from the Monte Carlo experiment The One eigenvalue; S1-5: Standardized Feature Matrix (26) In equation (26), Representative characteristic matrix The standard feature matrix, and Representing the first The mean and standard deviation of each feature.

[0009] The specific steps of step S2 are as follows: S2-1: Set the learning rate for each hyperparameter Temperature parameters Regularization coefficient Number of training sessions The search range, setting the number of hyperparameter sampling times. ; S2-2: The standardized feature matrix obtained using equation (26) Constructing the feature augmentation matrix Add a column of all 1s as an offset term to calculate the intercept; S2-3: Beginning the... The hyperparameters are sampled once, and the values ​​of each hyperparameter are randomly searched within a set range. Ridge regression with a bias term is then used to solve for the weight vector, and the model is started at this sampling number. Rotation training: (27) In equation (27), Represents the weight vector matrix, where The weights of each feature quantity in equation (24) are respectively assigned. It is the intercept, i.e., the bias of each feature quantity, representing the baseline inertia estimate when all features are 0. Representative feature augmented matrix, It is an eigenvalue augmented matrix transpose, This represents the identity matrix with the last diagonal element set to 0. Represents the target inertia matrix, where Represents the actual inertia of each unit in the power system; S2-4: From the weight vector matrix Separate the first The weight vectors and biases from each training round are used to calculate the baseline inertia estimate. (28) In equation (28), The inertia of each unit in the power system represented by the ridge regression baseline estimate. Representative at the The model under the sampling is the first The weight vector for each round of training.

[0010] The specific steps of step S3 are as follows: S3-1: Set an evaluation metric for direct preference optimization, and replace the traditional preference difference with the squared difference of error to make the loss function more closely resemble the error structure of the regression scenario: (29) In equation (29), The difference index representing the loss function, i.e., the first The squared error of the estimation for each sample is used to measure the improvement of the current model relative to the baseline model. Represents the current model in the th... The inertia estimate on each sample, i.e., the inertia estimate obtained after benchmark regression and preference optimization. Representing the The inertia of each unit in the power system estimated by ridge regression baseline for a sample. , Representing the The true labeled value of each sample, that is, the true inertia of each unit; S3-2: The steps for constructing the preference probability function are as follows: S3-2-1: Define the Sigmoid function: (30) In equation (30), That is, the general form of the Sigmoid function. The input values ​​of the function; S3-2-2: The squared difference of the estimation error obtained from equation (29) Substituting into equation (30), we get: (31) In equation (31), Represents the preference probability of the sample. Represents temperature parameter; S3-3: The steps for calculating the gradient of the loss with respect to the estimate are as follows: S3-3-1: Calculate the preference probability For the current model in the th Inertia estimation on a sample The derivative is: (32) S3-3-2: Define the gradient of the loss: (33) In equation (33), The representative loss function is the first... Squared error of the estimation of each sample gradient, The representative model in the Inertia estimation on a sample The gradient; S3-4: The steps for updating model parameters are as follows: S3-4-1: Accumulate and normalize the gradient: (34) In equation (34), The loss function represents the model's... Weight vectors for each round of training gradient, Represents the total number of samples ( ,in Represents the total number of generating units. (representing the number of Monte Carlo experiments) The loss function represents the model's... Bias of round training The gradient; S3-4-2: Update model parameters according to the learning rate: (35) In equation (35), and Representing the first The model under the sampling is the first The weight vectors and biases for each round of training; S3-5: Update the inertia estimation function: (36) In equation (36), The ridge regression model represents the first time. After the second sampling The estimated inertia of each unit in the power system after the training; S3-6: Continue model training until the maximum number of training epochs is reached, and obtain the ridge regression model at the hyperparameter level. Estimated function after training under random sampling: (37) In equation (37), The ridge regression model represents the first time. After the second sampling The estimated inertia of each unit in the power system after this training. and Representing respectively in the The model under the second sampling was... Weight vectors and biases after each round of training; S3-7: Initiate a new round of hyperparameter sampling and repeat the aforementioned training and evaluation process until the preset sampling limit is reached. Then, compare the training results of the hyperparameter combinations obtained from each round of sampling, select the optimal hyperparameter combination based on the criterion of minimum relative error, and output the power system inertia estimation result corresponding to the optimal model. (38) In equation (38), The inertia of each unit in the power system represented by the final estimate from the ridge regression. and These represent the final weight vector and bias of the ridge regression, respectively; S3-8: Output the inertia of each unit in the power system obtained by the final estimation of the ridge regression as the inertia estimation result, complete the entire process of the power system inertia estimation method, and the program ends.

[0011] To verify the effectiveness of the power system inertia estimation method of this invention, a system was built on the MATLAB / SIMULINK platform as follows: Figure 2The IEEE 10-unit 39-bus power system model shown has a 233.8MW load connected to node 7. After the system reaches steady state, a small load increase of 0.05% (approximately 0.117MW) is added to node 7 to simulate load disturbance events during actual operation and to avoid transient instability caused by excessive disturbances. Frequency state data is collected within 0.21-2 seconds after the disturbance occurs, measured at the terminal buses of the 10 generating units, with a sampling interval of 1ms. Ridge regression model parameter settings: weight vector... and bias The Monte Carlo trial run was set to 50 for the parameter to be optimized. Direct preference optimization of the hyperparameter range setting: Temperature parameter. [0.1, 0.5], learning rate [0.001, 0.05], regularization coefficients [0.01, 1.0], Number of training iterations [30, 100], number of samples The constraint condition is that the inertia estimate must not be less than 0 and the value of 50 is set.

[0012] To test the estimation accuracy and noise resistance of the algorithm, two noise conditions were set up for comparison: in condition one, the signal-to-noise ratio (SNR) of the frequency measurement data was 60 dB, and in condition two, the SNR was 45 dB. The optimal weight vector obtained in condition one after algorithm training was... The element values ​​are as follows: -10.363, -7.231, 39.486, -41.344, -30.611, 16.042, -21.490, 12.762, -36.437, 3.731, and the bias is... The value is 64.350; the optimal weight vector obtained in working condition two. The element values ​​are as follows: -10.554, -1.148, 44.875, -49.003, -26.713, 13.809, -19.776, 11.001, -33.755, 4.526, and the bias is... The mean absolute percentage error (MAPE) of the inertia estimation results for the 10 units under the two operating conditions is 64.372. Figure 3 and Figure 4 The error comparison results of different models under the two working conditions are plotted on Figure 5 .

[0013] Combination Figures 3-4 It can be seen that, in Figure 3 In low-noise environments, the inertia estimation accuracy is high, with the mean absolute percentage error (MAPE) for all units being less than 0.3%. Figure 4The accuracy of inertia estimation decreases slightly under strong noise conditions, but MAPE remains below 0.9%, and the overall estimation results are relatively accurate. Figure 5 It can be seen that, compared with using the ridge regression model alone, the power system inertia estimation method based on ridge regression and direct preference optimization has an average MAPE of only about 0.137% and 0.450% under the two operating conditions of SNR=60dB and SNR=45dB, respectively, which is lower than the error levels of about 1.569% and 1.740% of ridge regression. This shows that the present invention can significantly improve the accuracy of inertia estimation and has stronger robustness to measurement noise.

[0014] The above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Therefore, any changes made in accordance with the shape and principle of the present invention should be covered within the protection scope of the present invention.

Claims

1. A power system inertia estimation method based on ridge regression and direct preference optimization, characterized in that, Includes the following steps: S1: Read the frequency and power signal data generated by the power system disturbance event and calculate the frequency and power deviation. Extract the root mean square, rate of change, skewness, kurtosis and peak factor of the frequency and power signals as feature quantities and perform standardization processing. S2: Construct a ridge regression baseline model using the extracted features to obtain preliminary inertia estimates, weight vectors, and biases; S3 uses the baseline model inertia estimation results as a reference value for direct preference optimization and sets a loss function. It then randomly searches for hyperparameters for direct preference optimization multiple times, updates the weight vector and bias through gradient descent, and determines the optimal configuration for ridge regression to achieve accurate assessment of power system inertia. The specific steps of step S1 are as follows: S1-1: Obtain the time series data of frequency and power of each unit after the power system disturbance occurs, discretize them, and calculate the frequency deviation and power deviation: (1) In equation (1), the subscript It is the first sampling points ( ), It is the first Each sampling time, Sampling points Frequency deviation of the unit Sampling points The per-unit value of the instantaneous frequency of the generator unit. It is the rated frequency of the unit. Sampling points Power deviation of the unit Sampling points The per-unit value of the instantaneous power of the unit. It is the unit's steady-state power; S1-2: Add Gaussian white noise to the frequency deviation and power deviation signals of equation (1): (2) In equation (2), This is the frequency deviation after adding Gaussian white noise. It is the first The noise term superimposed on the original frequency and power deviation signals at each sampling point follows a mean of 0 and a variance of . The Gaussian distribution, where It is the noise standard deviation. This is the power deviation after adding Gaussian white noise; The signal after adding noise is smoothed to obtain smoothed frequency deviation and power deviation signals, which are then combined column-wise into a matrix: (3) In equation (3), yes A combined signal matrix of order 1, The number of sampling points. and These are the smoothed frequency deviation and power deviation signals, respectively. S1-3: Combining signal matrix Extract and calculate features for each column separately: (4) In equation (4), the subscript Representative combined signal matrix The List, The root mean square of the deviation signal, Representing the The frequency or power deviation signal after smoothing at each sampling point The root mean square of the rate of change of the deviation signal. Representing the The frequency or power deviation signal after smoothing at each sampling point Represents the sampling time interval. This represents the skewness of the deviation signal. and These represent the mean and standard deviation of the deviation signal, respectively. Kurtosis represents the deviation signal. The peak factor representing the deviation signal. Represents the maximum absolute value of the signal; For the Taiwanese unit conducts The feature values ​​extracted after each Monte Carlo experiment are combined to form a feature vector: (5) In equation (5), Representing the The unit conducted its first The eigenvectors obtained from the Monte Carlo trials ( ), The root mean square of the frequency deviation. The root mean square of the rate of change of frequency. The root mean square of the power deviation and the root mean square of the rate of change of power are represented by . The skewness represents the frequency deviation. Kurtosis represents the frequency deviation. Peak factor representing frequency deviation, The skewness represents the power deviation. Kurtosis, representing power deviation Peak factor representing power deviation; S1-4: All sample feature vectors Arrange them in order to construct the characteristic matrix. : (6) In equation (6), the subscript Representing the One sample ( ,in (representing the total number of units), each sample contains the first... The unit conducted its first The results of the Monte Carlo experiment, subscript Representing the eigenvalues ​​( ), Represents the characteristic matrix, Representing the The unit conducted its first The eigenvectors obtained from the Monte Carlo experiment The One eigenvalue; S1-5: Standardized Feature Matrix (7) In equation (7), Representative characteristic matrix The standard feature matrix, and Representing the first The mean and standard deviation of each feature.

2. The power system inertia estimation method based on ridge regression and direct preference optimization according to claim 1, characterized in that, The specific steps of step S2 are as follows: S2-1: Set the learning rate for each hyperparameter Temperature parameters Regularization coefficient Number of training sessions The search range, setting the number of hyperparameter sampling times. ; S2-2: Standardized feature matrix obtained using equation (7) Constructing the feature augmentation matrix Add a column of all 1s as an offset term to calculate the intercept; S2-3: Beginning the... The hyperparameters are sampled once, and the values ​​of each hyperparameter are randomly searched within a set range. Ridge regression with a bias term is then used to solve for the weight vector, and the model is started at this sampling number. Rotation training: (8) In equation (8), Represents the weight vector matrix, where The weights of each feature quantity in equation (5) are respectively assigned. It is the intercept, i.e., the bias of each feature quantity, representing the baseline inertia estimate when all features are 0. Representative feature augmented matrix, It is an eigenvalue augmented matrix transpose, This represents the identity matrix with the last diagonal element set to 0. Represents the target inertia matrix, where Represents the actual inertia of each unit in the power system; S2-4: From the weight vector matrix Separate the first The weight vectors and biases from each training round are used to calculate the baseline inertia estimate. (9) In equation (9), The inertia of each unit in the power system represented by the ridge regression baseline estimate. Representative at the The model under the sampling is the first The weight vector for each round of training.

3. The power system inertia estimation method based on ridge regression and direct preference optimization according to claim 2, characterized in that, The specific steps of step S3 are as follows: S3-1: Set an evaluation metric for direct preference optimization, and replace the traditional preference difference with the squared difference of error to make the loss function more closely resemble the error structure of the regression scenario: (10) In equation (10), The difference index representing the loss function, i.e., the first The squared error of the estimation for each sample is used to measure the improvement of the current model relative to the baseline model. Represents the current model in the th... The inertia estimate on each sample, i.e., the inertia estimate obtained after benchmark regression and preference optimization. Representing the The inertia of each unit in the power system estimated by ridge regression baseline for a sample. , Representing the The true labeled value of each sample, that is, the true inertia of each unit; S3-2: The steps for constructing the preference probability function are as follows: S3-2-1: Define the Sigmoid function: (11) In equation (11), That is, the general form of the Sigmoid function. The input values ​​of the function; S3-2-2: The squared difference of the estimation error obtained from equation (10) Substituting into equation (11), we get: (12) In equation (12), Represents the preference probability of the sample. Represents temperature parameter; S3-3: The steps for calculating the gradient of the loss with respect to the estimate are as follows: S3-3-1: Calculate the preference probability For the current model in the th Inertia estimation on a sample The derivative is: (13) S3-3-2: Define the gradient of the loss: (14) In equation (14), The representative loss function is the first... Squared error of the estimation of each sample gradient, The representative model in the Inertia estimation on a sample The gradient; S3-4: The steps for updating model parameters are as follows: S3-4-1: Accumulate and normalize the gradient: (15) In equation (15), The loss function represents the model's... Weight vectors for each round of training gradient, Represents the total number of samples ( ,in Represents the total number of generating units. (representing the number of Monte Carlo experiments) The loss function represents the model's... Bias of round training The gradient; S3-4-2: Update model parameters according to the learning rate: (16) In equation (16), and Representing the first The model under the sampling is the first The weight vectors and biases for each round of training; S3-5: Update the inertia estimation function: (17) In equation (17), The ridge regression model represents the first time. After the second sampling The estimated inertia of each unit in the power system after the training; S3-6: Continue model training until the maximum number of training epochs is reached, and obtain the ridge regression model at the hyperparameter level. Estimated function after training under random sampling: (18) In equation (18), The ridge regression model represents the first time. After the second sampling The estimated inertia of each unit in the power system after this training. and Representing respectively in the The model under the second sampling was... Weight vectors and biases after each round of training; S3-7: Initiate a new round of hyperparameter sampling and repeat the aforementioned training and evaluation process until the preset sampling limit is reached. Then, compare the training results of the hyperparameter combinations obtained from each round of sampling, select the optimal hyperparameter combination based on the criterion of minimum relative error, and output the power system inertia estimation result corresponding to the optimal model. (19) In equation (19), The inertia of each unit in the power system represented by the final estimate from the ridge regression. and These represent the final weight vector and bias of the ridge regression, respectively; S3-8: Output the inertia of each unit in the power system obtained by the final estimation of the ridge regression as the inertia estimation result, complete the entire process of the power system inertia estimation method, and the program ends.