Internal resistance testing method of hydrogen fuel cell based on sampling delay compensation

By using polynomial interpolation in the internal resistance test of hydrogen fuel cell for sampling delay compensation and building an optimized objective function to solve the optimal control parameters, the problem of difficult to accurately compensate sampling delay in the prior art is solved, and the accuracy of the test and control accuracy are improved.

CN119828027APending Publication Date: 2025-04-15WUHAN UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510041442.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing fuel cell internal resistance testing methods are difficult to accurately compensate for sampling delays, resulting in signal distortion and affecting the accuracy and reliability of the test.

Method used

By taking the inductance current of the hydrogen fuel cell and the output voltage of the load as state variables, the sampling delay compensation is performed using polynomial interpolation, and an optimization objective function is constructed to solve the optimal control parameters of the hydrogen fuel cell controller.

Benefits of technology

It effectively reduces the error caused by sampling delay, improves the accuracy of state variable estimation, enhances control accuracy, and improves the working efficiency of fuel cells and the stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119828027A_ABST
    Figure CN119828027A_ABST
Patent Text Reader

Abstract

The invention discloses a hydrogen fuel cell internal resistance test method based on sampling delay compensation, which comprises the following steps: taking the inductive current of a hydrogen fuel cell and the output voltage of a load as state variables, performing polynomial interpolation on the state variable at the previous moment, predicting the state variable at the current moment, and calculating the internal resistance of the hydrogen fuel cell; taking the predicted state variable as the sampling delay compensation of the state variable at the current moment; constructing an optimization objective function of the hydrogen fuel cell controller according to the state variable after sampling delay compensation, and solving the optimization objective function to obtain an optimal control parameter of the hydrogen fuel cell controller; and collecting the output voltage and the output current of the hydrogen fuel cell after optimization control, calculating the electrochemical impedance spectroscopy (EIS) of the hydrogen fuel cell, performing relaxation time distribution analysis on the EIS, and evaluating the health state of the hydrogen fuel cell. Compared with a traditional control and compensation method, the method provided by the invention can improve the synchronism of signals, and has more excellent control performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of fuel cell internal resistance testing, and in particular to a method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation. Background Art

[0002] The internal resistance test of a fuel cell is a key step in evaluating the performance of a fuel cell. The size of the internal resistance directly affects the power generation efficiency of the battery, and is also related to the stability, reliability and durability of the battery. A fuel cell with low internal resistance can convert chemical energy into electrical energy more efficiently, while high internal resistance may lead to energy loss and performance degradation. Therefore, accurately measuring and evaluating the internal resistance of a fuel cell is crucial for the design, optimization and maintenance of the battery.

[0003] Electrochemical impedance spectroscopy (EIS) technology is an important means to study the internal state and electrochemical behavior of fuel cells. EIS obtains the impedance information of the battery at different frequencies by applying an AC current disturbance to the fuel cell and measuring the corresponding voltage response. These impedance data can reveal the electrochemical reaction process and physical phenomena inside the fuel cell, thereby helping researchers and engineers to gain in-depth understanding of the working state and performance changes of the battery. EIS testing is a non-destructive technique that can provide detailed information about the internal structure and reaction mechanism of the battery without damaging the battery. By analyzing the EIS data, parameters such as the charge transfer resistance, diffusion resistance, and double-layer capacitance of the battery can be determined, which are crucial for evaluating the performance and health of the battery. Although EIS technology is very useful in fuel cell internal resistance testing, the delay problem in the sampling process remains a challenge in practical applications. In digital signal processing, sampling delay may cause signal distortion, thereby affecting the accuracy and reliability of EIS testing. In order to overcome this problem, fractional-order delay filters are proposed as a solution.

[0004] Although fractional-order delay filters allow signals to be delayed over fractional parts of the sampling period, providing finer time control than traditional integer delays. However, designing a high-performance fractional-order delay filter requires accurate time delay estimation and Doppler shift estimation, which is a challenge in dynamic and complex communication environments. Existing techniques usually rely on complex algorithms and multiple assumptions to estimate the time delay and Doppler shift of the signal. For example, some methods use adaptive filters, least squares estimation, or frequency domain analysis to extract signal features. Although these methods are effective in some cases, they may not provide sufficient accuracy and stability in the application of fuel cell internal resistance testing. Therefore, designing a new method to accurately compensate for the sampling delay is crucial to improving the accuracy and reliability of EIS testing. Summary of the invention

