Electrolytic hydrogen production control method based on artificial intelligence algorithm

Through the electrolytic hydrogen production control method based on artificial intelligence algorithm, combined with genetic algorithm and ant colony algorithm, the power distribution and startup strategy of the electrolytic cell is optimized, and the problem of electrolytic cell control in Fengguang new energy power generation field is solved, and the economics of hydrogen production system is realized The balance between benefits and equipment life improves system operation efficiency and equipment reliability.

CN119243252APending Publication Date: 2025-01-03CHINA THREE GORGES TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411352422.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In Fengguang New Energy Power Generation Field and Energy Storage System, it is difficult for the existing technology to effectively control the power distribution and startup number of multiple proton exchange membrane electrolytic cells (PEMECs), resulting in a decrease in hydrogen production efficiency, an increase in failure rate and a shortened equipment life. Achieve a balance between economic benefits and equipment life.

Method used

The electrolytic hydrogen production control method based on artificial intelligence algorithm is adopted, and the historical data of wind and light power plants is collected through the combination of genetic algorithm and ant colony algorithm, individual fitness is calculated, cross-and-mutation operations are performed, and the power distribution and startup strategy of the electrolytic cell is optimized. Achieve refined control of each electrolytic cell, predict failures and optimize maintenance.

Benefits of technology

The balance of new energy consumption rate, economic benefits, electrolytic cell failure rate and life of the hydrogen production system is improved, the overall operating efficiency of the system is enhanced, the equipment life is extended, and the failure rate and energy consumption are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119243252A_ABST
    Figure CN119243252A_ABST
Patent Text Reader

Abstract

The invention relates to an electrolytic hydrogen production control method based on an artificial intelligence algorithm, and belongs to the technical field of hydrogen production control. Step 2, calculating individual fitness according to data in the initial group; step 3, carrying out a selection selection operation; step 4, carrying out a Crosssover crossover operation; step 5, carrying out a Mutation mutation operation; partial genes of individuals in Step4 are modified according to the set probability, and the genetic diversity of the population is increased; and Step 6, forming a new population from the superior individuals of the last generation and the newly generated individuals, carrying out iteration, continuing to carry out crossover and variation on the updated population, and terminating iteration until a preset condition is met, so as to obtain a consistent fitness threshold value or the maximum number of iterations. According to the method, electrolytic hydrogen control is carried out by obtaining a solution when a most appropriate fitness threshold is obtained through a genetic algorithm, in order to prevent calculation from falling into local optimum, an ant colony algorithm is introduced in crossing, variation and iteration processes, so that historical data can participate in a decision-making process through shortest operation, and the influence degree of each piece of data on a target function is obtained; and the calculation complexity is simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrolytic hydrogen, and in particular to a method for controlling hydrogen production by electrolysis based on an artificial intelligence algorithm. Background Art

[0002] With the growing global demand for clean energy, water electrolysis to produce hydrogen as an efficient and environmentally friendly method of hydrogen production is gradually becoming a research hotspot in the energy field. Among them, proton exchange membrane electrolyzer (PEMEC) occupies an important position in water electrolysis hydrogen production technology due to its high purity, high efficiency and flexibility. However, in the complex application scenarios combining wind and solar power plants and energy storage systems, how to effectively control the power distribution and start-up number of multiple PEMEC electrolyzers to achieve the economic benefits of hydrogen production, reduce the failure rate of electrolyzers and extend the life of the equipment is still a problem that needs to be solved urgently in current technology.

[0003] At present, the electrolysis hydrogen production system generally adopts a centralized control strategy, that is, the power and start-stop status of the electrolyzer are uniformly dispatched according to the overall hydrogen production demand. However, in the system powered by wind and solar energy power plants, the intermittent and unstable wind and solar resources lead to large fluctuations in power supply. Such fluctuations not only affect the stable operation of the electrolyzer, but may also lead to a decrease in electrolysis efficiency, an increase in energy consumption, and an increase in equipment failure rate.

