An off-grid photovoltaic hydrogen production parameter adaptive regulation method and device
Patent Information
- Application Number
- CN202611159346.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-01
- Publication Date
- 2026-10-16
AI Technical Summary
传统控制方法多采用固定PID参数或基于规则的查表调度策略,难以适应光照条件的快速变化,导致系统能效偏低或运行参数越限(如温度过高、压力异常)
[0017] The aforementioned adaptive parameter control method and device for off-grid photovoltaic hydrogen production achieves adaptive parameter control of the off-grid photovoltaic hydrogen production system under conditions of strong light fluctuations. It can dynamically track the optimal operating point without relying on a precise system model, significantly improving the system's energy efficiency and response speed. Through a synchronous update mechanism of deviation learning coefficients and trade-off coefficients, it can automatically adapt to practical engineering factors such as electrolyzer performance degradation, ambient temperature changes, and photovoltaic array aging, enhancing the system's robustness and long-term operational stability. The self-adjusting function of the boundary scaling coefficient allows the safety boundary to dynamically change with operating conditions, preventing critical parameters such as temperature and pressure from exceeding limits, ensuring the safety of the hydrogen production process and the lifespan of the equipment. Simultaneously, the structure combining offline calculation and online optimization reduces the real-time computational burden, facilitating deployment on embedded controllers.
Smart Images