[0005] The present invention proposes a method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation, which solves the problem that the existing internal resistance testing method cannot accurately compensate for the sampling delay of the fuel cell.

[0006] In order to solve the above technical problems, the present invention provides a method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation, comprising the following steps:

[0007] Step S1: taking the inductor current of the hydrogen fuel cell and the output voltage of the load as state variables, performing polynomial interpolation on the state variables at the previous moment, predicting the state variables at the current moment, and using the predicted state variables as sampling delay compensation for the state variables at the current moment;

[0008] Step S2: constructing an optimization objective function of the hydrogen fuel cell controller according to the state variables after sampling delay compensation, and solving the optimization objective function to obtain the optimal control parameters of the hydrogen fuel cell controller;

[0009] Step S3: collecting the output voltage and output current of the hydrogen fuel cell after optimization control, calculating the electrochemical impedance spectrum EIS of the hydrogen fuel cell, performing relaxation time distribution analysis on the EIS, and evaluating the health status of the hydrogen fuel cell.

[0010] Preferably, in step S1, a prediction function of the state variable is constructed using the Lagrange interpolation method, and the expression of the prediction function is:

[0011]

[0012] Where x(k|k-τ) is the state variable at time k predicted by time k-τ; A N is the Nth power of the system matrix; α0 and α1 are interpolation basis functions; I m is the identity matrix of order m; A -1 is the inverse matrix of the system matrix; x(k-τ) is the state variable at time k-τ; B is the input matrix; d is the input vector; k is the current moment; N is the control time domain; F is the noise matrix.

[0013] Preferably, the expression of the optimization objective function in step S2 is:

[0014]

[0015] Where J(D(k)) is the optimization objective function; Y(k) is the predicted output vector; R y is the reference value of the state variable; Γ y , Γ d are diagonal weighted matrices respectively; D(k) is the duty cycle of the dc / dc converter switch tube of the hydrogen fuel cell; R dis the reference value of the control signal; H is a semi-positive definite matrix; f T is the gradient function; is the miscellaneous factor; S u is the prediction matrix of control input; S x is the state prediction matrix; x(k|k-τ) is the state variable at time k predicted by time k-τ; D F is a stray item.

[0016] Preferably, solving the optimization objective function in step S2 includes the following steps: converting the optimization objective function into a quadratic programming problem, and solving the quadratic programming problem using an improved genetic algorithm.

[0017] Preferably, the expression of the quadratic programming problem is:

[0018]

[0019] Preferably, the method of solving the quadratic programming problem by using an improved genetic algorithm comprises the following steps:

[0020] Step S21: randomly generate an initial population with the number of individuals Np, and convert each individual into a binary number as the genetic code of the chromosome;

[0021] Step S22: Convert the quadratic programming problem into a maximum value problem:

[0022]

[0023] Will As the objective function, the objective function value is taken as the fitness of the individual;

[0024] Step S23: taking the ratio of the fitness of the individual to the total fitness of the population as the probability of the individual being selected, and adopting the roulette strategy to select several individuals from the current population as the regeneration population;

[0025] Step S24: using a roulette wheel strategy to select the father of the next generation individual from the regenerated population, randomly selecting the mother, randomly generating a crossover point, setting an adaptive crossover probability, and generating a new individual;

[0026] Step S25: setting the adaptive mutation probability, if the maximum fitness of the current population is equal to the minimum fitness, a mutation position is generated, otherwise the number of mutation positions and the position of each mutation are randomly generated, and the generated new individuals are mutated;

[0027] Step S26: Generate a new generation of population by crossover and mutation. If the current number of iterations reaches the set number of iterations, the iteration is stopped, and the individual with the highest fitness in the current population is output to obtain the optimal control parameters of the hydrogen fuel cell controller.

[0028] Preferably, the expression of the adaptive crossover probability in step S24 is:

[0029]