[0004] In addition, traditional control methods often ignore the individual differences and operating status differences between electrolyzers, making it difficult to achieve refined control of each electrolyzer. This not only limits the improvement of the overall performance of the system, but may also cause some electrolyzers to operate under non-optimal conditions for a long time, accelerating the aging and damage of the equipment. The existing hydrogen production control methods have the following shortcomings: 1. Uneven power distribution: In the prior art, the power distribution of electrolyzers is often based on a simple average distribution principle, and cannot be dynamically adjusted according to the actual operating status and performance differences of each electrolyzer. This results in some high-efficiency electrolyzers being unable to fully exert their performance advantages, while some low-efficiency electrolyzers may be damaged faster due to overload operation.

[0005] 2. Single startup strategy: When starting the electrolyzer, the existing technology usually adopts a fixed startup sequence or a random selection method, lacking the ability to make intelligent decisions based on the actual needs of the system and the status of the electrolyzer. This single startup strategy may not only lead to slow system response speed, but also increase the failure rate and energy consumption of the electrolyzer due to frequent start and stop.

[0006] 3. Lack of fault prediction and maintenance: In the existing technology, the fault prediction and maintenance of electrolyzers mainly rely on regular inspections and post-fault repairs. This method is not only inefficient, but may also cause equipment damage or safety accidents due to failure to detect potential faults in time.

[0007] 4. It is difficult to balance economic benefits and equipment life: While pursuing the economic benefits of hydrogen production, how to effectively extend the equipment life of the electrolyzer and reduce the failure rate is a major challenge facing current technology. Existing technologies often find it difficult to find the best balance between the two, resulting in low overall system operation efficiency.

[0008] In summary, in the current PEMEC electrolyzer parallel mode combined with wind and solar power plants and energy storage hydrogen electrolysis mode, how to effectively control the power of each electrolyzer and the number of electrolyzers started to achieve a balance between the economic benefits of hydrogen production, the failure rate of the electrolyzer and the life of the equipment is still a technical problem that needs to be solved urgently. Summary of the invention

[0009] The technical problem to be solved by the present invention is to provide a method for controlling hydrogen production by electrolysis based on an artificial intelligence algorithm, which aims to solve the balance between new energy consumption, economic benefits of hydrogen production, and electrolytic cell failure rate and life in wind and solar new energy power plants and energy storage electrolysis hydrogen modes, so as to maximize the long-term benefits of power plants.

[0010] In order to solve the above technical problems, the technical solution adopted by the present invention is: A method for controlling hydrogen production by electrolysis based on an artificial intelligence algorithm, comprising: Step 1: Collect historical data of hydrogen production by electrolysis in wind and solar power plants as the initial population of the genetic algorithm; Step 2: Calculate individual fitness based on the data in the initial group; Step 3, perform the Selection operation; select individuals whose fitness meets the set requirements from the calculation results of Step 2, and prepare for crossover and mutation; Step 4, perform crossover operation; find paired individuals that meet the requirements of matching degree with the current implementation data from the individuals whose fitness meets the requirements obtained in Step 3, and exchange their genes within the set range; Step 5: Perform mutation operation; modify some genes of individuals in Step 4 with a set probability to increase the genetic diversity of the population; Step 6: Form a new population from the excellent individuals of the previous generation and the newly generated individuals and iterate, and continue to cross and mutate the updated population until the iteration is terminated when the preset conditions are met, that is, the fitness threshold or the maximum number of iterations is obtained.

[0011] The historical data of hydrogen production by electrolysis of wind and solar power plants in the above-mentioned Step 1 include calendar time, wind power data, light intensity data, consumption rate data, hydrogen production data, economic benefit data, system operation rate data, PEMEC electrolyzer power data, PEMEC electrolyzer power balance data, number of PEMEC electrolyzers in use, failure rate of PEMEC electrolyzers and failure time of PEMEC electrolyzers.

[0012] The calculation process of individual fitness in the above Step 2 includes: The objective function and constraints of hydrogen production by electrolysis in wind and solar power plants are established. The objective function includes the new energy consumption rate, the economic benefits of hydrogen production, the system operation rate, the failure rate of the system PEMEC electrolyzer, and the power balance of the system PEMEC electrolyzer.

