Wind power plant AGC optimization control method and system based on model predictive control

By establishing an adaptive prediction model and introducing a model predictive control method with a feedback compensator, the problem of poor adaptability of the traditional PI control method in wind farm AGC control is solved. This method achieves accurate prediction and stable control of the future power output state of the wind farm, and improves the accuracy and robustness of wind farm AGC control.

CN120896268APending Publication Date: 2025-11-04XINJIANG JIMUNAI ZHONGGUANGHE FENGLI POWER GENERATION CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202511203440.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Traditional PI control methods are difficult to adapt to the complex dynamic characteristics of wind farms and cannot effectively cope with wind speed fluctuations, resulting in reduced control accuracy. They cannot meet the power regulation accuracy requirements of the power grid AGC and lack the ability to predict the future output status of wind farms. The control system response is lagging and cannot effectively cope with power fluctuations caused by rapid changes in wind speed.

Method used

A model predictive control-based AGC optimization control method for wind farms is adopted. By establishing an adaptive prediction model, online parameter identification is performed using the recursive least squares method. An active power optimization objective function containing power tracking error term and control smoothing term is constructed. A feedback compensator is introduced for real-time correction, forming a closed-loop control mechanism.

Benefits of technology

It improves the wind farm's adaptability to wind speed changes, enhances the accuracy of future power output prediction, ensures the stability and robustness of the control system under complex wind conditions, reduces frequent fluctuations in control commands, and extends the service life of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120896268A_ABST
    Figure CN120896268A_ABST
Patent Text Reader

Abstract

The invention provides a wind power plant AGC optimization control method and system based on model prediction control, and relates to the technical field of model control, and the method comprises the steps: building an adaptive prediction model, carrying out the online identification of parameters through a recursive least square method, constructing an active power optimization objective function, solving a control instruction sequence, designing a feedback compensator, and correcting a control instruction. And finally, issuing to each fan to execute and realize closed-loop control. According to the method, the AGC control precision of the wind power plant can be improved, the power fluctuation is reduced, and the power grid friendliness and the adaptability of an AGC control system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to model control technology, and in particular to a wind farm AGC optimization control method and system based on model predictive control. BACKGROUND

[0002] With the continuous growth of wind power installed capacity, wind farms participating in automatic generation control (AGC) of power grid has become an important means to improve the frequency regulation capability of power grid and promote wind power consumption. Wind farm AGC control requires wind farms to quickly and accurately adjust their active power output according to the power instructions issued by the power grid dispatching center, in order to meet the demand of power grid frequency regulation and power balance.

[0003] The traditional wind farm AGC control mainly adopts proportional integral (PI) control method, taking the deviation between the power grid dispatching instruction and the actual power output of the wind farm as the input of the controller, and generating corresponding control instructions through the PI controller and distributing them to each wind turbine generator. However, due to the characteristics of wind farm such as multivariable, nonlinearity, time-varying and significant influence of random wind speed fluctuation, the traditional PI control method has a series of problems in wind farm AGC control.

[0004] The traditional PI control method is difficult to adapt to the complex dynamic characteristics of wind farm, and has poor adaptability to wind speed changes and system parameter changes, resulting in reduced control accuracy when wind speed fluctuates greatly, and unable to meet the power regulation accuracy requirements of power grid AGC.

[0005] The traditional control method lacks the prediction ability of the future output state of the wind farm, and the generation of control instructions is only based on the deviation information at the current moment, without considering the future dynamic changes of the wind farm, resulting in response lag of the control system and inability to effectively cope with the power fluctuation caused by rapid change of wind speed.

[0006] The existing control strategy usually does not fully consider the balance between control smoothness and tracking accuracy, and excessive pursuit of power tracking accuracy will lead to frequent changes of control instructions, increase the mechanical stress and component wear of wind turbine generators, while excessive smoothing will affect the tracking performance, unable to meet the requirements of power grid dispatching, and lack of effective balance mechanism. SUMMARY

[0007] The wind farm AGC optimization control method and system based on model predictive control provided by the embodiments of the present application can solve the problems in the prior art.

[0008] In a first aspect, the present application provides a wind farm AGC optimization control method based on model predictive control, comprising: obtaining real-time operation data of the wind farm, and establishing an adaptive prediction model representing the dynamic response characteristics of the wind farm based on the real-time operation data of the wind farm; The real-time operation data of the wind farm is used to identify the parameters of the adaptive prediction model on-line by the recursive least square method, to obtain real-time dynamic characteristic parameters of the wind farm, and to substitute the real-time dynamic characteristic parameters of the wind farm into the adaptive prediction model to obtain prediction power data of the wind farm in a future period. Based on the prediction power data, a rolling time domain optimization method is used to construct an active power optimization objective function containing a power tracking error term and a control smoothing term, and an active power optimization control instruction sequence in a future control period of the wind farm is obtained by solving the active power optimization objective function. The actual active power output in the real-time operation data of the wind farm is compared with the prediction power data in real time, and a dynamic deviation sequence between the actual active power output and the prediction value of the wind farm is calculated. A feedback compensator is constructed based on the dynamic deviation sequence. The compensation output of the feedback compensator is superimposed with the active power optimization control instruction sequence to obtain a corrected active power control instruction. The corrected active power control instruction is issued to each wind turbine generator for execution, and power output data of each wind turbine generator is collected in real time. The power output data is input into the adaptive prediction model as new real-time operation data of the wind farm, so as to realize closed-loop control of the active power of the wind farm.

[0009] The real-time operation data of the wind farm is used to identify the parameters of the adaptive prediction model on-line by the recursive least square method, to obtain real-time dynamic characteristic parameters of the wind farm, and to substitute the real-time dynamic characteristic parameters of the wind farm into the adaptive prediction model to obtain prediction power data of the wind farm in a future period. The real-time operation data of the wind farm is used to identify the parameters of the adaptive prediction model on-line by the recursive least square method, to obtain real-time dynamic characteristic parameters of the wind farm, and to substitute the real-time dynamic characteristic parameters of the wind farm into the adaptive prediction model to obtain prediction power data of the wind farm in a future period. Based on the parameter estimation gain matrix, the to-be-identified parameters are calculated on-line and iteratively to obtain real-time dynamic characteristic parameters of the wind farm.

[0010] Based on the prediction power data, a rolling time domain optimization method is used to construct an active power optimization objective function containing a power tracking error term and a control smoothing term, and an active power optimization control instruction sequence in a future control period of the wind farm is obtained by solving the active power optimization objective function. Based on the prediction power data, a rolling time domain optimization method is used to construct an active power optimization objective function containing a power tracking error term and a control smoothing term, and an active power optimization control instruction sequence in a future control period of the wind farm is obtained by solving the active power optimization objective function. applying a dynamic power constraint and a dynamic ramp rate constraint to the predicted power value, setting upper and lower limits to the predicted power value based on the dynamic power constraint, setting upper and lower limits to a difference between predicted power values of adjacent time instants in the predicted time domain based on the dynamic ramp rate constraint, and establishing a state space model based on the active power optimization objective function, the power tracking error term, the control smoothing term, and the constraint condition; performing optimal solving based on the active power optimization objective function and the constraint condition under the state space model, performing online correction to the power tracking error term and the control smoothing term according to a prediction result of the state space model, and generating an active power optimization control instruction sequence in a future control time domain of the wind farm based on a result of the optimal solving.

[0011] performing optimal solving based on the active power optimization objective function and the constraint condition under the state space model, performing online correction to the power tracking error term and the control smoothing term according to a prediction result of the state space model, and generating an active power optimization control instruction sequence in a future control time domain of the wind farm based on a result of the optimal solving. solving the active power optimization objective function under the state space model by using an alternating direction multiplier method, constructing an augmented Lagrange function of original variables and auxiliary variables based on the power tracking error term, the control smoothing term, and corresponding weight coefficients, decomposing the original optimization problem into a sequence of sub-problems based on a gradient of the original variables of the augmented Lagrange function, alternately updating the original variables, the auxiliary variables, and a Lagrange multiplier by using the alternating direction multiplier method, calculating a convergence criterion according to residuals of the original variables and the auxiliary variables, and obtaining an optimal control sequence when the convergence criterion is less than a preset convergence threshold; performing prediction simulation under the state space model according to the optimal control sequence, obtaining a prediction deviation of the power tracking error term and the control smoothing term, calculating a root mean square error of the prediction deviation, and performing online correction to weight coefficients of the power tracking error term and the control smoothing term based on the root mean square error.