[0030] Where P c is the adaptive crossover probability; k1 and k2 are two different crossover probabilities; J max is the maximum fitness of the population; J is the fitness of the current individual; J avg is the average fitness of the population.

[0031] Preferably, in step S23, the larger fitness value of the two crossovers is recorded, and in step S25, if the fitness of the new individual after the crossover is smaller than the individual with the larger fitness before the crossover, the original fitness is retained.

[0032] Preferably, the expression of the adaptive mutation probability in step S25 is:

[0033]

[0034] Where P m is the adaptive mutation probability; k3 and k4 are two different crossover probabilities; f max is the maximum fitness of the population after crossover; f' is the fitness of the current individual after crossover; f avg is the average fitness of the population after crossover.

[0035] Preferably, step S3 comprises the following steps:

[0036] Step S31: Perform Fourier transform on the collected output voltage and output current of the hydrogen fuel cell to obtain the amplitude and phase at each frequency:

[0037]

[0038]

[0039] In the above formula, V k is the output voltage of the fuel cell after Fourier transformation; v n is the output voltage value of the hydrogen fuel cell within n sampling periods; i is the imaginary unit; k is the ratio of frequency f to base frequency; n is the sequence number; N is the sampling number; I k is the output current of the fuel cell after Fourier transformation; i n is the output current value of the hydrogen fuel cell within n sampling cycles; |Z k | is the impedance amplitude; Re is the real part of the imaginary number; Im is the imaginary part of the imaginary number; ∠Z k is the phase magnitude; ∠V kis the phase angle of the voltage; ∠I k is the phase angle of the current;

[0040] Step S32: Calculate the ratio of the voltage and current of the hydrogen fuel cell at each frequency as the impedance of the hydrogen fuel cell, and obtain an approximate representation of the electrochemical impedance spectrum EIS:

[0041]

[0042] Where Z(f) is the measured impedance at a given frequency f; R ∞ is the high frequency cut-off resistance; R p is the polarization resistance; M is the number of hydrogen fuel cell units connected in parallel; β m is the core weight; ψ m (τ) is the kernel function; f is the frequency; τ is the relaxation time constant; i is the imaginary unit; ε is the noise;

[0043] Step S33: Perform maximum likelihood estimation on the approximate representation of EIS, estimate the relaxation time constant τ and amplitude G(τ), and evaluate the electrochemical reaction process and battery performance of the fuel cell.

[0044] The benefits of the present invention include at least:

[0045] 1. By taking the inductor current of the hydrogen fuel cell and the output voltage of the load as state variables and using polynomial interpolation to compensate for the sampling delay of the state variables, the error caused by sampling delay can be effectively reduced. Compared with the traditional integer delay compensation method, this polynomial interpolation-based method can more accurately predict the state variables at the current moment, improve the accuracy of state variable estimation, and make subsequent calculations and controls based on these state variables more reliable, thereby helping to improve the control accuracy of the entire system for hydrogen fuel cells;

[0046] 2. Construct an optimization objective function based on the state variables after sampling delay compensation, and solve the optimal control parameters of the hydrogen fuel cell controller. This allows the controller to adjust the control strategy according to the actual system state to achieve better control effects. By optimizing the construction of the objective function, it is possible to comprehensively consider various factors such as performance indicators related to the state variables to find the control parameters that best suit the current working state of the fuel cell, thereby improving the working efficiency of the fuel cell, enhancing the stability and reliability of the system, reducing unnecessary energy loss, and extending the service life of the fuel cell. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A schematic diagram of a method flow chart of an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of a flow chart of an improved genetic algorithm used in an embodiment of the present invention;

[0049] Figure 3 A schematic diagram showing a comparison between the electrochemical impedance spectroscopy (EIS) of a hydrogen fuel cell obtained in an embodiment of the present invention and the EIS obtained by a conventional method;

[0050] Figure 4 A schematic diagram of the results of the relaxation time distribution analysis DRT according to an embodiment of the present invention;

[0051] Figure 5 Schematic diagram of the system structure of an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.

[0053] like Figure 1 As shown, an embodiment of the present invention provides a method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation, comprising the following steps:

[0054] Step S1: Establish a mathematical model of a boost converter for hydrogen fuel cell internal resistance testing, linearize and discretize the mathematical model, and obtain a state space coefficient matrix.

