PID control method and system for microbial fuel cell for robot
Through PID control and improved ant colony algorithm, the PID parameters are optimized, and the problems of slow power generation speed and unstable voltage of microbial fuel cells are solved, and the rapid and stable output voltage control is achieved, which improves the power generation efficiency.
Patent Information
- Application Number
- PCT/CN2024/099412
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-28
- Filing Date
- 2024-06-14
- Publication Date
- 2025-09-04
AI Technical Summary
Microbial fuel cells have slow power generation, unstable output voltage, and are easily affected by internal and external uncertainties. How to effectively control the output voltage of microbial fuel cells is a difficult problem.
The PID control method is adopted, combined with delay estimation and improved ant colony algorithm to optimize PID parameters, and by controlling the dilution rate of microbial fuel cells, offset the influence of external disturbances and internal microbial interactions, a fast and stable output voltage is achieved.
The rapid and stable generation of microbial fuel cells is achieved, and the power generation efficiency and voltage stability are improved.
Smart Images

Figure CN2024099412_04092025_PF_FP_ABST
Abstract
Description
A PID control method and system for a microbial fuel cell for a robot
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This invention claims priority to Chinese patent application No. 202410216837.3, filed with the State Intellectual Property Office of China on February 28, 2024, entitled “A PID Control Method and System for Microbial Fuel Cells,” the entire contents of which are incorporated by reference into this invention and constitute a part of this invention for all purposes. Technical Field
[0003] The present invention belongs to the technical field of energy control, and in particular relates to a PID control method and system for a microbial fuel cell. Background Art
[0004] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0005] Microbial fuel cells are a new energy technology that uses microorganisms in wastewater as catalysts to convert the chemical energy of organic matter in the wastewater into electricity. Currently, the energy supply needed by humanity primarily comes from the combustion of fossil fuels. However, the availability of fossil fuels in nature is limited, and excessive use of fossil fuels will not only lead to energy crises but also inevitably cause environmental pollution. Therefore, humanity is urgently seeking a new type of green, renewable energy source. Research on microbial fuel cells could help address these issues.
[0006] The internal reactions of microbial fuel cells are highly complex, involving multiple disciplines, including microbiology, electrochemistry, control, and materials science. The internal structure of a highly efficient dual-chamber microbial fuel cell consists of an anode, a cathode, and a proton exchange membrane between them. When the substrate in the microbial fuel cell is glucose, microorganisms at the anode oxidize and decompose the glucose, producing protons and electrons. The protons are transferred to the cathode through the proton exchange membrane, while the electrons travel through an external circuit to the cathode, also releasing electrical energy. At the cathode, the electrons combine with oxygen to form water. Currently, the use of microbial fuel cells is still in the laboratory stage; the selection and control of anode and cathode materials, as well as the type of electricity-producing microorganisms, are crucial factors influencing the power generation of microbial fuel cells. According to the inventors, microbial fuel cells are complex, nonlinear systems whose power generation performance is influenced by numerous external factors, as well as internal factors such as interactions between microorganisms within the microbial fuel cell. Microbial fuel cells also have slow power generation, unstable output voltage, and are susceptible to internal and external uncertainties. Furthermore, controlling the output voltage of a microbial fuel cell by controlling the input and substrate concentration remains an unresolved issue.
[0007] Summary of the Invention
[0008] To solve the above problems, the present invention proposes a PID control method and system for a microbial fuel cell. By controlling the input of the microbial fuel cell through PID, an improved ant colony algorithm is used to optimize the PID parameters, and time delay estimation is used to offset the effects of external disturbances of the microbial fuel cell and the interactions between various microorganisms inside the microbial fuel cell, the microbial fuel cell can quickly and stably generate the maximum output voltage.
[0009] According to some embodiments, a first solution of the present invention provides a PID control method for a microbial fuel cell, which adopts the following technical solution:
[0010] A PID control method for a microbial fuel cell, comprising:
[0011] Obtaining microbial fuel cell parameters;
[0012] Based on the obtained parameters, a PID controller for the microbial fuel cell is constructed;
[0013] Based on the input of the controller constructed by time delay estimation and PID control, the dilution rate of the microbial fuel cell is controlled. The parameters of the constructed PID controller are optimized using an improved ant colony algorithm to obtain the maximum output voltage of the microbial fuel cell, thus completing the PID control of the microbial fuel cell.
[0014] As a further technical limitation, based on the mathematical model of the microbial fuel cell system, the reference value of the state is xd , then e=x d -x, Then, the error dynamics is: v is a constant matrix; the control input is selected as Where u0=e, is the estimated value of N(x,t), which can be expressed as Where L is the sampling period. When L is infinitely small, then At this time, the control input
[0015] As a further technical limitation, an improved ant colony algorithm is used to optimize the parameters of the constructed PID controller. Specifically, the PID controller parameters are encoded using binary numbers, and the initial population is divided into several sub-populations of equal size whose pheromones cannot communicate with each other. Path selection and iteration are performed for each sub-population in different ways. When the sub-populations have reached the maximum number of iterations, the sub-populations are merged. The pheromones of the merged sub-populations are communicated, and the normal optimization operation of the ant colony algorithm is continued on this sub-population, with the maximum number of iterations set to 100. The optimal solution Z is obtained, and the corresponding output voltage of the microbial fuel cell is f(Z). Multiple new solutions Z1, Z2, ... Z are randomly generated. n , where n is a finite value. At this time, the corresponding output voltages are f(Z1), f(Z2), ..., f(Z n ); compare f(Z) with f(Z1), f(Z2), ..., f(Z n ) comparison, if f(Z) is the largest, then output X=Z, f(X)=f(Z); otherwise, output the largest f(Z q ), q belongs to [1,n], that is, X=Z q ,f(X)=f(Z q ), then, with the new solution Z q The old solution Z is the upper and lower bounds of the local optimization range. The ant colony optimization algorithm is used to perform local optimization and output the optimal solution X = Z a , f(X)=f(Z a ), a belongs to [1,n]; when the set maximum number of iterations 100 is reached, the optimal solution is output and the optimal PID control parameters of the microbial fuel cell are obtained.
[0016] As a further technical limitation, before constructing the PID controller of the microbial fuel cell, a mathematical model of the microbial fuel cell is obtained according to the obtained microbial fuel cell parameters, and a total voltage of the microbial fuel cell is obtained according to the obtained mathematical model of the microbial fuel cell.
[0017] As a further technical limitation, according to the obtained total voltage of the microbial fuel cell, the microbial fuel cell parameters in the constructed mathematical model of the microbial fuel cell are analyzed to obtain a time delay estimation and a PID controller of the microbial fuel cell.
[0018] Furthermore, based on the obtained mathematical model of the microbial fuel cell, the time delay estimation and the PID controller, an expression for the dilution rate of the microbial fuel cell is obtained; and by controlling the dilution rate, the state of the microbial fuel cell is controlled.
[0019] As a further technical limitation, the obtained microbial fuel cell parameters include at least substrate concentration, microbial content, acetate concentration, hydrogen ion concentration, microbial growth rate and substrate utilization rate in the microbial fuel cell.
[0020] According to some embodiments, a second solution of the present invention provides a PID control system for a microbial fuel cell, which adopts the following technical solution:
[0021] A PID control system for a microbial fuel cell, comprising:
[0022] an acquisition module configured to acquire microbial fuel cell parameters;
[0023] A construction module is configured to construct a PID controller of the microbial fuel cell according to the acquired parameters;
[0024] The control module is configured to control the dilution rate of the microbial fuel cell based on the input of the controller constructed by time delay estimation and PID control, and uses an improved ant colony algorithm to optimize the parameters of the constructed PID controller to obtain the maximum output voltage of the microbial fuel cell, thereby completing the PID control of the microbial fuel cell.
[0025] According to some embodiments, a third solution of the present invention provides a computer-readable storage medium, which adopts the following technical solution:
[0026] A computer-readable storage medium stores a program, which, when executed by a processor, implements the steps of the PID control method for a microbial fuel cell according to the first embodiment of the present invention.
[0027] According to some embodiments, a fourth solution of the present invention provides an electronic device, which adopts the following technical solution:
[0028] An electronic device comprises a memory, a processor and a program stored in the memory and running on the processor, wherein when the processor executes the program, the steps of the PID control method for a microbial fuel cell according to the first embodiment of the present invention are implemented.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] The present invention controls the input of the microbial fuel cell through time delay estimation and PID controller, uses an improved ant colony algorithm to optimize PID parameters, and uses time delay estimation to offset the influence of external disturbances of the microbial fuel cell and the interaction between various microorganisms inside the microbial fuel cell, so that the microbial fuel cell can quickly and stably generate the maximum output voltage. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings constituting a part of the specification of this embodiment are used to provide a further understanding of this embodiment. The schematic embodiments and descriptions of this embodiment are used to explain this embodiment and do not constitute an improper limitation on this embodiment.
[0032] FIG1 is a flow chart of a PID control method for a microbial fuel cell according to a first embodiment of the present invention;
[0033] FIG2 is a flow chart of an input constructed based on delay estimation and a PID controller in the first embodiment of the present invention;
[0034] FIG3 is a flow chart of optimizing parameters of a PID controller based on an improved ant colony algorithm in Example 1 of the present invention;
[0035] FIG4 is a structural block diagram of a PID control system of a microbial fuel cell in a second embodiment of the present invention. DETAILED DESCRIPTION
[0036] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0037] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs.
[0038] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0039] In the present invention, terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom", etc. indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present invention, and do not specifically refer to any part or element in the present invention, and should not be understood as limiting the present invention.
[0040] In the present invention, terms such as "fixed connection," "connected," and "connection" should be interpreted broadly to mean a fixed connection, an integral connection, or a detachable connection; a direct connection or an indirect connection through an intermediary. Relevant researchers or technicians in this field may determine the specific meanings of these terms in the present invention based on specific circumstances, and they should not be construed as limitations of the present invention.
[0041] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.
[0042] Example 1
[0043] The first embodiment of the present invention introduces a PID control method for a microbial fuel cell.
[0044] A PID control method for a microbial fuel cell as shown in FIG1 includes:
[0045] A PID control method for a microbial fuel cell, comprising:
[0046] Obtaining microbial fuel cell parameters;
[0047] Based on the obtained parameters, a PID controller for the microbial fuel cell is constructed;
[0048] Based on the input of the controller constructed by time delay estimation and PID control, the dilution rate of the microbial fuel cell is controlled. The parameters of the constructed PID controller are optimized using an improved ant colony algorithm to obtain the maximum output voltage of the microbial fuel cell, thus completing the PID control of the microbial fuel cell.
[0049] As one or more implementation methods, before constructing the PID controller of the microbial fuel cell, a mathematical model of the microbial fuel cell is obtained according to the obtained microbial fuel cell parameters, that is,
[0050] Among them, states x1, x2, x3, and x4 represent substrate concentration, microbial content, acetate concentration, and hydrogen ion concentration, respectively, and h(x1, x2, t, w(t)) represents the unknown microbial dynamics in the microbial fuel cell, w(t) is the perturbation input, and q max represents the maximum substrate utilization, p max represents the maximum microbial growth rate, Q represents the half-saturation constant, n represents the initial substrate concentration, b represents the microbial attenuation coefficient, and u represents the dilution rate of the microbial fuel cell. Therefore, only the analysis of states x1 and x2 is required to control the output voltage.
[0051] Analyze the states x1 and x2 in the mathematical model of the microbial fuel cell, and let x=[x1,x2] T , at this point, the nonlinear mathematical model of microbial fuel cells can be transformed into:
[0052] in, B(x)=[n-x1,x2],M(t)=h(x1,x2,t,w(t)); then in,
[0053] As shown in Figure 2, by controlling the dilution rate u, the state of the microbial fuel cell is controlled so that the state quickly and stably reaches the desired value, thereby enabling the microbial fuel cell to quickly generate a stable output voltage. The reference value of the state is x d , then e=x d -x, Then, the error dynamics is: v is a constant matrix; the control input is selected as Where u0=e, is the estimated value of N(x,t), which can be expressed as Where L is the sampling period. When L is infinitely small, then At this time, the control input
[0054] As one or more implementation methods, this embodiment uses the improved ant colony algorithm as shown in FIG3 to optimize the parameters of the constructed PID controller to achieve the maximum power output of the microbial fuel cell.
[0055] In this embodiment, in the initial stage, the initial population size is set to 40, 40 binary strings are generated randomly, the heuristic factor is 2, the pheromone volatility factor is 0.5, and the pheromone factor is 2; the population is divided into three sub-populations of equal size, and the three populations produce their own pheromones. Different populations cannot recognize each other, and the three populations use different methods to search for optimization.
[0056] Population 1: Uses pheromones and heuristic factors in the normal ant colony algorithm to find the best solution.
[0057] Population 2: While considering information such as pheromones and heuristic factors for path selection, a new mechanism is introduced, that is, each ant uses The probability of random movement is ; where t represents the current number of iterations and T represents the maximum number of iterations. As the algorithm iterates, t increases, resulting in The value of decreases gradually.
[0058] Population 3: When selecting a path, ants consider information such as pheromones and heuristics. A randomly generated probability, P, is also introduced. When P is greater than 0.5, the ants update their paths using the standard ant colony algorithm, relying on pheromone concentration and heuristics for guidance. When P is less than 0.5, the ants choose to move randomly, unconstrained by pheromones and heuristics.
[0059] The output voltage of the microbial fuel cell is used as the cost function, and the maximum number of iterations is 100. When the maximum number of iterations is reached, the three sub-populations are merged and the pheromones are exchanged. The normal optimization operation of the ant colony algorithm is continued for this population, and the maximum number of iterations is set to 100. The optimal solution Z is obtained, and the corresponding output voltage of the microbial fuel cell is f(Z). Multiple new solutions Z1, Z2, ... Z are randomly generated. n , where n is a finite value. At this time, the corresponding output voltages are f(Z1), f(Z2), ..., f(Z n ); compare f(Z) with f(Z1), f(Z2), ..., f(Z n ) comparison, if f(Z) is the largest, then output X=Z, f(X)=f(Z); otherwise, output the largest f(Z q ), q belongs to [1,n], that is, X=Z q ,f(X)=f(Z q ), then, with the new solution Z q The old solution Z is the upper and lower bounds of the local optimization range. The ant colony optimization algorithm is used to perform local optimization and output the optimal solution X = Z a , f(X)=f(Z a ), a belongs to [1,n]; when the maximum number of iterations set is 100, the optimal solution is output. At this point, the microbial fuel cell achieves maximum power output.
[0060] This embodiment uses time delay estimation and PID control to control the input of the microbial fuel cell, uses an improved ant colony algorithm to optimize the PID parameters, and uses time delay estimation to offset the effects of external disturbances of the microbial fuel cell and the interactions between various microorganisms within the microbial fuel cell, so that the microbial fuel cell can quickly and stably generate the maximum output voltage.
[0061] Example 2
[0062] The second embodiment of the present invention introduces a PID control system for a microbial fuel cell.
[0063] A PID control system for a microbial fuel cell as shown in FIG4 includes:
[0064] an acquisition module configured to acquire microbial fuel cell parameters;
[0065] A construction module is configured to construct a PID controller of the microbial fuel cell according to the acquired parameters;
[0066] The control module is configured to control the dilution rate of the microbial fuel cell based on the input of the controller constructed by time delay estimation and PID control, and uses an improved ant colony algorithm to optimize the parameters of the constructed PID controller to obtain the maximum output voltage of the microbial fuel cell, thereby completing the PID control of the microbial fuel cell.
[0067] The detailed steps are the same as those of the PID control method for the microbial fuel cell provided in Example 1, and will not be repeated here.
[0068] Example 3
[0069] A third embodiment of the present invention provides a computer-readable storage medium.
[0070] A computer-readable storage medium stores a program, which, when executed by a processor, implements the steps of the PID control method for a microbial fuel cell according to the first embodiment of the present invention.
[0071] The detailed steps are the same as those of the PID control method for the microbial fuel cell provided in Example 1, and will not be repeated here.
[0072] Example 4
[0073] A fourth embodiment of the present invention provides an electronic device.
[0074] An electronic device includes a memory, a processor, and a program stored in the memory and running on the processor. When the processor executes the program, the steps of the PID control method for a microbial fuel cell according to the first embodiment of the present invention are implemented.
[0075] The detailed steps are the same as those of the PID control method for the microbial fuel cell provided in Example 1, and will not be repeated here.
[0076] The above description is merely a preferred embodiment of this embodiment and is not intended to limit this embodiment. Those skilled in the art will readily appreciate that this embodiment may be modified and varied in various ways. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this embodiment shall be within the scope of protection of this embodiment.
Claims
1. A PID control method for a microbial fuel cell, characterized in that: include: Obtaining microbial fuel cell parameters; Based on the obtained parameters, a PID controller for the microbial fuel cell is constructed; Based on the input of the controller constructed by time delay estimation and PID control, the dilution rate of the microbial fuel cell is controlled. The parameters of the constructed PID controller are optimized using an improved ant colony algorithm to obtain the maximum output voltage of the microbial fuel cell, thus completing the PID control of the microbial fuel cell. Based on the mathematical model of the microbial fuel cell system, let the reference value of the state be, then,, then, the error dynamics is:, is a constant matrix; select the control input as, where, is the estimated value of, which can be expressed as, where L is the sampling period, when L is infinitely small, then; at this time, the control input; The parameters of the PID controller constructed by the improved ant colony algorithm optimization are specifically as follows: the PID controller parameters are encoded by binary numbers, the initial population is divided into several sub-populations of equal size and whose pheromones cannot communicate with each other, and the path selection and iteration of each sub-population are performed in different ways. When the sub-populations have reached the maximum number of iterations, the sub-populations are merged, and the pheromones of the merged sub-populations are communicated. The normal optimization operation of the ant colony algorithm is continued for this sub-population, and the maximum number of iterations is set to 100; the optimal solution Z is obtained, and the corresponding microbial fuel The output voltage of the battery is f(Z), and multiple new solutions Z1, Z2, ... Zn are randomly generated, where n is a finite value; the corresponding output voltages are f(Z1), f(Z2), ..., f(Zn); compare f(Z) with f(Z1), f(Z2), ..., f(Zn). If f(Z) is the largest, then output X = Z, f(X) = f(Z); otherwise, output the largest f(Zq), q belongs to [1, n], that is, X = Zq, f(X) = f(Zq). Then, the new solution Zq and the old solution Z are used as the upper and lower bounds of the local optimization range, and the optimization is carried out by The ant colony optimization algorithm is used for local optimization, and the optimal solution X = Za, f (X) = f (Za), a belongs to [1, n] is output; when the set maximum number of iterations of 100 is reached, the optimal solution is output, and the optimal PID control parameters of the microbial fuel cell are obtained.
2. A PID control method for a microbial fuel cell as claimed in claim 1, characterized in that: Before constructing the PID controller of the microbial fuel cell, a mathematical model of the microbial fuel cell is obtained according to the obtained microbial fuel cell parameters, and a total voltage of the microbial fuel cell is obtained according to the obtained mathematical model of the microbial fuel cell.
3. A PID control method for a microbial fuel cell as claimed in claim 2, characterized in that: According to the obtained total voltage of the microbial fuel cell, the microbial fuel cell parameters in the constructed mathematical model of the microbial fuel cell are analyzed to obtain the time delay estimation and PID controller of the microbial fuel cell.
4. A PID control method for a microbial fuel cell as claimed in claim 3, characterized in that: According to the obtained mathematical model of the microbial fuel cell, time delay estimation and PID controller, an expression of the dilution rate of the microbial fuel cell is obtained; and the state of the microbial fuel cell is controlled by controlling the dilution rate.
5. A PID control method for a microbial fuel cell as claimed in claim 1, characterized in that: The acquired microbial fuel cell parameters include at least substrate concentration, microbial content, acetate concentration, hydrogen ion concentration, microbial growth rate and substrate utilization rate in the microbial fuel cell.
6. A PID control system for a microbial fuel cell, characterized in that: include: an acquisition module configured to acquire microbial fuel cell parameters; A construction module configured to construct a microbial fuel cell according to the acquired parameters PID controller; A control module is configured to control the dilution rate of the microbial fuel cell based on the input of the controller constructed by time delay estimation and PID control, and optimize the parameters of the constructed PID controller using an improved ant colony algorithm to obtain the maximum output voltage of the microbial fuel cell, thereby completing the PID control of the microbial fuel cell; Based on the mathematical model of the microbial fuel cell system, let the reference value of the state be, then,, then, the error dynamics is:, is a constant matrix; select the control input as, where, is the estimated value of, which can be expressed as, where L is the sampling period, when L is infinitely small, then; at this time, the control input; The parameters of the PID controller constructed by optimizing the improved ant colony algorithm are specifically as follows: the PID controller parameters are encoded by binary numbers, the initial population is divided into a number of subpopulations of equal size and whose pheromones cannot communicate with each other, and the paths of each subpopulation are selected and iterated in different ways. When the subpopulations have reached the maximum number of iterations, the subpopulations are merged, and the pheromones of the merged subpopulations are communicated. The normal optimization operation of the ant colony algorithm is continued for this subpopulation, and the maximum number of iterations is set to 100; the optimal solution Z is obtained, and the corresponding output voltage of the microbial fuel cell is f(Z). Multiple new solutions Z1, Z2, ... Zn are randomly generated, where n is a finite value; the corresponding output voltage is f(Z1), f(Z2), ..., f(Zn); compare f(Z) with f(Z1), f(Z2), ..., f(Zn), if f(Z) is the largest, then output X=Z, f(X)=f(Z); otherwise, output the largest f(Zq), q belongs to [1,n], that is, X=Zq, f(X)=f(Zq), then, with the new solution Zq and the old solution Z as the upper and lower bounds of the local optimization range, use the ant colony optimization algorithm to perform local optimization, and output the optimal solution X=Za, f(X)=f(Za), a belongs to [1,n]; when the set maximum number of iterations 100 is reached, output the optimal solution, and get the micro- The optimal PID control parameters of biofuel cells.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the PID control method for a microbial fuel cell according to any one of claims 1 to 5 are implemented.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the steps of the PID control method for a microbial fuel cell according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Fuel cell cathode pressure control method based on improved particle swarm PID
CN112563541A
T-S fuzzy guaranteed performance control method and system of microbial fuel cell
CN113359436A
Microbial fuel cell self-adaptive control method based on elastic compensation
CN117174971A
PID (Proportion Integration Differentiation) control method and system of microbial fuel cell
CN117784590A
Fuel cell system and method of controlling the same
US20170365868A1