[0012] performing real-time comparison between actual active power output in real-time operation data of the wind farm and the predicted power data, and calculating a dynamic deviation sequence between the actual active power output and the predicted value of the wind farm includes: The real-time operation data of the wind farm includes actual active power and predicted power data, the actual active power output is constructed as an actual power output sequence, the predicted power data is constructed as a predicted power sequence, and the actual power output sequence and the predicted power sequence are operated to obtain an initial deviation sequence. Based on the initial deviation sequence and the actual power output sequence, a power curve fitting model is established, and a fitted power value sequence of the wind farm is calculated according to the power curve fitting model and the initial deviation sequence. a fitting deviation sequence is obtained by subtracting the actual power output sequence from the fitting power value sequence at corresponding time points, a fitting deviation square sequence is obtained by squaring the fitting deviation sequence, an accumulated value is obtained by accumulating the fitting deviation square sequence within a preset time window, and a power curve drift degree index is obtained by dividing the accumulated value by the number of sampling points within the preset time window; a sign function value of the initial deviation sequence is calculated, a dynamic compensation coefficient is obtained by multiplying the sign function value by a preset compensation weight factor and the power curve drift degree index and adding an initial compensation coefficient; the dynamic compensation coefficient is multiplied by the initial deviation sequence to obtain a dynamic deviation sequence between the actual active power output of the wind farm and the predicted value.

[0013] a feedback compensator is constructed based on the dynamic deviation sequence, and a corrected active power control instruction is obtained by superimposing a compensation output of the feedback compensator on the active power optimization control instruction sequence, including: the dynamic deviation sequence is divided into a training sample set according to a time window, time sequence feature vectors containing historical information are obtained by extracting time sequence features of the training sample set through a long short-term memory network, correlation weights between features are calculated based on the time sequence feature vectors, long-term dependence relationships and short-term fluctuation characteristics of the dynamic deviation sequence are modeled according to the correlation weights, and an initial compensation model of the feedback compensator is obtained; a mapping relationship is established by calculating statistical characteristics of the dynamic deviation sequence, a learning rate parameter of the initial compensation model is dynamically adjusted according to the mapping relationship, a gradient clipping method is used to truncate gradients greater than a preset compensation threshold to prevent gradient explosion in the training process, the training sample set is divided into a training set and a validation set, parameters of the initial compensation model are iteratively optimized through a cross-validation method, and a compensation model with optimal generalization performance is obtained; a compensation output of the compensation model is adaptively weighted and superimposed on the active power optimization control instruction sequence, a multi-objective evaluation index containing control error and power fluctuation rate is established, an adjustment amount of a superimposition weight is calculated based on the multi-objective evaluation index, the superimposition weight is updated in real time using the adjustment amount, and a corrected active power control instruction is obtained.

[0014] the training sample set is divided into a training set and a validation set, parameters of the initial compensation model are iteratively optimized through a cross-validation method, and a compensation model with optimal generalization performance is obtained, including: The training sample set is divided into a training set and a validation set according to the time continuity principle, the training set is divided into a plurality of subsets with equal size based on the time sequence distribution characteristics of the training set, one subset is selected as a validation sample in a rotating manner, and the remaining subsets are used as training samples to construct a cross-validation training group; The initial compensation model is trained on the cross-validation training group, a generated historical gradient sequence is collected, a gradient mean and a gradient fluctuation amplitude of the historical gradient sequence are calculated, and an adaptive compensation threshold is established according to a mapping relationship between the gradient mean and the gradient fluctuation amplitude; The training gradient of the initial compensation model on each training subset is monitored based on the adaptive compensation threshold, when the amplitude of the training gradient exceeds the adaptive compensation threshold, a normalized gradient vector is calculated based on the direction of the training gradient, and the product of the adaptive compensation threshold and the normalized gradient vector is used as a clipped gradient; The model parameters are updated using the clipped gradient, the model prediction bias is calculated based on the corresponding validation subset, the evaluation criterion is constructed in combination with the sensitivity of the model parameters to the model prediction bias, the current model parameters are saved when the evaluation criterion reaches the optimal value, the parameter optimization process is sequentially performed on all cross-validation training groups, and the compensation model with the optimal generalization performance is selected from a plurality of optimization results.

[0015] In a second aspect of the embodiment of the present application, a wind farm AGC optimization control system based on model predictive control is provided, comprising: A first unit is configured to acquire wind farm real-time operation data, and establish an adaptive prediction model representing dynamic response characteristics of the wind farm based on the wind farm real-time operation data; A second unit is configured to use the wind farm real-time operation data to perform online identification on parameters of the adaptive prediction model by using a recursive least square method, obtain wind farm real-time dynamic characteristic parameters, and substitute the wind farm real-time dynamic characteristic parameters into the adaptive prediction model to obtain predicted power data of a future time period of the wind farm; A third unit is configured to use a rolling time domain optimization method to construct an active power optimization objective function containing a power tracking error term and a control smoothing term based on the predicted power data, and obtain an active power optimization control instruction sequence in a future control time domain of the wind farm by solving the active power optimization objective function; A fourth unit is configured to compare actual active power output in the wind farm real-time operation data with the predicted power data in real time, calculate a dynamic deviation sequence between the actual active power output and the predicted value of the wind farm, construct a feedback compensator based on the dynamic deviation sequence, superimpose the compensation output of the feedback compensator and the active power optimization control instruction sequence to obtain a corrected active power control instruction. A fifth unit is configured to send the corrected active power control instruction to each wind turbine generator set for execution, collect power output data of each wind turbine generator set in real time, input the power output data as new wind farm real-time operation data into the adaptive prediction model, and realize closed-loop control of the wind farm active power.

[0016] In a third aspect, the embodiment of the present application provides an electronic device, comprising: a processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described above.

[0017] In a fourth aspect, the embodiment of the present application provides a computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions are executed by a processor to implement the method described above.

[0018] The present application has the following advantages: By establishing an adaptive prediction model and using recursive least squares method for online parameter identification, the changes in dynamic response characteristics of the wind farm can be accurately captured, the prediction accuracy of the future power output of the wind farm is improved, and a reliable foundation is provided for subsequent control optimization.

[0019] The rolling horizon optimization method is used to construct an optimization objective function containing a power tracking error term and a control smoothing term, which can ensure accurate tracking of the power output of the wind farm, reduce frequent fluctuations of the control instruction, and improve system stability and equipment service life.

[0020] The feedback compensator constructed by introducing the dynamic deviation sequence realizes real-time correction of the prediction error, significantly improves the disturbance suppression ability and robustness of the control system, forms a complete closed-loop control mechanism, and ensures the reliability of the AGC control performance of the wind farm under various complex wind conditions. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 FIG. 1 is a flowchart of a wind farm AGC optimization control method based on model predictive control according to an embodiment of the present application; Figure 2 FIG. 2 is a performance thermodynamic diagram of a wind farm control method according to an embodiment of the present application; Figure 3 FIG. 3 is a flowchart of wind farm power prediction dynamic deviation calculation according to an embodiment of the present application; Figure 4 FIG. 4 is a performance comparison analysis column chart of a feedback compensator according to an embodiment of the present application; Figure 5 FIG. 5 is a model generalization performance comparison diagram of different gradient clipping strategies according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0023] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described repeatedly in some embodiments.

[0024] Figure 1 The flowchart of the wind farm AGC optimization control method based on model predictive control of the embodiments of the present application is shown in FIG. 1, which comprises the following steps. Figure 1 acquiring real-time operation data of the wind farm, and establishing an adaptive prediction model representing dynamic response characteristics of the wind farm based on the real-time operation data of the wind farm; using the real-time operation data of the wind farm, performing online identification of parameters of the adaptive prediction model by a recursive least square method to obtain real-time dynamic characteristic parameters of the wind farm, and substituting the real-time dynamic characteristic parameters of the wind farm into the adaptive prediction model to obtain prediction power data of a future time period of the wind farm; based on the prediction power data, constructing an active power optimization objective function containing a power tracking error term and a control smoothing term by using a rolling time domain optimization method, and obtaining a sequence of active power optimization control instructions in a future control time domain of the wind farm by solving the active power optimization objective function; performing real-time comparison between actual active power output in the real-time operation data of the wind farm and the prediction power data, calculating a dynamic deviation sequence between the actual active power output and the prediction value of the wind farm, constructing a feedback compensator based on the dynamic deviation sequence, superimposing compensation output of the feedback compensator and the sequence of active power optimization control instructions to obtain corrected active power control instructions; issuing the corrected active power control instructions to each wind turbine generator for execution, and collecting power output data of each wind turbine generator in real time, taking the power output data as new real-time operation data of the wind farm to input the adaptive prediction model, and realizing closed-loop control of active power of the wind farm.

[0025] ​In an alternative embodiment, the parameters of the adaptive prediction model are identified online by recursive least squares method using the real-time operation data of the wind farm, and the real-time dynamic characteristic parameters of the wind farm are obtained, including: A parameter estimation gain matrix is constructed by recursive least squares method using the real-time operation data of the wind farm, and the parameter estimation gain matrix is used to iteratively update the parameters of the adaptive prediction model, including the to-be-identified parameters reflecting the dynamic characteristics of the wind farm; The to-be-identified parameters are iteratively calculated online based on the parameter estimation gain matrix, and the real-time dynamic characteristic parameters of the wind farm are obtained.