[0055] Specifically, x=[i L / v in u C / v in ] T As a state variable, i L is the inductor current of the hydrogen fuel cell, v in is the voltage across the hydrogen fuel cell, u C is the voltage across the output capacitor, d is the duty cycle; for the kth switching cycle T s The switching behavior occurring on the surface of the device is solved by establishing the following equation:

[0056]

[0057] In the formula, is the state quantity; G1 and G2 are system matrices; g1 and g2 are input matrices; t is the current time; T s is the sampling period; R is the resistance of the load resistor; L is the inductance of the inductor; C is the capacitance of the output filter capacitor.

[0058] The discretized state space equation can be obtained from the above formula:

[0059]

[0060] In the formula, x(k) is the state variable at time k; G d1 , G d2 is the discretized system matrix; g d1 , g d2 is the discretized input matrix.

[0061] According to the state space averaging method, the discretized state space equations can be combined into the following equations:

[0062]

[0063]

[0064] In the formula, A is the system matrix; B is the input matrix; F is the noise; d(k) is the input; y(k) is the output; A n , B n is the discretized system matrix; C n is the discretized input matrix; D n is the discretized noise; d i is the input quantity of the segment; x av,i is the state variable of the i-th segment; I2 is the second-order unit matrix; v in is the input voltage value.

[0065] The prediction output equation is obtained from the above formula:

[0066] Y(k)=S x x(k)+S u D(k)+D F ;

[0067]

[0068] In the above formula, Y(k) is the predicted output vector; S x is the state prediction matrix; S u is the prediction matrix of control input; D F is a stray term; D(k) is the input of the prediction model, specifically the duty cycle of the dc / dc converter switch tube of the hydrogen fuel cell; N p N is the number of prediction time domain steps; m To control the number of steps in the time domain.

[0069] Step S2: Taking the inductor current of the hydrogen fuel cell and the output voltage of the load as state variables, performing polynomial interpolation on the state variables at the previous moment, predicting the state variables at the current moment, and using the predicted state variables as sampling delay compensation for the state variables at the current moment.

[0070] Specifically, the voltage v across the hydrogen fuel cell is collected. in , inductor current i L and the load voltage v out , the data collected at this time is fractional-order delayed data. The inductor current i of the fuel cell is L and load voltage v out As the delayed state variable, the state variable x(k-τ) at time k-τ is used to predict the state variable x(k) at the current time as compensation for the fractional sampling delay, where the delay time τ=N+d, the integer part N=int[τ], and the decimal part d∈[0,1], that is: x(k-τ)=[i L (k)v out (k)] T ,x(k)=[i L (k)'v out (k)'] T .

[0071] The prediction equation of model predictive control is established by using the Lagrange interpolation method, and the state variable x(k|kN) at time k is predicted from time kN as follows:

[0072]

[0073] Where x(k|kN) is the state variable at time k predicted by time kN; x(kN) is the state variable at time kN.

[0074] By Lagrange interpolation method, we can get:

[0075]

[0076] In the above formula, z is the Langrange interpolation polynomial; α j is the Lagrange interpolation basis function; n is the number of given points.

[0077] Since kN is an integer moment, k-τ moment includes kN moment, τ=N+d, d is the decimal part. After deriving the law of integer moments from the above formula, we can use specific laws to derive general laws, then the state variable is:

[0078]

[0079] When n = 1, x(k|kN) can be guaranteed to have the lowest complexity and also meet the approximation requirements. Finally, the following state variables of fractional-order delay compensation are obtained:

[0080]

[0081] Where α0 and α1 are Lagrange interpolation basis functions; I m is the identity matrix of order m.

[0082] Step S3: constructing an optimization objective function of the hydrogen fuel cell controller according to the state variables after sampling delay compensation, and solving the optimization objective function to obtain the optimal control parameters of the hydrogen fuel cell controller.

[0083] Specifically, the optimization objective function is constructed as follows:

[0084]

[0085] Where J(D(k)) is the optimization objective function; is the reference value of the state variable; Γ y , Γ d are diagonal weighted matrices respectively; is the reference value of the control signal; H is a semi-positive definite matrix; f T is the gradient function; is a miscellaneous factor.