[0013] The objective function of the above-mentioned wind and solar power plant electrolysis hydrogen production is: New energy consumption rate: ; in, is the renewable energy consumption rate of the power plant, For electrolyzer i The operating power, N is the number of electrolytic cells, is the charging and discharging power of the battery, When the battery is in charging state, When , the battery is in discharge state; is the AC grid power, , the AC grid supplies power to the electrolysis system, that is, the system takes power, , the electrolysis system supplies power to the AC grid, i.e. the system sells electricity; is the wind power generation power, is the photovoltaic power generation power; The economic benefits of hydrogen production, that is, the input-output ratio: ; Among them, S is the economic benefit of the hydrogen production system, For electrolyzer i The amount of hydrogen produced; The unit price of hydrogen sold; The real-time electricity price of the power grid or the unit price of electricity sold; is the system wind power capacity, is the cost of wind power per unit capacity; is the system photovoltaic capacity, is the cost of unit photovoltaic; is the total electrolytic cell capacity, is the cost of electrolyzer per unit capacity; is the system battery capacity, The unit capacity battery cost; Cost of AC power grid; , , , and Varies with the size of the system; Single production cycle operation rate: ; in, is the system single production cycle operation rate, is the current production cycle number, is the actual system operation time within a unit production cycle, is the unit production cycle time; System operation rate: ; in, is the operating rate of the system, and B is the number of production cycles set for assessment; Failure rate of system PEMEC electrolyzer: ; ; in, is the failure rate of a single electrolyzer, Number the electrolytic cell, is the electrolytic cell failure time within a unit production cycle, is the total failure rate of the system electrolyzer.

[0014] In the above Step 1, after obtaining the historical data of hydrogen production by electrolysis in wind and solar power plants, the selection process of the initial population is as follows: Determine the maximum number of iterations M and the number of populations ,File size , define the initial population =[ ], external empty file , combined into a matrix Q = [ ] is used for calculations.

[0015] In the above Step 1, the constraints in the calculation of individual fitness are: Power Constraints: ; Constraints on new energy consumption rate: ; To set the minimum absorption rate; PEMEC electrolyzer power constraints: PEMEC electrolyzers are prone to explosion during power transfer. At higher power, the irreversible attenuation of the electrolyzer will be aggravated and the service life will be reduced. Therefore, it is necessary to constrain the power of PEMEC electrolyzers: ; in, is the rated operating power of the PEMEC electrolyzer, and They are the minimum power factor and maximum power factor of PEMEC electrolyzer operation respectively.

[0016] In the above Step 4-Step 6, the ant colony algorithm is introduced to find the data factors that affect each objective function in the shortest calculation, so that the new population generated after the mutation operation in Step 5 can find the optimal solution more easily.

[0017] In the Crossover operation of Step 4 above, the matrix Q in Step 1 is used as the initial pheromone concentration matrix of the ant colony algorithm, and the external empty file is adjusted. The historical data of hydrogen production by electrolysis of different wind and solar power plants are used to obtain the heuristic function. Each ant selects the next city as the target of the crossover operation according to the pheromone concentration matrix and the probability of the heuristic function.

[0018] In the above-mentioned Mutation operation of Step 5, the ant path and distance before the mutation are recorded, that is, the two paired individuals that perform the crossover operation in Step 4 and the data information they carry.

[0019] During the genetic algorithm iteration process of Step 6 above, the ant colony algorithm determines whether the ants have walked through all the cities based on the data information that has undergone crossover and mutation operations in the recording process, and updates the pheromone concentration matrix based on the paths and distances walked by the ants, that is, the initial population and matrix in Step 1 are updated, and the iteration numbers of the ant colony algorithm and the genetic algorithm are updated synchronously.

[0020] The present invention provides a method for controlling hydrogen production by electrolysis based on an artificial intelligence algorithm, which takes the new energy consumption rate, real-time economic benefits, system operation rate and electrolyzer failure rate as objective functions, and controls hydrogen electrolysis by obtaining the solution at the most appropriate fitness threshold through a genetic algorithm. In order to avoid the calculation from falling into a local optimum, an ant colony algorithm is introduced in the crossover, mutation and iteration processes, so that historical data can be involved in the decision-making process with the shortest operation, the influence of each data on the objective function is obtained, and the complexity of the calculation is simplified. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The present invention will be further described below in conjunction with the accompanying drawings and embodiments: Figure 1 It is a schematic diagram of the flow chart of the present invention. DETAILED DESCRIPTION

[0022] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and embodiments.

