PEM electrolyzer temperature prediction and control method and device based on learning and full drive system

Through the temperature prediction and control method based on learning and full-drive system, the problems of unsatisfactory prediction accuracy and severe external interference in PEM electrolyzer temperature control are solved, real-time and stable temperature control is achieved, the algorithm complexity and computing cost are reduced, the prediction accuracy is improved, and the use of cooling water is saved.

CN119248030BActive Publication Date: 2025-09-30SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411328268.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-09-30
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

The existing technology has unsatisfactory prediction accuracy in PEM electrolyzer temperature control and is severely affected by external interference, making it difficult to effectively stabilize the temperature within a safe and efficient range.

Method used

A temperature prediction control method based on learning and full-drive system is adopted. By constructing a dynamic model of the PEM electrolyzer, machine learning is used to estimate the noise probability distribution and noise support set, design the feedback control law, establish state and terminal constraints, and perform online optimization control.

Benefits of technology

It achieves real-time and stable temperature control, reduces algorithm complexity and computing cost, improves prediction accuracy, reduces the impact of external interference, and saves cooling water.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248030B_ABST
    Figure CN119248030B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for predictive control of the temperature of a PEM electrolyzer based on a learning and full-drive system. The method comprises the following steps: Step S1, constructing a dynamic model of the PEM electrolyzer temperature, taking the PEM electrolyzer water flow rate as the control object, and constructing a feedback control law based on full-drive system theory to eliminate the nonlinear portion of the dynamic model related to temperature; Step S2, constructing state constraints and terminal constraints and solving the optimization problem online to obtain a control law for the PEM electrolyzer water flow rate at the current moment, thereby achieving PEM electrolyzer temperature control by controlling the PEM electrolyzer water flow rate. The state constraints and terminal constraints used for model predictive control are obtained using a noise probability distribution and noise support set pre-estimated through machine learning. Compared with existing technologies, the present invention has advantages in terms of real-time performance, stability, and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrolyzer control, and in particular to a PEM electrolyzer temperature prediction and control method and device based on a learning and full-drive system. Background Art

[0002] A proton exchange membrane electrolyzer (PEM) utilizes a proton exchange membrane. Temperature control in PEM electrolyzers is crucial for their structural safety and operational efficiency. Numerous factors influence the internal temperature, including heat generated by the electrochemical reaction, heat transfer to the outside world, and the effects of the cooling system. Therefore, maintaining a stable temperature within a safe and efficient range is a worthy challenge.

[0003] At present, there are some studies on the temperature control of PEM electrolyzers at home and abroad. Some schemes use the classic PID controller to control the temperature of the coolant. The PID controller is a common feedback control method that adjusts the control input (i.e. heating or cooling) to maintain the temperature within the desired range by measuring the difference between the system output (i.e. temperature) and the desired value. However, the PID controller has problems such as slow response speed and difficulty in handling complex nonlinear systems, which limits its application effect in the temperature control of PEM electrolyzers.

[0004] Some solutions also utilize model predictive control (MPC). However, to implement MPC, the original PEM electrolyzer system is linearly approximated as a linear system, which can lead to issues with model prediction accuracy. Other solutions use fuzzy logic control and PI controllers to regulate the input water temperature. While fuzzy logic control does not require a precise mathematical model of the system and is highly adaptable to nonlinearity and uncertainty, it suffers from drawbacks such as reliance on strong empirical rules and lack of interpretability. Furthermore, overly complex rules can lead to computational inference burdens.

[0005] In summary, the current electrolytic cell temperature control scheme has problems such as unsatisfactory prediction accuracy and severe external interference. Summary of the Invention

[0006] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a PEM electrolyzer temperature prediction and control method and device based on learning and full-drive system to solve the problems of poor prediction accuracy and serious external interference in the electrolyzer temperature control scheme.

[0007] The purpose of the present invention can be achieved by the following technical solutions:

[0008] One aspect of the present invention provides a method for predicting and controlling the temperature of a PEM electrolyzer based on a learning and full-drive system, comprising the following steps:

[0009] Step S1, constructing a dynamic model of the PEM electrolyzer temperature, taking the water flow rate of the PEM electrolyzer as the control object, and constructing a feedback control law based on the full drive system theory to eliminate the nonlinear part of the dynamic model related to temperature;

[0010] Step S2, constructing state constraints and terminal constraints and solving the optimization problem online to obtain the control law of the water flow rate of the PEM electrolyzer at the current moment, and realizing the temperature control of the PEM electrolyzer by controlling the water flow rate of the PEM electrolyzer, wherein the state constraints and terminal constraints used for model predictive control are obtained by using the noise probability distribution and noise support set estimated in advance by machine learning.

[0011] As a preferred technical solution, in step S2, the process of obtaining the noise probability distribution and the noise support set includes the following steps:

[0012] Step S001: Acquire multiple historical noise data points, perform principal component analysis through machine learning, and obtain principal component features;

[0013] Step S002: Project each historical noise data point onto each principal component, and obtain the cumulative probability density information on each principal component through kernel density estimation;

[0014] Step S003, for the cumulative probability density information on each principal component, obtain a noise support set by performing confidence interval truncation processing;

[0015] Step S004 : For the multiple historical noise data points, obtain the probability distribution of each point in the noise support set by high-dimensional kernel density estimation, that is, the noise probability distribution.

[0016] As a preferred technical solution, in step S001, the acquisition of the principal component features is implemented using the following formula:

[0017] W=[d 1 ,d 2 ,…,d N ] T

[0018]

[0019] S=PΛP T

[0020] P=[p1,p2,…,p r ]

[0021] Λ=diag(λ1,…,λr )

[0022] Where W is a matrix containing N historical noise data points, W0 is the matrix after W is centered, and P = [p1, p2, ..., p r ] represents the eigenvector matrix, Λ=diag(λ1,…,λ r ) represents the diagonal matrix of eigenvalues, and T represents transpose.

[0023] As a preferred technical solution, the noise support set for:

[0024]

[0025] The noise probability distribution is:

[0026]

[0027] in, is the mean of historical noise data points, represents the cumulative probability density function on the kth principal component, α is the significance level, express The inverse operation of d represents the vector of historical noise data points, k represents the normalization constant, and f kde (d) represents the probability distribution of d obtained by kernel density estimation.

[0028] As a preferred technical solution, in step S1, the dynamic model is:

[0029] T(k+1)=F1(T(k))+F2(m w ,T(k))+T(k)+d(k)

[0030] The feedback control law is modeled as:

[0031] m w =F2 -1 (-F1(T(k)),T(k))

[0032] Among them, T(k), m w , d(k) represent the discrete temperature, water flow rate and external noise respectively, F1(T(k)) is the nonlinear part related to temperature, F2(m w ,T(k)) is a decreasing function of water flow rate.

[0033] As a preferred technical solution, when the feedback control rate is u(i+1|k)=K p When T(i+1|k)+v(i+1|k), the state constraint is:

[0034]

[0035] Z (i) ={z|Hz≤h-ζ(i)}

[0036] z(i+1|k)=Φz(i|k)+v(i|k),z(0|k)=T(k)

[0037] e(i+1|k)=Φe(i|k)+d(i|k),e(0|k)=0

[0038] minζ(i|k)

[0039] sT r [H j e(i|k)≤ζ(i|k)]≥1-∈

[0040] e(i|k)~P e(i|k)

[0041] Among them, M (i) represents the state constraint at time i, z(i+1|k) and e(i+1|k) are the nominal system and error system respectively, Φ=I+K p , I is the identity matrix, K p is the LQR solution of the linear dynamic model in step S2, T(i+1|k) is the state of the temperature system from the time k to the time i+1, u(i+1|k) and v(i+1|k) are the control inputs to be solved in the linear dynamic model in step S2 and the control input of the i-th step in the model predictive control method, respectively, H j is the jth row of H, ∈ represents the probability that the chance constraint tolerates exceeding the original constraint, P r represents the probability of an event occurring, P e(i|k) represents the probability distribution of the error estimate at step i, Z (i) represents the set of chance constraints, represents the Minkowski difference, represents the Minkowski sum, represents the estimated noise support set.

[0042] As a preferred technical solution, the terminal constraint Z is obtained by solving the maximum robust positive invariant set of the following formula: (N) :