[0026] Real-time operation data of the wind farm are collected, including wind speed, wind direction, power generation, environmental temperature and other key parameters. These data are collected by the data acquisition system of the wind farm at a certain sampling frequency, usually with a sampling interval of 5 minutes or 10 minutes. The collected data are preprocessed, including outlier rejection, data smoothing and normalization, to improve the accuracy of subsequent model identification.

[0027] In order to construct the adaptive prediction model, the model structure needs to be defined. In this embodiment, the adaptive prediction model is represented in the form of linear difference equation, and the model contains to-be-identified parameters which reflect the dynamic characteristics of the wind farm. The model input is the processed wind speed data, and the output is the predicted power generation. The order of the model is determined according to the actual characteristics of the wind farm, and a model of 2 to 3 orders can be selected to better describe the dynamic characteristics of the wind farm.

[0028] Recursive least squares method is an online parameter identification algorithm that can continuously update model parameters according to real-time data. When applying recursive least squares method for parameter identification, a parameter estimation gain matrix needs to be constructed. The construction of the parameter estimation gain matrix is based on the input data at the current time and the covariance matrix at the last time.

[0029] Specifically, at each sampling time, a regression vector is constructed according to the current input data (such as wind speed, wind direction, etc.). The regression vector contains current and historical input and output data. Initially, the initial value of the to-be-identified parameters is set, which can be based on the offline identification results of historical data or set as a zero vector. At the same time, the covariance matrix is initialized as a larger diagonal matrix, for example, a unit matrix multiplied by 1000, to ensure that the algorithm has strong learning ability in the early stage.

[0030] The prediction error between the current model output and the actual wind farm output is calculated. Then the Kalman gain vector is calculated according to the regression vector and the covariance matrix. The Kalman gain vector is used to adjust the step size of parameter update, ensuring the convergence of the algorithm.

[0031] The Kalman gain vector and the prediction error are used to update the model parameters. The updated parameters reflect the latest dynamic characteristics of the wind farm. At the same time, the covariance matrix is updated to prepare for the next parameter estimation. The update of the covariance matrix uses the standard recursive least squares formula, or introduces a forgetting factor to enhance the tracking ability of the algorithm for time-varying systems. The forgetting factor is usually selected between 0.95 and 0.99, and can be adjusted according to the speed of change of the wind farm characteristics.

[0032] To improve the robustness of the algorithm, parameter estimation constraints can be introduced. For example, according to the physical characteristics of the wind farm, some parameters should remain positive, or the parameter change should not exceed a pre-set threshold. When the updated parameters violate the constraints, appropriate modifications are made to ensure the physical meaning of the parameters.

[0033] Through the above iterative process, the real-time dynamic characteristic parameters of the wind farm can be obtained. These parameters include system gain, time constant, etc., which directly reflect the dynamic response characteristics of the wind farm.

[0034] To illustrate this, let's consider a real case. Suppose a wind farm has collected 7 days of continuous operation data with a sampling interval of 10 minutes. The first 5 days of data are used to initialize the model parameters, resulting in initial parameter values of [0.75, 0.20, 0.05]. Then, the recursive least squares method is used to perform online parameter identification on the last 2 days of data. In this process, the parameter estimation gain matrix is constantly updated, with an initial value of the diagonal matrix [1000, 0, 0; 0, 1000, 0; 0, 0, 1000], and a forgetting factor of 0.98.

[0035] As the algorithm runs, the parameter values gradually converge. For example, at noon on the 6th day, the parameter values are updated to [0.72, 0.23, 0.04]; by the evening of the 7th day, the parameters are further adjusted to [0.70, 0.25, 0.03]. These parameter changes reflect the dynamic characteristic changes of the wind farm under different wind conditions.

[0036] Using the identified real-time dynamic characteristic parameters, the power generation of the wind farm in the future short time can be accurately predicted. For example, using the latest identified parameters to predict the power generation in the next 30 minutes, the average absolute error percentage of the prediction result compared with the actual power generation is less than 5%, which is significantly better than the prediction effect of the fixed parameter model.

[0037] An important feature of this method is its ability to adapt to the time-varying nature of wind farm characteristics. When the operating environment of the wind farm changes, such as seasonal replacement, equipment aging or partial wind turbine shutdown, the model parameters will automatically adjust to ensure that the prediction model always reflects the current characteristics of the wind farm.

[0038] Through the above detailed recursive least square method of online parameter identification, real-time dynamic characteristic parameters of the wind farm can be effectively obtained, thereby providing important support for accurate prediction and optimal control of the wind farm.

[0039] In an alternative embodiment, based on the predicted power data, a rolling horizon optimization method is used to construct an active power optimization objective function including a power tracking error term and a control smoothing term, and a sequence of active power optimization control instructions in a future control time domain of the wind farm is obtained by solving the active power optimization objective function, including: Based on the predicted power data, an active power optimization objective function is constructed, a power tracking error term in the active power optimization objective function is formed by a time-varying weighted sum of squares of power reference values and predicted power values in a prediction time domain, and a control smoothing term in the active power optimization objective function is formed by a time-varying weighted sum of squares of differences between predicted power values at adjacent time points in the prediction time domain; Dynamic power constraints and dynamic ramp rate constraints are imposed on the predicted power values, upper and lower limits of the predicted power values are set based on the dynamic power constraints, upper and lower limits of differences between predicted power values at adjacent time points in the prediction time domain are set based on the dynamic ramp rate constraints, a state space model is established based on the active power optimization objective function, the power tracking error term, the control smoothing term and constraint conditions; Optimal solving is performed based on the active power optimization objective function and constraint conditions under the state space model, the power tracking error term and the control smoothing term are corrected online according to a prediction result of the state space model, and a sequence of active power optimization control instructions in a future control time domain of the wind farm is generated based on a result of the optimal solving.

[0040] In constructing the active power optimization objective function, a combination of power tracking error term and control smoothing term is adopted. The power tracking error term is calculated by the time-varying weighted sum of squares of the power reference value and the predicted power value in the prediction time domain. Taking a 100 MW wind farm as an example, the prediction time domain length is set to 15 minutes, and the sampling interval is 1 minute, so the prediction time domain contains 15 time points. At time t, the power reference value is the AGC instruction value issued by the power grid dispatching, for example, 85 MW; the predicted power value is the predicted output power of the wind farm at each time point in the next 15 minutes, such as [83.5, 84.2, 84.8, 85.3, 85.7, 86.0, 86.2, 86.3, 86.4, 86.5, 86.5, 86.4, 86.3, 86.1, 85.9] MW. The time-varying weighting coefficient decreases exponentially with the increase of time point, and the weight near the current time is larger, for example, the weight sequence is [1.0, 0.95, 0.90, 0.86, 0.82, 0.78, 0.74, 0.70, 0.67, 0.63, 0.60, 0.57, 0.54, 0.52, 0.49]. The difference square of the power reference value and the predicted power value at each time point is calculated, multiplied by the corresponding weight, and summed to obtain the power tracking error term.

[0041] The control smoothing term is formed by the time-varying weighted sum of squares of the predicted power difference between adjacent time points in the prediction time domain. Continuing to use the predicted power value sequence, the power difference between adjacent time points is calculated as [0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.1, 0.1, 0.0, -0.1, -0.1, -0.2, -0.2] MW. The time-varying weighting coefficient of the smoothing term is set to a constant 0.5, the square of each difference is calculated, multiplied by the weight, and summed to obtain the control smoothing term. The active power optimization objective function is linearly combined by the power tracking error term and the control smoothing term, and the combination coefficients are usually set to 0.7 and 0.3, that is, the tracking accuracy accounts for 70% of the weight, and the control smoothness accounts for 30% of the weight.

[0042] The predicted power value needs to meet the dynamic power constraint and the dynamic ramp rate constraint. The dynamic power constraint sets an upper limit based on the real-time available capacity of the wind farm and a lower limit based on the minimum technical output. For a 100 MW wind farm, the total available capacity of the wind turbine is measured to be 88 MW at a certain time, considering a 5% reserved margin, the upper limit is set to 83.6 MW; the minimum technical output is 10% of the total installed capacity, that is, 10 MW, as the lower limit. The dynamic ramp rate constraint is determined based on the response capability of the wind farm, which is usually set to 2% of the rated capacity per minute, that is, 2 MW per minute in this example. Therefore, the upper limit of the predicted power difference between adjacent time points is +2 MW, and the lower limit is -2 MW.

[0043] The state space model establishment process includes state variable definition, state equation construction and output equation construction. The state variable is selected as the predicted power value at each time point in the prediction time domain, and the initial state is the current actual output power of the wind farm, such as 80 MW. The state equation describes the relationship between the power values at adjacent time points, considers the dynamic response characteristics of the wind farm, and adopts a first-order inertia link model with a time constant of 30 seconds. The output equation directly uses the state variable as the output. The above power constraints and ramp rate constraints also need to be included in the state space model to form a complete state space expression.