[0023] A method for controlling hydrogen production by electrolysis based on an artificial intelligence algorithm, comprising: Step 1: Collect historical data of hydrogen production by electrolysis in wind and solar power plants as the initial population of the genetic algorithm; Step 2: Calculate individual fitness based on the data in the initial group; Step 3, perform the Selection operation; select individuals whose fitness meets the set requirements from the calculation results of Step 2, and prepare for crossover and mutation; Step 4, perform crossover operation; find paired individuals that meet the requirements of matching degree with the current implementation data from the individuals whose fitness meets the requirements obtained in Step 3, and exchange their genes within the set range; Step 5: Perform mutation operation; modify some genes of individuals in Step 4 with a set probability to increase the genetic diversity of the population; Step 6: Form a new population from the excellent individuals of the previous generation and the newly generated individuals and iterate, and continue to cross and mutate the updated population until the iteration is terminated when the preset conditions are met, that is, the fitness threshold or the maximum number of iterations is obtained.

[0024] The historical data of hydrogen production by electrolysis of wind and solar power plants in the above Step 1 include calendar time, wind power data, light intensity data, absorption rate data, hydrogen production data, economic benefit data, system operation rate data, PEMEC electrolyzer power data, PEMEC electrolyzer power balance data, number of PEMEC electrolyzers used, PEMEC electrolyzer failure rate and PEMEC electrolyzer failure time, determine the maximum number of iterations M, population number ,File size , define the initial population =[ ], external empty file , combined into a matrix Q = [ ] is used for calculations.

[0025] System PEMEC electrolyzer power balance: ; ; in, is the average power of the PEMEC electrolyzer in the system, It is the power balance of the PEMEC electrolyzer in the system.

[0026] The calculation process of individual fitness in the above Step 2 is: The objective function and constraints of hydrogen production by electrolysis in wind and solar power plants are established. The objective function includes the new energy consumption rate, the economic benefits of hydrogen production, the system operation rate, the failure rate of the system PEMEC electrolyzer, and the power balance of the system PEMEC electrolyzer.

[0027] The objective function of the above-mentioned wind and solar power plant electrolysis hydrogen production is: New energy consumption rate: ; in, is the renewable energy consumption rate of the power plant, For electrolyzer i The operating power, N is the number of electrolytic cells, is the charging and discharging power of the battery, When the battery is in charging state, When , the battery is in discharge state; is the AC grid power, , the AC grid supplies power to the electrolysis system, that is, the system takes power, , the electrolysis system supplies power to the AC grid, i.e. the system sells electricity; is the wind power generation power, is the photovoltaic power generation power; The economic benefits of hydrogen production, that is, the input-output ratio: ; Among them, S is the economic benefit of the hydrogen production system, For electrolyzer i The amount of hydrogen produced; The unit price of hydrogen sold; The real-time electricity price of the power grid or the unit price of electricity sold; is the system wind power capacity, is the cost of wind power per unit capacity; is the system photovoltaic capacity, is the cost of unit photovoltaic; is the total electrolytic cell capacity, is the cost of electrolyzer per unit capacity; is the system battery capacity, The unit capacity battery cost; Cost of AC power grid; , , , and Varies with the size of the system; Single production cycle operation rate: ; in, is the system single production cycle operation rate, is the current production cycle number, is the actual system operation time within a unit production cycle, is the unit production cycle time; System operation rate: ; in, is the operating rate of the system, and B is the number of production cycles set for assessment; Failure rate of system PEMEC electrolyzer: ; ; in, is the failure rate of a single electrolyzer, Number the electrolytic cell, is the electrolytic cell failure time within a unit production cycle, is the total failure rate of the system electrolyzer.

[0028] In the above Step 1, the constraints in the calculation of individual fitness are: Power Constraints: ; Constraints on new energy consumption rate: ; To set the minimum absorption rate; PEMEC electrolyzer power constraints: PEMEC electrolyzers are prone to explosion during power transfer. At higher power, the irreversible attenuation of the electrolyzer will be aggravated and the service life will be reduced. Therefore, it is necessary to constrain the power of PEMEC electrolyzers: ; in, is the rated operating power of the PEMEC electrolyzer, and They are the minimum power factor and maximum power factor of PEMEC electrolyzer operation respectively.

[0029] Fitness calculation; population The target matrix is ​​formed based on the objective function calculation and weight proportion of each group of solutions according to the new energy consumption rate, economic benefits of hydrogen production, system operation rate and system PEMEC electrolyzer failure rate. , the target matrices are compared with each other and the statistics are less than the target number of each group of solutions, forming a matrix of the number of dominated solutions , calculate the solution set fitness to form a matrix .