[0043]

[0044] Where N is the step size of the control time domain.

[0045] As a preferred technical solution, the optimization problem is:

[0046]

[0047] min v J N (v)

[0048] stz(i+1|k)=Φz(i|k)+v(i|k)

[0049] z(0|k)=T(k)

[0050] Φ=I+K p

[0051] z(i+1|k)∈M (i+1) ,i=0,1,…,N-1

[0052] z(N+1|k)∈Z (N)

[0053] Where N is the number of historical noise data points, v(i|k) is the control input of step i in the model predictive control method, B is the input coefficient matrix of the linear dynamic model in step S2, and P is The solution, K p is the feedback control coefficient, Φ=I+K p , I is the identity matrix, Q z 、R u are all positive semidefinite matrices, Z (N) represents the terminal state constraint, M (i) Represents the state constraint at time i.

[0054] As a preferred technical solution, in step S2, the process of controlling the temperature of the PEM electrolyzer by controlling the water flow rate of the PEM electrolyzer is as follows:

[0055] Based on the control law of the water flow rate of the PEM electrolyzer at the current moment, the target water flow rate at the current moment is obtained by inverse solution, and the water flow rate of the PEM electrolyzer is controlled.

[0056] Another aspect of the present invention provides an electronic device comprising: one or more processors and a memory, wherein the memory stores one or more programs, and the one or more programs include instructions for executing the aforementioned PEM electrolyzer temperature prediction and control method based on learning and full-drive system.

[0057] Compared with the prior art, the present invention has at least one of the following beneficial effects:

[0058] (1) Strong real-time performance and the ability to achieve online control: The present invention uses a model predictive control method to control the PEM electrolyzer. Compared with PID, it can consider multiple state constraints and is more suitable for handling complex control problems. In addition, the original complex nonlinear system is converted into a linear system for control optimization, which greatly reduces the complexity of the algorithm and improves the calculation speed, so that the model predictive control can be calculated online.

[0059] (2) Strong control stability: The model predictive control method of the present invention fully considers the external interference on the PEM electrolyzer, making the control effect more robust and stable. By constructing state constraints, it can theoretically guarantee the feasibility and convergence of the recursion, and reduce the conservatism of the control, making the algorithm more stable and feasible, and saving more control costs.

[0060] (3) No need to linearize the model itself: Unlike some solutions that directly linearize the model itself, the present invention eliminates the nonlinear part of the dynamic model related to temperature by constructing a feedback vacancy rate, making the prediction part of the model predictive control more accurate and improving the accuracy of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 Schematic diagram of the flow of the PEM electrolyzer temperature prediction and control method based on learning and full drive system in this embodiment;

[0062] Figure 2 The simulation diagram of PEM electrolyzer in Simulink is shown below;

[0063] Figure 3 This is a schematic diagram comparing the control effects of the four methods in the comparative experiment;

[0064] Figure 4 This is a partial enlarged view of the PID control experiment;

[0065] Figure 5 Schematic diagram of a PEM electrolyzer system. DETAILED DESCRIPTION

[0066] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0067] Example 1

[0068] In response to the problems existing in the aforementioned prior art, this embodiment provides a PEM electrolyzer temperature prediction and control method based on learning and full-drive system. This method robustly controls the temperature of the PEM electrolyzer based on machine learning and full-drive system theory.

[0069] For details, see Figure 1 ,This method is divided into an offline phase (including steps S1 and S3 ) and an online phase (including steps S2 and S4 ), and each step will be described separately below.

[0070] Step S1, estimating the noise distribution and the noise support set based on the historical noise data of the PEM electrolyzer.

[0071] Specifically, the noise of the PEM electrolyzer refers to the external interference to the PEM electrolyzer and the error of the mathematical model of the PEM electrolyzer itself. Assume that we have some historical samples of this noise and set d1, d2, ..., d n For N historical noise data points, the steps for establishing the noise distribution estimate are specifically as follows:

[0072] Step S101, based on the matrix W composed of N historical noise data points = [d 1 ,d 2 ,…,d N ] T , we use the machine learning methods principal component analysis (PCA) and kernel density estimation (KDE) to estimate the probability distribution of the noise. First, we use the PCA algorithm to extract the principal components of the noise data matrix to estimate the shape of the noise support set. First, we center it to get a matrix W0 with a mean of 0 and calculate the covariance matrix Then diagonalize the matrix S to S = PΛP T , where P = [p1,p2,…,p r ] represents the eigenvector matrix, Λ=diag(λ1,…,λ r ) is a diagonal matrix composed of eigenvalues, where the size of the eigenvalue represents the amount of information on the principal component.

[0073] Step S102: Project each data point onto each principal component according to the result of step S101. Define the i-th projection point on the k-th principal component as Take the Gaussian kernel as the kernel function in KDE, and use the maximum likelihood estimation to obtain the bandwidth in KDE. Finally, according to the projection points on each principal component, use KDE to estimate the probability distribution of the noise on each principal component, and get the cumulative probability density function on the kth principal component:

[0074] Step S103: Use the 1-2α confidence interval cutoff on the cumulative probability density function of each principal component to obtain the support set estimate of the noise:

[0075]

[0076] Step S104: Matrix W = [d 1 ,d 2 ,…,d N ] T Use the high-dimensional KDE algorithm to estimate the probability distribution f of each point in the support set kde (d), and because the estimated support set is bounded, it is necessary to truncate and normalize the distribution obtained by KDE. Let k represent the normalization constant, then the probability distribution of each point is:

[0077] In step S2, based on the full drive system theory, a suitable feedback control law is designed to eliminate the nonlinear part in the dynamic system of the PEM electrolyzer temperature and obtain a linear system.

[0078] Specifically, the dynamic system of the PEM electrolyzer temperature is a first-order, highly nonlinear, complex system that is related to the power supply voltage, external temperature, water flow rate, etc. When a stable current supply is provided and the external conditions are assumed to be stable, the system can be expressed as:

[0079]

[0080] Where, T,m w ,d are the current temperature, water flow rate and external noise respectively, f1(T) is the temperature-related nonlinear part of the temperature system, f2(T,m w ) is a nonlinear function related to the input water flow rate. Discretize the above system:

[0081] T(k+1)=F1(T(k))+F2(m w ,T(k))+T(k)+d(k)

[0082] The effect of water flow rate on the temperature of PEM electrolyzer is that the greater the water flow rate, the better the cooling effect. w , T(k)) is a monotonically increasing function of the water flow rate, and its range is set to be sufficient to offset the nonlinear part F1(T(k)) in the system. The core idea of ​​the full-drive system theory is to apply a suitable feedback control law to eliminate the nonlinear part of the original system and obtain a linear system. The feedback control law m is inversely solved. w =F2 -1(-F1(T(k)),T(k)), and substitute it into the original temperature system to obtain the linear system:

[0083] T(k+1)=T(k)+u(k)+d(k)

[0084] Where u(k) is the control input to be solved.

[0085] Step S3: Offline calculation of the state constraints and terminal constraints designed in the model predictive control based on the estimated noise distribution.

[0086] Specifically, state constraints and terminal constraints are constraints designed to ensure recursive feasibility and convergence in model predictive control. Let's assume the original state constraint is T = {T|HT≤h}. The state constraint consists of two parts: a chance constraint and a tube constraint. The terminal constraint is a maximal robust positive invariant set. The specific solution process is as follows:

[0087] Step S301: Apply the feedback control law u(i+1|k)=K to the linear system in step S2. p T(i+1|k)+v(i+1|k). Where K p is the LQR solution of the linear system, and T(i+1|k) is the state of the temperature system at time i+1 after it is observed from time k. The following nominal system and error system are obtained:

[0088] z(i+1|k)=Φz(i|k)+v(i|k),z(0|k)=T(k)

[0089] e(i+1|k)=Φe(i|k)+d(i|k),e(0|k)=0

[0090] Where Φ is I+K p .