[0044] When solving the optimization problem under the state space model, a quadratic programming algorithm is used. The initial value of the optimization solution is set to be that the current wind farm output power remains unchanged in the prediction time domain, that is, all 80 MW. In the optimization process, the predicted power value is adjusted by the gradient descent method until the objective function reaches the minimum and all constraints are satisfied. For the above example, after 100 iterations, the optimized predicted power sequence is [81.5, 83.0, 84.5, 85.5, 86.0, 86.0, 85.5, 85.0, 84.5, 84.0, 83.5, 83.0, 82.5, 82.0, 81.5] MW. By comparing the objective function values before and after optimization, the optimized value is reduced by about 35%, indicating that the optimization effect is significant.

[0045] As the prediction time domain advances, the power tracking error term and the control smoothing term need to be corrected online. The specific method is to update the state estimation of the state space model based on the deviation between the actual measured wind farm output power and the predicted power at the end of each control period (usually 1 minute). For example, the actual measured wind farm output power at t+1 time is 81.2 MW, and the optimized prediction value is 81.5 MW, with a deviation of -0.3 MW. This deviation information is fed back to the model to correct the prediction at subsequent time. The correction method is to multiply the deviation value by a decay coefficient (set to 0.9) and add it to the original prediction sequence to obtain the corrected prediction power sequence.

[0046] When generating the active power optimization control instruction sequence based on the optimal solution result, only the first control value in the prediction time domain is extracted as the instruction for the current control period and issued to the wind farm. In the above example, the control instruction at t time is 81.5 MW. After executing the instruction, roll to t+1 time, take the new measured power as the initial state, and re-execute the optimization solution process to obtain a new predicted power sequence, and extract the first value as the control instruction at t+1 time. Through this rolling time domain optimization method, the control instruction is constantly updated to realize accurate control of the active power of the wind farm.

[0047] The actual application effect shows that the rolling time domain optimization method is used to control the active power of the wind farm, the AGC power tracking error can be controlled within ±1%, compared with the error range of ±3% of the traditional proportional integral controller, the control accuracy is improved by about 67%. At the same time, the active power changes more smoothly, the average per minute climbing rate is reduced from 1.8MW / minute to 1.2MW / minute, which is reduced by 33%, effectively reduces the mechanical wear of the fan, prolongs the service life of the equipment.

[0048] Figure 2 The performance thermodynamic diagram of the wind farm control method of the embodiment of the present application is analyzed. The diagram shows a performance thermodynamic diagram of a wind speed and turbulence intensity double parameter evaluation system. The vertical axis is the wind speed parameter (range 4m / s-20m / s), and the horizontal axis is the turbulence intensity parameter (range 0.05-0.45). The evaluation score is indicated by a blue to yellow gradient color scale in the diagram, with 99.0 points being the best (dark blue) and 75.0 points being the worst (yellow). From the data distribution, the evaluation score is the highest under the condition of medium wind speed interval (12-14m / s) and low turbulence intensity (0.05-0.15), reaching 95.1 points at the highest; as the turbulence intensity increases, the evaluation score generally decreases to 87-89 points in the turbulence intensity 0.40-0.45 interval. At the same time, under the condition of extremely high wind speed (20m / s) or extremely low wind speed (4m / s), the evaluation score is relatively low, indicating that the adaptability of the algorithm under extreme wind conditions needs to be improved. The score distribution in the diagram shows a clear gradient change characteristic, reflecting the sensitivity of the two-way search evaluation algorithm to the wind speed-turbulence intensity combined parameters, which can provide an important reference for the parameter optimization of the wind farm power prediction model. The color scale of the thermodynamic diagram is set from 75.0 points (inferior) to 99.0 points (superior), which intuitively shows the algorithm performance under different parameter combinations.

[0049] In an optional implementation, the optimal solution is performed based on the active power optimization objective function and constraint conditions under the state space model, and the online correction of the power tracking error term and the control smoothing term according to the prediction result of the state space model includes: The alternating direction multiplier method is used to solve the active power optimization objective function under the state space model, the augmented Lagrangian function of the original variable and the auxiliary variable is constructed based on the power tracking error term and the control smoothing term and the corresponding weight coefficient, the original optimization problem is decomposed into a sequence of sub-problems based on the original variable gradient of the augmented Lagrangian function, the original variable, the auxiliary variable and the Lagrange multiplier are updated alternately by using the alternating direction multiplier method, and the convergence criterion is calculated according to the residual of the original variable and the auxiliary variable. When the convergence criterion is less than a preset convergence threshold, an optimal control sequence is obtained. According to the optimal control sequence, a prediction simulation is performed under the state space model to obtain a predicted deviation of the power tracking error term and the control smoothing term, a root mean square error of the predicted deviation is calculated, and a weight coefficient of the power tracking error term and the control smoothing term is corrected online based on the root mean square error.

[0050] A state space model is established, which describes the dynamic characteristics of the power system and includes the relationships between system state variables, control inputs, output responses, etc. The model is a combination of system state equations and output equations. The state equations describe the evolution law of the state variables over time, and the output equations describe the relationship between the system output and the state variables.

[0051] An active power optimization objective function is constructed under the state space model, which includes two parts: a power tracking error term and a control smoothing term. The power tracking error term measures the deviation between the actual power output and the reference power trajectory, and the calculation method is the sum of the squares of the difference between the two. The control smoothing term evaluates the smoothing degree of the control input, which is usually represented as the sum of the squares of the difference between adjacent control variables. The two terms are assigned weight coefficients, and the initial values of the weight coefficients can be set as follows: the weight of the power tracking error term is 0.8, and the weight of the control smoothing term is 0.2.

[0052] For the constructed optimization objective function, the alternating direction multiplier method is used for solving, and auxiliary variables are introduced to convert the original optimization problem into an equivalent form. For the power tracking error term, auxiliary variables are introduced to represent the difference between the actual power and the reference power; for the control smoothing term, auxiliary variables are introduced to represent the change of the control quantity at adjacent time points. Based on the original variables and auxiliary variables, an augmented Lagrangian function is constructed, which includes the original objective function, the equality constraint penalty term and the Lagrange multiplier term. The penalty factor is set to 1.5, which can be adjusted according to the actual convergence performance.

[0053] The solving process of the alternating direction multiplier method is iteratively executed in three steps. In the first step, the original variables are updated, the auxiliary variables and the Lagrange multipliers are fixed, and the augmented Lagrangian function is optimized with respect to the original variables. The gradient descent method can be used for solving, and the learning rate is set to 0.01. In the second step, the auxiliary variables are updated, the updated original variables and the original Lagrange multipliers are fixed, and the augmented Lagrangian function is optimized to obtain new auxiliary variable values. In the third step, the Lagrange multipliers are updated, and the Lagrange multipliers are adjusted according to the inconsistency between the original variables and the auxiliary variables. The adjustment step is 0.5.

[0054] After each round of variable update, the residual between the original variable and the auxiliary variable is calculated as the convergence criterion of the algorithm. The residual is calculated as the Euclidean norm of the difference between the two. Set the preset convergence threshold to 0.001. When the residual is less than the threshold, the algorithm is considered to have converged, and the optimal control sequence is obtained. If the algorithm does not converge within the preset maximum number of iterations, the current optimal solution is output, and the maximum number of iterations is set to 200.

[0055] After obtaining the optimal control sequence, prediction simulation is performed under the state space model to simulate the dynamic response of the system under the action of the control sequence. By comparing the predicted output with the expected output, the prediction deviation of the power tracking error term is calculated; by comparing the actual control sequence with the ideal smooth control sequence, the prediction deviation of the control smoothing term is calculated.

[0056] The quality of the current optimization result is evaluated by calculating the root mean square error of the prediction deviation. The root mean square error of the power tracking error term is calculated as the square root of the sum of the squares of the difference between the predicted power and the reference power divided by the number of sampling points; the root mean square error of the control smoothing term is calculated as the square root of the sum of the squares of the difference between adjacent control values divided by the number of control points minus one.

[0057] Based on the calculated root mean square error, the weight coefficients of the power tracking error term and the control smoothing term are corrected online. If the root mean square error of the power tracking error term is greater than the preset threshold 0.05, increase the weight coefficient of this term by 10% of the current value; if the root mean square error of the control smoothing term is greater than the preset threshold 0.08, increase the weight coefficient of this term by 10% of the current value. After the weight coefficient is corrected, the sum of the two is ensured to be 1, which is realized through normalization processing.

[0058] In actual application, the active power control process of a certain power system, the reference power trajectory is the power value at 1 hour intervals within 24 hours, which is 100 kW, 120 kW, 150 kW, etc. After applying the above method, the root mean square error of the power tracking error term is reduced from the initial 0.082 to 0.032, the root mean square error of the control smoothing term is reduced from 0.095 to 0.043, and the weight coefficient is adjusted from the initial 0.8:0.2 to 0.75:0.25, achieving a balance between power tracking and control smoothing, and the overall performance of the system is significantly improved.

