An offshore wind power energy storage system control method based on improved model predictive control

CN122992897APending Publication Date: 2026-10-27HUANENG POWER INT ENERGY DEV CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611470013.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]本发明的目的在于提供一种基于改进模型预测控制的海上风电储能系统控制方法,主要解决了电解槽调频响应、设备寿命及制氢收益之间的多目标协调优化的技术问题,其适用于包含海上风电场、碱性电解槽制氢系统及储能系统的电氢耦合架构,是一种基于模型预测控制(Model predictive control,MPC)的深度协同调频方法

Benefits of technology

[0147]1、本发明通过构建包含“频率偏差项”与“制氢经济目标跟踪项”的多目标MPC函数,能够根据实时工况灵活分配权重。在优先保障电网频率稳定的前提下,使碱性电解槽尽可能运行在最优经济制氢功率点,显著提升了系统的整体能源利用率和制氢综合效益。有效保护设备寿命:通过运行模式因子和控制增量惩罚项,有效避免了电解槽的频繁启停,延长了核心设备的使用寿命。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122992897A_ABST
    Figure CN122992897A_ABST
Patent Text Reader

Abstract

The application discloses a kind of offshore wind power energy storage system control method based on improved model predictive control, it is related to power system operation and control technical field.The technical scheme includes the following steps: step S1, constructs electric hydrogen coupling system collaborative state space model;Step S2, real-time working condition identification and operation mode determination;Step S3, construct multi-objective optimization function based on model predictive control MPC;Step S4: determine system dynamic power boundary constraint;Step S5: quadratic programming QP standard type conversion of multi-objective optimization problem;Step S6: optimal control sequence solving and emergency degradation logic execution.The application can realize the deep collaborative response of offshore wind power and hydrogen production system, while ensuring the frequency modulation accuracy, effectively avoids the frequent start-stop of alkaline electrolytic cell, improves the economic operation level and equipment life of system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system operation and control technology, and in particular to a control method for offshore wind power energy storage systems based on improved model predictive control. Background Technology

[0002] Offshore wind power, as a high-energy-density renewable energy source, has seen its installed capacity continuously expand. However, offshore wind power exhibits significant volatility and randomness, posing a substantial challenge to the frequency stability of the power grid after large-scale grid connection.

[0003] Currently, utilizing hydrogen electrolyzers as flexible loads for grid frequency regulation has become a research hotspot. Alkaline electrolyzers are widely used due to their low cost and mature technology, but their response characteristics present a matching challenge with the rapid fluctuations of offshore wind power. Existing hydrogen-electricity co-regulation strategies have the following shortcomings: traditional control logic does not fully consider the frequent start-stop constraints of alkaline electrolyzers, leading to frequent equipment operation under severe wind power fluctuations and shortening the electrolyzer's lifespan; existing methods often focus on single frequency regulation accuracy, neglecting the optimal operating point and economic benefits of the hydrogen production system, resulting in low hydrogen production efficiency; the regulation capability of the electrolyzer is strictly limited by dynamic physical boundaries such as hydrogen storage tank pressure and battery state of charge (SOC), making it difficult for traditional frequency regulation control methods (such as PID control) to achieve real-time optimal regulation under multivariable constraints; when dealing with complex hydrogen-electricity coupling models, complex optimization algorithms may exhibit non-convergence in extreme operating conditions, affecting the robustness of system operation.

[0004] Model predictive control (MPC) is an online optimization control algorithm that mainly includes three basic elements: predictive model, rolling optimization, and feedback correction. MPC is one of the effective methods for handling constrained system control problems, aiming to solve multivariable constrained optimization control problems that are difficult to address with PID control. The algorithm exhibits strong robustness. Summary of the Invention

[0005] The purpose of this invention is to provide a control method for offshore wind power energy storage systems based on improved model predictive control. It mainly solves the technical problem of multi-objective coordinated optimization among electrolyzer frequency regulation response, equipment lifespan and hydrogen production revenue. It is applicable to the electro-hydrogen coupling architecture that includes offshore wind farms, alkaline electrolyzer hydrogen production systems and energy storage systems. It is a deep coordinated frequency regulation method based on model predictive control (MPC).

[0006] The inventive concept of this invention is as follows: First, a collaborative system model incorporating an offshore wind farm, an alkaline electrolyzer, battery energy storage, and a hydrogen storage tank is constructed, and a discretized linear state-space expression is established. Second, a model-predictive control (MPC) architecture is adopted to construct a multi-objective function integrating grid frequency deviation, optimal hydrogen production operating point tracking, and control smoothness. This method dynamically adjusts the start-up and shutdown constraints of the alkaline electrolyzer by introducing an operating mode factor based on wind speed ranges, and combines hydrogen storage pressure and battery state of charge (SOC) to correct power boundary constraints in real time. The optimal power command is solved using a standard quadratic programming (QP) algorithm, and rule-based emergency degradation logic is set to deal with non-convergence of the algorithm. This invention can achieve deep collaborative response between offshore wind power and hydrogen production systems, effectively avoiding frequent start-up and shutdown of the alkaline electrolyzer while ensuring frequency regulation accuracy, thereby improving the economic operation level and equipment lifespan of the system.

[0007] To achieve the aforementioned objectives, the present invention employs the following technical solution: a control method for an offshore wind power energy storage system based on improved model predictive control, comprising the following steps:

[0008] Step S1: Construct a cooperative state-space model of the electro-hydrogen coupling system;

[0009] Based on the physical characteristics of offshore wind power PMSG turbine units, alkaline electrolyzers, battery energy storage systems (BESS) and hydrogen storage tanks, a system mathematical model is established that includes grid frequency deviation, hydrogen storage pressure, battery state of charge and hydrogen production rate, and is tuned into a linear discretized state-space equation.

[0010] Step S2: Real-time operating condition identification and operation mode determination;

[0011] The power management system (PMS) collects real-time data on grid frequency deviation, current wind speed, alkaline electrolyzer operating status, and the status of each energy storage unit. Based on the current wind speed range, the operating mode factor of the offshore wind power-alkaline electrolyzer hydrogen production-battery energy storage-hydrogen storage tank electro-hydrogen coupling system is determined. The operating mode factor Includes: low wind speed mode, medium / high wind speed mode and high wind speed mode;

[0012] Step S3: Construct a multi-objective optimization function based on model predictive control (MPC);

[0013] With the optimization objectives of minimizing grid frequency deviation, tracking the optimal economic hydrogen production power of alkaline electrolyzers, and ensuring power regulation smoothness, a multi-objective optimization function of model predictive control (MPC) integrating predictive output term, reference trajectory tracking term, and control increment penalty term is constructed, and weight factors for each objective are assigned.

[0014] Step S4: Determine the dynamic power boundary constraints of the offshore wind power-alkaline electrolyzer hydrogen production-battery energy storage-hydrogen storage tank electro-hydrogen coupling system.

[0015] Based on the operating mode factors identified in step S2, and combined with the real-time pressure upper limit of the hydrogen storage tank and the safety boundary of the battery's state of charge, the upper and lower limits of power regulation of the alkaline electrolyzer and the battery at each moment are dynamically corrected to form a dynamic operating constraint boundary that changes with the system state.

[0016] Step S5: Transformation of the quadratic programming (QP) standard form of the multi-objective optimization problem;

[0017] The multi-objective predictive control problem is as follows: In the prediction time domain, using the control increment sequence of the alkaline electrolyzer input power and the battery charging and discharging power as decision variables, under the conditions of satisfying the upper and lower limits of alkaline electrolyzer power, the upper and lower limits of battery charging and discharging power, the safety boundary of hydrogen storage tank pressure, the safety boundary of battery state of charge, and the control increment change rate constraint, the optimal power allocation sequence in the future finite time domain is obtained by comprehensively minimizing the grid frequency deviation, the degree of deviation of the alkaline electrolyzer from the optimal economic hydrogen production power point, and the control increment in the power adjustment process.