[0091] Step S302: Based on the noise probability distribution obtained in step S1 and the dynamic equation of the error system, the probability distribution p of the error e(k+i|k) at time k+i is derived. e(k+i|k) The distribution of e(0|k) is known. According to the noise probability distribution obtained in step S1 and the dynamic equation of the error system, enough data points of e(1|k) are sampled to obtain the probability distribution of e(1|k) by imitating step S1. Similarly, the probability distribution p of e(k+i|k) at time k+i can be obtained. e(k+i|k) , and solve the optimization problem:

[0092] minζ(i|k)

[0093] sT r [H je(i|k)≤ζ(i|k)]≥1-∈

[0094] e(i|k)~P e(i|k)

[0095] Where H j is the jth row of H, and ∈ indicates that the chance constraint tolerates the probability of exceeding the original constraint. The set of chance constraints can be expressed as Z (i) ={z|Hz≤h-ζ(i)}.

[0096] Step S303: Based on the estimated support set of the noise Calculate the tube state constraints at each moment The total state constraint at each moment is obtained as

[0097] Step S304, solving the system The maximum robust positive invariant set of , we get the terminal constraint Z (N) .

[0098] Step S4, solving the optimization problem in the model predictive control online to obtain the control law of the water flow rate of the PEM electrolyzer at the current moment.

[0099] The performance indicators of the optimization problem that needs to be solved online are:

[0100]

[0101] Where Q z , R u They are all semi-positive matrices. Because the feedback control coefficient K p is the solution of LQR, so minimizing the above performance index is equivalent to minimizing:

[0102]

[0103] Where P is the Lyapunov equation Therefore, the final quadratic programming problem that needs to be solved online is:

[0104] min v J N (v)

[0105] stz(i+1|k)=Φz(i|k)+v(i|k)

[0106] z(0|k)=T(k)

[0107] Φ=I+K p

[0108] z(i+1|k)∈M (i+1) ,i=0,1,…,N-1

[0109] z(N+1|k)∈Z (N)

[0110] Because the state constraint M (i+1) and the terminal constraint Z (N) Both have inequality expressions, so the quadratic programming problem can be quickly solved by the quadprog function in Matlab, meeting the real-time requirements of online solution of the control law.

[0111] In the above steps, steps S1 and S3 are both offline calculation steps, while steps S2 and S4 are online calculation steps. The current water flow rate is obtained by solving the optimization problem in step S4.

[0112] In summary, the control steps of the PEM electrolyzer temperature in this method are summarized as follows: first, the noise distribution is estimated using machine learning methods based on the historical data of the electrolyzer to prepare for the subsequent model predictive control; then, based on the temperature observation at the current moment, a suitable feedback control law is designed to eliminate the nonlinear part in the system and obtain a linear system; third, based on the estimated noise distribution, the state constraints designed in the subsequent model predictive control are calculated; finally, the quadratic programming problem at the current moment in step S4 is solved, and the optimal control law of the N control time domains obtained in step S4 is set as u * (0|k),u * (1|k),…,u * (N|k), using the optimal control law at time 0, plus the nonlinear part F1(T(k)) in the PEM electrolyzer system that needs to be eliminated in step S2, the water flow rate at the current time k is inversely solved where α=u * (0|k)-F1(T(k)), this method controls the temperature of the PEM electrolyzer by controlling the water flow rate at the current moment.

[0113] The following will further illustrate this method with reference to the accompanying drawings and specific simulation examples. The results of using Simulink to simulate the electrochemical modeling and heat conduction modeling of the PEM electrolyzer are as follows: Figure 2 As shown in Figure 2. The electrochemical working process of the electrolytic cell is as follows: Figure 5 As shown, it is modeled as:

[0114]

[0115] where z,i,i o,c ,i o,a ,F,R,T,α respectively represent the stoichiometric coefficient, the current density in the cell, the exchange current density between the cathode and anode, the Faraday constant, the gas constant, the temperature and the reaction rate constant. The heat conduction model of the electrolytic cell is:

[0116]

[0117] Where C t , N, V th , T a , A hx , H hx C represents heat capacity, number of batteries, thermal neutral voltage, external temperature, water flow temperature, heat exchanger area and heat transfer coefficient of heat exchanger respectively. c =m w C w is the heat capacity of the water flow, τ t =R t C t The detailed parameters of the electrolytic cell modeling are shown in Table 1.

[0118] Table 1 Parameters of electrolytic cell modeling