[0086] The improved genetic algorithm is used to solve the optimization objective function and obtain the optimal solution D(k) max , acting on the system, such as Figure 2 As shown, the following steps are included:

[0087] Step S31: randomly generate an initial population with Np individuals, convert each individual D(k) into a binary number as the genetic code of the chromosome, and the code length is L.

[0088] Step S32: Because It is independent of D(k), so when solving the optimization objective function, the optimization objective function can be equivalent to a quadratic programming problem, and the compensation state variable i obtained by sampling fractional-order delay compensation is L (k)' and v out (k)'Construct the quadratic programming problem QP:

[0089]

[0090] Convert the above quadratic programming problem into a maximum value problem:

[0091]

[0092] Will As the objective function, the objective function value is taken as the fitness of the individual.

[0093] Step S33: The ratio of the fitness of the individual to the total fitness of the population is used as the probability of the individual being selected, and a roulette strategy is used to select several individuals from the current population as the regeneration population.

[0094] Step S34: Use the roulette strategy to select the father of the next generation individual from the regenerated population, randomly select the mother, randomly generate crossover points, set the adaptive crossover probability, generate new individuals, and record the larger fitness value of the two crossovers. If the fitness of the new individual after the crossover is less than the individual with the larger fitness before the crossover, the original fitness is retained. The expression of the adaptive crossover probability is:

[0095]

[0096] Where P c is the adaptive crossover probability; k1 and k2 are two different crossover probabilities; J max is the maximum fitness of the population; J is the fitness of the current individual; J avg is the average fitness of the population.

[0097] Step S35: Set the adaptive mutation probability. If the maximum fitness of the current population is equal to the minimum fitness, a mutation bit is generated. Otherwise, the number of mutation bits and the position of each mutation are randomly generated, and the generated new individuals are mutated. The expression of the adaptive mutation probability is:

[0098]

[0099] Where P m is the adaptive mutation probability; k3 and k4 are two different crossover probabilities; f max is the maximum fitness of the population after crossover; f' is the fitness of the current individual after crossover; f avg is the average fitness of the population after crossover.

[0100] Step S36: Generate a new generation of population by crossover and mutation. If the current number of iterations reaches the set number of iterations, stop the iteration. Otherwise, return to step S32 and output the individual D(k) with the highest fitness in the current population. max , get the optimal control parameters of the hydrogen fuel cell controller, and change D(k) max Acts on the PWM drive module of the hydrogen fuel cell.

[0101] Step S4: collecting the output voltage and output current of the hydrogen fuel cell after optimization control, calculating the electrochemical impedance spectrum EIS of the hydrogen fuel cell, performing relaxation time distribution analysis on the EIS, and evaluating the health status of the hydrogen fuel cell.

[0102] Specifically, under the closed-loop control system architecture constructed by the above steps, the output characteristics of the hydrogen fuel cell are optimized with higher accuracy and stability. This enables the sampled data to reach a higher precision standard, providing a basis for subsequent data analysis. When testing the internal resistance of hydrogen fuel cells, thanks to the precise and stable output of the front end, the test process can effectively avoid interference factors, thereby ensuring that the results obtained are extremely accurate, accurately reflecting the actual state of the battery's internal resistance, and meeting high-precision detection requirements.

[0103] The health status of a hydrogen fuel cell is assessed, including the following steps:

[0104] Step S41: Perform Fourier transform on the collected output voltage and output current of the hydrogen fuel cell to obtain the amplitude and phase at each frequency:

[0105]

[0106] In the above formula, V k is the output voltage of the fuel cell after Fourier transformation; v n is the output voltage value of the hydrogen fuel cell within n sampling periods; i is the imaginary unit; k is the ratio of frequency f to base frequency; n is the sequence number; N is the sampling number; I k is the output current of the fuel cell after Fourier transformation; i n is the output current value of the hydrogen fuel cell within n sampling cycles; |Z k | is the impedance amplitude; Re is the real part of the imaginary number; Im is the imaginary part of the imaginary number; ∠Z k is the phase magnitude; ∠V k is the phase angle of the voltage; ∠I k is the phase angle of the current.