[0059] In an alternative embodiment, the actual active power output in the real-time operation data of the wind farm is compared with the predicted power data in real time, and a dynamic deviation sequence between the actual active power output and the predicted value of the wind farm is calculated, including: The wind farm real-time operation data includes actual active power and predicted power data, the actual active power output is constructed as an actual power output sequence, the predicted power data is constructed as a predicted power sequence, and the actual power output sequence and the predicted power sequence are operated to obtain an initial deviation sequence; Based on the initial deviation sequence and the actual power output sequence, a power curve fitting model is established, and a wind farm fitting power value sequence is calculated according to the power curve fitting model and the initial deviation sequence; The actual power output sequence and the fitting power value sequence are subtracted at a corresponding time to obtain a fitting deviation sequence, the fitting deviation sequence is squared to obtain a fitting deviation square sequence, the fitting deviation square sequence is accumulated within a preset time window to obtain an accumulated value, and the accumulated value is divided by the number of sampling points within the preset time window to obtain a power curve drift degree index; The sign function value of the initial deviation sequence is calculated according to the initial deviation sequence, the sign function value is multiplied by a preset compensation weight factor and the power curve drift degree index, and an initial compensation coefficient is added to obtain a dynamic compensation coefficient; The dynamic compensation coefficient is multiplied by the initial deviation sequence to obtain a dynamic deviation sequence between the actual active power output and the predicted value of the wind farm.

[0060] As Figure 3 shown, the method comprises: By comparing the actual active power output and the predicted power data in the wind farm real-time operation data in real time, a dynamic deviation sequence between the actual active power output and the predicted value of the wind farm is calculated.

[0061] The wind farm real-time operation data includes actual active power and predicted power data. The actual active power output is constructed as an actual power output sequence, for example, the actual active power data collected every 5 minutes within one hour can be represented as: pactual=[120.5, 125.7, 130.2, 128.4, 126.8, 131.5, 135.2, 133.0, 129.5, 127.3, 130.6, 132.8] MW. The predicted power data is constructed as a predicted power sequence, and the corresponding predicted power data can be represented as: p predict =[118.2, 127.3, 126.5, 130.1, 129.2, 128.7, 133.4, 135.2, 131.8, 126.5, 128.9, 130.3] MW. The actual power output sequence and the predicted power sequence are subtracted to obtain an initial deviation sequence, and the calculation method is actual power minus predicted power, and the initial deviation sequence is: p biasinit=[2.3,-1.6,3.7,-1.7,-2.4,2.8,1.8,-2.2,-2.3,0.8,1.7,2.5]MW.

[0062] Based on the initial deviation sequence and the actual power output sequence, a power curve fitting model is established. Here, a polynomial fitting method is used to construct the power curve fitting model. Specifically, the actual power is taken as the independent variable, and the initial deviation is taken as the dependent variable. The polynomial coefficients are fitted by the least squares method. For example, through a third-order polynomial fitting, the coefficients are: a = [0.00012, -0.04587, 5.63215, -228.76589]. According to this fitting model, the corresponding fitting deviation value can be calculated for each actual power value, thereby constructing a fitting power value sequence. Specifically, the fitting power value sequence is calculated by adding the actual power to the deviation value calculated according to the fitting model, and the fitting power value sequence is: p fit =[122.1,124.3,129.8,127.2,125.9,130.3,134.5,132.8,128.9,126.8,129.7,131.6]MW.

[0063] The actual power output sequence and the fitting power value sequence are subtracted at the corresponding time to obtain the fitting deviation sequence, and the calculation method is to subtract the fitting power from the actual power, and the fitting deviation sequence is: p biasfit =[-1.6,1.4,0.4,1.2,0.9,1.2,0.7,0.2,0.6,0.5,0.9,1.2]MW. The square operation is performed on the fitting deviation sequence to obtain the fitting deviation square sequence, i.e.: p biasfitsquare =[2.56,1.96,0.16,1.44,0.81,1.44,0.49,0.04,0.36,0.25,0.81,1.44]MW 2 . The cumulative operation is performed on the fitting deviation square sequence within a preset time window (here, 12 sampling points, i.e., one hour) to obtain a cumulative value, and the cumulative value is 11.76 MW 2 . The cumulative value is divided by the number of sampling points in the preset time window (12 points) to obtain the power curve drift degree index, i.e.: drift index =11.76 / 12=0.98MW 2 .

[0064] The sign function value of the initial deviation sequence is calculated according to the initial deviation sequence. The definition of the sign function is that when the deviation is greater than 0, the sign function value is 1; when the deviation is less than 0, the sign function value is -1; and when the deviation is equal to 0, the sign function value is 0. For the above initial deviation sequence, the calculated sign function value is: sign bias=[1,-1,1,-1,-1,1,1,-1,-1,1,1,1]. The sign function value is multiplied by a preset compensation weight factor (set to 0.05) and a power curve drift degree index (0.98), and added to the initial compensation coefficient (set to 1.0) to obtain the dynamic compensation coefficient. The specific calculation is: 1.0 + 0.05 x 0.98 x sign bias , the dynamic compensation coefficient is: comp coef =[1.049, 0.951, 1.049, 0.951, 0.951, 1.049, 1.049, 0.951, 0.951, 1.049, 1.049, 1.049].

[0065] The dynamic compensation coefficient is multiplied by the initial deviation sequence to obtain the dynamic deviation sequence between the actual active power output of the wind farm and the predicted value. The calculation method is: p biasdynamic =comp coef x p biasinit , the dynamic deviation sequence is: p biasdynamic =[2.41,-1.52,3.88,-1.62,-2.28,2.94,1.89,-2.09,-2.19,0.84,1.78,2.62] MW.

[0066] The dynamic deviation sequence calculated by the above method can more accurately reflect the difference between the actual active power output of the wind farm and the predicted value, effectively considers the influence of power curve drift on the deviation, and improves the accuracy and stability of the wind farm power prediction. This dynamic compensation method based on the power curve drift degree index can adapt to the power deviation characteristics of the wind farm under different operating conditions, and provides more reliable data support for the operation management and dispatch of the wind farm.

[0067] In an optional implementation, a feedback compensator is constructed based on the dynamic deviation sequence, and a compensation output of the feedback compensator is superimposed with the active power optimization control instruction sequence to obtain a corrected active power control instruction, which includes: The dynamic deviation sequence is divided into a training sample set according to a time window, time sequence feature vectors containing historical information are obtained by performing time sequence feature extraction on the training sample set through a long short-term memory network, correlation weights between features are calculated based on the time sequence feature vectors, long-term dependence relationships and short-term fluctuation characteristics of the dynamic deviation sequence are modeled according to the correlation weights, and an initial compensation model of the feedback compensator is obtained; A mapping relationship is established by calculating statistical characteristics of the dynamic deviation sequence, a learning rate parameter of the initial compensation model is dynamically adjusted according to the mapping relationship, a gradient clipping method is used to cut off the gradient greater than a preset compensation threshold in the training process to prevent gradient explosion, the training sample set is divided into a training set and a validation set, the parameters of the initial compensation model are iteratively optimized through a cross-validation method to obtain a compensation model with optimal generalization performance; The compensation output of the compensation model and the active power optimization control instruction sequence are adaptively weighted and superimposed to establish a multi-objective evaluation index containing control error and power fluctuation rate, an adjustment amount of the superimposition weight is calculated based on the multi-objective evaluation index, the superimposition weight is updated in real time using the adjustment amount to obtain a corrected active power control instruction.

[0068] A dynamic deviation sequence data containing multiple time points is obtained, which represents the deviation value between the actual power output and the optimization control instruction. For example, in a certain distributed energy system, the deviation data sampled continuously for 24 hours is [-0.15, -0.12, -0.08, -0.10, -0.05, 0.02, 0.06, 0.08, 0.10, 0.12, 0.15, 0.18, 0.20, 0.18, 0.15, 0.10, 0.05, 0.00, -0.05, -0.08, -0.10, -0.12, -0.14, -0.16] MW. These deviation data are divided according to a time window, the length of the time window is set to 6 time points, and the sliding step is 1 time point. For example, the first training sample is [-0.15, -0.12, -0.08, -0.10, -0.05, 0.02], the second training sample is [-0.12, -0.08, -0.10, -0.05, 0.02, 0.06], and so on, to construct a complete training sample set.

[0069] The long short-term memory network is used for time sequence feature extraction of the training sample set. The network includes an input layer, a hidden layer, and an output layer. The number of hidden layer units is set to 64. The time sequence data is processed through three gate mechanisms, namely, a forgetting gate, an input gate, and an output gate. For example, for the input sample [-0.15, -0.12, -0.08, -0.10, -0.05, 0.02], the time sequence feature vector containing long short-term memory information [0.041, -0.037, 0.025, -0.018, 0.032, -0.022, 0.028,..., 0.015] is obtained after network processing. Based on these feature vectors, the correlation weight matrix between different time point features is calculated, which represents the influence degree of historical data on the current prediction. Through the self-attention mechanism, the correlation weight is applied to the feature vector, so as to model the long-term dependence relationship and short-term fluctuation characteristics of the dynamic bias sequence, and obtain the initial compensation model of the feedback compensator.