Figure CN122932016A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy hydrogen production technology, and in particular to an adaptive control method and apparatus for off-grid photovoltaic hydrogen production parameters. Background Technology
[0002] Off-grid photovoltaic hydrogen production systems utilize the DC power output from photovoltaic arrays to directly drive water electrolysis to produce hydrogen, without relying on grid support, making them suitable for remote areas or regions rich in renewable energy.
[0003] Because photovoltaic power output is highly random, intermittent, and fluctuating, electrolytic cells need to operate safely and efficiently over a wide power range. Traditional control methods often employ fixed PID parameters or rule-based lookup table scheduling strategies, which are difficult to adapt to rapid changes in lighting conditions, leading to low system energy efficiency or operating parameters exceeding limits (such as excessively high temperature or abnormal pressure).
[0004] Furthermore, the off-grid photovoltaic hydrogen production process involves the coupling of multiple energy flows, including electricity, heat, and hydrogen production, resulting in complex dynamic characteristics. Existing predictive control models rely on accurate system models, which lead to severe model mismatch in actual off-grid scenarios and lack self-learning and parameter adaptation capabilities. Summary of the Invention
[0005] Based on this, it is necessary to provide an adaptive control method and device for off-grid photovoltaic hydrogen production parameters to address the above-mentioned technical problems. This method enables adaptive control of parameters in off-grid photovoltaic hydrogen production systems under strong irradiance conditions, and can dynamically track the optimal operating point without relying on a precise system model, thus significantly improving the system's energy efficiency and response speed.
[0006] This invention provides an adaptive control method for off-grid photovoltaic hydrogen production parameters, the method comprising: The coupling matrix and static characteristic parameters are determined based on the conservation of thermoelectric hydrogen energy, and the boundary scaling coefficient and bias learning coefficient are initialized. The safety boundary and energy efficiency standard with dynamic trade-off coefficient are calculated offline using the coupling matrix and static characteristic parameters, and the standard parameter set and initial values of the trade-off coefficient are generated. Collect photovoltaic power output and operating status, and generate operating condition feature vectors from static feature parameters; The safety boundary is scaled using a boundary scaling factor. The optimal operating values for temperature, pressure, and flow are obtained iteratively by using the scaled boundary and the standard parameter set as constraints. Output drive instructions based on the optimal operating values and record the actual response of each actuator; The compromise coefficient correction value is calculated based on the operational deviation, actual response, and deviation learning coefficient, and the compromise coefficient, standard parameter set, boundary scaling coefficient, and deviation learning coefficient are updated synchronously.
[0007] In one embodiment, determining the coupling matrix and static feature parameters based on the conservation of thermoelectric hydrogen energy, and initializing the boundary scaling coefficient and bias learning coefficient, includes: Based on the voltage and current characteristics of the electrolyzer, the heat balance equation, and the hydrogen production formula, a balance equation for voltage, heat, and hydrogen production is established. The equilibrium equations are transformed into matrix form, and the coupling relationships between the elements in the matrix are determined to obtain the coupling matrix. Extract the coefficients that remain constant under changes in current, temperature, and pressure from the equilibrium equations, and use them as static characteristic parameters. Initialize the boundary scaling factor to a unit value and the bias learning factor to a half value.
[0008] In one embodiment, the step of offline calculation of the safety boundary and energy efficiency standard with dynamic trade-off coefficients through coupling matrix and static characteristic parameters, and generation of standard parameter set and initial values of trade-off coefficients, includes: Substituting the coupling matrix with the rated voltage, maximum withstand temperature, and maximum pressure of the electrolytic cell, we calculate the upper and lower limits of voltage, temperature, and pressure to form the safety boundary. Based on the energy efficiency benchmark value in the static characteristic parameters, a dynamic compromise coefficient is introduced to construct an energy efficiency target function, which is a linear weighted sum of the energy efficiency value and the compromise coefficient. Search for the parameter combination that maximizes the energy efficiency objective function within the safety boundary, output the standard parameter set, and record the corresponding compromise coefficient as the initial value of the compromise coefficient.
[0009] In one embodiment, the acquisition of photovoltaic output and operating status, and the generation of a condition feature vector from static feature parameters, includes: Real-time acquisition of photovoltaic array output power, electrolytic cell terminal voltage and current, ambient temperature sensor measured temperature value, system pressure sensor collected pressure value, and coolant or hydrogen flow rate value; Divide the photovoltaic power by the rated power value in the static characteristic parameters to obtain the normalized power; subtract the reference value in the static characteristic parameters from the voltage, current, temperature, pressure, and flow rate respectively, and then divide by the reference range to obtain the normalized values. The normalized power, voltage, current, temperature, pressure, and flow rate are arranged in a fixed order to form a six-dimensional operating condition feature vector.
[0010] In one embodiment, scaling the safety boundary using a boundary scaling factor, and iteratively optimizing the optimal operating values for temperature, pressure, and flow rate using the scaled boundary and a standard parameter set as constraints, includes: Multiply each upper bound of the safety boundary by the boundary scaling factor, and divide each lower bound by the boundary scaling factor to obtain the scaled new boundary. Using the standard parameter set as the target reference point, the Euclidean distance between the current working condition feature vector and the target reference point is calculated as the objective function. Within the scaled boundary, an iterative optimization algorithm is used to adjust the setpoints for temperature, pressure, and flow rate until the objective function converges. The temperature, pressure, and flow rate values at the point of convergence are then output as the optimal operating values.
[0011] In one embodiment, the step of outputting drive instructions based on optimal operating values and recording the actual response of each actuator includes: The temperature value in the optimal operating value is converted into the pulse width modulation duty cycle command of the heater, the pressure value is converted into the speed command of the variable frequency pump, and the flow rate value is converted into the opening command of the proportional valve, and then output to the corresponding actuators respectively. After one control cycle, the actual temperature, pressure and flow values reached by the actuator are collected through temperature sensor, pressure sensor and flow sensor; The collected actual values are stored in the cache array in the order of temperature, pressure, and flow rate, overwriting the data from the previous period.
[0012] In one embodiment, the step of calculating the compromise coefficient correction value based on the operating deviation, actual response amount, and deviation learning coefficient, and synchronously updating the compromise coefficient, standard parameter set, boundary scaling coefficient, and deviation learning coefficient includes: Calculate the difference between the optimal operating value and the actual response, and obtain the temperature deviation, pressure deviation and flow deviation respectively. Take the root mean square of each deviation as the operating deviation. Multiply the running deviation by the deviation learning coefficient to obtain the compromise coefficient correction value, and add the correction value to the current compromise coefficient value to obtain the new compromise coefficient; wherein, during the first execution, the current compromise coefficient value is the initial value of the compromise coefficient; Using the new compromise coefficients, the original coupling matrix, and static characteristic parameters, the safety boundary and energy efficiency standards are recalculated, and the standard parameter set is updated. At the same time, the boundary scaling coefficients are updated according to the preset adjustment strategy, and the deviation learning coefficients are multiplied by a decay factor to complete the synchronous update.
[0013] The present invention also provides an adaptive control device for off-grid photovoltaic hydrogen production parameters, applied to the adaptive control method for off-grid photovoltaic hydrogen production parameters described in any of the above embodiments, the device comprising: The initialization module is used to determine the coupling matrix and static characteristic parameters based on the conservation of thermoelectric hydrogen energy, and to initialize the boundary scaling coefficient and bias learning coefficient. The generation module is used to calculate the safety boundary and energy efficiency standard with dynamic trade-off coefficients offline through the coupling matrix and static characteristic parameters, and generate the standard parameter set and initial values of the trade-off coefficients. The sensing module is used to collect photovoltaic power output and operating status, and generate operating condition feature vectors from static feature parameters. The online optimization module is used to scale the safety boundary using the boundary scaling factor, and then iteratively optimizes the temperature, pressure, and flow rate by using the scaled boundary and the standard parameter set as constraints. The execution module is used to output drive instructions based on the optimal operating values and record the actual response of each actuator. The update module is used to calculate the compromise coefficient correction value based on the running deviation, actual response amount, and deviation learning coefficient, and to synchronously update the compromise coefficient, standard parameter set, boundary scaling coefficient, and deviation learning coefficient.
[0014] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the off-grid photovoltaic hydrogen production parameter adaptive control method as described above.
[0015] The present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the adaptive control method for off-grid photovoltaic hydrogen production parameters as described above.
[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the adaptive control method for off-grid photovoltaic hydrogen production parameters as described above.
[0017] The aforementioned adaptive parameter control method and device for off-grid photovoltaic hydrogen production achieves adaptive parameter control of the off-grid photovoltaic hydrogen production system under conditions of strong light fluctuations. It can dynamically track the optimal operating point without relying on a precise system model, significantly improving the system's energy efficiency and response speed. Through a synchronous update mechanism of deviation learning coefficients and trade-off coefficients, it can automatically adapt to practical engineering factors such as electrolyzer performance degradation, ambient temperature changes, and photovoltaic array aging, enhancing the system's robustness and long-term operational stability. The self-adjusting function of the boundary scaling coefficient allows the safety boundary to dynamically change with operating conditions, preventing critical parameters such as temperature and pressure from exceeding limits, ensuring the safety of the hydrogen production process and the lifespan of the equipment. Simultaneously, the structure combining offline calculation and online optimization reduces the real-time computational burden, facilitating deployment on embedded controllers. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1Flowchart of the adaptive control method for off-grid photovoltaic hydrogen production parameters provided by the present invention; Figure 2 A module diagram of the off-grid photovoltaic hydrogen production parameter adaptive control device provided by the present invention; Figure 3 An internal structural diagram of the computer device provided by the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] The following is combined Figures 1 to 3 This invention describes an adaptive control method and apparatus for off-grid photovoltaic hydrogen production parameters.
[0022] In one embodiment, an adaptive control method for off-grid photovoltaic hydrogen production parameters includes the following steps: Step S100: Determine the coupling matrix and static characteristic parameters based on the conservation of thermoelectric hydrogen energy, and initialize the boundary scaling coefficient and bias learning coefficient.
[0023] Step S200: Calculate the safety boundary and energy efficiency standard with dynamic trade-off coefficient offline using the coupling matrix and static characteristic parameters, and generate the standard parameter set and initial values of the trade-off coefficient. Step S300: Collect photovoltaic output and operating status, and generate operating condition feature vector from static feature parameters; Step S400: Scale the safety boundary using the boundary scaling factor, and use the scaled boundary and the standard parameter set as constraints to iteratively optimize the optimal operating values of temperature, pressure, and flow rate. Step S500: Output drive instructions based on the optimal operating value and record the actual response of each actuator; Step S600: Calculate the compromise coefficient correction value based on the operating deviation, actual response amount, and deviation learning coefficient, and update the compromise coefficient, standard parameter set, boundary scaling coefficient, and deviation learning coefficient simultaneously.
[0024] The aforementioned adaptive control method for off-grid photovoltaic hydrogen production parameters establishes a coupling matrix based on the conservation of thermoelectric hydrogen energy. By solving the voltage, heat, and hydrogen production balance equations of the electrolyzer offline, a coupling matrix describing the coupling relationships between various physical quantities and static characteristic parameters that do not change with operating conditions are obtained. Using this coupling matrix and static characteristic parameters, the safety boundaries of the electrolyzer (upper and lower limits of voltage, temperature, and pressure) and energy efficiency standards incorporating dynamic trade-off coefficients are calculated offline, generating a standard parameter set and initial values for the trade-off coefficients. During online operation, photovoltaic output (power, voltage, and current) and ambient temperature are collected in real time and normalized using the static characteristic parameters to generate an operating condition feature vector. The safety boundary is dynamically scaled using a boundary scaling factor. Within the scaled boundary, the optimal temperature, pressure, and flow rate setpoints under the current operating conditions are obtained by iterative optimization using the gradient descent method, targeting the standard parameter set, and then converted into drive commands output to the actuator. Subsequently, the actual response of each actuator is collected, the operating deviation is calculated, the deviation learning coefficient is used to back-calculate the compromise coefficient correction value, and the initial value of the compromise coefficient, the standard parameter set, the boundary scaling coefficient and the deviation learning coefficient are updated synchronously to form a closed-loop adaptive learning mechanism.
[0025] This system achieves adaptive parameter control of an off-grid photovoltaic hydrogen production system under conditions of strong light fluctuations. It can dynamically track the optimal operating point without relying on a precise system model, significantly improving the system's energy efficiency and response speed. Through a synchronous update mechanism of deviation learning coefficients and trade-off coefficients, it can automatically adapt to practical engineering factors such as electrolyzer performance degradation, ambient temperature changes, and photovoltaic array aging, enhancing the system's robustness and long-term operational stability. The self-adjusting function of the boundary scaling coefficient allows the safety boundary to dynamically change with operating conditions, preventing critical parameters such as temperature and pressure from exceeding limits, ensuring the safety of the hydrogen production process and the lifespan of the equipment. Simultaneously, the combination of offline calculation and online optimization reduces the real-time computational burden, facilitating deployment on embedded controllers.
[0026] In one embodiment, determining the coupling matrix and static feature parameters based on the conservation of thermoelectric hydrogen energy, and initializing the boundary scaling coefficient and bias learning coefficient, includes the following steps: Step S110: Based on the voltage and current characteristics of the electrolyzer, the heat balance equation, and the hydrogen production formula, establish the balance equations for voltage, heat, and hydrogen production.
[0027] Specifically, the voltage balance equation is based on the polarization curve of the electrolyzer and expresses the electrolysis voltage as the sum of the reversible voltage, activation overpotential, ohmic overpotential and concentration overpotential. This equation describes the relationship between electrical energy input and electrolysis voltage.
[0028] The heat balance equation is established based on the balance between heat generation and heat dissipation in the electrolyzer. Heat generation comes from Joule heating and overpotential loss, while heat dissipation includes convection, radiation, and heat carried away by the cooling medium. This equation describes the relationship between heat accumulation and temperature change. The hydrogen production formula is based on Faraday's law, relating the electrolysis current to the hydrogen yield. This equation describes the relationship between electrical energy and chemical energy conversion.
[0029] By combining the three equations above, we obtain a set of balance equations for voltage, heat, and hydrogen production. Voltage balance ensures that the electrical power matches the electrolysis potential, heat balance ensures that the temperature does not exceed the limit, and hydrogen production balance ensures that the gas production is consistent with the energy input.
[0030] Step S120: Convert the equilibrium equations into matrix form and determine the coupling relationship between the elements in the matrix to obtain the coupling matrix.
[0031] Specifically, the three equilibrium equations obtained in step S110 are written in linear or affine form, respectively, containing state variables (current, temperature, pressure) and input variables (photovoltaic power, cooling flow rate).
[0032] For example, the voltage equation can be written as: ; In the formula, This is the terminal voltage of the electrolytic cell, that is, the voltage actually applied across the two ends of the electrolytic cell. The reversible voltage represents the minimum theoretical voltage required for water electrolysis under thermodynamic equilibrium conditions. The equivalent internal resistance of the electrolytic cell is determined by temperature. The function of temperature; it typically decreases as temperature increases. This refers to the current flowing through the electrolytic cell, i.e., the electrolytic current.
[0033] The heat equation can be written as: ; In the formula, The heat capacity of the electrolytic cell represents the amount of heat required to raise the overall temperature of the electrolytic cell by 1 Kelvin. The rate of change of temperature over time. This refers to the electrical power input, specifically the input electrical power to the electrolyzer. Aside from its use in hydrogen production, the remainder of this power is converted into heat. The heat transfer coefficient, This represents the heat exchange area of the electrolytic cell. This is the current temperature of the electrolytic cell. The ambient temperature.
[0034] The hydrogen production equation can be written as: .
[0035] In the formula, The molar yield of hydrogen is the amount of hydrogen produced per unit time. is Faraday's constant.
[0036] Obtain the coefficients in each equation and arrange them into a matrix according to the row corresponding to the equation and the column corresponding to the variable.
[0037] Example as follows: State variable: Current ,temperature ; Given constants: , (After linearization) ), , , ; According to the voltage equation: ; At work Neighborhood linearization: Ignore higher-order terms ( Increment × (the increment), retaining the first order: Rearrange into affine form (moving the constant term to the right): ; According to the heat equation: Substitution The first-order approximation, neglecting second-order minor quantities ( (terms), resulting in the linearized form: ; According to the hydrogen production equation: ; Subsequently, the coefficients are extracted and arranged into a matrix (state variable order: ):
[0038] Finally, rearranging the differential terms to the left side, we obtain the state-space form: The top left corner This indicates that the voltage equation is subject to algebraic constraints (without). (Item), reflecting and The coupling relationship between them (through) and (term coupling).
[0039] The off-diagonal elements in this matrix reflect the interactions between different physical quantities, such as the influence coefficient of current on temperature and the influence coefficient of temperature on voltage. The quantitative coupling relationships between the elements are determined through matrix inversion or linear algebra methods. This coupling matrix is used to describe the interaction strength between the three subsystems: electricity, heat, and hydrogen.
[0040] Step S130: Extract the coefficients that remain unchanged when the current, temperature, and pressure change from the equilibrium equation, and use them as static characteristic parameters.
[0041] Specifically, in the equilibrium equation established in step S110, there are some coefficients related to the structure of the electrolytic cell, material properties, and gas properties. These coefficients remain basically unchanged when the operating current, ambient temperature, and operating pressure change.
[0042] For example, the effective electrode area, temperature coefficient of film resistivity, molar mass of hydrogen, Faraday constant, heat capacity, and heat transfer area. These coefficients are extracted separately from the equations to form a set of static characteristic parameters. These static characteristic parameters remain constant throughout the system's entire lifespan or change only slowly with aging, thus serving as a fixed benchmark for subsequent normalization and objective function calculations. The extraction methods can include numerically identifying the equilibrium equations under rated operating conditions or directly using data provided in the electrolyzer's manufacturer's parameter table.
[0043] Step S140: Initialize the boundary scaling factor to a unit value and the bias learning factor to a half value.
[0044] Specifically, the boundary scaling factor is a unitless quantity used to adjust the tightness of the safety boundary online. During initialization, it is assigned a unit value, i.e., a value of one, indicating that the safety boundary is not scaled initially, and the original safety boundary calculated in step S210 is used.
[0045] The deviation learning coefficient is also a dimensionless quantity used to control the sensitivity of the operating deviation to the compromise coefficient correction. It is initialized to a half value, i.e., 0.5, indicating that in the initial stage, the compromise coefficient correction value is half of the operating deviation, serving a smooth adjustment function. These two coefficients will be continuously and adaptively updated in subsequent steps S630 as the system operates.
[0046] In one embodiment, the offline calculation of the safety boundary and energy efficiency standard with dynamic trade-off coefficients through the coupling matrix and static characteristic parameters, and the generation of the standard parameter set and initial values of the trade-off coefficients, includes the following steps: Step S210: Substitute the coupling matrix with the rated voltage, maximum withstand temperature, and maximum pressure of the electrolytic cell to calculate the upper and lower limits of voltage, temperature, and pressure, thus forming the safety boundary.
[0047] Specifically, each element of the coupling matrix reflects the quantitative influence relationship between current, temperature, and pressure. By substituting the rated voltage (e.g., nominal operating voltage), maximum withstand temperature (e.g., determined by the diaphragm material), and maximum pressure (determined by the shell strength) of the electrolytic cell as inputs into the inverse matrix of the coupling matrix or the relevant transfer function, the feasible ranges of the corresponding current, temperature, and pressure can be solved.
[0048] For example, the maximum allowable current can be deduced from the upper voltage limit; the upper temperature limit can be calculated from the maximum current combined with thermal balance; and the upper pressure limit can be calculated from the upper temperature limit and pressure safety specifications. Similarly, the lower voltage limit corresponds to the minimum operating current, the lower temperature limit corresponds to the low-temperature start-up limit, and the lower pressure limit corresponds to atmospheric pressure or backflow prevention requirements. Ultimately, the upper and lower limits for voltage, temperature, and pressure are obtained. These four extreme values together form a rectangular or super-rectangular safety boundary, serving as a hard constraint that cannot be infringed upon in subsequent online optimization.
[0049] Step S220: Based on the energy efficiency benchmark value in the static characteristic parameters, a dynamic compromise coefficient is introduced to construct an energy efficiency objective function, which is a linear weighted sum of the energy efficiency value and the compromise coefficient.
[0050] Specifically, the energy efficiency benchmark value is the energy efficiency-related part of the static characteristic parameters, such as the theoretical minimum energy consumption, the temperature corresponding to the optimal thermal efficiency point, and the hydrogen production rate. The dynamic tradeoff coefficient is a dimensionless quantity that varies between zero and one, used to balance two potentially conflicting objectives of the system.
[0051] For example, to achieve both the highest energy efficiency and the fastest dynamic response speed, the constructed energy efficiency objective function takes the following form: Energy efficiency target = compromise factor × energy efficiency index A + (1 - compromise factor) × energy efficiency index B.
[0052] Among them, energy efficiency index A represents efficiency priority (such as the lowest hydrogen production energy consumption), and energy efficiency index B represents power priority (such as the highest hydrogen production rate). By adjusting the trade-off coefficient, different optimization focuses can be selected under different operating conditions. The larger the value of this objective function, the better the overall energy efficiency.
[0053] Step S230: Search for the parameter combination that maximizes the energy efficiency objective function within the safety boundary, output the standard parameter set, and record the corresponding compromise coefficient as the initial value of the compromise coefficient.
[0054] Specifically, using the safety boundaries (upper and lower limits of voltage, temperature, and pressure) determined in step S210 as the search space, and the energy efficiency objective function constructed in step S220 as the evaluation index, optimization algorithms such as enumeration, genetic algorithms, or gradient descent are used to traverse or iterate within the safety boundaries to find the parameter combinations (including current, temperature, pressure, flow rate, etc.) that maximize the energy efficiency objective function. The optimal parameter combination found is the standard parameter set.
[0055] Simultaneously, the value of the dynamic trade-off coefficient corresponding to this optimal parameter combination is recorded and used as the initial value of the trade-off coefficient. This initial value represents the energy efficiency trade-off strategy that the system should adopt under ideal offline design conditions. The standard parameter set and the initial value of the trade-off coefficient will be used in subsequent steps S400 and S600.
[0056] In one embodiment, the process of collecting photovoltaic output and operating status, and generating a condition feature vector from static feature parameters, includes the following steps: Step S310: Real-time acquisition of the output power of the photovoltaic array, the terminal voltage and current of the electrolytic cell, the temperature value measured by the ambient temperature sensor, the pressure value acquired by the system pressure sensor, and the flow rate of the coolant or hydrogen gas.
[0057] Specifically, during system operation, the instantaneous power output of the photovoltaic array is collected in real time through power sensors at the photovoltaic inverter or DC combiner box at a sampling frequency of no less than 10 Hz. The terminal voltage and current flowing through the electrolytic cell are simultaneously collected through voltage and current sensors at the input terminal. The ambient temperature is collected through an ambient temperature sensor placed in a shaded area near the electrolytic cell, away from direct sunlight. All collected values undergo analog-to-digital conversion and filtering to eliminate high-frequency noise, yielding raw values suitable for normalized calculations.
[0058] Step S320: Divide the photovoltaic power by the rated power value in the static characteristic parameters to obtain the normalized power; subtract the reference value in the static characteristic parameters from the voltage, current, temperature, pressure, and flow rate respectively, and then divide by the reference range to obtain the normalized values.
[0059] Specifically, the rated power value is the nominal maximum power of the photovoltaic array pre-stored in the static characteristic parameters. Dividing the real-time acquired photovoltaic power by this rated power, the result typically ranges from zero to one, yields the normalized power. For voltage, current, and temperature, each physical quantity corresponds to a reference value and a reference range in the static characteristic parameters. The reference value can be a typical value under rated operating conditions (such as rated voltage, rated current, and standard ambient temperature), and the reference range can be half of the allowable fluctuation width or the maximum deviation.
[0060] The normalization formula is: (real-time value − baseline value) / baseline range.
[0061] The calculated normalized values are centered around zero and roughly fall between -1 and +1. The purpose of normalization is to eliminate the differences in dimensions and numerical scales between different physical quantities, which facilitates the subsequent formation of eigenvectors and distance calculation.
[0062] Step S330: Arrange the normalized power, voltage, current, temperature, pressure, and flow rate in a fixed order to form a six-dimensional operating condition feature vector.
[0063] Specifically, to maintain consistency, the order of the feature vectors is specified as: power, voltage, current, temperature, pressure, and flow rate.
[0064] For example, a feature vector can be represented as .
[0065] This vector is a six-dimensional real vector that uniquely represents the input conditions and system state at the current moment. In the subsequent step S420, this feature vector is used to calculate the Euclidean distance with the six-dimensional target reference point corresponding to the standard parameter set, thereby assessing the degree of deviation between the current operating condition and the ideal operating condition.
[0066] In one embodiment, scaling the safety boundary using a boundary scaling factor, and iteratively optimizing the temperature, pressure, and flow rate using the scaled boundary and the standard parameter set as constraints, includes the following steps: Step S410: Multiply each upper limit of the safety boundary by the boundary scaling factor, and divide each lower limit by the boundary scaling factor to obtain the scaled new boundary.
[0067] Specifically, safety boundaries include voltage limits. Voltage lower limit Upper temperature limit Lower limit of temperature Pressure limit Lower limit of pressure The boundary scaling factor is denoted as α (initially a unit value).
[0068] The new boundary after scaling is calculated as follows: The new upper limit = the original upper limit × α, and the new lower limit = the original lower limit / α.
[0069] When α is greater than the unit value, the upper limit expands and the lower limit shrinks, making the safety boundary more lenient and allowing for a larger operating range; when α is less than the unit value, the upper limit shrinks and the lower limit expands, making the safety boundary more stringent and limiting the operating range. The change in the boundary scaling factor is adaptively adjusted by step S630 according to the operating deviation to achieve a dynamic balance between safety and energy efficiency.
[0070] Step S420: Using the standard parameter set as the target reference point, calculate the Euclidean distance between the current working condition feature vector and the target reference point as the objective function.
[0071] Specifically, the standard parameter set includes normalized power, voltage, current, temperature, pressure, and flow rates under the optimal operating conditions obtained through offline optimization; that is, the target reference point is also a six-dimensional vector. The current operating condition feature vector is the six-dimensional vector generated in step S330.
[0072] The formula for calculating Euclidean distance is: in, For pressure deviation, This is for flow rate deviation.
[0073] The smaller the value of this Euclidean distance, the closer the current operating condition is to the offline optimal operating condition. This Euclidean distance is used as the objective function for online optimization, with the goal of minimizing this distance, i.e., bringing the drive system closer to the standard parameter set.
[0074] Step S430: Within the scaled boundary, use an iterative optimization algorithm to adjust the setpoints of temperature, pressure, and flow rate until the objective function converges, and output the temperature, pressure, and flow rate values at the convergence point as the optimal operating values.
[0075] Specifically, using the coupling matrix and its inverse matrix or Jacobian matrix determined in step S120, a linear mapping relationship is established between the changes in temperature, pressure, and flow rate (ΔT, ΔP, ΔQ) and the changes in voltage, current, and power. This updates the voltage, current, and power components in the eigenvector, and the Euclidean distance is then recalculated. The gradient direction is determined based on the partial derivatives of the Euclidean distance with respect to temperature, pressure, and flow rate, which are obtained by solving the Jacobian matrix of the coupling matrix.
[0076] If the objective function decreases, continue adjusting in that direction; if it increases, decrease the step size or change the direction. The iterative process is carried out within the scaled boundaries determined in step S410, and exceeding these boundaries is not allowed.
[0077] Convergence is determined when the change in the objective function between two consecutive iterations is less than a preset threshold (e.g., one-thousandth) or when the maximum number of iterations is reached. The corresponding temperature, pressure, and flow rates at this point are the optimal operating values. These optimal operating values are the executable settings that best approximate the offline ideal operating conditions.
[0078] In one embodiment, the step of outputting drive instructions based on optimal operating values and recording the actual response of each actuator includes the following steps: In step S510, the temperature value in the optimal operating value is converted into a pulse width modulation duty cycle command for the heater, the pressure value is converted into a speed command for the variable frequency pump, and the flow rate value is converted into an opening command for the proportional valve, and then output to the corresponding actuators respectively.
[0079] Specifically, the optimal operating temperature corresponds to the desired temperature of the electrolyzer. Using a pre-calibrated temperature-duty cycle curve, the desired temperature is converted into the pulse width modulation duty cycle (0% to 100%) required by the heater. The optimal operating pressure corresponds to the desired system pressure. Through the pressure-frequency relationship, the pressure value is converted into the drive frequency of the variable frequency pump, thus obtaining the speed command. The optimal operating flow rate corresponds to the desired coolant or hydrogen flow rate. Using the flow-opening characteristic curve, the flow rate value is converted into the valve opening percentage of the proportional valve.
[0080] The above instructions are converted from digital to analog and then output to the corresponding actuator driver, causing the heater, pump, and valve to perform the corresponding actions.
[0081] In step S520, after one control cycle, the actual temperature, pressure, and flow values reached by the actuator are collected through the temperature sensor, pressure sensor, and flow sensor.
[0082] Specifically, the control cycle can be from 100 milliseconds to 1 second, depending on the system's real-time requirements. After a complete control cycle, the actual temperature is collected by temperature sensors (such as thermocouples or platinum resistance thermometers) installed inside the electrolytic cell or at the inlet and outlet; the system pressure is collected by a pressure transmitter; and the coolant or hydrogen output flow rate is collected by a flow meter (such as a turbine flow meter or ultrasonic flow meter).
[0083] These actual response values reflect the actual physical effect of the actuator after receiving the command. Due to actuator inertia, sensor noise, and environmental interference, there is usually a deviation between the actual value and the command value.
[0084] In step S530, the collected actual values are stored in the cache array in the order of temperature, pressure, and flow rate, overwriting the data from the previous cycle.
[0085] Specifically, a fixed-length circular buffer array is allocated in the embedded controller or computer memory. The three elements of this array correspond to temperature, pressure, and flow rate, respectively. Each time a new actual response value is obtained, the temperature value is written to the first element, the pressure value to the second element, and the flow rate value to the third element in sequence. If the buffer array is full, the new data overwrites the old data.
[0086] The purpose of this is to provide step S610 with the latest actual response data while avoiding storage bloat caused by the accumulation of historical data. The cache array can retain only the latest data or multiple periods for smoothing filtering.
[0087] In one embodiment, the step of calculating the compromise coefficient correction value based on the operating deviation, actual response quantity, and deviation learning coefficient, and synchronously updating the compromise coefficient, standard parameter set, boundary scaling coefficient, and deviation learning coefficient, includes the following steps: Step S610: Calculate the difference between the optimal operating value and the actual response value to obtain the temperature deviation, pressure deviation and flow deviation respectively, and take the root mean square of each deviation as the operating deviation.
[0088] Specifically, the temperature, pressure, and flow rate in the optimal operating values output in step S430 are considered as expected values, and the actual temperature, pressure, and flow rate collected in step S520 are considered as actual values.
[0089] Difference = Expected value - Actual value (note the sign). This yields the temperature deviation ΔT, pressure deviation ΔP, and flow deviation ΔQ.
[0090] To avoid the positive and negative values of the deviations canceling each other out, the root mean square of each deviation is taken as the overall operating deviation: .
[0091] The root mean square (RMS) comprehensively reflects the overall degree to which the three controlled variables deviate from the expected value, and is equally sensitive to positive and negative deviations. The smaller this operating deviation, the more accurate the system's tracking control.
[0092] Step S620: Multiply the running deviation by the deviation learning coefficient to obtain the compromise coefficient correction value, and add the correction value to the current compromise coefficient value to obtain the new compromise coefficient; wherein, when executed for the first time, the current compromise coefficient value is the initial value of the compromise coefficient.
[0093] Specifically, the bias learning coefficient is denoted as β (initial value is half), a real number between zero and one. The running bias is denoted as... The compromise factor correction value = β × The sign of the correction value is determined by the operational deviation. If the actual value is lower than the expected value, resulting in a positive deviation, then the correction value is positive; otherwise, it is negative.
[0094] The initial value of the compromise coefficient obtained in step S230 Add to the correction value: ; To ensure that the compromise factor remains within a reasonable range (e.g., between 0 and 1), it is possible to... A thresholding process is applied: if the value is less than 0, it is set to 0; if the value is greater than 1, it is set to 1. The new trade-off factor reflects the online adjustment of the energy efficiency trade-off strategy based on the actual tracking error.
[0095] Step S630: Recalculate the safety boundary and energy efficiency standard using the new compromise coefficient, the original coupling matrix, and the static characteristic parameters, and update the standard parameter set; at the same time, update the boundary scaling coefficient according to the preset adjustment strategy, and multiply the deviation learning coefficient by a decay factor to complete the synchronous update.
[0096] Specifically, firstly, the new compromise coefficients obtained in step S620 are substituted into the energy efficiency objective function in step S220, replacing the original compromise coefficients. Then, using the unchanged coupling matrix and static characteristic parameters, steps S210 and S220 are repeated to recalculate the safety boundary and energy efficiency objective function. Finally, a new standard parameter set is generated through the search process in step S230. This new standard parameter set will replace the current standard parameter set and be used for optimization in the next control cycle.
[0097] At the same time, the boundary scaling factor is based on renew.
[0098] in, It is a fixed, tiny step size (e.g., 0.01) that gradually loosens the safety boundary to explore a better operating area, but does not exceed a preset upper limit.
[0099] The bias learning coefficient is based on renew.
[0100] in, It is a decay factor less than one (e.g., 0.995), which causes the learning coefficient to gradually decrease, making later adjustments more stable. The above three updates (standard parameter set, boundary scaling factor, and deviation learning factor) are completed synchronously at the end of a control cycle, thereby achieving adaptive control of all parameters in a closed loop.
[0101] The following describes the adaptive control device for off-grid photovoltaic hydrogen production parameters provided by the present invention. The adaptive control device for off-grid photovoltaic hydrogen production parameters described below can be referred to in correspondence with the adaptive control method for off-grid photovoltaic hydrogen production parameters described above.
[0102] In one embodiment, an off-grid photovoltaic hydrogen production parameter adaptive control device, applied to the off-grid photovoltaic hydrogen production parameter adaptive control method described in any of the above embodiments, includes an initialization module, a generation module, a sensing module, an online optimization module, an execution module, and an update module.
[0103] The initialization module is used to determine the coupling matrix and static characteristic parameters based on the conservation of thermoelectric hydrogen energy, and to initialize the boundary scaling coefficient and bias learning coefficient.
[0104] The generation module is used to calculate the safety boundary and energy efficiency standard with dynamic compromise coefficients offline through the coupling matrix and static characteristic parameters, and to generate the standard parameter set and initial values of the compromise coefficients.
[0105] The sensing module is used to collect photovoltaic power output and operating status, and generates operating condition feature vectors from static feature parameters.
[0106] The online optimization module is used to scale the safety boundary using the boundary scaling factor. With the scaled boundary and the standard parameter set as constraints, iterative optimization is performed to obtain the optimal operating values for temperature, pressure, and flow.
[0107] The execution module is used to output drive instructions based on the optimal operating value and record the actual response of each actuator.
[0108] The update module is used to calculate the compromise coefficient correction value based on the running deviation, actual response amount and deviation learning coefficient, and to update the compromise coefficient, standard parameter set, boundary scaling coefficient and deviation learning coefficient simultaneously.
[0109] Figure 3 This example illustrates a schematic diagram of the physical structure of an electronic device, which can be a smart terminal. Its internal structure diagram can be as follows: Figure 3As shown, this electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an adaptive control method for off-grid photovoltaic hydrogen production parameters.
[0110] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the electronic device to which the present invention is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0111] On the other hand, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements an adaptive control method for off-grid photovoltaic hydrogen production parameters.
[0112] On another front, a computer program product or computer program is provided, comprising computer instructions stored in a computer storage medium. A processor of an electronic device reads the computer instructions from the computer storage medium, and when the processor executes the computer instructions, it implements an adaptive control method for off-grid photovoltaic hydrogen production parameters.
[0113] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.
[0114] By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0115] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0116] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A method for adaptive control of off-grid photovoltaic hydrogen production parameters, characterized in that, The method includes: The coupling matrix and static characteristic parameters are determined based on the conservation of thermoelectric hydrogen energy, and the boundary scaling coefficient and bias learning coefficient are initialized. The safety boundary and energy efficiency standard with dynamic trade-off coefficient are calculated offline using the coupling matrix and static characteristic parameters, and the standard parameter set and initial values of the trade-off coefficient are generated. Collect photovoltaic power output and operating status, and generate operating condition feature vectors from static feature parameters; The safety boundary is scaled using a boundary scaling factor. The optimal operating values for temperature, pressure, and flow are obtained iteratively by using the scaled boundary and the standard parameter set as constraints. Output drive instructions based on the optimal operating values and record the actual response of each actuator; The compromise coefficient correction value is calculated based on the operational deviation, actual response, and deviation learning coefficient, and the compromise coefficient, standard parameter set, boundary scaling coefficient, and deviation learning coefficient are updated synchronously.
2. The adaptive control method for off-grid photovoltaic hydrogen production parameters according to claim 1, characterized in that, The process of determining the coupling matrix and static feature parameters based on the conservation of thermoelectric hydrogen energy, and initializing the boundary scaling coefficient and bias learning coefficient, includes: Based on the voltage and current characteristics of the electrolyzer, the heat balance equation, and the hydrogen production formula, a balance equation for voltage, heat, and hydrogen production is established. The equilibrium equations are transformed into matrix form, and the coupling relationships between the elements in the matrix are determined to obtain the coupling matrix. Extract the coefficients that remain constant under changes in current, temperature, and pressure from the equilibrium equations, and use them as static characteristic parameters. Initialize the boundary scaling factor to a unit value and the bias learning factor to a half value.
3. The adaptive control method for off-grid photovoltaic hydrogen production parameters according to claim 1, characterized in that, The process of offline calculation of safety boundaries and energy efficiency standards with dynamic trade-off coefficients using coupling matrices and static characteristic parameters, generating a standard parameter set and initial values for trade-off coefficients, includes: Substituting the coupling matrix with the rated voltage, maximum withstand temperature, and maximum pressure of the electrolytic cell, we calculate the upper and lower limits of voltage, temperature, and pressure to form the safety boundary. Based on the energy efficiency benchmark value in the static characteristic parameters, a dynamic compromise coefficient is introduced to construct an energy efficiency target function, which is a linear weighted sum of the energy efficiency value and the compromise coefficient. Search for the parameter combination that maximizes the energy efficiency objective function within the safety boundary, output the standard parameter set, and record the corresponding compromise coefficient as the initial value of the compromise coefficient.
4. The adaptive control method for off-grid photovoltaic hydrogen production parameters according to claim 1, characterized in that, The process of collecting photovoltaic power output and operating status, and generating a working condition feature vector from static feature parameters, includes: Real-time acquisition of photovoltaic array output power, electrolytic cell terminal voltage and current, ambient temperature sensor measured temperature value, system pressure sensor collected pressure value, and coolant or hydrogen flow rate value; Divide the photovoltaic power by the rated power value in the static characteristic parameters to obtain the normalized power; subtract the reference value in the static characteristic parameters from the voltage, current, temperature, pressure, and flow rate respectively, and then divide by the reference range to obtain the normalized values. The normalized power, voltage, current, temperature, pressure, and flow rate are arranged in a fixed order to form a six-dimensional operating condition feature vector.
5. The adaptive control method for off-grid photovoltaic hydrogen production parameters according to claim 1, characterized in that, The process of scaling the safety boundary using a boundary scaling factor, and then iteratively optimizing the temperature, pressure, and flow rate using the scaled boundary and the standard parameter set as constraints, includes: Multiply each upper bound of the safety boundary by the boundary scaling factor, and divide each lower bound by the boundary scaling factor to obtain the scaled new boundary. Using the standard parameter set as the target reference point, the Euclidean distance between the current working condition feature vector and the target reference point is calculated as the objective function. Within the scaled boundary, an iterative optimization algorithm is used to adjust the setpoints for temperature, pressure, and flow rate until the objective function converges. The temperature, pressure, and flow rate values at the point of convergence are then output as the optimal operating values.
6. The adaptive control method for off-grid photovoltaic hydrogen production parameters according to claim 1, characterized in that, The process of outputting drive instructions based on optimal operating values and recording the actual response of each actuator includes: The temperature value in the optimal operating value is converted into the pulse width modulation duty cycle command of the heater, the pressure value is converted into the speed command of the variable frequency pump, and the flow rate value is converted into the opening command of the proportional valve, and then output to the corresponding actuators respectively. After one control cycle, the actual temperature, pressure and flow values reached by the actuator are collected through temperature sensor, pressure sensor and flow sensor; The collected actual values are stored in the cache array in the order of temperature, pressure, and flow rate, overwriting the data from the previous period.
7. The adaptive control method for off-grid photovoltaic hydrogen production parameters according to claim 1, characterized in that, The step of calculating the compromise coefficient correction value based on the operating deviation, actual response amount, and deviation learning coefficient, and synchronously updating the compromise coefficient, standard parameter set, boundary scaling coefficient, and deviation learning coefficient includes: Calculate the difference between the optimal operating value and the actual response, and obtain the temperature deviation, pressure deviation and flow deviation respectively. Take the root mean square of each deviation as the operating deviation. Multiply the running deviation by the deviation learning coefficient to obtain the compromise coefficient correction value, and add the correction value to the current compromise coefficient value to obtain the new compromise coefficient; wherein, during the first execution, the current compromise coefficient value is the initial value of the compromise coefficient; Using the new compromise coefficients, the original coupling matrix, and static characteristic parameters, the safety boundary and energy efficiency standards are recalculated, and the standard parameter set is updated. At the same time, the boundary scaling coefficients are updated according to the preset adjustment strategy, and the deviation learning coefficients are multiplied by a decay factor to complete the synchronous update.
8. An off-grid photovoltaic hydrogen production parameter adaptive control device, applied to the off-grid photovoltaic hydrogen production parameter adaptive control method according to any one of claims 1 to 7, characterized in that, The device includes: The initialization module is used to determine the coupling matrix and static characteristic parameters based on the conservation of thermoelectric hydrogen energy, and to initialize the boundary scaling coefficient and bias learning coefficient. The generation module is used to calculate the safety boundary and energy efficiency standard with dynamic trade-off coefficients offline through the coupling matrix and static characteristic parameters, and generate the standard parameter set and initial values of the trade-off coefficients. The sensing module is used to collect photovoltaic power output and operating status, and generate operating condition feature vectors from static feature parameters. The online optimization module is used to scale the safety boundary using the boundary scaling factor, and then iteratively optimizes the temperature, pressure, and flow rate by using the scaled boundary and the standard parameter set as constraints. The execution module is used to output drive instructions based on the optimal operating values and record the actual response of each actuator. The update module is used to calculate the compromise coefficient correction value based on the running deviation, actual response amount, and deviation learning coefficient, and to synchronously update the compromise coefficient, standard parameter set, boundary scaling coefficient, and deviation learning coefficient.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.