[0107] Table 1 is a comparison of the error results of the fractional-order delay compensation model predictive control MPC, integer delay MPC and PID control methods used in the embodiment of the present invention. Figure 3 The accuracy of the method used in the embodiment of the present invention can be seen from Table 1. The calculation expression of the error is as follows:

[0108]

[0109] In the formula, Z mr , Z tr , Z mi and Z ti are the real and imaginary parts of the measured impedance and theoretical impedance respectively; N is the number of internal impedance points tested.

[0110] Table 1

[0111]

[0112] Step S42: Calculate the ratio of the voltage and current of the hydrogen fuel cell at each frequency as the impedance of the hydrogen fuel cell, thereby obtaining the electrochemical impedance spectrum EIS of the hydrogen fuel cell, and convolute the EIS to obtain the relaxation time distribution DRT of the hydrogen fuel cell:

[0113]

[0114] Where Z(f) is the measured impedance at a given frequency f; R ∞ is the high frequency cut-off resistance; R p is the polarization resistance; g(τ) is the possibility density function of the constrained time relaxation characteristics; i is; f is the frequency; τ is the relaxation time constant.

[0115] Since the EIS frequency is usually sampled logarithmically, the above equation is often rewritten as a probability density function of lnτ:

[0116]

[0117] In the formula, G(τ)=τg(τ).

[0118] G(τ) in the embodiment of the present invention adopts the form of kernel density estimation to approximate the probability density:

[0119]

[0120] In the formula, β m is the corresponding kernel weight, ψ m is the kernel function.

[0121] Therefore, the electrochemical impedance spectrum EIS can be obtained as shown below:

[0122]

[0123] Where ε is the experimental and discrete noise.

[0124] Step S43: Estimate R by maximizing the likelihood of the above function ∞ , from which the relaxation time constant τ and amplitude G(τ) can be estimated, thereby evaluating the electrochemical reaction process and battery performance of the fuel cell.

[0125] Maximizing the likelihood of the above function is equivalent to the minimum sum of squares of the following formula:

[0126]

[0127] Where Z' is the real impedance vector; Z" is the imaginary impedance vector; A' is the DRT core basis matrix of the real impedance vector; A" is the DRT core basis matrix of the real impedance vector; β is the weight coefficient vector.

[0128] like Figure 4 As shown in the figure, when the current density of the hydrogen fuel cell changes, the peak of the DRT will also change significantly. The greater the current density, the higher the peak of the DRT. When the SOH of the fuel cell decreases, the peak value of the DRT may change. Therefore, after obtaining the key function G(τ) of DRT analysis, different electrochemical reaction processes can be estimated and the health status SOH of the hydrogen fuel cell can be estimated.

[0129] The embodiment of the present invention also provides Figure 5 The internal resistance test system of a hydrogen fuel cell based on sampling delay compensation shown in the figure includes a fuel cell, a load, a DC / DC boost module, a sampling module, a delay compensation module, a PWM drive module and a battery performance analysis module. i , O i are input and output respectively.

[0130] Specifically, a mathematical model of the fractional-order delay of the state variable in the model predictive control algorithm is constructed according to the Lagrange interpolation method, and the output current of the hydrogen fuel cell is controlled by the model predictive control algorithm, and the given value of the current is the superposition value of the DC quantity and the AC quantity. The delay compensation module includes a sampling fractional-order delay compensation module based on digital signal processing technology DSP and an objective function solving module, wherein the sampling fractional-order delay compensation module based on DSP is used to construct the objective function, convert the objective function into a QP problem, and the objective function solving module uses an improved genetic algorithm to solve the QP problem to obtain the optimal solution of the controller, which is applied to the PWM drive module. At the same time, the sampling module transmits the collected voltage and current of the hydrogen fuel cell to the battery performance analysis module. The battery performance analysis module includes an FPGA chip processor, a host computer DRT analysis module and a hydrogen fuel cell performance analysis module. The FPGA chip processor performs online fast Fourier transform (FFT) and online hydrogen fuel cell impedance calculation on the collected voltage and current of the hydrogen fuel cell. The calculated impedance data is transmitted to the host computer DRT analysis module for DRT analysis to obtain the relaxation time constant of the hydrogen fuel cell. The relaxation time constant is transmitted to the fuel cell performance analysis module to obtain the chemical reaction process of the fuel cell and estimate the SOH of the fuel cell.