[0018] Substituting the predicted output equation of the electro-hydrogen coupling system into a multi-objective optimization function, eliminating state and output variables, the aforementioned finite-time rolling optimization problem, which aims to minimize grid frequency deviation, achieve economic hydrogen production power tracking in the alkaline electrolyzer, and smooth control increments, and is constrained by equipment power boundaries, energy storage state boundaries, and control increment boundaries, is transformed into a control increment sequence... This problem presents a discrete standard quadratic programming (QP) problem with decision variables, and constructs the Hessian matrix. With gradient vector ;

[0019] Step S6: Solving for the optimal control sequence and executing the emergency degradation logic;

[0020] Using the QP solver under dynamic power boundary constraints, the above-mentioned control increment sequence is applied. The system employs a standard quadratic programming approach, with the decision variables set as the decision variables, aiming to minimize the multi-objective MPC cost function while satisfying constraints on alkaline electrolyzer power, battery power, hydrogen storage pressure, SOC, and control increment. This approach yields the optimal control increment sequence, and the validity of the solver's results is verified. If no feasible solution is found, the system degenerates to the rule-based wind speed range default mode for emergency control; otherwise, the optimal power allocation command is issued to each actuator.

[0021] Further, in step S1, the system mathematical model includes:

[0022] S11, Offshore wind power PMSG turbine model

[0023] ;

[0024] In the formula, It's wind speed. It's the cut-in wind speed. It's an intermediate wind speed. That is the rated wind speed. It is a droop control frequency modulation power. It is a power reduction. It is in the wind speed The power of the down fan In order to be in wind speed The power of the downdraft fan at its maximum power point. This refers to the rated power of the fan; at low wind speeds, the fan operates in maximum power tracking mode; at medium wind speeds, the fan uses droop control for backup; at high wind speeds, the fan uses load reduction control.

[0025] S12, Alkaline Electrolytic Cell Model

[0026] alkaline electrolytic cells The equation is:

[0027] ;

[0028] In the formula, This refers to the unit voltage of the alkaline electrolytic cell; Gibbs free energy change in an electrochemical reaction process; The number of electrons transferred in each reaction; It is Faraday's constant; For the coefficients of the temperature-independent constant term in the empirical model of the ohmic resistance of an alkaline electrolyzer, This is the first-order temperature correction factor in the empirical model of the ohmic resistance of an alkaline electrolyzer. and Together, they characterize the effect of electrolyte resistance on temperature; This refers to the temperature of the alkaline electrolytic cell; The area of ​​the electrolysis module; It is direct current; Electrode overvoltage coefficient ; Electrode overvoltage coefficient ;

[0029] The hydrogen production rate of the alkaline electrolyzer is:

[0030] ;

[0031] in, The expression is:

[0032] ;

[0033] In the formula, The hydrogen production rate of the alkaline electrolyzer; The Faraday efficiency is used to characterize the proportion of current actually involved in the hydrogen production reaction. This refers to the number of alkaline electrolytic cell modules connected in series. This is the operating current for the alkaline electrolytic cell; This refers to the number of electrons transferred in an electrochemical reaction. The Faraday efficiency coefficient; ;

[0034] S13, BESS model of energy storage system

[0035] The mathematical model for a storage battery is:

[0036] ;

[0037] in, ;

[0038]

[0039] in,

[0040] In the formula, For internal electric power in the storage battery; This is the initial internal electromotive force; The polarization voltage constant; The voltage variation coefficient, This is the capacity variation coefficient; This refers to the rated capacity of the battery. This refers to the charging and discharging current. This represents the remaining percentage of battery charge, i.e., the state of charge. This is a polarization correction term; The polarization effect coefficient; Battery temperature; This refers to the number of batteries connected in series in the battery pack. It is the number of batteries connected in parallel in the battery pack;

[0041] S14, Hydrogen Storage Model:

[0042] Hydrogen storage rate: ;

[0043] In the formula, The net hydrogen storage rate of the hydrogen storage tank; The hydrogen intake rate of the hydrogen storage tank; Hydrogen output rate from the hydrogen storage tank;

[0044] Hydrogen storage capacity is: ;

[0045] In the formula, for The hydrogen storage capacity of the hydrogen storage tank at any time;

[0046] From the gas law, the pressure of the hydrogen storage tank is:

[0047] ;

[0048] In the formula, For the hydrogen storage tank pressure, The hydrogen storage temperature, This refers to the volume of the hydrogen storage tank. It is the ideal gas constant;

[0049] S15. State-space representation of an electro-hydrogen coupling system

[0050] The power balance equation for an electro-hydrogen coupling system is: ;

[0051] In the formula, For fan power, For battery power, when When the battery releases electrical energy, At that time, the battery absorbs electrical energy; This refers to the power of the alkaline electrolytic cell; This refers to the system's grid-connected power. For load power;

[0052] The power equations for the net power and controllable energy generation of the electro-hydrogen coupling system are as follows:

[0053] ;

[0054] In the formula, Power generated by controllable energy. It is the system's net power;

[0055] Hydrogen reserves are determined by the hydrogen gas produced by the alkaline electrolyzer, resulting in the differential equations for hydrogen pressure and alkaline electrolyzer power:

[0056] ;

[0057] In the formula: This is the voltage of the alkaline electrolytic cell;

[0058] The rate of change of the battery's state of charge is:

[0059] ;

[0060] In the formula This is the battery voltage. According to the volt-ampere characteristics of a battery, the battery voltage remains constant. The charging and discharging power of the battery; when At that time, the battery discharges. Lower; when At that time, the battery is charging. Increase;

[0061] Define the frequency deviation after discretization. The evolution formula is:

[0062]

[0063] In the formula, The system's equivalent inertial constant; The system damping coefficient; It is the disturbance power; To control the sampling time for model prediction; This provides the active incremental output for the wind turbine to participate in frequency regulation;

[0064] The state-space representation of a linear discrete system is as follows:

[0065] ;

[0066] In the formula, These are state variables, including hydrogen storage tank pressure, battery state of charge, and grid frequency deviation; The control variables include the power of the alkaline electrolyzer and the power of the battery; For controlled output; To constrain the output; and These are the system matrix and the control matrix, respectively. The controlled output matrix; The matrix is ​​directly passed to the controlled output; To constrain the output matrix; The constraint output is directly passed matrix; The current moment; For the next moment;

[0067] The state-space discrete form of the electro-hydrogen coupling system is expressed as follows:

[0068] ;

[0069] In the formula, The system sampling time;

[0070] The state variables, control variables, and output variables of the electro-hydrogen coupling system are expressed in a matrix as follows:

[0071] ;

[0072] Matrix in electro-hydrogen coupling system , , , , , The matrix is ​​expressed as:

[0073] ;

[0074] in, , The discrete influence coefficient of the power change of the alkaline electrolyzer on the pressure change of the hydrogen storage tank; This is the discrete influence coefficient of battery power variation on SOC variation.

[0075] Furthermore, in step S2, the power management system (PMS) collects real-time data on grid frequency deviation, current wind speed, alkaline electrolyzer operating status, and the status of each energy storage unit; and determines the system's operating mode factor based on the current wind speed range. ;

[0076] ;

[0077] The operating mode factor is used in step S4 to dynamically correct the upper and lower limits of power regulation for the alkaline electrolyzer and the battery.

[0078] Further, step S3 includes:

[0079] The power regulation function of the electro-hydrogen coupling system is:

[0080] ;

[0081] in, ;

[0082] In the formula, Set as reference trajectory For reference trajectory, where, To achieve the optimal economic hydrogen production power; This refers to the predicted power grid frequency deviation term; To control the incremental term, used to characterize the smoothness of power regulation; symbol Represents a quadratic function; To predict the time domain, To control the time domain, the weighting matrix The weighting matrix represents the weights of the performance metrics for the state variables. The weight matrix for controlling the quantities; It is a weighting factor for power balancing or frequency regulation power tracking, used to adjust the system's response strength to grid power deviations; A weighting factor for maintaining the state of charge (SOC) of the battery is used to constrain the degree to which the SOC deviates from the expected value. A weighting factor for tracking the economic operation of hydrogen production is used to constrain the degree to which the alkaline electrolyzer deviates from the optimal economic hydrogen production power point; The weighting factors represent the control variables. .