[0030] ; in, For the k The fitness of the group solution, j is less than The group number of the target matrix of the group solution, , They are Middle j Row data and k Row data.

[0031] In the above Step 4-Step 6, the ant colony algorithm is introduced to find the data factors that affect each objective function in the shortest calculation, so that the new population generated after the mutation operation in Step 5 can find the optimal solution more easily.

[0032] In the crossover operation of genetic operations, in order to make the calculation less complicated, the external empty file is usually in the matrix Q in the initial population. It will not bring in too much historical data of hydrogen production by electrolysis of wind and solar power plants in Step 1, which will cause the effect of some parameters on the objective function to be reduced due to the fact that some parameters are not referenced or the number of references is too small when generating new populations to obtain the optimal solution through crossover and mutation. By introducing the ant colony algorithm in the crossover to mutation operation of the genetic algorithm, the most suitable external empty file can be selected. By introducing historical data and cross-referencing them, all historical data can be appropriately referenced to determine their impact on the objective function, thus helping to quickly arrive at the optimal solution.

[0033] In the Crossover operation of Step 4 above, the matrix Q in Step 1 is used as the initial pheromone concentration matrix of the ant colony algorithm, and the external empty file is adjusted. The historical data of hydrogen production by electrolysis of different wind and solar power plants are used to obtain the heuristic function. Each ant selects the next city as the target of the crossover operation according to the pheromone concentration matrix and the probability of the heuristic function.

[0034] In the above-mentioned Mutation operation of Step 5, the ant path and distance before the mutation are recorded, that is, the two paired individuals that perform the crossover operation in Step 4 and the data information they carry.

[0035] During the genetic algorithm iteration process of Step 6 above, the ant colony algorithm determines whether the ants have walked through all the cities based on the data information that has undergone crossover and mutation operations in the recording process, and updates the pheromone concentration matrix based on the paths and distances walked by the ants, that is, the initial population and matrix in Step 1 are updated, and the iteration numbers of the ant colony algorithm and the genetic algorithm are updated synchronously.

Claims

1. A method for controlling hydrogen production by electrolysis based on artificial intelligence algorithm, characterized in that: include: Step 1: Collect historical data of hydrogen production by electrolysis in wind and solar power plants as the initial population of the genetic algorithm; Step 2, calculate individual fitness based on the data in the initial population; Step 3, perform the Selection operation; select individuals whose fitness meets the set requirements from the calculation results of Step 2, and prepare for crossover and mutation; Step 4, perform crossover operation; find paired individuals that meet the requirements of matching degree with the current implementation data from the individuals whose fitness meets the requirements obtained in Step 3, and exchange their genes within the set range; Step 5: Perform mutation operation; modify some genes of individuals in Step 4 with a set probability to increase the genetic diversity of the population; Step 6: Form a new population from the excellent individuals of the previous generation and the newly generated individuals and iterate, and continue to cross and mutate the updated population until the iteration is terminated when the preset conditions are met, that is, the fitness threshold or the maximum number of iterations is obtained.

2. The method for controlling hydrogen production by electrolysis based on an artificial intelligence algorithm according to claim 1, characterized in that: The historical data of hydrogen production by electrolysis in the wind and solar power plants in Step 1 include calendar time, wind power data, light intensity data, absorption rate data, hydrogen production data, economic benefit data, system operation rate data, PEMEC electrolyzer power data, PEMEC electrolyzer power balance data, number of PEMEC electrolyzers in use, PEMEC electrolyzer failure rate and PEMEC electrolyzer failure time.

3. The method for controlling hydrogen production by electrolysis based on artificial intelligence algorithm according to claim 2, characterized in that: The calculation process of individual fitness in Step 2 includes: The objective function and constraints of hydrogen production by electrolysis in wind and solar power plants are established. The objective function includes the new energy consumption rate, the economic benefits of hydrogen production, the system operation rate, the failure rate of the system PEMEC electrolyzer, and the power balance of the system PEMEC electrolyzer.