[0119]

[0120] Modeling the voltage V cell Substituting into the heat conduction modeling, we get a first-order equation with the output being the temperature of the electrolytic cell and the input being the water flow rate and current density (all other parameters are constants). When providing a stable current density supply, the temperature modeling of the electrolytic cell is a highly nonlinear first-order equation with the input being the water flow rate and the output being the temperature in the cell. Taking into account the working efficiency and safety of the PEM electrolyzer, the control target of this embodiment is set to control the temperature as close to 80 degrees Celsius as possible, but not exceeding 80 degrees Celsius. The initial temperature of the electrolytic cell is set to 25 degrees Celsius, and the tolerance in the chance constraint is set to 5%. Under these conditions, a total of 100 rounds of 2500-second PEM electrolyzer temperature control experiments were carried out. In addition, this embodiment also uses the PID method, the Linear Quadratic Regulator (LQR) method, and the tube model predictive control method to control the temperature of the electrolytic cell as a comparison of the proposed method. The control effects of the four are as follows. Figure 3 As shown in the figure, it can be seen that, except for PID control, the temperature convergence speed of the method of this embodiment is faster than that of the other two methods, and the average violation rate of exceeding the set 80 degrees Celsius threshold after temperature convergence is 4.28%. Although PID control can converge very quickly, its average violation rate is as high as 37.25% (through Figure 4The high violation rate of PID can be clearly seen in the local enlarged image). This is mainly because the previous analysis shows a slow response to system disturbances, resulting in frequent violations of constraints. In response to the above problem, for the LQR method, its temperature converges quite slowly, and after convergence, it can be found that its temperature will obviously exceed the algorithm of this embodiment, and the average violation rate is as high as 25.3%. The tube model predictive control keeps the electrolytic cell at an overly conservative temperature, which reduces the efficiency of the electrolytic cell and greatly increases the consumption of unnecessary cooling water. For the tube model predictive control, it consumed an average of 2090.25 kg of cooling water in the 2500-second experiment, PID consumed 833.40 kg, and the LQR method consumed 499.40 kg. The method of this embodiment only requires an average of 87 kg of cooling water to control the temperature of the electrolytic cell.

[0121] In summary, this method maintains the efficient operation of the electrolytic cell while making the temperature of the electrolytic cell exceed the set threshold as little as possible, thereby ensuring the safety and life of the electrolytic cell, saving the use of cooling water, and reducing control costs.

[0122] This method has at least one of the following beneficial effects:

[0123] (1) No approximation is performed on the original system, which improves the accuracy of model prediction. Using the model predictive control method to control the PEM electrolyzer can consider multiple state constraints compared to PID, making it more suitable for handling complex control problems. It also converts the original complex nonlinear system into a linear system for control optimization, greatly reducing the complexity of the algorithm and improving the calculation speed, making the model predictive control possible for online calculation.

[0124] (2) Taking external interference into account can better stabilize the temperature of the electrolyzer. The model predictive control method takes into account the external interference on the PEM electrolyzer, making the control effect more robust and stable. By designing state constraints, it can not only theoretically guarantee the feasibility and convergence of the recursion, but also reduce the conservativeness of the control, making the algorithm more stable and feasible, and saving more control costs. There is no need to linearize or approximate the original PEM electrolyzer model, making the prediction part of the model predictive control more accurate and improving the accuracy of the algorithm.

[0125] (3) Appropriate state constraints and terminal constraints are designed to ensure the convergence and recursive feasibility of the algorithm while avoiding overly conservative control laws, thereby reducing control costs. The problem that requires online optimization in the algorithm is a quadratic programming problem, which can be quickly calculated, thereby improving the calculation speed of the algorithm.

[0126] Example 2

[0127] This embodiment provides an electronic device, including: one or more processors and a memory, wherein the memory stores one or more programs, and the one or more programs include instructions for executing the PEM electrolyzer temperature prediction and control method based on learning and full-drive system as described in Example 1.

[0128] Example 3

[0129] This embodiment provides a computer-readable storage medium, including one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs include instructions for executing the PEM electrolyzer temperature prediction and control method based on learning and full-drive system as described in Example 1.