[0083] Furthermore, in step S4, the system dynamic power boundary constraints include:

[0084] S41. The operational constraints of the electro-hydrogen coupling system are:

[0085] ;

[0086] In the formula, Output as system constraints; For system control variables; Indicates the increment of control quantity in the electro-hydrogen coupling system; , Each constrains the output variable in The lower and upper limits of time; , The control variables are respectively in The lower and upper limits of time; , They are respectively controlling the increment in The lower and upper limits of time;

[0087] S42. Considering the energy storage levels of the hydrogen storage tank and the battery, when At that time, the system has surplus power, which is absorbed by the battery and alkaline electrolyzer. The hydrogen produced by the alkaline electrolyzer is stored in the hydrogen storage tank, and the stored hydrogen does not exceed the upper limit of hydrogen pressure. The power absorbed by the battery does not exceed the limit. upper limit At that time, the system's operational boundary constraints are:

[0088] ;

[0089] when When the system experiences a power deficit, the alkaline electrolytic cell shuts down, and the battery replenishes the power deficit, providing no less than [amount missing]. Lower limit, At that time, the system's operational boundary constraints are:

[0090] ;

[0091] In the formula, This is the lower limit of the permissible input power for an alkaline electrolyzer; This refers to the maximum allowable input power for an alkaline electrolyzer. This represents the maximum charging power boundary of the battery, and according to the power sign convention, its value is negative. This represents the maximum discharge power boundary of the battery, and its value is positive.

[0092] In considering the objective function of minimizing frequency deviation and achieving fast response, To predict the time domain, To control the time domain, satisfy The control increment outside the time domain is set to 0, that is: ;

[0093] S43. Based on the obtained linear discrete state-space model, the system state at future time steps is obtained by recursively deducing the current state and the control sequence in the time domain, which is the core equality constraint of the optimization problem:

[0094] ;

[0095] In the formula: for The constantly measured system state serves as the initial condition for the optimization problem. for The control quantity that actually acts on the system at any given time is the initial value of the control quantity recursion; for Always looking towards the future The predicted net power disturbance of the system at any given time, the temporal continuity of short-term wind speed and load fluctuations, and the constant disturbance persistence assumption in the prediction time domain, that is, assuming that the external disturbance in the prediction time domain remains at the measured level at the current time, to achieve feedforward compensation for wind power fluctuations, are expressed mathematically as follows: By fully introducing into the state prediction sequence This allows the MPC algorithm to accurately assess the ongoing impact of wind power net power disturbances on future grid frequency evolution during rolling optimization, and proactively calculate the optimal alkaline electrolyzer and energy storage power offsetting command.

[0096] S44. Hard constraints on control quantity prediction ensure that the control quantity at all times in the time domain satisfies the upper and lower limits of the equipment's physical power.

[0097] ;

[0098] In the formula, , ;

[0099] in, ;

[0100] In the formula, The minimum power required for stable startup of an alkaline electrolyzer; This is the rated power of the alkaline electrolytic cell; This is the maximum permissible short-term overload power for an alkaline electrolyzer;

[0101] S45. State quantity safety constraints and dynamic constraints for different working conditions:

[0102] Predict the constraint output at all times in the time domain to satisfy the safety boundary of the energy storage system, and combine this with the positive and negative dynamic tightening control quantity boundary of the system's net power:

[0103] ;

[0104] in, , ;

[0105] In the formula, Constraint output variables for the prediction time; To constrain the minimum value of the output variable; To constrain the maximum value of the output variable;

[0106] S46, based on Predicting the future Step net power Dynamically correct control quantity boundaries:

[0107] When the system is in the medium / high wind speed range and Overpowered operating conditions: The alkaline electrolytic cell and the battery absorb the excess power, and the control quantity boundary is corrected to:

[0108] ;

[0109] When the system is in a low wind speed range or Power deficit condition: Forced shutdown of alkaline electrolytic cell, causing The battery compensates for the power deficit, and the control quantity boundary is corrected as follows:

[0110] .

[0111] Further, step S5 includes:

[0112] S51, Control Increment Sequence Definition: Define the sequence of control increments in the prediction time domain as the decision variable:

[0113] ;

[0114] In the formula, To control the time domain Control increment stacking vector within; For the predicted time Compared to The increment of control variables obtained from time-to-time prediction; To control the time domain; superscript Represents the transpose of a matrix or vector;

[0115] S52, Vectorization of the prediction model:

[0116] Based on the fact that the system state-space expression includes feedforward disturbance terms and direct transit terms, the future... Predicted output variables of the step Write about the initial state Historical control volume Predicting feedforward disturbances and control increment sequence The parsing form:

[0117] ;

[0118] In the formula, System matrices These are the coefficient matrices generated recursively;

[0119] S53. Definition of Unconstrained Free Response Error: Defines the free response and reference trajectory of a system without any future control increments. error vector for:

[0120] ;

[0121] In the formula, Let be the error vector of the system's predicted output relative to the reference trajectory without any future control increment. This is a stacked vector for predicting the reference trajectory in the time domain;

[0122] S54. Constructing the standard form of quadratic programming (QP): Substituting the vectorized expression into the multi-objective MPC objective function. And by removing constant terms irrelevant to the decision variables, the objective function is simplified to the standard quadratic programming form:

[0123] ;

[0124] Among them, the Hessian matrix With gradient vector The expression is:

[0125] ;

[0126] In the formula, For a quadratic programming problem, the Hessian matrix is ​​used to represent the quadratic terms of the objective function with respect to the control increment sequence. Let be the vector of coefficients of the first-order terms of the objective function with respect to the control increment sequence; and The weight matrix is ​​respectively and The diagonal block matrix obtained by expanding in the prediction time domain is used in the objective function weight matrix. The weighting of the power increment of the alkaline electrolyzer is set to be greater than that of the battery power increment, thereby enhancing the evaluation of the power change rate of the alkaline electrolyzer. The constraints enable the battery to prioritize compensation for rapid power fluctuations, reducing the probability of frequent start-ups and shutdowns and large power surges in the alkaline electrolyzer.

[0127] S55. Matrixing and Solving Inequality Constraints:

[0128] All physical boundary constraints, energy storage safety boundary constraints, and dynamically adjusted power tightening boundaries in step S4 are uniformly expressed as linear inequalities:

[0129] ;

[0130] In the formula, the matrix sum vector It is dynamically updated according to the real-time operating conditions at each sampling time;

[0131] The above problem is solved using the standard QP solver. If the solver returns a feasible result, the first term of the optimal sequence is extracted. The first element is used as the current control execution variable:

[0132] ;

[0133] ;

[0134] In the formula, It is the identity matrix; The optimal control increment sequence obtained by the QP solver;

[0135] S56. Emergency Verification: If the QP solver returns no feasible solution, the system will degenerate into the "rule-based wind speed range default mode" and execute emergency control.

[0136] Furthermore, in step S6, verifying the validity of the solver results includes:

[0137] The validity of the solution result is verified based on the return status flag of the QP solver. If the solver successfully finds the optimal solution, it is a valid solution; otherwise, if the QP solver fails to find a feasible solution that satisfies the constraints, the system will degenerate into the "rule-based wind speed range default mode," which includes:

[0138] Emergency low wind speed mode: Independent frequency modulation by BESS;

[0139] Emergency medium / high wind speed mode: The alkaline electrolyzer maintains the same power as the previous moment, and the fan actively adjusts the power by reducing the load;

[0140] Apply the first element of the optimal control increment sequence to the system:

[0141] ;