[0131] Compared with the existing technology, fractional-order sampling delay compensation has higher flexibility and accuracy, and is closer to ideal phase compensation, making the impedance test of hydrogen fuel cells more accurate; the improved genetic algorithm has stronger local search capability and faster convergence speed; DRT analysis can get rid of the "a priori" assumption problem, and can determine the characteristic relaxation time and the corresponding frequency range, thereby characterizing different electrochemical reaction processes and estimating the SOH of hydrogen fuel cells.

[0132] In general, the method of the present invention aims at the sampling delay problem in the internal resistance test of hydrogen fuel cells, and designs a control strategy of fractional-order delay compensation based on model predictive control. Compared with traditional control and compensation methods, it can improve the synchronization of signals and has better control performance. The fractional-order delay compensation strategy used is based on the Lagrange interpolation method, which has superior accuracy at given data points; the calculation process is simple and the calculation efficiency is high. It has good universality in high-speed control systems. The improved genetic algorithm used has strong global search capabilities, low requirements on the nature of the problem, and can avoid premature convergence. After obtaining the EIS impedance spectrum of the hydrogen fuel cell, the hydrogen fuel cell was subjected to DRT analysis, which can deeply analyze the electrochemical reaction process and estimate the SOH of the fuel cell.

[0133] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. Only the preferred embodiments of the present invention are expressed. The description is more specific and detailed, but it cannot be understood as limiting the scope of the present invention. As long as there is no contradiction in the combination of these technical features, they should be considered as within the scope of this specification.

[0134] It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these modifications and improvements all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. A method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation, characterized in that: The following steps are involved: Step S1: taking the inductor current of the hydrogen fuel cell and the output voltage of the load as state variables, performing polynomial interpolation on the state variables at the previous moment, predicting the state variables at the current moment, and using the predicted state variables as sampling delay compensation for the state variables at the current moment; Step S2: constructing an optimization objective function of the hydrogen fuel cell controller according to the state variables after sampling delay compensation, and solving the optimization objective function to obtain the optimal control parameters of the hydrogen fuel cell controller; Step S3: collecting the output voltage and output current of the hydrogen fuel cell after optimization control, calculating the electrochemical impedance spectrum EIS of the hydrogen fuel cell, performing relaxation time distribution analysis on the EIS, and evaluating the health status of the hydrogen fuel cell.

2. The method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation according to claim 1, characterized in that: In step S1, the prediction function of the state variable is constructed using the Lagrange interpolation method, and the expression of the prediction function is: Where x(k|k-τ) is the state variable at time k predicted by time k-τ; A N is the Nth power of the system matrix; α0 and α1 are interpolation basis functions; I m is the identity matrix of order m; A -1 is the inverse matrix of the system matrix; x(k-τ) is the state variable at time k-τ; B is the input matrix; d is the input vector; k is the current moment; N is the control time domain; F is the noise matrix.

3. The internal resistance test method of a hydrogen fuel cell based on sampling delay compensation according to claim 1, characterized in that: The expression of the optimization objective function in step S2 is: H=2(S u T C y S u +C d ) f T =2 ( (Sxx(k|k-τ)+D F -Ry) T ΓySu-Rd T Γd) Where J(D(k)) is the optimization objective function; Y(k) is the predicted output vector; R y is the reference value of the state variable; Γ y , Γ d are diagonal weighted matrices respectively; D(k) is the duty cycle of the dc / dc converter switch tube of the hydrogen fuel cell; R d is the reference value of the control signal; H is a semi-positive definite matrix; f T is the gradient function; is the miscellaneous factor; S u is the prediction matrix of control input; S x is the state prediction matrix; x(k|k-τ) is the state variable at time k predicted by time k-τ; D F is a stray item.

4. The internal resistance test method of a hydrogen fuel cell based on sampling delay compensation according to claim 3 is characterized in that: Solving the optimization objective function in step S2 includes the following steps: converting the optimization objective function into a quadratic programming problem, and solving the quadratic programming problem using an improved genetic algorithm.