4. The method for controlling hydrogen production by electrolysis based on artificial intelligence algorithm according to claim 3 is characterized in that: The objective function of hydrogen production by electrolysis in the wind and solar power plant is: New energy consumption rate: ; in, is the renewable energy consumption rate of the power plant, For electrolyzer i The operating power, N is the number of electrolytic cells, is the charging and discharging power of the battery, When the battery is in charging state, When , the battery is in discharge state; is the AC grid power, , the AC grid supplies power to the electrolysis system, that is, the system takes power, , the electrolysis system supplies power to the AC grid, i.e. the system sells electricity; is the wind power generation power, is the photovoltaic power generation power; The economic benefits of hydrogen production, that is, the input-output ratio: ; Among them, S is the economic benefit of the hydrogen production system, For electrolyzer i The amount of hydrogen produced; The unit price of hydrogen sold; The real-time electricity price of the power grid or the unit price of electricity sold; is the system wind power capacity, is the cost of wind power per unit capacity; is the system photovoltaic capacity, is the cost of unit photovoltaic; is the total electrolytic cell capacity, is the cost of electrolyzer per unit capacity; is the system battery capacity, The unit capacity battery cost; Cost of AC power grid; , , , and Varies with the size of the system; Single production cycle operation rate: ; in, is the system single production cycle operation rate, is the current production cycle number, is the actual system operation time within a unit production cycle, is the unit production cycle time; System operation rate: ; in, is the operating rate of the system, and B is the number of production cycles set for assessment; Failure rate of system PEMEC electrolyzer: ; ; in, is the failure rate of a single electrolyzer, Number the electrolytic cell, is the electrolytic cell failure time within a unit production cycle, is the total failure rate of the system electrolyzer.

5. The method for controlling hydrogen production by electrolysis based on artificial intelligence algorithm according to claim 4, characterized in that: In the above Step 1, after obtaining the historical data of hydrogen production by electrolysis in wind and solar power plants, the process of selecting the initial population is as follows: Determine the maximum number of iterations M and the number of populations ,File size , define the initial population =[ ], external empty file , combined into a matrix Q = [ ] is used for calculations.

6. The method for controlling hydrogen production by electrolysis based on artificial intelligence algorithm according to claim 5, characterized in that: In the above Step 1, the constraints in the calculation of individual fitness are: Power Constraints: ; Constraints on new energy consumption rate: ; To set the minimum absorption rate; PEMEC electrolyzer power constraints: PEMEC electrolyzers are prone to explosion during power transfer. At higher power, the irreversible attenuation of the electrolyzer will be aggravated and the service life will be reduced. Therefore, it is necessary to constrain the power of PEMEC electrolyzers: ; in, is the rated operating power of the PEMEC electrolyzer, and They are the minimum power factor and maximum power factor of PEMEC electrolyzer operation respectively.

7. The method for controlling hydrogen production by electrolysis based on artificial intelligence algorithm according to claim 6, characterized in that: In the above-mentioned Step 4-Step 6, the ant colony algorithm is introduced to find the data factors that affect each objective function in the shortest calculation, so that the new population generated after the mutation operation in Step 5 can find the optimal solution more easily.

8. The method for controlling hydrogen production by electrolysis based on artificial intelligence algorithm according to claim 7, characterized in that: In the Crossover operation of Step 4, the matrix Q in Step 1 is used as the initial pheromone concentration matrix of the ant colony algorithm, and the external empty file is adjusted. The historical data of hydrogen production by electrolysis of different wind and solar power plants are used to obtain the heuristic function. Each ant selects the next city as the target of the crossover operation according to the pheromone concentration matrix and the probability of the heuristic function.

9. The method for controlling hydrogen production by electrolysis based on artificial intelligence algorithm according to claim 8, characterized in that: In the Mutation operation of Step 5, the ant path and distance before the mutation are recorded, that is, the two paired individuals that perform the crossover operation in Step 4 and the data information they carry.

10. The method for controlling hydrogen production by electrolysis based on artificial intelligence algorithm according to claim 9, characterized in that: During the genetic algorithm iteration process of Step 6, the ant colony algorithm determines whether the ants have walked through all the cities based on the data information that has been crossover and mutation operations in the recording process, and updates the pheromone concentration matrix based on the paths and distances walked by the ants, that is, the initial population and matrix in Step 1 are updated, and the iteration numbers of the ant colony algorithm and the genetic algorithm are updated synchronously.