[0142] In the formula, That is The final output of the alkaline electrolyzer and the optimal power allocation command for the battery is sent to the system actuator.

[0143] Meanwhile, the present invention proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed, it implements the steps of the method described in the present invention.

[0144] Furthermore, the present invention proposes a computer-readable storage medium having a computer program stored thereon, the computer program being configured to implement the steps of the method described in the present invention when invoked by a processor.

[0145] Finally, the present invention provides a computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method described in the present invention.

[0146] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0147] 1. This invention constructs a multi-objective MPC function that includes a "frequency deviation term" and a "hydrogen production economic target tracking term," enabling flexible weight allocation based on real-time operating conditions. While prioritizing grid frequency stability, it ensures the alkaline electrolyzer operates at the optimal economic hydrogen production power point, significantly improving the overall energy utilization rate and comprehensive hydrogen production benefits of the system. It also effectively protects equipment lifespan: through operating mode factors and control increment penalty terms, frequent start-ups and shutdowns of the electrolyzer are effectively avoided, extending the service life of core equipment.

[0148] 2. This invention overcomes the limitations of traditional fixed boundary constraints by proposing a dynamic power boundary correction mechanism based on the real-time pressure of the hydrogen storage tank and the state of charge (SOC) of the battery. The system can automatically tighten or loosen the upper and lower limits of power regulation for the electrolyzer and battery in real time according to the remaining capacity space of the storage unit. This not only effectively prevents safety hazards such as overpressure of the hydrogen storage tank and overcharging and over-discharging of the battery, but also maximizes the frequency regulation potential of the energy storage system. To address the potential infeasible risk of numerical optimization algorithms, this invention designs a "rule-based emergency degradation logic" as the underlying safeguard. When the QP solver fails to find a feasible solution under extreme conditions, the system can immediately and seamlessly switch to expert rule logic based on wind speed ranges. This two-layer architecture of "optimization control + emergency safeguard" ensures accurate regulation under normal conditions while guaranteeing that the system's frequency regulation function is not lost under extreme scenarios such as communication delays and sudden changes in operating conditions. Attached Figure Description

[0149] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0150] Figure 1 This is a schematic diagram of the composition and energy flow relationship of the offshore wind power hydrogen production and electro-hydrogen coupling system in this invention.

[0151] Figure 2 This is a flowchart of the frequency regulation control method based on improved model predictive control of the present invention.

[0152] Figure 3 This is a schematic diagram of the dynamic power boundary constraint generation process of the present invention.

[0153] Figure 4 This is a flowchart of the quadratic programming optimization solution and control output of the present invention. Detailed Implementation

[0154] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. Of course, the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0155] Example 1: See Figure 1 , Figure 2 , Figure 3 , Figure 4 This embodiment provides a technical solution: a control method for an offshore wind power energy storage system based on improved model predictive control, characterized by the following steps:

[0156] Step S1: Construct a cooperative state-space model of the electro-hydrogen coupling system;

[0157] Based on the physical characteristics of offshore wind power PMSG turbine units, alkaline electrolyzers, battery energy storage systems (BESS) and hydrogen storage tanks, a system mathematical model is established that includes grid frequency deviation, hydrogen storage pressure, battery state of charge and hydrogen production rate, and is tuned into a linear discretized state-space equation.

[0158] Step S2: Real-time operating condition identification and operation mode determination;

[0159] The power management system (PMS) collects real-time data on grid frequency deviation, current wind speed, alkaline electrolyzer operating status, and the status of each energy storage unit. Based on the current wind speed range, the operating mode factor of the offshore wind power-alkaline electrolyzer hydrogen production-battery energy storage-hydrogen storage tank electro-hydrogen coupling system is determined. The operating mode factor Includes: low wind speed mode, medium / high wind speed mode and high wind speed mode;

[0160] Step S3: Construct a multi-objective optimization function based on model predictive control (MPC);

[0161] With the optimization objectives of minimizing grid frequency deviation, tracking the optimal economic hydrogen production power of alkaline electrolyzers, and ensuring power regulation smoothness, a multi-objective optimization function of model predictive control (MPC) integrating predictive output term, reference trajectory tracking term, and control increment penalty term is constructed, and weight factors for each objective are assigned.

[0162] Step S4: Determine the dynamic power boundary constraints of the offshore wind power-alkaline electrolyzer hydrogen production-battery energy storage-hydrogen storage tank electro-hydrogen coupling system.

[0163] Based on the operating mode factors identified in step S2, and combined with the real-time pressure upper limit of the hydrogen storage tank and the safety boundary of the battery's state of charge, the upper and lower limits of power regulation of the alkaline electrolyzer and the battery at each moment are dynamically corrected to form a dynamic operating constraint boundary that changes with the system state.

[0164] Step S5: Transformation of the quadratic programming (QP) standard form of the multi-objective optimization problem;

[0165] The multi-objective predictive control problem is as follows: In the prediction time domain, using the control increment sequence of the alkaline electrolyzer input power and the battery charging and discharging power as decision variables, under the conditions of satisfying the upper and lower limits of alkaline electrolyzer power, the upper and lower limits of battery charging and discharging power, the safety boundary of hydrogen storage tank pressure, the safety boundary of battery state of charge, and the control increment change rate constraint, the optimal power allocation sequence in the future finite time domain is obtained by comprehensively minimizing the grid frequency deviation, the degree of deviation of the alkaline electrolyzer from the optimal economic hydrogen production power point, and the control increment in the power adjustment process.

[0166] Substituting the predicted output equation of the electro-hydrogen coupling system into a multi-objective optimization function, eliminating state and output variables, the aforementioned finite-time rolling optimization problem, which aims to minimize grid frequency deviation, achieve economic hydrogen production power tracking in the alkaline electrolyzer, and smooth control increments, and is constrained by equipment power boundaries, energy storage state boundaries, and control increment boundaries, is transformed into a control increment sequence... This problem presents a discrete standard quadratic programming (QP) problem with decision variables, and constructs the Hessian matrix. With gradient vector ;

[0167] Step S6: Solving for the optimal control sequence and executing the emergency degradation logic;

[0168] Using the QP solver under dynamic power boundary constraints, the above-mentioned control increment sequence is applied. The system employs a standard quadratic programming approach, with the decision variables set as the decision variables, aiming to minimize the multi-objective MPC cost function while satisfying constraints on alkaline electrolyzer power, battery power, hydrogen storage pressure, SOC, and control increment. This approach yields the optimal control increment sequence, and the validity of the solver's results is verified. If no feasible solution is found, the system degenerates to the rule-based wind speed range default mode for emergency control; otherwise, the optimal power allocation command is issued to each actuator.

[0169] Specifically, in step S1, the system mathematical model includes:

[0170] S11, Offshore wind power PMSG turbine model

[0171] ;

[0172] In the formula, It's wind speed. It's the cut-in wind speed. It's an intermediate wind speed. That is the rated wind speed. It is a droop control frequency modulation power. It is a power reduction. It is in the wind speed The power of the down fan In order to be in wind speed The power of the downdraft fan at its maximum power point. This refers to the rated power of the fan; at low wind speeds, the fan operates in maximum power tracking mode; at medium wind speeds, the fan uses droop control for backup; at high wind speeds, the fan uses load reduction control.

[0173] S12, Alkaline Electrolytic Cell Model

[0174] alkaline electrolytic cells The equation is:

[0175] ;

[0176] In the formula, This refers to the unit voltage of the alkaline electrolytic cell; Gibbs free energy change in an electrochemical reaction process; The number of electrons transferred in each reaction; It is Faraday's constant; For the coefficients of the temperature-independent constant term in the empirical model of the ohmic resistance of an alkaline electrolyzer, This is the first-order temperature correction factor in the empirical model of the ohmic resistance of an alkaline electrolyzer. and Together, they characterize the effect of electrolyte resistance on temperature; This refers to the temperature of the alkaline electrolytic cell; The area of ​​the electrolysis module; It is direct current; Electrode overvoltage coefficient ; Electrode overvoltage coefficient ;