5. The internal resistance test method of a hydrogen fuel cell based on sampling delay compensation according to claim 4, characterized in that: The expression of the quadratic programming problem is:

6. The method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation according to claim 5, characterized in that: The use of an improved genetic algorithm to solve the quadratic programming problem comprises the following steps: Step S21: randomly generate an initial population with the number of individuals Np, and convert each individual into a binary number as the genetic code of the chromosome; Step S22: Convert the quadratic programming problem into a maximum value problem: Will As the objective function, the objective function value is taken as the fitness of the individual; Step S23: taking the ratio of the fitness of the individual to the total fitness of the population as the probability of the individual being selected, and adopting the roulette strategy to select several individuals from the current population as the regeneration population; Step S24: using a roulette wheel strategy to select the father of the next generation individual from the regenerated population, randomly selecting the mother, randomly generating a crossover point, setting an adaptive crossover probability, and generating a new individual; Step S25: setting the adaptive mutation probability, if the maximum fitness of the current population is equal to the minimum fitness, a mutation position is generated, otherwise the number of mutation positions and the position of each mutation are randomly generated, and the generated new individuals are mutated; Step S26: Generate a new generation of population by crossover and mutation. If the current number of iterations reaches the set number of iterations, the iteration is stopped, and the individual with the highest fitness in the current population is output to obtain the optimal control parameters of the hydrogen fuel cell controller.

7. The method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation according to claim 6, characterized in that: The expression of the adaptive crossover probability in step S24 is: Where P c is the adaptive crossover probability; k1 and k2 are two different crossover probabilities; J max is the maximum fitness of the population; J is the fitness of the current individual; J avg is the average fitness of the population.

8. The method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation according to claim 6, characterized in that: In step S24, the larger fitness value of the two crossovers is recorded. If the fitness of the new individual after the crossover is smaller than the individual with the larger fitness before the crossover, the original fitness is retained.

9. The method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation according to claim 6, characterized in that: The expression of the adaptive mutation probability in step S25 is: Where P m is the adaptive mutation probability; k3 and k4 are two different crossover probabilities; f max is the maximum fitness of the population after crossover; f' is the fitness of the current individual after crossover; f avg is the average fitness of the population after crossover.

10. The method for testing the internal resistance of a hydrogen fuel cell based on sampling delay compensation according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: Perform Fourier transform on the collected output voltage and output current of the hydrogen fuel cell to obtain the amplitude and phase at each frequency: In the above formula, V k is the output voltage of the fuel cell after Fourier transformation; v n is the output voltage value of the hydrogen fuel cell within n sampling periods; i is the imaginary unit; k is the ratio of frequency f to base frequency; n is the sequence number; N is the sampling number; I k is the output current of the fuel cell after Fourier transformation; i n is the output current value of the hydrogen fuel cell within n sampling cycles; |Z k is the impedance amplitude; Re is the real part of the imaginary number; Im is the imaginary part of the imaginary number; ∠Z k is the phase magnitude; ∠V k is the phase angle of the voltage; ∠I k is the phase angle of the current; Step S32: Calculate the ratio of the voltage and current of the hydrogen fuel cell at each frequency as the impedance of the hydrogen fuel cell, and obtain an approximate representation of the electrochemical impedance spectrum EIS: Where Z(f) is the measured impedance at a given frequency f; R ∞ is the high frequency cut-off resistance; R p is the polarization resistance; M is the number of hydrogen fuel cell units connected in parallel; β m is the core weight; ψ m (τ) is the kernel function; f is the frequency; τ is the relaxation time constant; i is the imaginary unit; ε is the noise; Step S33: Perform maximum likelihood estimation on the approximate representation of EIS, estimate the relaxation time constant τ and amplitude G(τ), and evaluate the electrochemical reaction process and battery performance of the fuel cell.

Citation Information

Patent Citations

  • Parameter optimization method of EC-WPT system based on complementary symmetrical LCC resonant network

    CN109004755A

  • Fuel cell internal resistance test system based on interleaved DC-DC and control method

    CN115524626A

  • Method and system for establishing EIS equivalent circuit model of hydrogen fuel cell

    CN118330464A