A hydrogen fuel cell stack inspection method and system
By combining group inspection of hydrogen fuel cell stacks with an improved quantum genetic algorithm and SG filtering, the problems of low precision and high cost in existing inspection methods are solved, high-speed acquisition and accurate detection of single cell voltages are achieved, and the system's stability and anti-interference ability are improved.
Patent Information
- Application Number
- CN202510828800.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-20
AI Technical Summary
Existing hydrogen fuel cell stack inspection methods have the problems of low accuracy and high cost. In particular, the single PEMFC voltage detection method is difficult to strike a balance between large cumulative error, poor system stability and high structural complexity.
The hydrogen fuel cell stack is divided into several groups, each of which consists of several single cells connected in series. Differential amplifiers and optocoupler switches are used for inspection. In combination with the improved quantum genetic algorithm and SG filtering, the optocoupler switch is used to control the connection between the single cells and the differential amplifier to achieve analog-to-digital conversion and then filtering.
It achieves high-speed acquisition and precise acquisition of single cell voltage, reduces costs, and at the same time improves the accuracy of voltage detection and the system's anti-interference ability, ensuring the stable operation of the fuel cell.
Smart Images

Figure CN120352783B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of voltage signal acquisition of hydrogen fuel cells, and in particular relates to a hydrogen fuel cell stack inspection method and system. Background Art
[0002] Hydrogen fuel cells are devices that convert chemical energy directly into electrical energy. They offer advantages such as high efficiency, cleanliness, and renewability, and are considered the ideal energy source of the future. A hydrogen fuel cell system typically consists of a hydrogen fuel cell stack, air circuits, fuel circuits, cooling circuits, and a control system. A hydrogen fuel cell stack typically requires dozens or even hundreds of PEMFC (hydrogen fuel cell) cells connected in series. Unstable voltage in a single PEMFC directly impacts the performance and lifespan of the fuel cell stack. Furthermore, the voltage trend of each cell is a key parameter in the fuel cell stack control strategy. Therefore, real-time voltage monitoring of individual PEMFCs is crucial for the overall fuel cell stack.
[0003] Currently, commonly used methods for detecting cell PEMFC voltage include resistor voltage divider, differential amplifier, and floating ground technology. The resistor voltage divider method uses resistors to divide the fuel cell voltage to within the measurement range of the A / D chip before sampling. This method offers the advantages of low cost, simplicity, and speed, but suffers from large cumulative errors and low accuracy. The differential amplifier method uses a voltage differential amplifier input followed by A / D conversion. While this method eliminates common-mode voltage at the cell terminals, it also suffers from high cost and poor system stability. The floating ground method uses floating potential control, eliminating potential accumulation issues and offering high accuracy, but suffers from a complex structure and high cost. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a hydrogen fuel cell stack inspection method and system, which can improve data accuracy and reduce costs.
[0005] The technical solution adopted by the present invention to solve the above technical problems is:
[0006] As a first aspect of the present invention, a hydrogen fuel cell stack inspection method is provided, the method comprising:
[0007] S1. Divide the hydrogen fuel cell stack into several groups, each group consists of several single cells connected in series, each group corresponds to a differential amplifier, and the differential amplifiers of several groups work simultaneously for inspection;
[0008] During inspection, each group uses an optocoupler switch to connect the positive and negative poles of each single battery in the group to the corresponding differential amplifier. By controlling the on and off of the optocoupler switch, the differential amplifier inspects the voltage of all single batteries in the group.
[0009] Perform analog-to-digital conversion on the voltage of all inspected single batteries;
[0010] S2. Perform SG filtering on the voltages of all single cells after analog-to-digital conversion to obtain filtered voltages of all single cells; wherein the window size of the SG filter and the fitting order of the polynomial are determined by an improved quantum genetic algorithm.
[0011] According to the above method, the S2 specifically includes:
[0012] S21. Determine the window size M and the fitting order P of the polynomial according to the improved quantum genetic algorithm;
[0013] S22. The collected voltage value of the corresponding battery is used as a data point. Several data points form a data sequence. For any data point in the data sequence, its window includes (M-1) / 2 data points before and after it plus the data point itself.
[0014] S23. Fitting a polynomial to the data points in the selected window according to the fitting order P of the polynomial and solving the polynomial; for each data point in the window, calculating the fitting value of the polynomial at the center of the window, and using the fitting value as the smoothed result;
[0015] S24. Move the window to the next data point and repeat S23 until the entire data sequence is traversed; all smoothed results are used as the filtered voltages of all single cells.
[0016] According to the above method, the S21 specifically includes:
[0017] S211, quantum chromosome initialization:
[0018] The combination of window size and fitting order is used to form individuals in the population in the form of binary coding, the population size is preset, and the number of bits of binary coding and probability amplitude are determined;
[0019] S212, binary code conversion:
[0020] The value of each bit of the binary code is determined by comparing the random number and the probability amplitude; the binary code is divided into two according to the number of bits corresponding to the window size and the fitting order, and each is converted into decimal to obtain an individual window size and fitting order;
[0021] The window size and fitting order of several individuals are obtained according to different random numbers;
[0022] S213, Quality Determination:
[0023] According to the preset fitness function, the window size and fitting order quality of each individual are calculated; the higher the fitness value, the higher the quality of the individual;
[0024] S214, Iteration:
[0025] The population is updated through quantum rotating gate adjustment, and then S212 and S213 are repeated for iteration until the preset number of iterations is reached;
[0026] S215 , outputting the window size and fitting order corresponding to the highest fitness value finally obtained as the window size of the SG filter and the fitting order of the polynomial.
[0027] According to the above method, in S214, the rotation angle of the quantum rotating gate is adaptively determined according to the speed update algorithm in the particle swarm algorithm.
[0028] According to the above method, a weight parameter is provided in the speed update algorithm, and the weight parameter is dynamically adjusted according to the average fitness of the current population.
[0029] According to the above method, in S214, the population is updated by using a Hadamard gate to mutate random numbers.
[0030] According to the above method, in S214, when the highest fitness values of three consecutive iterations are the same, a portion of individuals with the lowest fitness values are initialized after the third iteration; the portion is a preset percentage.
[0031] According to the above method, the S23 specifically includes:
[0032] S231, performing polynomial fitting on the data points using the least squares method within the selected window;
[0033] S232. Construct a Vandermonde matrix, where the number of rows is the window size and the number of columns is the fitting order of the polynomial. Each row of the Vandermonde matrix corresponds to a data point in the window, and each column corresponds to a power of the polynomial.
[0034] S233, using the least squares method to solve the coefficients of the fitted polynomial;
[0035] S234. For each data point in the window, use the polynomial with the solved coefficient to calculate the fitting value at the center of the window, and use the fitting value as the smoothed result.
[0036] According to the above method, the S1 specifically includes:
[0037] The hydrogen fuel cell stack is divided into several groups, each group is composed of several single cells connected in series;
[0038] In each group, several optocoupler switches are sequentially arranged at the connection nodes and end points of the single cells;
[0039] The encoder is used to sequentially control the adjacent optocoupler switches to close and the other optocoupler switches to open, so that only one single battery is connected to the input port of the differential amplifier at a time;
[0040] The differential amplifier transmits the voltage of the single battery obtained by inspection to the analog-to-digital conversion unit for analog-to-digital conversion.
[0041] As a second aspect of the present invention, the present invention provides a hydrogen fuel cell stack inspection system, comprising:
[0042] Differential amplifiers, wherein the hydrogen fuel cell stack is divided into a plurality of groups, each group is composed of a plurality of single cells connected in series, and the number of differential amplifiers is the same as the number of groups in the hydrogen fuel cell stack;
[0043] A plurality of optocoupler switches, one end of each optocoupler switch is sequentially connected to the connection node and the end point of each single cell of each hydrogen fuel cell stack, and the other end of each optocoupler switch is connected to the input port of the differential amplifier corresponding to the hydrogen fuel cell stack; the on and off of the optocoupler switch ensures that only one single cell is connected to the input port of the differential amplifier at a time;
[0044] an analog-to-digital conversion unit connected to each differential amplifier and configured to perform analog-to-digital conversion on the voltages of all single cells collected by the differential amplifier;
[0045] The data processing unit is used to perform SG filtering on the voltages of all single cells after analog-to-digital conversion to obtain the filtered voltages of all single cells; wherein the window size of the SG filter and the fitting order of the polynomial are determined by an improved quantum genetic algorithm.
[0046] The beneficial effects of the present invention are:
[0047] 1. By grouping hydrogen fuel cell stacks through inspection circuits, multiple groups can be inspected simultaneously, achieving high-speed acquisition of single cell voltages. The coordinated inspection using optocouplers and differential amplifiers reduces costs. An improved quantum genetic algorithm combined with SG filtering can accurately capture changes in single cell voltages.
[0048] 2. To reduce the possibility of the algorithm falling into a local optimum, mutation and disaster mechanisms are added: a mutation algorithm is set to optimize random numbers; when the highest fitness value of the algorithm is the same for three consecutive iterations, a disaster mechanism is adopted. According to the principle of survival of the fittest, after this iteration, some individuals with the lowest fitness value are initialized, thereby protecting excellent individuals and increasing the diversity of the population, thereby improving the accuracy of the single cell voltage. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 The present invention relates to a patrol circuit for a hydrogen fuel cell stack according to an embodiment of the present invention.
[0050] Figure 2 This is an encoder control definition diagram according to an embodiment of the present invention.
[0051] Figure 3 FIG. 4 is a hardware block diagram of an embodiment of the present invention.
[0052] Figure 4 4 is a flow chart of a filtering algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0054] As a first aspect of the present invention, the present invention provides a method for inspecting a hydrogen fuel cell stack, wherein the hydrogen fuel cell stack is composed of multiple single cells connected in series; the method comprises:
[0055] S1. Divide the hydrogen fuel cell stack into several groups. Each group consists of several single cells connected in series. Each group corresponds to a differential amplifier. Several groups of differential amplifiers work simultaneously for inspection.
[0056] During inspection, each group uses optocoupler switches to connect the positive and negative terminals of each battery cell to the corresponding differential amplifier. By controlling the optocoupler switches, the differential amplifier monitors the voltages of all the battery cells in the group. Specifically, within each group, several optocoupler switches are sequentially placed at the connection nodes and endpoints of the battery cells. An encoder sequentially controls adjacent optocoupler switches to close, while other optocoupler switches open, ensuring that only one battery cell at a time is connected to the differential amplifier's input port.
[0057] Performing analog-to-digital conversion on the voltages of all inspected single cells. In this embodiment, the differential amplifier transmits the voltages of the inspected single cells to the analog-to-digital conversion unit for analog-to-digital conversion.
[0058] Figure 1This is a patrol circuit for a hydrogen fuel cell stack. Each section contains 31 individual fuel cells, an analog-to-digital converter (ADS1115), a differential amplifier (INA149AIDR), two 74HC154PW encoders, and 32 optocoupler switches. High-precision voltage measurement is achieved through the differential channels of the INA149AIDR. The INA149AIDR is a high-precision unity-gain differential amplifier with a high input common-mode voltage range. It is a single monolithic device that combines a high-precision operational amplifier and an integrated thin-film resistor network. The INA149AIDR can accurately measure small differential voltages with common-mode signal voltages up to ±275 V. Its low power consumption further optimizes energy management in fuel cell systems.
[0059] The 74HC154PW outputs a digital signal to control the on / off switching of an optocoupler switch. Optocouplers, which use optical signals to achieve electrical isolation, are used for signal transmission and isolation during fuel cell inspections, ensuring the safety of high-voltage battery systems. Isolating the inspection circuit from the main circuit using an optocoupler prevents electrical interference from the main circuit from affecting signal quality and protects the inspection circuit from high-voltage shocks. Furthermore, the optocoupler acts as an on / off control during the inspection process, improving system reliability and anti-interference capabilities, thereby ensuring stable fuel cell operation.
[0060] The inspection process for a single area is mainly:
[0061] When inspecting the first battery, the encoder controls optocoupler 0 and optocoupler 1 to close, so that the positive and negative poles of the first battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0062] When inspecting the second battery, the encoder controls optocoupler 1 and optocoupler 2 to close, so that the positive and negative poles of the second battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0063] When inspecting the third battery, the encoder controls optocoupler 2 and optocoupler 3 to close, so that the positive and negative poles of the third battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0064] When inspecting the fourth battery, the encoder controls optocoupler 3 and optocoupler 4 to close, so that the positive and negative poles of the fourth battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0065] When inspecting the fifth battery, the encoder controls optocoupler 4 and optocoupler 5 to close, so that the positive and negative poles of the fifth battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0066] When inspecting the sixth battery, the encoder controls optocoupler 5 and optocoupler 6 to close, so that the positive and negative poles of the sixth battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0067] When inspecting the 7th battery, the encoder controls optocoupler 6 and optocoupler 7 to close, so that the positive and negative poles of the 7th battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0068] When inspecting the 8th battery, the encoder controls optocoupler 7 and optocoupler 8 to close, so that the positive and negative poles of the 8th battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0069] When inspecting the 9th battery, the encoder controls optocoupler 8 and optocoupler 9 to close, so that the positive and negative poles of the 9th battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0070] When inspecting the 10th battery, the encoder controls optocoupler 9 and optocoupler 10 to close, so that the positive and negative poles of the 10th battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0071] When inspecting the 11th battery, the encoder controls the optocoupler 10 and optocoupler 11 to close, so that the positive and negative poles of the 11th battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0072] Similarly, close the two adjacent optocouplers in sequence. When inspecting the 31st battery, the encoder controls optocoupler 30 and optocoupler 31 to close, so that the positive and negative poles of the 31st battery are connected to the input port of the differential amplifier, and the data is read by INA149AIDR and sent to ADS1115.
[0073] The optocoupler switch is controlled by a 74HC154PW encoder. Key features of the 74HC154PW include high-speed logic processing and low power consumption, making it suitable for accurate signal encoding and decoding. It supports a wide supply voltage range (typically 2V to 6V), ensuring adaptability to diverse circuit conditions. Furthermore, the chip exhibits strong anti-interference capabilities and stability, ensuring reliable operation in complex electromagnetic environments. This is particularly important during fuel cell inspections, enabling precise switching and efficient control of optocoupler signals. Figure 2 This is the control definition diagram of 74HC154PW. It controls the output digital signal by controlling the input ports A0, A1, A2, and A3, and thus controls the optocoupler switch.
[0074] After building the inspection circuit for a single zone, you can build multiple zones for simultaneous inspection. Multi-zone design replicates the circuit for a single zone. This method allows for inspection of 31*n fuel cells, where n is the number of zones. During an inspection, the cells in each zone can be inspected simultaneously, significantly increasing voltage acquisition speed.
[0075] This invention manages multiple fuel cells in groups. Differential amplifiers in different groups are responsible for inspecting individual fuel cells within the group. Multiple groups can be inspected simultaneously, significantly shortening the inspection cycle. By controlling an optocoupler switch, the positive and negative electrodes of different individual cells in the same group are connected to the amplifier inputs. Finally, the differential amplifier output signals are collected by the ADS1115 chip, enabling rapid and accurate acquisition of the voltage values of multiple individual cells.
[0076] S2. Perform SG filtering on the voltages of all single cells after analog-to-digital conversion to obtain the filtered voltages of all single cells; the window size of the SG filter and the fitting order of the polynomial are determined by an improved quantum genetic algorithm, such as Figure 4 As shown, specifically including:
[0077] S21, determining the window size M and the fitting order P of the polynomial according to the improved quantum genetic algorithm. The S21 specifically includes:
[0078] S211, quantum chromosome initialization:
[0079] The combination of window size and fitting order is used to form individuals in the population in the form of binary coding. The population size is preset, and the number of bits of binary coding and probability amplitude are determined.
[0080] Specifically, the population size, i.e., the number of individuals, is first determined. A set of individuals is then randomly generated within a preset range to form the initial population. Each individual is a candidate solution, represented by a binary code. For example, setting the window size to the first 5 digits and the fitting order to the last 5 digits creates a 10-bit binary code.
[0081] The present invention uses quantum state vectors (qubit encoding) to replace the original binary encoding. A qubit can be expressed by the following formula:
[0082]
[0083] Where α and β are both complex numbers, representing the spin-up state and the spin-down state respectively, and are probability amplitudes that satisfy .
[0084] The present invention improves the quantum coding initialization, divides the qubit into N probability spaces, and divides them according to the following formula:
[0085]
[0086] Where i represents the i-th individual, M is the number of individuals in the population, and by dividing the probability space by α and β, each subpopulation can have the same probability at the time of initialization, which can further improve the search ability of the population.
[0087] The probability amplitude encoding corresponding to individuals in the population is:
[0088]
[0089] In the formula, i represents the i-th individual, θ ij =2π*rand represents the rotation angle of the jth position of the i-th individual, rand is a random number between 0 and 1, and n is the total number of bits of binary code.
[0090] From this we can obtain: α=cos(θ), β=sin(θ).
[0091] S212, binary code conversion:
[0092] The value of each bit of the binary code is determined by comparing the random number and the probability amplitude; the binary code is divided into two according to the number of bits corresponding to the window size and the fitting order, and each is converted into decimal to obtain an individual window size and fitting order.
[0093] Specifically, the random number rand is compared with cos(θ) (i.e., α). If the random number at that position is greater than or equal to cos(θ), that position is encoded as 1; otherwise, it is encoded as 0. This yields a binary code containing the quantum information. Then, according to the rules of binary encoding, the binary code is converted to the window size and fitting order. For example, if the window size is set to the first 5 digits and the fitting order is set to the last 5 digits, the first 5 digits of the binary code are converted to a decimal number as the window size, and the decimal number of the last 5 digits of the binary code is used as the fitting order.
[0094] The window sizes and fitting orders of several individuals are obtained according to different random numbers.
[0095] S213, Quality Determination:
[0096] According to the preset fitness function, the window size and fitting order quality of each individual are calculated; the higher the fitness value, the higher the quality of the individual.
[0097] In this embodiment, the fitness function is defined as
[0098]
[0099] Where, fitness is the adaptability, U0 is the ideal reference value of the sampling voltage, U SG,k is the voltage value after SG filtering at time k, and T is the sampling time.
[0100] Substitute the window size and fitting order of each individual into the SG filtering algorithm, perform SG filtering on the voltage of all single cells after analog-to-digital conversion, obtain the voltage value after SG filtering, and then substitute it into the fitness function for calculation to obtain the individual fitness function.
[0101] S214, Iteration:
[0102] The population is updated through adjustment of the quantum rotating gate, and the quantum state probability is changed through rotation adjustment of the quantum gate to maintain the diversity of the population and move individuals towards the direction of high fitness.
[0103] Then, S212 and S213 are repeated to iterate until a preset number of iterations is reached.
[0104] The initial rotation angle of the quantum revolving gate is fixed. During algorithm execution, the optimal solution may be exceeded, resulting in the solution being constantly approached. However, the rotation angle cannot be too small, otherwise the algorithm will converge too slowly and potentially fall into a local optimum. The rotation angle of the quantum revolving gate can be adaptively determined based on the velocity update formula in the particle swarm algorithm. This velocity update formula includes a weight parameter, namely the inertia weight. A larger inertia weight is required for global search in the early stages of the algorithm, while a smaller weight is required for local search in the later stages. In this embodiment, the weight parameter is dynamically adjusted based on the average fitness, maximum fitness, and minimum fitness of the current population.
[0105] Furthermore, in order to reduce the possibility of the algorithm falling into local optimality, mutation and disaster mechanisms are added.
[0106] Specifically, the population is updated by using a Hadamard gate to mutate random numbers. In this embodiment, the mutation probability is set to 0.01. When the random number is less than 0.01, mutation is performed according to a preset mutation formula. If the highest fitness value is the same for three consecutive iterations, a disaster mechanism is implemented. According to the principle of survival of the fittest, after the third iteration, a portion of individuals with the lowest fitness value is initialized; this portion is a preset percentage, for example, 10%.
[0107] S215 , outputting the window size and fitting order corresponding to the highest fitness value finally obtained as the window size of the SG filter and the fitting order of the polynomial.
[0108] S22. The collected voltage value of the corresponding battery is used as a data point. Several data points form a data sequence. For any data point in the data sequence, its window includes (M-1) / 2 data points before and after it plus the data point itself.
[0109] In this example, 100 data points form a data sequence. The data sequence for the voltage value of battery 1 contains 100 voltage values collected from battery 1, and the data sequence for the voltage value of battery 2 contains 100 voltage values collected from battery 2. For each point in each data sequence, a window centered on that point is selected. If the window size is M, then this window will include (M-1) / 2 data points before and after it, plus the center point itself.
[0110] S23, within the selected window, fitting a polynomial to the data points according to the fitting order P of the polynomial and solving it; for each data point in the window, calculating the fitting value of the polynomial at the center of the window, and using the fitting value as the smoothed result. The said S23 specifically includes:
[0111] S231. In the selected window, use the least squares method to perform polynomial fitting on the data points; the purpose is to find a polynomial function that minimizes the sum of the squared differences between the function and all data points in the window.
[0112] The polynomial is of the form: , where a0, a1, ..., ap are unknown coefficients, which are solved by the least squares method.
[0113] S232. Construct a Vandermonde matrix A, where the number of rows is the window size M and the number of columns is the fitting order P of the polynomial. Each row of the Vandermonde matrix A corresponds to a data point in the window, and each column corresponds to a power of the polynomial.
[0114] S233. Use the least squares method to solve the coefficients of the fitted polynomial.
[0115] S234. For each data point in the window, use the polynomial with the solved coefficient to calculate the fitting value at the center of the window, and use the fitting value as the smoothed result.
[0116] S24. Move the window to the next data point and repeat S23 until the entire data sequence is traversed; all smoothed results are used as the filtered voltages of all single cells.
[0117] This invention uses an improved quantum genetic algorithm (IQGA) to optimize the key parameters (window size and fitting order) of the Savitzky-Golay (SG) filtering algorithm. After determining the optimal parameter combination, the collected single-cell voltage data is filtered to eliminate noise while preserving voltage trends. Ultimately, the inspection system feeds this processed, accurate voltage data back to the fuel cell controller in real time, enabling efficient and accurate cell voltage monitoring and management.
[0118] As a second aspect of the present invention, the present invention provides a hydrogen fuel cell stack inspection system, such as Figure 1 and Figure 3 Shown, including:
[0119] Differential amplifier, wherein the hydrogen fuel cell stack is divided into several groups, each group is composed of several single cells connected in series, and the number of differential amplifiers is the same as the number of groups of the hydrogen fuel cell stack.
[0120] A plurality of optocoupler switches are provided, one end of each optocoupler switch is sequentially connected to the connection nodes and endpoints of the single cells of each hydrogen fuel cell stack, and the other end of each optocoupler switch is connected to the input port of the differential amplifier corresponding to the hydrogen fuel cell stack; the on-off of the optocoupler switch ensures that only one single cell is connected to the input port of the differential amplifier at a time; and the on-off of the optocoupler switch is controlled by an encoder.
[0121] The analog-to-digital conversion unit is connected to each differential amplifier and is used to perform analog-to-digital conversion on the voltages of all single cells collected by the differential amplifier.
[0122] The data processing unit is configured to perform SG filtering on the voltages of all single cells after analog-to-digital conversion to obtain filtered voltages of all single cells. The window size and polynomial fitting order of the SG filtering are determined using an improved quantum genetic algorithm. The specific algorithm is the same as S2 in the above method section and will not be repeated here.
[0123] The present invention solves the problems of slow inspection speed and poor anti-electromagnetic interference capability in existing fuel cell stack inspection methods through innovative inspection architecture and digital processing technology, providing reliable guarantee for the stable operation of the fuel cell system.
[0124] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A hydrogen fuel cell stack inspection method, characterized by: This method includes: S1. Divide the hydrogen fuel cell stack into several groups, each group consists of several single cells connected in series, each group corresponds to a differential amplifier, and the differential amplifiers of several groups work simultaneously for inspection; During inspection, each group uses an optocoupler switch to connect the positive and negative poles of each single battery in the group to the corresponding differential amplifier. By controlling the on and off of the optocoupler switch, the differential amplifier inspects the voltage of all single batteries in the group. Perform analog-to-digital conversion on the voltage of all inspected single batteries; S2. Performing SG filtering on the voltages of all single cells after analog-to-digital conversion to obtain filtered voltages of all single cells; wherein the window size of the SG filter and the fitting order of the polynomial are determined by an improved quantum genetic algorithm; The S2 specifically includes: S21. Determine the window size M and the fitting order P of the polynomial according to the improved quantum genetic algorithm; S22. The collected voltage value of the corresponding battery is used as a data point. Several data points form a data sequence. For any data point in the data sequence, its window includes (M-1) / 2 data points before and after it plus the data point itself. S23. Fitting a polynomial to the data points in the selected window according to the fitting order P of the polynomial and solving the polynomial; for each data point in the window, calculating the fitting value of the polynomial at the center of the window, and using the fitting value as the smoothed result; S24, moving the window to the next data point and repeating S23 until the entire data sequence is traversed; all smoothed results are used as the filtered voltages of all single cells; The S21 specifically includes: S211, quantum chromosome initialization: The combination of window size and fitting order is used to form individuals in the population in the form of binary coding, the population size is preset, and the number of bits of binary coding and probability amplitude are determined; S212, binary code conversion: The value of each bit of the binary code is determined by comparing the random number and the probability amplitude; the binary code is divided into two according to the number of bits corresponding to the window size and the fitting order, and each is converted into decimal to obtain an individual window size and fitting order; The window size and fitting order of several individuals are obtained according to different random numbers; S213, Quality Assessment According to the preset fitness function, the window size and fitting order quality of each individual are calculated; the higher the fitness value, the higher the quality of the individual; S214, Iteration The population is updated by adjusting the quantum revolving gate, and then S212 and S213 are repeated for iteration until the preset number of iterations is reached; the rotation angle of the quantum revolving gate is adaptively determined according to the speed update algorithm in the particle swarm algorithm; The population is also updated by using Hadamard gate to mutate random numbers; S215 , outputting the window size and fitting order corresponding to the highest fitness value finally obtained as the window size of the SG filter and the fitting order of the polynomial.
2. The hydrogen fuel cell stack inspection method according to claim 1, characterized in that: The speed update algorithm is provided with a weight parameter, which is dynamically adjusted according to the average fitness of the current population.
3. The hydrogen fuel cell stack inspection method according to claim 1, characterized in that: In the above-mentioned S214, when the highest fitness values of three consecutive iterations are the same, a portion of individuals with the lowest fitness values are initialized after the third iteration; the portion is a preset percentage.
4. The hydrogen fuel cell stack inspection method according to claim 1, characterized in that: The S23 specifically includes: S231, performing polynomial fitting on the data points using the least squares method within the selected window; S232. Construct a Vandermonde matrix, where the number of rows is the window size and the number of columns is the fitting order of the polynomial. Each row of the Vandermonde matrix corresponds to a data point in the window, and each column corresponds to a power of the polynomial. S233, using the least squares method to solve the coefficients of the fitted polynomial; S234. For each data point in the window, use the polynomial with the solved coefficient to calculate the fitting value at the center of the window, and use the fitting value as the smoothed result.
5. The hydrogen fuel cell stack inspection method according to claim 1, characterized in that: The S1 specifically includes: The hydrogen fuel cell stack is divided into several groups, each group is composed of several single cells connected in series; In each group, several optocoupler switches are sequentially arranged at the connection nodes and end points of the single cells; The encoder is used to sequentially control the adjacent optocoupler switches to close and the other optocoupler switches to open, so that only one single battery is connected to the input port of the differential amplifier at a time; The differential amplifier transmits the voltage of the single battery obtained by inspection to the analog-to-digital conversion unit for analog-to-digital conversion.
6. A system for implementing the hydrogen fuel cell stack inspection method according to any one of claims 1 to 5, characterized in that: include: Differential amplifiers, wherein the hydrogen fuel cell stack is divided into a plurality of groups, each group is composed of a plurality of single cells connected in series, and the number of differential amplifiers is the same as the number of groups in the hydrogen fuel cell stack; A plurality of optocoupler switches, one end of each optocoupler switch is sequentially connected to the connection node and the end point of each single cell of each hydrogen fuel cell stack, and the other end of each optocoupler switch is connected to the input port of the differential amplifier corresponding to the hydrogen fuel cell stack; the on and off of the optocoupler switch ensures that only one single cell is connected to the input port of the differential amplifier at a time; an analog-to-digital conversion unit connected to each differential amplifier and configured to perform analog-to-digital conversion on the voltages of all single cells collected by the differential amplifier; The data processing unit is used to perform SG filtering on the voltages of all single cells after analog-to-digital conversion to obtain the filtered voltages of all single cells; wherein the window size of the SG filter and the fitting order of the polynomial are determined by an improved quantum genetic algorithm.
Citation Information
Patent Citations
Device for detecting positive and negative monolithic voltage of fuel cell, and control method thereof
CN109581233A