[0177] The hydrogen production rate of the alkaline electrolyzer is:

[0178] ;

[0179] in, The expression is:

[0180] ;

[0181] In the formula, The hydrogen production rate of the alkaline electrolyzer; The Faraday efficiency is used to characterize the proportion of current actually involved in the hydrogen production reaction. This refers to the number of alkaline electrolytic cell modules connected in series. This is the operating current for the alkaline electrolytic cell; This refers to the number of electrons transferred in an electrochemical reaction. The Faraday efficiency coefficient; ;

[0182] S13, BESS model of energy storage system

[0183] The mathematical model for a storage battery is:

[0184] ;

[0185] in, ;

[0186]

[0187] in,

[0188] In the formula, For internal electric power in the storage battery; This is the initial internal electromotive force; The polarization voltage constant; The voltage variation coefficient, This is the capacity variation coefficient; This refers to the rated capacity of the battery. This refers to the charging and discharging current. This represents the remaining percentage of battery charge, i.e., the state of charge. This is a polarization correction term; The polarization effect coefficient; Battery temperature; This refers to the number of batteries connected in series in the battery pack. It is the number of batteries connected in parallel in the battery pack;

[0189] S14, Hydrogen Storage Model:

[0190] Hydrogen storage rate: ;

[0191] In the formula, The net hydrogen storage rate of the hydrogen storage tank; The hydrogen intake rate of the hydrogen storage tank; Hydrogen output rate from the hydrogen storage tank;

[0192] Hydrogen storage capacity is: ;

[0193] In the formula, for The hydrogen storage capacity of the hydrogen storage tank at any time;

[0194] From the gas law, the pressure of the hydrogen storage tank is:

[0195] ;

[0196] In the formula, For the hydrogen storage tank pressure, The hydrogen storage temperature, This refers to the volume of the hydrogen storage tank. It is the ideal gas constant;

[0197] S15. State-space representation of an electro-hydrogen coupling system

[0198] The power balance equation for an electro-hydrogen coupling system is: ;

[0199] In the formula, For fan power, For battery power, when When the battery releases electrical energy, At that time, the battery absorbs electrical energy; This refers to the power of the alkaline electrolytic cell; This refers to the system's grid-connected power. For load power;

[0200] The power equations for the net power and controllable energy generation of the electro-hydrogen coupling system are as follows:

[0201] ;

[0202] In the formula, Power generated by controllable energy. It is the system's net power;

[0203] Hydrogen reserves are determined by the hydrogen gas produced by the alkaline electrolyzer, resulting in the differential equations for hydrogen pressure and alkaline electrolyzer power:

[0204] ;

[0205] In the formula: This is the voltage of the alkaline electrolytic cell;

[0206] The rate of change of the battery's state of charge is:

[0207] ;

[0208] In the formula This is the battery voltage. According to the volt-ampere characteristics of a battery, the battery voltage remains constant. The charging and discharging power of the battery; when At that time, the battery discharges. Lower; when At that time, the battery is charging. Increase;

[0209] Define the frequency deviation after discretization. The evolution formula is:

[0210]

[0211] In the formula, The system's equivalent inertial constant; The system damping coefficient; It is the disturbance power; To control the sampling time for model prediction; This provides the active incremental output for the wind turbine to participate in frequency regulation;

[0212] The state-space representation of a linear discrete system is as follows:

[0213] ;

[0214] In the formula, These are state variables, including hydrogen storage tank pressure, battery state of charge, and grid frequency deviation; The control variables include the power of the alkaline electrolyzer and the power of the battery; For controlled output; To constrain the output; and These are the system matrix and the control matrix, respectively. The controlled output matrix; The matrix is ​​directly passed to the controlled output; To constrain the output matrix; The constraint output is directly passed matrix; The current moment; For the next moment;

[0215] The state-space discrete form of the electro-hydrogen coupling system is expressed as follows:

[0216] ;

[0217] In the formula, The system sampling time;

[0218] The state variables, control variables, and output variables of the electro-hydrogen coupling system are expressed in a matrix as follows:

[0219] ;

[0220] Matrix in electro-hydrogen coupling system , , , , , The matrix is ​​expressed as:

[0221] ;

[0222] in, , The discrete influence coefficient of the power change of the alkaline electrolyzer on the pressure change of the hydrogen storage tank; This is the discrete influence coefficient of battery power variation on SOC variation.

[0223] Specifically, in step S2, the power management system (PMS) collects real-time data on grid frequency deviation, current wind speed, alkaline electrolyzer operating status, and the status of each energy storage unit; and determines the system's operating mode factor based on the current wind speed range. ;

[0224] ;

[0225] The operating mode factor is used in step S4 to dynamically correct the upper and lower limits of power regulation for the alkaline electrolyzer and the battery.

[0226] Specifically, step S3 includes:

[0227] The power regulation function of the electro-hydrogen coupling system is:

[0228] ;

[0229] in, ;

[0230] In the formula, Set as reference trajectory For reference trajectory, where, To achieve the optimal economic hydrogen production power; This refers to the predicted power grid frequency deviation term; To control the incremental term, used to characterize the smoothness of power regulation; symbol Represents a quadratic function; To predict the time domain, To control the time domain, the weighting matrix The weighting matrix represents the weights of the performance metrics for the state variables. The weight matrix for controlling the quantities; It is a weighting factor for power balancing or frequency regulation power tracking, used to adjust the system's response strength to grid power deviations; A weighting factor for maintaining the state of charge (SOC) of the battery is used to constrain the degree to which the SOC deviates from the expected value. A weighting factor for tracking the economic operation of hydrogen production is used to constrain the degree to which the alkaline electrolyzer deviates from the optimal economic hydrogen production power point; The weighting factors represent the control variables. .

[0231] Specifically, in step S4, the system dynamic power boundary constraints include:

[0232] S41. The operational constraints of the electro-hydrogen coupling system are:

[0233] ;

[0234] In the formula, Output as system constraints; For system control variables; Indicates the increment of control quantity in the electro-hydrogen coupling system; , Each constrains the output variable in The lower and upper limits of time; , The control variables are respectively in The lower and upper limits of time; , They are respectively controlling the increment in The lower and upper limits of time;

[0235] S42. Considering the energy storage levels of the hydrogen storage tank and the battery, when At that time, the system has surplus power, which is absorbed by the battery and alkaline electrolyzer. The hydrogen produced by the alkaline electrolyzer is stored in the hydrogen storage tank, and the stored hydrogen does not exceed the upper limit of hydrogen pressure. The power absorbed by the battery does not exceed the limit. upper limit At that time, the system's operational boundary constraints are:

[0236] ;

[0237] when When the system experiences a power deficit, the alkaline electrolytic cell shuts down, and the battery replenishes the power deficit, providing no less than [amount missing]. Lower limit, At that time, the system's operational boundary constraints are:

[0238] ;

[0239] In the formula, This is the lower limit of the permissible input power for an alkaline electrolyzer; This refers to the maximum allowable input power for an alkaline electrolyzer. This represents the maximum charging power boundary of the battery, and according to the power sign convention, its value is negative. This represents the maximum discharge power boundary of the battery, and its value is positive.

[0240] In considering the objective function of minimizing frequency deviation and achieving fast response, To predict the time domain, To control the time domain, satisfy The control increment outside the time domain is set to 0, that is: ;

[0241] S43. Based on the obtained linear discrete state-space model, the system state at future time steps is obtained by recursively deducing the current state and the control sequence in the time domain, which is the core equality constraint of the optimization problem:

[0242] ;