[0130] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A PEM electrolyzer temperature prediction and control method based on learning and full drive system, characterized in that: The steps include: Step S1, constructing a dynamic model of the PEM electrolyzer temperature, taking the water flow rate of the PEM electrolyzer as the control object, and constructing a feedback control law based on the full drive system theory to eliminate the nonlinear part of the dynamic model related to temperature; Step S2: constructing state constraints and terminal constraints and solving the optimization problem online to obtain a control law for the water flow rate of the PEM electrolyzer at the current moment, and achieving PEM electrolyzer temperature control by controlling the water flow rate of the PEM electrolyzer. The state constraints and terminal constraints used for model predictive control are obtained by using a noise probability distribution and a noise support set estimated in advance by machine learning. When the feedback control law is When , the state constraint is: in, express State constraints at the moment, 、 They are nominal system and error system respectively. , is the identity matrix, is the LQR solution of the linear dynamic model in step S2, i.e., the feedback control coefficient, For the temperature system The moment is observed to begin at i+ The state at moment 1, for No. OK, represents the probability that the chance constraint tolerates more than the original constraint, represents the probability of an event occurring, represents the probability distribution of the error estimate at step i, represents the set of chance constraints, represents the Minkowski difference, represents the Minkowski sum, represents the estimated noise support set, represents the discretized temperature, By solving the maximum robust positive invariant set of the following equation, we can obtain the terminal constraint: : in, To control the time domain step size, The optimization problem is: in, is the number of historical noise data points, is the control input of step i in the model predictive control method, is the input coefficient matrix of the linear dynamic model in step S2, for The solution, 、 are all positive semidefinite matrices, represents the terminal state constraint, express State constraints at a given moment.

2. A PEM electrolyzer temperature prediction and control method based on learning and full drive system according to claim 1, characterized in that: In step S2, the process of obtaining the noise probability distribution and the noise support set includes the following steps: Step S001: Acquire multiple historical noise data points, perform principal component analysis through machine learning, and obtain principal component features; Step S002: Project each historical noise data point onto each principal component, and obtain the cumulative probability density information on each principal component through kernel density estimation; Step S003, for the cumulative probability density information on each principal component, obtain a noise support set by performing confidence interval truncation processing; Step S004 : For the multiple historical noise data points, obtain the probability distribution of each point in the noise support set by high-dimensional kernel density estimation, that is, the noise probability distribution.

3. The method for predicting and controlling the temperature of a PEM electrolyzer based on a learning and full-drive system according to claim 2, characterized in that: In step S001, the main component features are obtained using the following formula: in, To include A matrix of historical noise data points, for The centered matrix, represents the eigenvector matrix, represents the diagonal matrix of eigenvalues, Indicates transpose.

4. A PEM electrolyzer temperature prediction and control method based on learning and full drive system according to claim 3, characterized in that: The noise support set for: The noise probability distribution is: in, is the mean of historical noise data points, Indicates the The cumulative probability density function on the principal components is is the significance level, express The inverse operation of represents a vector of historical noise data points, represents the normalization constant, Represents the kernel density estimation The probability distribution of .

5. The method for predicting and controlling the temperature of a PEM electrolyzer based on a learning and full-drive system according to claim 1, characterized in that: In step S1, the dynamic model is: The feedback control law is modeled as: in, 、 、 Represent the discrete temperature, water flow rate and external noise respectively, is the nonlinear part related to temperature, It is a decreasing function of the water flow rate.

6. The method for predicting and controlling the temperature of a PEM electrolyzer based on a learning and full-drive system according to claim 1, characterized in that: In step S2, the process of controlling the temperature of the PEM electrolyzer by controlling the water flow rate of the PEM electrolyzer is as follows: Based on the control law of the water flow rate of the PEM electrolyzer at the current moment, the target water flow rate at the current moment is obtained by inverse solution, and the water flow rate of the PEM electrolyzer is controlled.

7. An electronic device, characterized in that: include: One or more processors and a memory, wherein the memory stores one or more programs, wherein the one or more programs include instructions for executing the PEM electrolyzer temperature prediction and control method based on learning and full-drive system as described in any one of claims 1-6.