[0070] In the model training process, a dynamic adjustment mechanism of the learning rate is established by calculating the statistical characteristics of the dynamic bias sequence. The standard deviation σ and the mean μ of the bias sequence are calculated. In this example, σ = 0.123 and μ = 0.001. Based on these statistics, a learning rate mapping relationship is established: when the bias fluctuation is large (σ > 0.1), the basic learning rate is set to 0.001; when the bias fluctuation is at a medium level (0.05 < σ ≤ 0.1), the basic learning rate is set to 0.005; and when the bias fluctuation is small (σ ≤ 0.05), the basic learning rate is set to 0.01. In this way, the learning rate parameter of the initial compensation model is dynamically adjusted, so that the model has good convergence under different fluctuation characteristics.

[0071] To prevent the problem of gradient explosion, a preset compensation threshold of 0.5 is set. When the calculated gradient value is greater than the threshold, it is truncated to the threshold value, ensuring the stability of the training process. The training sample set is divided into a training set and a validation set according to a ratio of 7:3. The five-fold cross-validation method is used to iteratively optimize the parameters of the initial compensation model. In each fold validation, the mean square error on the training set and the validation set is calculated respectively. When the error on the validation set does not decrease for 5 consecutive iteration periods, the training process is stopped. In this way, the compensation model with the optimal generalization performance is finally obtained. The mean square error of the model on the test set is about 0.0023.

[0072] The compensation output of the compensation model is adaptively weighted and superimposed with the active power optimization control instruction sequence. For example, the active power optimization control instruction at the current time is 5.25 megawatts, the compensation value predicted by the compensation model is 0.15 megawatts, and the initial superimposition weight is set to 0.8. Then the corrected active power control instruction is 5.25+(0.8x0.15)=5.37 megawatts. A multi-objective evaluation index including control error and power fluctuation rate is established. The control error is defined as the absolute value of the difference between the corrected instruction and the actual power output, and the power fluctuation rate is defined as the change rate of the corrected instruction at adjacent two time points. Based on the two indexes, the adjustment amount of the superimposition weight is calculated. When the control error is reduced and the power fluctuation rate does not exceed the preset threshold 0.05, the superimposition weight is increased; otherwise, the superimposition weight is reduced. The adjustment amount is calculated as the difference between the current control error and the last time control error multiplied by a coefficient of 0.1. The adjustment amount is applied to the current superimposition weight to realize real-time update of the superimposition weight.

[0073] Through the above process, the conversion of the dynamic deviation sequence to the corrected active power control instruction is successfully realized, the control accuracy is improved, the power fluctuation is reduced, and the active power control of the distributed energy system is more stable and reliable. Experimental results show that after using the method, the control error of the system is reduced by an average of 37.8%, and the power fluctuation is reduced by 25.3%, which provides effective guarantee for the stable operation of the distributed energy system.

[0074] Figure 4For the performance comparison and analysis column chart of the feedback compensator embodiment of the present application, the chart shows the performance evaluation results of the wind farm power prediction system at different development stages, and comprehensively compares the three core indicators of control accuracy, response speed and disturbance resistance. The horizontal axis of the chart represents four different development stages: initial model, optimized model, adaptive compensation model and comprehensive test, and the vertical axis is the performance index percentage. From the data evolution, the initial model stage has relatively low indicators, with control accuracy of 64.5%, response speed of 56.2%, and disturbance resistance of only 52.0%; after optimization, the three indicators are improved to 80.2%, 76.0% and 68.1% respectively; after introducing the adaptive compensation mechanism, the performance is significantly improved, with control accuracy reaching 104.6%, response speed improving to 96.3%, and disturbance resistance reaching 91.7%; finally, in the comprehensive test stage, the three indicators all reach a high level, which are 109.1%, 104.5% and 100.9% respectively. In the legend, the blank box represents the control accuracy, representing the accuracy of the model; the diagonal box represents the response speed, reflecting the rapid response ability of the model to input changes; the grid box represents the disturbance resistance, reflecting the stability of the model under external interference. The overall trend shows that through continuous optimization and the introduction of the adaptive compensation mechanism, the prediction system has achieved significant improvement in all performance indicators, and finally formed a comprehensive prediction scheme with high precision, fast response and strong robustness.

[0075] In an optional implementation, the training sample set is divided into a training set and a validation set, the parameters of the initial compensation model are iteratively optimized through a cross-validation method, and a compensation model with optimal generalization performance is obtained, including: The training sample set is divided into a training set and a validation set according to the time continuity principle, the training set is divided into a plurality of subsets of equal size based on the time sequence distribution characteristics of the training set, one of the subsets is selected as a validation sample in a rotating manner, and the remaining subsets are used as training samples to construct a cross-validation training group; The initial compensation model is trained on the cross-validation training group, a historical gradient sequence is collected, the gradient mean and gradient fluctuation amplitude of the historical gradient sequence are calculated, and an adaptive compensation threshold is established according to the mapping relationship between the gradient mean and the gradient fluctuation amplitude; Based on the adaptive compensation threshold, the training gradient of the initial compensation model on each training subset is monitored, when the amplitude of the training gradient exceeds the adaptive compensation threshold, a normalized gradient vector is calculated based on the direction of the training gradient, and the product of the adaptive compensation threshold and the normalized gradient vector is used as the clipped gradient; The model parameters are updated using the cropped gradient, the model prediction bias is calculated based on the corresponding validation subset, and an evaluation criterion is constructed based on the sensitivity of the model parameters to the model prediction bias. When the evaluation criterion reaches the optimal value, the current model parameters are saved. The parameter optimization process is performed on all cross-validation training groups in turn, and the compensation model with the optimal generalization performance is selected from the multiple optimization results.

[0076] The training sample set division process adopts the time continuity principle, and arranges the data in chronological order according to the timestamps of the samples. Taking the transmission line temperature compensation model as an example, it is assumed that one year of historical data contains 8760 hours of samples, each of which contains temperature, load rate, wind speed, and other influencing factors and corresponding line temperature values. These samples are divided into training set and validation set in chronological order, with the training set accounting for 75%, i.e. the first 6570 samples as the training set and the last 2190 samples as the validation set.

[0077] The time series distribution characteristics analysis of the training set is determined by calculating the autocorrelation coefficient of the samples. For data with obvious seasonality, the autocorrelation coefficient has obvious peaks at 24 hours and seasonal periods. Based on this characteristic, the training set is divided into K equal-sized subsets, and K is usually selected as 5 or 10. In this embodiment, K=5, so each subset contains 1314 sample points. The division is not random, but maintains time continuity, i.e. the first subset contains the first to 1314 samples, the second subset contains the 1315 to 2628 samples, and so on.

[0078] The process of constructing cross-validation training groups adopts a rotation method. In the first group, the first subset is selected as the validation sample, and the remaining four subsets are used as the training sample; in the second group, the second subset is selected as the validation sample, and the remaining subsets are used as the training sample; and so on, a total of 5 cross-validation training groups are constructed. For each training group, the training sample contains 5256 data points, and the validation sample contains 1314 data points.

[0079] The initial compensation model structure adopts a three-layer neural network, the input layer contains 5 neurons corresponding to temperature, load rate, wind speed, solar intensity, and precipitation, the hidden layer contains 10 neurons, and the output layer is one neuron corresponding to the line temperature compensation value. The activation function is selected as ReLU function, and the initialization adopts Xavier method, each parameter is assigned a random value obeying uniform distribution.

[0080] The historical gradient sequence is collected after each training batch. The random gradient descent method is used in the training process, the batch size is set to 32, and the initial learning rate is 0.01. After completing the parameter update of each batch, the gradient values of all parameters are recorded to form the historical gradient sequence. Taking the weight parameter of the first neuron in the hidden layer as an example, after 100 continuous batch training, 100 gradient values are collected to form the gradient sequence of the parameter [-0.021, 0.035, -0.018, 0.042... 0.029].

[0081] The gradient mean is the arithmetic mean of the gradient sequence. For the above gradient sequence, the gradient mean is calculated as 0.008. The gradient fluctuation amplitude is the standard deviation of the gradient sequence, and the standard deviation of the sequence is calculated as 0.024. The gradient mean and fluctuation amplitude of each parameter in the model are calculated to form the parameter-gradient feature mapping table.

[0082] The adaptive compensation threshold is established based on the relationship between the gradient mean and the fluctuation amplitude. The specific mapping relationship is: threshold = |gradient mean| + a x gradient fluctuation amplitude, where a is the fluctuation coefficient, which is set according to the complexity of the model. For this example model, the value of a is set to 2.5. Taking the above parameters as an example, the adaptive compensation threshold is calculated as |0.008| + 2.5 x 0.024 = 0.068. Each parameter in the model calculates an independent adaptive compensation threshold to form the parameter-threshold correspondence table.