[0243] In the formula: for The constantly measured system state serves as the initial condition for the optimization problem. for The control quantity that actually acts on the system at any given time is the initial value of the control quantity recursion; for Always looking towards the future The predicted net power disturbance of the system at any given time, the temporal continuity of short-term wind speed and load fluctuations, and the constant disturbance persistence assumption in the prediction time domain, that is, assuming that the external disturbance in the prediction time domain remains at the measured level at the current time, to achieve feedforward compensation for wind power fluctuations, are expressed mathematically as follows: By fully introducing into the state prediction sequence This allows the MPC algorithm to accurately assess the ongoing impact of wind power net power disturbances on future grid frequency evolution during rolling optimization, and proactively calculate the optimal alkaline electrolyzer and energy storage power offsetting command.

[0244] S44. Hard constraints on control quantity prediction ensure that the control quantity at all times in the time domain satisfies the upper and lower limits of the equipment's physical power.

[0245] ;

[0246] In the formula, , ;

[0247] in, ;

[0248] In the formula, The minimum power required for stable startup of an alkaline electrolyzer; This is the rated power of the alkaline electrolytic cell; This is the maximum permissible short-term overload power for an alkaline electrolyzer;

[0249] S45. State quantity safety constraints and dynamic constraints for different working conditions:

[0250] Predict the constraint output at all times in the time domain to satisfy the safety boundary of the energy storage system, and combine this with the positive and negative dynamic tightening control quantity boundary of the system's net power:

[0251] ;

[0252] in, , ;

[0253] In the formula, Constraint output variables for the prediction time; To constrain the minimum value of the output variable; To constrain the maximum value of the output variable;

[0254] S46, based on Predicting the future Step net power Dynamically correct control quantity boundaries:

[0255] When the system is in the medium / high wind speed range and Overpowered operating conditions: The alkaline electrolytic cell and the battery absorb the excess power, and the control quantity boundary is corrected to:

[0256] ;

[0257] When the system is in a low wind speed range or Power deficit condition: Forced shutdown of alkaline electrolytic cell, causing The battery compensates for the power deficit, and the control quantity boundary is corrected as follows:

[0258] .

[0259] Specifically, step S5 includes:

[0260] S51, Control Increment Sequence Definition: Define the sequence of control increments in the prediction time domain as the decision variable:

[0261] ;

[0262] In the formula, To control the time domain Control increment stacking vector within; For the predicted time Compared to The increment of control variables obtained from time-to-time prediction; To control the time domain; superscript Represents the transpose of a matrix or vector;

[0263] S52, Vectorization of the prediction model:

[0264] Based on the fact that the system state-space expression includes feedforward disturbance terms and direct transit terms, the future... Predicted output variables of the step Write about the initial state Historical control volume Predicting feedforward disturbances and control increment sequence The parsing form:

[0265] ;

[0266] In the formula, System matrices These are the coefficient matrices generated recursively;

[0267] S53. Definition of Unconstrained Free Response Error: Defines the free response and reference trajectory of a system without any future control increments. error vector for:

[0268] ;

[0269] In the formula, Let be the error vector of the system's predicted output relative to the reference trajectory without any future control increment. This is a stacked vector for predicting the reference trajectory in the time domain;

[0270] S54. Constructing the standard form of quadratic programming (QP): Substituting the vectorized expression into the multi-objective MPC objective function. And by removing constant terms irrelevant to the decision variables, the objective function is simplified to the standard quadratic programming form:

[0271] ;

[0272] Among them, the Hessian matrix With gradient vector The expression is:

[0273] ;

[0274] In the formula, For a quadratic programming problem, the Hessian matrix is ​​used to represent the quadratic terms of the objective function with respect to the control increment sequence. Let be the vector of coefficients of the first-order terms of the objective function with respect to the control increment sequence; and The weight matrix is ​​respectively and The diagonal block matrix obtained by expanding in the prediction time domain is used in the objective function weight matrix. The weighting of the power increment of the alkaline electrolyzer is set to be greater than that of the battery power increment, thereby enhancing the evaluation of the power change rate of the alkaline electrolyzer. The constraints enable the battery to prioritize compensation for rapid power fluctuations, reducing the probability of frequent start-ups and shutdowns and large power surges in the alkaline electrolyzer.

[0275] S55. Matrixing and Solving Inequality Constraints:

[0276] All physical boundary constraints, energy storage safety boundary constraints, and dynamically adjusted power tightening boundaries in step S4 are uniformly expressed as linear inequalities:

[0277] ;

[0278] In the formula, the matrix sum vector It is dynamically updated according to the real-time operating conditions at each sampling time;

[0279] The above problem is solved using the standard QP solver. If the solver returns a feasible result, the first term of the optimal sequence is extracted. The first element is used as the current control execution variable:

[0280] ;

[0281] ;

[0282] In the formula, It is the identity matrix; The optimal control increment sequence obtained by the QP solver;

[0283] S56. Emergency Verification: If the QP solver returns no feasible solution, the system will degenerate into the "rule-based wind speed range default mode" and execute emergency control.

[0284] Specifically, in step S6, verifying the validity of the solver results includes:

[0285] The validity of the solution result is verified based on the return status flag of the QP solver. If the solver successfully finds the optimal solution, it is a valid solution; otherwise, if the QP solver fails to find a feasible solution that satisfies the constraints, the system will degenerate into the "rule-based wind speed range default mode," which includes:

[0286] Emergency low wind speed mode: Independent frequency modulation by BESS;

[0287] Emergency medium / high wind speed mode: The alkaline electrolyzer maintains the same power as the previous moment, and the fan actively adjusts the power by reducing the load;

[0288] Apply the first element of the optimal control increment sequence to the system:

[0289] ;

[0290] In the formula, That is The final output of the alkaline electrolyzer and the optimal power allocation command for the battery is sent to the system actuator.

[0291] Example 2: This example proposes an electronic system, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method steps of the present invention.

[0292] Example 3: This example proposes a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the method described in this invention, which will not be repeated here.

[0293] Example 4: This example proposes a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, they implement the steps of the method described in this invention, which will not be repeated here.

[0294] It should be noted that the processing flow of embodiments 2-4 corresponds to the specific steps of the method provided in embodiment 1 of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the method provided in embodiment 1 of the present invention.

[0295] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0296] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A control method for an offshore wind power energy storage system based on improved model predictive control, characterized in that, Includes the following steps: Step S1: Construct a cooperative state-space model of the electro-hydrogen coupling system; Step S2: Real-time operating condition identification and operation mode determination; Step S3: Construct a multi-objective optimization function based on model predictive control (MPC); Step S4: Determine the dynamic power boundary constraints of the offshore wind power-alkaline electrolyzer hydrogen production-battery energy storage-hydrogen storage tank electro-hydrogen coupling system. Step S5: Transformation of the quadratic programming (QP) standard form of the multi-objective optimization problem; Step S6: Solve for the optimal control sequence and execute the emergency degradation logic.

2. The control method for an offshore wind power energy storage system based on improved model predictive control according to claim 1, characterized in that, Step S1 includes establishing a system mathematical model based on the physical characteristics of the offshore wind power PMSG turbine, alkaline electrolyzer, battery energy storage system (BESS), and hydrogen storage tank, which includes grid frequency deviation, hydrogen storage pressure, battery state of charge, and hydrogen production rate, and tuning it into a linear discretized state space equation. The mathematical model of the system includes: S11, Offshore wind power PMSG turbine model ; In the formula, It's wind speed. It's the cut-in wind speed. It's an intermediate wind speed. That is the rated wind speed. It is a droop control frequency modulation power. It is a power reduction. It is in the wind speed The power of the down fan In order to be in wind speed The power of the downdraft fan at its maximum power point. This refers to the rated power of the fan; at low wind speeds, the fan operates in maximum power tracking mode; at medium wind speeds, the fan uses droop control for backup; at high wind speeds, the fan uses load reduction control. S12, Alkaline Electrolytic Cell Model alkaline electrolytic cells The equation is: ; In the formula, This refers to the unit voltage of the alkaline electrolytic cell; Gibbs free energy change in an electrochemical reaction process; The number of electrons transferred in each reaction; It is Faraday's constant; These are the coefficients of the temperature-independent constant term in the empirical model of the ohmic resistance of an alkaline electrolyzer. This is the first-order temperature correction factor in the empirical model of the ohmic resistance of an alkaline electrolyzer. and Together, they characterize the effect of electrolyte resistance on temperature; This refers to the temperature of the alkaline electrolytic cell; The area of ​​the electrolysis module; It is direct current; Electrode overvoltage coefficient ; Electrode overvoltage coefficient ; The hydrogen production rate of the alkaline electrolyzer is: ; in, The expression is: ; In the formula, The hydrogen production rate of the alkaline electrolyzer; The Faraday efficiency is used to characterize the proportion of current actually involved in the hydrogen production reaction. This refers to the number of alkaline electrolytic cell modules connected in series. This is the operating current for the alkaline electrolytic cell; This refers to the number of electrons transferred in an electrochemical reaction. The Faraday efficiency coefficient; ; S13, BESS model of energy storage system The mathematical model for a storage battery is: ; in, ; ; in, ; In the formula, For internal electric power in the storage battery; This is the initial internal electromotive force; The polarization voltage constant; The voltage variation coefficient, This is the capacity variation coefficient; This refers to the rated capacity of the battery. This refers to the charging and discharging current. This represents the remaining percentage of battery charge, i.e., the state of charge. This is a polarization correction term; The polarization effect coefficient; Battery temperature; This refers to the number of batteries connected in series in the battery pack. It is the number of batteries connected in parallel in the battery pack; S14, Hydrogen Storage Model: Hydrogen storage rate: ; In the formula, The net hydrogen storage rate of the hydrogen storage tank; The hydrogen intake rate of the hydrogen storage tank; Hydrogen output rate from the hydrogen storage tank; Hydrogen storage capacity is: ; In the formula, for The hydrogen storage capacity of the hydrogen storage tank at any time; From the gas law, the pressure of the hydrogen storage tank is: ; In the formula, For the hydrogen storage tank pressure, The hydrogen storage temperature, This refers to the volume of the hydrogen storage tank. It is the ideal gas constant; S15. State-space representation of an electro-hydrogen coupling system The power balance equation for an electro-hydrogen coupling system is: ; In the formula, For fan power, For battery power, when When the battery releases electrical energy, At that time, the battery absorbs electrical energy; This refers to the power of the alkaline electrolytic cell; This refers to the system's grid-connected power. For load power; The power equations for the net power and controllable energy generation of the electro-hydrogen coupling system are as follows: ; In the formula, Power generated by controllable energy. It is the system's net power; Hydrogen reserves are determined by the hydrogen gas produced by the alkaline electrolyzer, resulting in the differential equations for hydrogen pressure and alkaline electrolyzer power: ; In the formula: This is the voltage of the alkaline electrolytic cell; The rate of change of the battery's state of charge is: ; In the formula This is the battery voltage. According to the volt-ampere characteristics of a battery, the battery voltage remains constant. The charging and discharging power of the battery; when At that time, the battery discharges. Lower; when At that time, the battery is charging. Increase; Define the frequency deviation after discretization. The evolution formula is: ; In the formula, The system's equivalent inertial constant; The system damping coefficient; It is the disturbance power; To control the sampling time for model prediction; This provides the active incremental output for the wind turbine to participate in frequency regulation; The state-space representation of a linear discrete system is as follows: ; In the formula, These are state variables, including hydrogen storage tank pressure, battery state of charge, and grid frequency deviation; The control variables include the power of the alkaline electrolyzer and the power of the battery; For controlled output; To constrain the output; and These are the system matrix and the control matrix, respectively. The controlled output matrix; The matrix is ​​directly passed to the controlled output; To constrain the output matrix; The constraint output is directly passed matrix; The current moment; For the next moment; The state-space discrete form of the electro-hydrogen coupling system is expressed as follows: ; In the formula, The system sampling time; The state variables, control variables, and output variables of the electro-hydrogen coupling system are expressed in a matrix as follows: ; Matrix in electro-hydrogen coupling system , , , , , The matrix is ​​expressed as: ; in, , The discrete influence coefficient of the power change of the alkaline electrolyzer on the pressure change of the hydrogen storage tank; This is the discrete influence coefficient of battery power variation on SOC variation.

3. The control method for an offshore wind power energy storage system based on improved model predictive control according to claim 1, characterized in that, Step S2 includes: real-time acquisition of grid frequency deviation, current wind speed, alkaline electrolyzer operating status, and status of each energy storage unit through the power management system (PMS); and determining the operating mode factor of the offshore wind power-alkaline electrolyzer hydrogen production-battery energy storage-hydrogen storage tank electro-hydrogen coupling system based on the current wind speed range. The operating mode factor Includes: low wind speed mode, medium / high wind speed mode and high wind speed mode; The power management system (PMS) collects real-time data on grid frequency deviation, current wind speed, alkaline electrolyzer operating status, and the status of each energy storage unit; and determines the system's operating mode factor based on the current wind speed range. ; ; The operating mode factor is used in step S4 to dynamically correct the upper and lower limits of power regulation for the alkaline electrolyzer and the battery.

4. The control method for an offshore wind power energy storage system based on improved model predictive control according to claim 1, characterized in that, Step S3 includes constructing a multi-objective optimization function for model predictive control (MPC) that integrates a predictive output term, a reference trajectory tracking term, and a control increment penalty term, with the optimization objectives of minimizing grid frequency deviation, tracking the optimal economic hydrogen production power of the alkaline electrolyzer, and ensuring smooth power regulation. Weighting factors are then assigned to each objective. The power regulation function of the electro-hydrogen coupling system is: ; in, ; In the formula, Set as reference trajectory For reference trajectory, where, To achieve the optimal economic hydrogen production power; This refers to the predicted power grid frequency deviation term; To control the incremental term, used to characterize the smoothness of power regulation; symbol Represents a quadratic function; To predict the time domain, To control the time domain, the weighting matrix The weighting matrix represents the weights of the performance metrics for the state variables. The weight matrix for controlling the quantities; It is a weighting factor for power balancing or frequency regulation power tracking, used to adjust the system's response strength to grid power deviations; A weighting factor for maintaining the state of charge (SOC) of the battery is used to constrain the degree to which the SOC deviates from the expected value. A weighting factor for tracking the economic operation of hydrogen production is used to constrain the degree to which the alkaline electrolyzer deviates from the optimal economic hydrogen production power point; The weighting factors represent the control variables. .