[0083] The training gradient monitoring is performed at each training batch. When the current gradient amplitude calculated by a certain parameter exceeds its corresponding adaptive compensation threshold, the gradient clipping mechanism is triggered. Taking the above parameters as an example, suppose the gradient value calculated in a certain batch is 0.092, which is greater than the adaptive compensation threshold of the parameter 0.068, then gradient clipping processing is required.

[0084] The normalized gradient vector is calculated by dividing the original gradient by its module length. For multi-dimensional parameters such as weight matrices, the Frobenius norm of the gradient matrix is calculated first, and then normalized using the norm. For the above one-dimensional parameter, normalization is simplified to take the gradient sign, and the gradient value is 0.092, which is normalized to +1.

[0085] The clipped gradient is calculated as the product of the adaptive compensation threshold and the normalized gradient vector. For the above parameter, the clipped gradient is 0.068 x (+1) = 0.068. This method preserves the gradient direction information while limiting the update step size to prevent parameter fluctuations during training.

[0086] The model parameter update adopts the momentum method, and the update formula is: new parameter = current parameter - learning rate x clipped gradient + momentum coefficient x last step update amount. The momentum coefficient is set to 0.9, and the learning rate adopts the decay strategy, with an initial value of 0.01, and decaying to 95% of the original value every 10 batches. Assuming that the current parameter value is 0.352, the last step update amount is 0.005, the current learning rate is 0.008, and the clipped gradient is 0.068, then the updated parameter value is 0.352-0.008x0.068+0.9x0.005=0.3514.

[0087] The model prediction bias calculation is based on the validation subset. The difference between the model prediction value and the actual value is calculated for each validation sample, and two indicators, root mean square error (RMSE) and mean absolute error (MAE), are used. The specific calculation process is to input the validation subset into the current model to obtain the predicted temperature compensation value, and compare it with the actual temperature compensation value. Taking a certain validation as an example, on 1314 validation samples, the RMSE is calculated to be 1.8°C, and the MAE is calculated to be 1.5°C.

[0088] The model parameter sensitivity analysis is realized by the perturbation method. A small perturbation δ (taking 0.1% of the current value of the parameter) is added to each parameter, and the change amplitude of the model output is calculated. The sensitivity is defined as the ratio of the output change rate to the parameter change rate. Taking a certain weight parameter as an example, the current value is 0.352, and after increasing 0.1%, it becomes 0.3523. The model prediction bias changes from 1.8°C to 1.85°C, with a change rate of 2.8%, so the parameter sensitivity is 28 (2.8% ÷ 0.1%).

[0089] The evaluation criteria are constructed by combining the prediction bias and the parameter sensitivity, and the weighted average method is adopted. The evaluation function is defined as: J = β x normalized prediction bias + (1-β) x normalized parameter sensitivity sum, where β is the balance coefficient, set to 0.7. Normalization processing maps each index to the [0, 1] interval. When the J value reaches the minimum, the current model parameters are saved as the optimal solution for this cross-validation group.

[0090] The parameter optimization process is performed on all cross-validation training groups, and an optimal parameter set is obtained for each group. Taking 5-fold cross-validation as an example, 5 different parameter sets are obtained. For each parameter, use an independent validation set (2190 samples) for evaluation and calculate the prediction bias. Assuming that the MAE of the 5 parameter sets on the validation set is 1.62°C, 1.45°C, 1.58°C, 1.39°C, and 1.53°C, respectively, the fourth parameter set with the smallest MAE (1.39°C) is selected as the final model parameter.

[0091] Additional measures to prevent overfitting include early stopping strategy and parameter regularization. Early stopping strategy sets the validation error to stop training for 5 consecutive training cycles without improvement. Parameter regularization adopts L2 norm, and the regularization coefficient is set to 0.001. Add the parameter square term in the objective function. These measures are combined with adaptive gradient clipping to further improve the generalization ability of the model.

[0092] The actual application shows that the line temperature compensation model trained by the method reduces the prediction error by an average of 22.5% under different seasons and load conditions, especially under extreme weather conditions, the prediction accuracy is significantly improved, effectively supporting the dynamic capacity evaluation of the transmission line.

[0093] Figure 5 The figure compares the root mean square error (RMSE) performance of the three prediction methods, where the diamond mark "the technical solution" represents the dynamic adaptive compensation algorithm, the square mark "the traditional gradient clipping method" is a classical optimization method based on gradient descent, and the circular mark "the fixed threshold method" uses a pre-set fixed threshold for prediction correction. From the data trend, the RMSE value of the dynamic adaptive compensation algorithm fluctuates between 0.43 and 0.54, with an average of 0.38; the RMSE value of the traditional gradient clipping method varies between 0.29 and 0.38, with an average of 0.34; the fixed threshold method performs best, with an RMSE value between 0.17 and 0.27, with an average of 0.22. Analyzing each scenario, in scenario 2, all three methods perform well, with RMSEs of 0.43, 0.29 and 0.17 respectively; in scenarios 4 and 7, the prediction errors of the three methods are relatively large, with the RMSE of the dynamic adaptive compensation algorithm reaching 0.54. Overall, the fixed threshold method maintains a relatively stable low error level in each scenario, while the dynamic adaptive compensation algorithm, although with a larger average error, can also achieve acceptable prediction results in certain specific scenarios (such as scenario 2). The comparison results of the three algorithms clearly show the differences in prediction performance in different application scenarios, providing an important reference for algorithm selection.

[0094] In a second aspect of the embodiments of the present application, a wind farm AGC optimization control system based on model predictive control is provided, comprising: A first unit for obtaining real-time operation data of a wind farm, and establishing an adaptive prediction model representing the dynamic response characteristics of the wind farm based on the real-time operation data of the wind farm; A second unit for using the real-time operation data of the wind farm to perform online identification of parameters of the adaptive prediction model through recursive least squares to obtain real-time dynamic characteristic parameters of the wind farm, and substituting the real-time dynamic characteristic parameters of the wind farm into the adaptive prediction model to obtain predicted power data of the wind farm in a future period. a third unit configured to, based on the predicted power data, construct, by using a rolling time domain optimization method, an active power optimization objective function containing a power tracking error term and a control smoothing term, and obtain, by solving the active power optimization objective function, a sequence of active power optimization control instructions in a future control time domain of the wind farm; a fourth unit configured to compare, in real time, actual active power output in the real-time operation data of the wind farm with the predicted power data, calculate a dynamic deviation sequence between the actual active power output and the predicted value of the wind farm, construct a feedback compensator based on the dynamic deviation sequence, and perform superposition operation on a compensation output of the feedback compensator and the sequence of active power optimization control instructions to obtain corrected active power control instructions; a fifth unit configured to issue the corrected active power control instructions to each wind turbine generator for execution, and collect power output data of each wind turbine generator in real time, and input the power output data as new real-time operation data of the wind farm into the adaptive prediction model to realize closed-loop control of active power of the wind farm.

[0095] In a third aspect, an electronic device is provided, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the method described above.

[0096] In a fourth aspect, a computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.

[0097] The present application can be a method, apparatus, system, and / or computer program product. The computer program product can include a computer-readable storage medium having computer-readable program instructions loaded thereon, which are used to execute various aspects of the present application.

[0098] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for AGC optimal control of a wind farm based on model predictive control, characterized in that, The method comprises the following steps: acquiring real-time operation data of a wind farm, and establishing an adaptive prediction model representing dynamic response characteristics of the wind farm based on the real-time operation data of the wind farm; using the real-time operation data of the wind farm, performing online identification of parameters of the adaptive prediction model by using a recursive least square method to obtain real-time dynamic characteristic parameters of the wind farm, and substituting the real-time dynamic characteristic parameters of the wind farm into the adaptive prediction model to obtain predicted power data of the wind farm in a future time period; based on the predicted power data, constructing an active power optimization objective function including a power tracking error term and a control smoothing term by using a rolling time domain optimization method, and obtaining a sequence of active power optimization control instructions in a future control time domain of the wind farm by solving the active power optimization objective function; performing real-time comparison between actual active power output in the real-time operation data of the wind farm and the predicted power data, calculating a dynamic deviation sequence between the actual active power output and the predicted value of the wind farm, constructing a feedback compensator based on the dynamic deviation sequence, superimposing compensation output of the feedback compensator on the sequence of active power optimization control instructions to obtain corrected active power control instructions; issuing the corrected active power control instructions to each wind turbine generator for execution, and collecting power output data of each wind turbine generator in real time, taking the power output data as new real-time operation data of the wind farm and inputting the new real-time operation data into the adaptive prediction model to realize closed-loop control of active power of the wind farm.

2. The method of claim 1, wherein, using the real-time operation data of the wind farm, performing online identification of parameters of the adaptive prediction model by using a recursive least square method to obtain real-time dynamic characteristic parameters of the wind farm includes: using the real-time operation data of the wind farm, constructing a parameter estimation gain matrix by using a recursive least square method, the parameter estimation gain matrix being used for iterative updating of parameters of the adaptive prediction model, the parameters of the adaptive prediction model including to-be-identified parameters reflecting dynamic characteristics of the wind farm; based on the parameter estimation gain matrix, performing online iterative calculation on the to-be-identified parameters to obtain real-time dynamic characteristic parameters of the wind farm.