5. The control method for an offshore wind power energy storage system based on improved model predictive control according to claim 1, characterized in that, In step S4, based on the operating mode factor identified in step S2, and combined with the real-time pressure upper limit of the hydrogen storage tank and the battery state-of-charge safety boundary, the upper and lower limits of power regulation for the alkaline electrolyzer and the battery at each moment are dynamically adjusted to form a dynamic operating constraint boundary that changes with the system state; the system dynamic power boundary constraints include: S41. The operational constraints of the electro-hydrogen coupling system are: ; In the formula, Output as system constraints; For system control variables; Indicates the increment of control quantity in the electro-hydrogen coupling system; , Each constrains the output variable in The lower and upper limits of time; , The control variables are respectively in The lower and upper limits of time; , They are respectively controlling the increment in The lower and upper limits of time; S42. Considering the energy storage levels of the hydrogen storage tank and the battery, when At that time, the system has surplus power, which is absorbed by the battery and alkaline electrolyzer. The hydrogen produced by the alkaline electrolyzer is stored in the hydrogen storage tank, and the stored hydrogen does not exceed the upper limit of hydrogen pressure. The power absorbed by the battery does not exceed the limit. upper limit At that time, the system's operational boundary constraints are: ; when When the system experiences a power deficit, the alkaline electrolytic cell shuts down, and the battery replenishes the power deficit, providing no less than [amount missing]. Lower limit, At that time, the system's operational boundary constraints are: ; In the formula, This is the lower limit of the permissible input power for an alkaline electrolyzer; This refers to the maximum allowable input power for an alkaline electrolyzer. This represents the maximum charging power boundary of the battery, and according to the power sign convention, its value is negative. This represents the maximum discharge power boundary of the battery, and its value is positive. In considering the objective function of minimizing frequency deviation and achieving fast response, To predict the time domain, To control the time domain, satisfy The control increment outside the time domain is set to 0, that is: ; S43. Based on the obtained linear discrete state-space model, the system state at future time steps is obtained by recursively deducing the current state and the control sequence in the time domain, which is the core equality constraint of the optimization problem: ; In the formula: for The constantly measured system state serves as the initial condition for the optimization problem. for The control quantity that actually acts on the system at any given time is the initial value of the control quantity recursion; for Always looking towards the future The predicted net power disturbance of the system at any given time, the temporal continuity of short-term wind speed and load fluctuations, and the constant disturbance persistence assumption in the prediction time domain, that is, assuming that the external disturbance in the prediction time domain remains at the measured level at the current time, to achieve feedforward compensation for wind power fluctuations, are expressed mathematically as follows: By fully introducing into the state prediction sequence This allows the MPC algorithm to accurately assess the ongoing impact of wind power net power disturbances on future grid frequency evolution during rolling optimization, and proactively calculate the optimal alkaline electrolyzer and energy storage power offsetting command. S44. Hard constraints on control quantity prediction ensure that the control quantity at all times in the time domain satisfies the upper and lower limits of the equipment's physical power. ; In the formula, , ; in, ; In the formula, The minimum power required for stable startup of an alkaline electrolyzer; This is the rated power of the alkaline electrolytic cell; This is the maximum permissible short-term overload power for an alkaline electrolyzer; S45. State quantity safety constraints and dynamic constraints for different working conditions: Predict the constraint output at all times in the time domain to satisfy the safety boundary of the energy storage system, and combine this with the positive and negative dynamic tightening control quantity boundary of the system's net power: ; in, , ; In the formula, Constraint output variables for the prediction time; To constrain the minimum value of the output variable; To constrain the maximum value of the output variable; S46, based on Predicting the future Step net power Dynamically correct control quantity boundaries: When the system is in the medium / high wind speed range and Overpowered operating conditions: The alkaline electrolytic cell and the battery absorb the excess power, and the control quantity boundary is corrected to: ; When the system is in a low wind speed range or Power deficit condition: Forced shutdown of alkaline electrolytic cell, causing The battery compensates for the power deficit, and the control quantity boundary is corrected as follows: 。 6. The control method for an offshore wind power energy storage system based on improved model predictive control according to claim 1, characterized in that, Step S5 includes: The multi-objective predictive control problem is as follows: In the prediction time domain, using the control increment sequence of the alkaline electrolyzer input power and the battery charging and discharging power as decision variables, under the conditions of satisfying the upper and lower limits of alkaline electrolyzer power, the upper and lower limits of battery charging and discharging power, the safety boundary of hydrogen storage tank pressure, the safety boundary of battery state of charge, and the control increment change rate constraint, the optimal power allocation sequence in the future finite time domain is obtained by comprehensively minimizing the grid frequency deviation, the degree of deviation of the alkaline electrolyzer from the optimal economic hydrogen production power point, and the control increment in the power adjustment process. Substituting the predicted output equation of the electro-hydrogen coupling system into a multi-objective optimization function, eliminating state and output variables, the aforementioned finite-time rolling optimization problem, which aims to minimize grid frequency deviation, achieve economic hydrogen production power tracking in alkaline electrolyzers, and smooth control increments, and is constrained by equipment power boundaries, energy storage state boundaries, and control increment boundaries, is transformed into a problem using a control increment sequence. This problem presents a discrete standard quadratic programming (QP) problem with decision variables, and constructs the Hessian matrix. With gradient vector ; S51, Control Increment Sequence Definition: Define the sequence of control increments in the prediction time domain as the decision variable: ; In the formula, To control the time domain Control increment stacking vector within; For the predicted time Compared to The increment of control variables obtained from time-to-time prediction; To control the time domain; superscript Represents the transpose of a matrix or vector; S52, Vectorization of the prediction model: Based on the fact that the system state-space expression includes feedforward disturbance terms and direct transit terms, the future... Predicted output variables of the step Write about the initial state Historical control volume Predicting feedforward disturbances and control increment sequence The parsing form: ; In the formula, System matrices These are the coefficient matrices generated recursively; S53. Definition of Unconstrained Free Response Error: Defines the free response and reference trajectory of a system without any future control increments. error vector for: ; In the formula, Let be the error vector of the system's predicted output relative to the reference trajectory without any future control increment. This is a stacked vector for predicting the reference trajectory in the time domain; S54. Constructing the standard form of quadratic programming (QP): Substituting the vectorized expression into the multi-objective MPC objective function. And by removing constant terms irrelevant to the decision variables, the objective function is simplified to the standard quadratic programming form: ; Among them, the Hessian matrix With gradient vector The expression is: ; In the formula, For a quadratic programming problem, the Hessian matrix is ​​used to represent the quadratic terms of the objective function with respect to the control increment sequence. Let be the vector of coefficients of the first-order terms of the objective function with respect to the control increment sequence; and The weight matrix is ​​respectively and The diagonal block matrix obtained by expanding in the prediction time domain is used in the objective function weight matrix. The weighting of the power increment of the alkaline electrolyzer is set to be greater than that of the battery power increment, thereby enhancing the evaluation of the power change rate of the alkaline electrolyzer. The constraints enable the battery to prioritize compensation for rapid power fluctuations, reducing the probability of frequent start-ups and shutdowns and large power surges in the alkaline electrolyzer. S55. Matrixing and Solving Inequality Constraints: All physical boundary constraints, energy storage safety boundary constraints, and dynamically adjusted power tightening boundaries in step S4 are uniformly expressed as linear inequalities: ; In the formula, the matrix sum vector It is dynamically updated according to the real-time operating conditions at each sampling time; The above problem is solved using the standard QP solver. If the solver returns a feasible result, the first term of the optimal sequence is extracted. The first element is used as the current control execution variable: ; ; In the formula, It is the identity matrix; The optimal control increment sequence obtained by the QP solver; S56. Emergency Verification: If the QP solver returns no feasible solution, the system will degenerate into "rule-based wind speed range default mode" and execute emergency control.

7. The control method for an offshore wind power energy storage system based on improved model predictive control according to claim 1, characterized in that, Step S6 includes: Using the QP solver under dynamic power boundary constraints, the above-mentioned control increment sequence is applied. The system uses a standard quadratic programming approach, with the decision variables as the decision variables, minimizing the multi-objective MPC cost function, and satisfying constraints such as alkaline electrolyzer power, battery power, hydrogen storage pressure, SOC, and control increment. The optimal control increment sequence is obtained, and the effectiveness of the solver results is verified. If the algorithm has no feasible solution, the system degenerates to the rule-based wind speed range default mode to perform emergency control. Otherwise, the optimal power allocation command is issued to each actuator, and the validity of the solver results is verified, including: The validity of the solution result is verified based on the return status flag of the QP solver. If the solver successfully finds the optimal solution, it is a valid solution; otherwise, if the conditions are not met, i.e., the QP solver failed to find a feasible solution that satisfies the constraints, the system will degenerate into the "rule-based wind speed interval default mode," which includes: Emergency low wind speed mode: Independent frequency modulation by BESS; Emergency medium / high wind speed mode: The alkaline electrolyzer maintains the same power as the previous moment, and the fan actively adjusts the power by reducing the load; Apply the first element of the optimal control increment sequence to the system: ; In the formula, That is The final output of the alkaline electrolyzer and the optimal power allocation command for the battery is sent to the system actuator.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed, it implements the steps of the method as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is configured to implement the steps of the method according to any one of claims 1 to 7 when invoked by a processor.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.