3. The method of claim 1, wherein, based on the predicted power data, constructing an active power optimization objective function including a power tracking error term and a control smoothing term by using a rolling time domain optimization method, and obtaining a sequence of active power optimization control instructions in a future control time domain of the wind farm by solving the active power optimization objective function includes: based on the predicted power data, constructing an active power optimization objective function, a power tracking error term in the active power optimization objective function being formed by time-varying weighted sum of squares of power reference values and predicted power values in a prediction time domain, and a control smoothing term in the active power optimization objective function being formed by time-varying weighted sum of squares of differences between predicted powers at adjacent time points in the prediction time domain; applying a dynamic power constraint and a dynamic ramp rate constraint to the predicted power value, setting upper and lower limits to the predicted power value based on the dynamic power constraint, setting upper and lower limits to a difference between predicted power values of adjacent time instants in the predicted time domain based on the dynamic ramp rate constraint, and establishing a state space model based on the active power optimization objective function, the power tracking error term, the control smoothing term, and the constraint condition; performing optimal solving based on the active power optimization objective function and the constraint condition under the state space model, performing online correction to the power tracking error term and the control smoothing term according to a prediction result of the state space model, and generating an active power optimization control instruction sequence in a future control time domain of the wind farm based on a result of the optimal solving.

4. The method of claim 3, wherein, performing optimal solving based on the active power optimization objective function and the constraint condition under the state space model, and performing online correction to the power tracking error term and the control smoothing term according to a prediction result of the state space model, includes: performing solving to the active power optimization objective function under the state space model by using an alternating direction multiplier method, constructing an augmented Lagrange function of original variables and auxiliary variables based on the power tracking error term, the control smoothing term, and corresponding weight coefficients, decomposing the original optimization problem into a sequence of sub-problems based on a gradient of the original variables of the augmented Lagrange function, alternately updating the original variables, the auxiliary variables, and a Lagrange multiplier by using the alternating direction multiplier method, calculating a convergence criterion according to residuals of the original variables and the auxiliary variables, and obtaining an optimal control sequence when the convergence criterion is less than a preset convergence threshold; performing prediction simulation under the state space model according to the optimal control sequence, obtaining a prediction deviation of the power tracking error term and the control smoothing term, calculating a root mean square error of the prediction deviation, and performing online correction to weight coefficients of the power tracking error term and the control smoothing term based on the root mean square error.

5. The method of claim 1, wherein, performing real-time comparison between actual active power output in real-time operation data of the wind farm and the predicted power data, and calculating a dynamic deviation sequence between the actual active power output and the predicted value of the wind farm, includes: the real-time operation data of the wind farm includes actual active power and predicted power data, the actual active power output is constructed as an actual power output sequence, the predicted power data is constructed as a predicted power sequence, and the actual power output sequence and the predicted power sequence are operated to obtain an initial deviation sequence; based on the initial deviation sequence and the actual power output sequence, a power curve fitting model is established, and a fitted power value sequence of the wind farm is calculated according to the power curve fitting model and the initial deviation sequence; a fitting deviation sequence is obtained by subtracting the actual power output sequence from the fitting power value sequence at corresponding time points, a fitting deviation square sequence is obtained by squaring the fitting deviation sequence, an accumulated value is obtained by accumulating the fitting deviation square sequence within a preset time window, and a power curve drift degree index is obtained by dividing the accumulated value by the number of sampling points within the preset time window; a sign function value of the initial deviation sequence is calculated, a dynamic compensation coefficient is obtained by multiplying the sign function value by a preset compensation weight factor and the power curve drift degree index, and adding an initial compensation coefficient; the dynamic compensation coefficient is multiplied by the initial deviation sequence to obtain a dynamic deviation sequence between the actual active power output of the wind farm and the predicted value.

6. The method of claim 1, wherein, a feedback compensator is constructed based on the dynamic deviation sequence, and a compensation output of the feedback compensator is superimposed on the active power optimization control instruction sequence to obtain a corrected active power control instruction, including: the dynamic deviation sequence is divided into a training sample set according to a time window, time sequence feature vectors containing historical information are obtained by extracting time sequence features of the training sample set through a long short-term memory network, correlation weights between features are calculated based on the time sequence feature vectors, and a long-term dependence relationship and a short-term fluctuation characteristic of the dynamic deviation sequence are modeled according to the correlation weights to obtain an initial compensation model of the feedback compensator; a mapping relationship is established by calculating statistical characteristics of the dynamic deviation sequence, a learning rate parameter of the initial compensation model is dynamically adjusted according to the mapping relationship, a gradient clipping method is used to truncate a gradient greater than a preset compensation threshold to prevent gradient explosion in the training process, the training sample set is divided into a training set and a validation set, parameters of the initial compensation model are iteratively optimized through a cross-validation method to obtain a compensation model with optimal generalization performance; a compensation output of the compensation model is adaptively weighted and superimposed on the active power optimization control instruction sequence to establish a multi-objective evaluation index containing a control error and a power fluctuation rate, an adjustment amount of a superimposition weight is calculated based on the multi-objective evaluation index, the superimposition weight is updated in real time using the adjustment amount, and a corrected active power control instruction is obtained.

7. The method of claim 6, wherein, the training sample set is divided into a training set and a validation set, parameters of the initial compensation model are iteratively optimized through a cross-validation method to obtain a compensation model with optimal generalization performance, including: the training sample set is divided into a training set and a validation set according to a time continuity principle, the training set is divided into a plurality of subsets of equal size based on time sequence distribution characteristics of the training set, one of the subsets is selected as a validation sample in a rotating manner, and the remaining subsets are used as training samples to construct a cross-validation training group; the initial compensation model is trained on the cross-validation training group, a historical gradient sequence is collected, a gradient mean and a gradient fluctuation amplitude of the historical gradient sequence are calculated, and an adaptive compensation threshold is established according to a mapping relationship between the gradient mean and the gradient fluctuation amplitude; monitoring a training gradient of the initial compensation model on each training subset based on the adaptive compensation threshold, when an amplitude of the training gradient exceeds the adaptive compensation threshold, calculating a normalized gradient vector based on a direction of the training gradient, and taking a product of the adaptive compensation threshold and the normalized gradient vector as a clipped gradient; updating a model parameter using the clipped gradient, calculating a model prediction bias based on a corresponding validation subset, constructing an evaluation criterion combining a sensitivity of the model parameter to the model prediction bias, saving a current model parameter when the evaluation criterion reaches an optimal value, sequentially performing a parameter optimization process on all cross-validation training groups, and selecting a compensation model with optimal generalization performance from multiple optimization results.

8. A wind farm AGC optimization control system based on model predictive control for implementing the method of any of the preceding claims 1-7, characterized in that, Comprising: a first unit configured to obtain wind farm real-time operation data, and establish an adaptive prediction model representing dynamic response characteristics of the wind farm based on the wind farm real-time operation data; a second unit configured to obtain wind farm real-time dynamic characteristic parameters by performing online identification on parameters of the adaptive prediction model using the wind farm real-time operation data through a recursive least squares method, and obtain predicted power data of the wind farm in a future time period by substituting the wind farm real-time dynamic characteristic parameters into the adaptive prediction model; a third unit configured to construct an active power optimization objective function including a power tracking error term and a control smoothing term based on the predicted power data using a rolling time domain optimization method, and obtain an active power optimization control instruction sequence in a future control time domain of the wind farm by solving the active power optimization objective function; a fourth unit configured to compare actual active power output in the wind farm real-time operation data with the predicted power data in real time, calculate a dynamic deviation sequence between the actual active power output and the predicted value of the wind farm, construct a feedback compensator based on the dynamic deviation sequence, and obtain corrected active power control instructions by superimposing a compensation output of the feedback compensator and the active power optimization control instruction sequence; a fifth unit configured to issue the corrected active power control instructions to each wind turbine for execution, and collect power output data of each wind turbine in real time, input the power output data as new wind farm real-time operation data into the adaptive prediction model, and realize closed-loop control of active power of the wind farm.

9. An electronic device, comprising: Comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the method of any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions, when executed by the processor, implement the method of any one of claims 1 to 7.

Citation Information

Cited By

  • Hydroelectric generating set power active control method, system and equipment based on frequency prediction and medium

    CN121124241A

  • Large dynamic reverse demodulation method and device based on TDMA system

    CN121124917A

  • Hybrid model predictive control method and system for controlling motor

    CN121277154A

  • Hydropower station AGC collaborative optimization method and device based on deep learning load prediction and model prediction control

    CN121367187A

  • A Collaborative Optimization Method and Device for AGC in Hydropower Stations Based on Deep Learning Load Forecasting and Model Predictive Control

    CN121367187B