NMPC-based microbial fuel cell operation optimization method and system
By combining NMPC-based methods with recursive least squares and chaotic particle swarm optimization algorithms, multi-objective optimization control of microbial fuel cell systems is achieved, solving the problems of unstable system output performance and insufficient adaptive capability, and improving the system's robustness and power generation efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
- Filing Date
- 2026-04-24
- Publication Date
- 2026-05-29
AI Technical Summary
Microbial fuel cell systems suffer from problems such as unstable output performance, low power generation efficiency, single control objective, insufficient adaptive capability, and large computational load during operation, making it difficult to meet the needs of engineering promotion.
By employing an NMPC-based approach, a multi-objective optimization nonlinear model predictive control model is constructed. This model is combined with recursive least squares method and an improved chaotic particle swarm optimization algorithm to achieve joint regulation of substrate concentration and biomass concentration, enabling rolling optimization control and improving system stability and adaptability.
It significantly improves the robustness and reliability of microbial fuel cell systems, enabling them to maintain stable operation under substrate fluctuations or load changes, reducing computational burden, and meeting the requirements for online real-time control.
Smart Images

Figure CN122113672A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of microbial fuel cell control technology, and particularly relates to a method and system for optimizing the operation of microbial fuel cells based on NMPC. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Microbial fuel cells (MFCs), as a novel new energy technology that can directly convert the chemical energy of organic substrates into electrical energy, combine the functions of wastewater treatment, clean energy supply, and resource recovery, and have significant application prospects in distributed power generation, water environment management, and biomass energy utilization. However, MFC systems exhibit strong nonlinearity, time-varying characteristics, multi-parameter coupling, and hysteresis. Their output performance is easily affected by substrate concentration, microbial activity, system internal resistance, ambient temperature, and load fluctuations, making it difficult to maintain operational stability and power generation efficiency over long periods, thus hindering their engineering application.
[0004] Current MFC operation control mostly adopts traditional open-loop control or simple closed-loop strategies, mainly relying on direct adjustment of output voltage, external load resistance, or fixed feed / return rates. These methods have significant technical limitations: First, the control objective is singular, focusing only on output voltage or current stability, failing to incorporate power generation revenue, pumping energy consumption, and system maintenance costs into the optimization framework, resulting in poor operational economy. Second, the fixed models and parameters cannot identify time-varying parameters such as internal resistance and microbial activity online, leading to insufficient adaptability in the face of substrate fluctuations, load changes, and microbial aging, easily resulting in voltage oscillations and sudden output drops. Third, direct control of electrical quantities exacerbates system nonlinear coupling, causing frequent abrupt changes in control actions, resulting in low operational stability and robustness. Fourth, traditional model predictive control relies on complex polarization curve modeling, which involves large computational loads and poor real-time performance, making it difficult to meet the online optimization requirements of MFC.
[0005] In recent years, model predictive control (MPC) has been gradually applied to MFC systems. However, most existing methods are linear model predictive control, which is difficult to accurately describe the coupling characteristics of microbial metabolism and electrochemistry. Some nonlinear model predictive controls do not consider the overall performance loss of the system and the switching of operating modes, resulting in rigid control objectives. At the same time, most strategies lack online internal resistance estimation mechanisms, and fixed parameter models will deviate significantly over time, further reducing control accuracy. Summary of the Invention
[0006] To overcome the shortcomings of the prior art, this invention provides a method and system for optimizing the operation of microbial fuel cells based on NMPC. By constructing a multi-objective optimized nonlinear model predictive control (NMPC) model, the substrate concentration and biomass concentration are jointly regulated to achieve indirect control of the output voltage and current. At the same time, the relationship between pumping energy consumption and system maintenance costs is comprehensively considered to optimize the system stability and adaptive capability, thereby improving the overall operating performance of the MFC system.
[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: The first aspect of this invention provides a method for optimizing the operation of microbial fuel cells based on NMPC; A method for optimizing the operation of microbial fuel cells based on NMPC, comprising: A kinetic model of a microbial fuel cell was established, and system operation data, including current substrate concentration, biomass concentration, output voltage, and output current, were collected in real time. Based on the collected output voltage and output current, the equivalent internal resistance of the system is obtained by recursive least squares method, and the voltage prediction model is updated; according to the collected current substrate concentration and output voltage, the current operating mode of the system is determined according to the preset threshold discrimination criterion. In the prediction time domain, the dynamic model is discretized using the fourth-order Runge-Kutta method to recursively predict future state variables; and a multi-objective optimization function for nonlinear model predictive control is constructed based on the predicted values in the prediction time domain. An improved chaotic particle swarm optimization algorithm is used to solve the multi-objective optimization function to obtain the optimal control input sequence in the prediction time domain; The first control variable is extracted from the optimal control sequence and used as the actual control input at the current moment. At the next sampling moment, the above process is repeated to achieve rolling optimization closed-loop control.
[0008] As a further technical solution, the kinetic model of the microbial fuel cell is as follows:
[0009] in, Indicates the maximum substrate consumption rate; This represents the maximum microbial growth rate. It is the half-saturation constant, which physically represents the rate at which microorganisms reach their maximum growth rate. The substrate concentration corresponding to half; Represents the system dilution rate; Represents the rate of biomass mortality; Indicates the concentration of the feed substrate; state and These correspond to substrate concentration and biomass concentration, respectively.
[0010] As a further technical solution, the recursive least squares method is used to estimate the internal resistance parameters online, and the parameter update formula is as follows:
[0011] in, time The parameter estimates correspond to the system's equivalent internal resistance. ; Let the regression vector be defined as follows: ; , , and They are time points The system output current, system output voltage, gain vector, and covariance matrix of parameter estimation error.
[0012] As a further technical solution, based on the collected current substrate concentration and output voltage, the current operating mode of the system is determined according to a preset threshold discrimination criterion, the expression of which is:
[0013] in, The substrate concentration threshold, Let be the substrate concentration at the k-th sampling time; Let k be the system output voltage at time k; This is the lower voltage threshold. For power generation mode; Stable mode.
[0014] As a further technical solution, in the prediction time domain, the fourth-order Runge-Kutta method is used to discretize the dynamic model and recursively predict future state variables, including: The system was discretized using the fourth-order Runge-Kutta method to construct a state prediction model. The discretization prediction process for substrate concentration and biomass concentration is as follows: For discrete time Define the following intermediate variables:
[0015] State update formula:
[0016] in, , They represent the first Substrate concentration and biomass concentration at each sampling time. For the first Dilution rate of control input at each sampling time; and These are the system dynamics model equations constructed, respectively; Indicates substrate concentration In the The instantaneous increment of the step, Indicates biomass concentration In the The instantaneous increment; These correspond to the four calculation stages of RK4 and are used to combine them into the state prediction value for the next time step; , Given the predicted substrate concentration and biomass concentration at the (k+1)th sampling time, calculate the corresponding current based on the predicted state. and voltage .
[0017] As a further technical solution, the multi-objective optimization function for nonlinear model predictive control is constructed as follows:
[0018] in, It is a multi-objective optimization function; For prediction in the time domain; This is the system state vector; The target reference state; This is the state weight matrix; This refers to the dilution rate; To control the weighting coefficients; This is the overall system performance loss function; Constraints to control input changes; The weighting coefficients for the constraint terms that control input variation.
[0019] As a further technical solution, the specific process of solving the multi-objective optimization function using the improved chaotic particle swarm optimization algorithm includes: The particle swarm is initialized within the control input constraints, the particle positions are represented as candidate control input sequences, and a chaotic map is introduced to perturb the initial particles. Substitute the control input sequence corresponding to each particle into the objective function to calculate the fitness value, and update the individual optimal solution and the global optimal solution; The particle position and velocity are iteratively updated based on the particle swarm optimization algorithm, and chaotic perturbations are introduced during the update process to enhance the global search capability. The particles are constrained, and the optimal control sequence is output when the termination condition is met. The first item is selected as the control input at the current time, and the process is iterated at the next sampling time to achieve rolling optimization control.
[0020] A second aspect of the present invention provides a microbial fuel cell operation optimization system based on NMPC.
[0021] A microbial fuel cell operation optimization system based on NMPC includes: The data acquisition and modeling module is configured to: establish a kinetic model of the microbial fuel cell and acquire system operation data in real time, including current substrate concentration, biomass concentration, output voltage, and output current. The parameter estimation and mode discrimination module is configured to: obtain the equivalent internal resistance of the system using the recursive least squares method based on the collected output voltage and output current, and update the voltage prediction model; determine the current operating mode of the system according to the collected current substrate concentration and output voltage and the preset threshold discrimination criteria. The state prediction and optimization function construction module is configured to: discretize the dynamic model using the fourth-order Runge-Kutta method in the prediction time domain, recursively predict future state variables; and construct a multi-objective optimization function for nonlinear model predictive control based on the predicted values in the prediction time domain. The optimal sequence acquisition module is configured to: solve the multi-objective optimization function using an improved chaotic particle swarm optimization algorithm to obtain the optimal control input sequence in the prediction time domain; The rolling optimization control module is configured to extract the first control quantity from the optimal control sequence as the actual control input at the current moment, and repeat the above process at the next sampling moment to achieve rolling optimization closed-loop control.
[0022] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of the NMPC-based microbial fuel cell operation optimization method described in the first aspect of the present invention.
[0023] A fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the NMPC-based microbial fuel cell operation optimization method described in the first aspect of the present invention.
[0024] The above one or more technical solutions have the following beneficial effects: (1) This invention, by constructing a multi-objective optimization function, integrates state tracking, control input constraints, and voltage safety constraints into a nonlinear model predictive control framework, overcoming the inherent defect of traditional control methods that only focus on a single objective, and effectively avoiding the voltage oscillation problem commonly found in traditional direct voltage control methods. Simultaneously, this invention introduces a control input smoothing term to constrain the rate of change of the dilution rate, preventing sudden changes in control commands from impacting the system. Furthermore, a stable mode switching mechanism based on a lower voltage threshold automatically prioritizes stable operation when the system voltage deviates from the safe range. These measures work synergistically to ensure stable operation of the microbial fuel cell system under substrate fluctuations or load changes, significantly improving the system's robustness and reliability.
[0025] (2) To address the problem of dynamic changes in parameters such as system internal resistance, microbial activity, and substrate concentration under operating conditions, this invention employs the recursive least squares method to achieve online real-time identification of internal resistance, enabling model parameters to automatically update with the system state and maintain high prediction accuracy. Compared to fixed-parameter models, this method can quickly adapt to complex operating conditions such as substrate fluctuations, load changes, and microbial aging, significantly reducing control deviations caused by model mismatch. It can maintain stable control performance even under highly nonlinear and time-varying environments, improving the system's adaptability to external disturbances and changes in internal parameters.
[0026] (3) This invention uses a simplified method of mapping the output current by multiplying the substrate concentration and the biomass concentration, which significantly reduces the computational load while ensuring physical rationality. Combined with the fourth-order Runge-Kutta (RK4) discretization method, the accuracy of state prediction and numerical stability are improved, enabling nonlinear model predictive control to complete rolling optimization within a short sampling period. The overall scheme has low computational burden and strong real-time performance, making it more suitable for embedded platform deployment. It can meet the online real-time control requirements of microbial fuel cells and provide an efficient and feasible technical path for engineering applications.
[0027] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0028] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0029] Figure 1 This is a flowchart of the method in the first embodiment.
[0030] Figure 2 This is a schematic diagram of the NMPC control framework for the first embodiment.
[0031] Figure 3 This is a flowchart of the control strategy for the first embodiment.
[0032] Figure 4 This is a system structure diagram of the second embodiment. Detailed Implementation
[0033] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0034] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0035] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0036] Example 1 This embodiment discloses a microbial fuel cell operation optimization method based on NMPC. An MFC dynamic model is established, and the internal resistance is estimated online and the operating mode is determined by the recursive least squares method. In the prediction time domain, the state is predicted based on the fourth-order Runge-Kutta method and a nonlinear model predictive control model (NMPC) is constructed. The optimal control sequence is solved by the chaotic particle swarm algorithm and executed in a rolling manner, which significantly improves the overall operating efficiency of the MFC system.
[0037] like Figures 1-3 As shown, a method for optimizing the operation of a microbial fuel cell based on NMPC includes: Step S1: Establish a kinetic model of the microbial fuel cell and collect system operation data in real time, including current substrate concentration, biomass concentration, output voltage, and output current.
[0038] Step S1.1: Establish a dynamic model of a single-chamber microbial fuel cell (MFC). The dynamic model of the microbial fuel cell is as follows:
[0039] in, Indicates the maximum substrate consumption rate; This represents the maximum microbial growth rate. It is the half-saturation constant, which physically represents the rate at which microorganisms reach their maximum growth rate. The substrate concentration corresponding to half; Represents the system dilution rate; Represents the rate of biomass mortality; Indicates the concentration of the feed substrate; state and These correspond to substrate concentration and biomass concentration, respectively.
[0040] The control objective of the constructed kinetic model is substrate concentration. Converging to the expected reference value Biomass concentration Converging to the expected reference value Output voltage Stable; Output current Stability is crucial to avoid overload. The model's control input is the dilution rate. (or reflux / feed rate), denoted as By adjusting It indirectly regulates the concentration of substrate and biomass, thereby achieving indirect control of voltage and current.
[0041] Step S1.2: Based on the constructed kinetic model of the microbial fuel cell, initialize the system state variables and parameters, including substrate concentration. Biomass concentration Maximum substrate consumption rate Maximum microbial growth rate half-saturation constant Mortality rate Initial internal resistance estimate and control parameter matrix , Prediction time domain Wait. Simultaneously set a reference state. , Voltage safety threshold Lower voltage limit and substrate concentration threshold .
[0042] Step S2: Based on the collected output voltage and output current, the equivalent internal resistance of the system is obtained by recursive least squares method, and the voltage prediction model is updated; according to the collected current substrate concentration and output voltage, the current operating mode of the system is determined according to the preset threshold discrimination criterion.
[0043] Step S2.1: In this embodiment, a current and voltage model is constructed based on the system state variables to simplify the complex electrochemical process, enabling it to be embedded in a nonlinear model predictive control framework for real-time optimization calculations. The current calculation formula is as follows:
[0044] In the formula, This refers to the output current of the microbial fuel cell; The concentration of the substrate in the reactor; This refers to the biomass concentration within the reactor. This is a proportionality coefficient used to map substrate concentration and biomass concentration to output current.
[0045] By employing a simplified state prediction model, the product of substrate consumption rate and biomass concentration is directly mapped to current. This method avoids complex polarization curve modeling, improves the prediction efficiency of NMPC, and ensures that current changes with system state have physical rationality, thus enabling indirect regulation of the current.
[0046] The voltage calculation formula is:
[0047] in, This refers to the output voltage of the microbial fuel cell; This is the open-circuit voltage, which can be taken as a constant or determined based on experimental experience; The internal resistance is dynamically estimated using the online recursive least squares (RLS) algorithm; The current is obtained using the above current calculation formula.
[0048] Step S2.2, during the operation of the microbial fuel cell, the internal resistance in the above voltage calculation formula... The internal resistance parameter changes dynamically with substrate concentration, biomass activity, and environmental conditions. Using a fixed internal resistance parameter will increase voltage prediction error, thus affecting control performance. To improve the accuracy of the voltage prediction model and enhance the control system's adaptability to changes in operating conditions, this embodiment further introduces an online internal resistance estimation mechanism to estimate the equivalent internal resistance parameter in the microbial fuel cell system. Real-time identification is performed.
[0049] Specifically, the recursive least squares method is used to estimate the internal resistance parameters online, and the parameter update formula is as follows:
[0050] in, time The parameter estimates correspond to the system's equivalent internal resistance. ; Let the regression vector be defined as follows: ; , , and They are time points The system output current, system output voltage, gain vector, and covariance matrix of parameter estimation error.
[0051] By using the recursive least squares method to estimate the internal resistance online, the parameters in the voltage model can be updated in real time according to the system's operating state, thereby improving the accuracy of voltage prediction. Furthermore, the online estimation result is embedded in the nonlinear model predictive control (NMPC) framework, enabling the prediction model to dynamically reflect changes in system characteristics, thereby improving the robustness and optimization performance of the control system.
[0052] In step S2.3, in order to balance the power generation performance and operational stability of the microbial fuel cell system, a mode switching strategy based on the system operating status was also designed.
[0053] Specifically, based on the collected current substrate concentration and output voltage, the current operating mode of the system is determined according to a preset threshold discrimination criterion, the expression of which is:
[0054] in, The substrate concentration threshold, Let be the substrate concentration at the k-th sampling time; Let k be the system output voltage at time k; This is the lower voltage threshold. For power generation mode; Stable mode.
[0055] When the system substrate concentration is high, it indicates that there is sufficient reactant in the reactor. In this case, the system switches to power generation mode to increase system power output. When the system voltage is below a set threshold, it indicates that the system's operating state deviates from the stable range. In this case, the system switches to stable mode to prioritize stable operation. Under other circumstances, the system defaults to stable mode. During system operation, regardless of the operating mode, an objective function is constructed based on the state prediction model and optimized. The control objective is adaptively switched by adjusting the weights and structure of the optimization terms in the objective function under different modes.
[0056] By introducing a mode switching mechanism, the control system can dynamically adjust and optimize targets according to the operating status, thereby improving power generation performance while ensuring system stability and thus improving overall operating efficiency.
[0057] Step S3: In the prediction time domain, the dynamic model is discretized using the fourth-order Runge-Kutta method to recursively predict future state variables; and a multi-objective optimization function for nonlinear model predictive control is constructed based on the predicted values in the prediction time domain.
[0058] Step S3.1: To improve the accuracy of state prediction and numerical stability, this embodiment uses the fourth-order Runge-Kutta (RK4) method to discretize the system based on the continuous dynamics model and construct a state prediction model.
[0059] For substrate concentration Biomass concentration The discrete prediction process is as follows: For discrete time Define the following intermediate variables:
[0060] State update formula:
[0061] in, , They represent the first Substrate concentration and biomass concentration at each sampling time. For the first Dilution rate of control input at each sampling time; and These are the system dynamics model equations constructed in step S1; Indicates substrate concentration In the The instantaneous increment of the step, Indicates biomass concentration In the The instantaneous increment; These correspond to the four calculation stages of RK4 and are used to combine them into the state prediction value for the next time step; , Given the predicted substrate concentration and biomass concentration at the (k+1)th sampling time, calculate the corresponding current based on the predicted state. and voltage .
[0062] Step S3.2: To achieve synergistic optimization of the operational stability and system performance loss of the microbial fuel cell system, a nonlinear model predictive control (NMPC) objective function based on multi-objective optimization is further constructed.
[0063] Specifically, in the prediction time domain Inside, the objective function is defined as:
[0064] In the formula, It is a multi-objective optimization function; For prediction in the time domain; This is a comprehensive system performance loss function used to characterize the combined technical costs of power generation, pumping energy consumption, and voltage stability. Constraints to control input changes; The weighting coefficients for the constraint terms that control input variation.
[0065] The objective function described above includes a state error term, a control input constraint term, a system energy efficiency optimization term, a mode coupling mechanism, and a control input smoothing term.
[0066] (i) The state error term describes the deviation of the system state from the reference value, and is used to ensure the stable convergence of substrate concentration and biomass concentration. Its expression is:
[0067] in, This is the state error term; This is the system state vector; The target reference state; This is the state weight matrix.
[0068] (ii) Control input constraints are used to limit the range of change of control variables, and their expression is:
[0069] in, Dilution rate (control input); To control the weighting coefficients.
[0070] (iii) For system energy efficiency optimization, in order to achieve comprehensive optimization of net power output and pumping energy consumption, performance indicators are constructed as follows:
[0071] in, This refers to the system output power.
[0072] Based on this, a system comprehensive performance loss function is defined. for:
[0073] in, This is the weighting coefficient for power generation revenue; To control the energy consumption weighting coefficient; This is the voltage stability weighting coefficient; This is the threshold for safe operation of the system voltage.
[0074] This item is used to improve power generation efficiency while reducing energy consumption and maintaining voltage stability, and to constrain system voltage variations within a reasonable range to avoid the impact of excessively low or high voltage on system operational stability.
[0075] (iv) Regarding the mode coupling mechanism, to adapt to different operating conditions, the operating mode is introduced into the objective function to achieve dynamic switching of the optimization objective. Its expression is:
[0076] in, Indicates the power generation mode. This indicates the stable mode. When the system is in power generation mode, the primary goal is to increase output power; when the system is in stable mode, the primary goal is to maintain system voltage stability.
[0077] (v) To avoid abrupt changes in the control input, a control input change constraint term is introduced, the expression of which is:
[0078] in, To control the input smoothing term; This represents the control input from the previous time step. The control input smoothing term is used to improve the continuity of the control input, thereby enhancing the stability of system operation.
[0079] By constructing the above objective function, system state regulation, energy consumption constraints, power output, and voltage stability are uniformly incorporated into the optimization framework. Combined with the operating mode, the control objective is dynamically adjusted, thereby improving the overall performance and operating efficiency of the microbial fuel cell system while ensuring stable system operation.
[0080] Step S4: The improved chaotic particle swarm optimization algorithm is used to solve the multi-objective optimization function to obtain the optimal control input sequence in the prediction time domain.
[0081] To solve the constructed nonlinear model predictive control objective function, at each sampling time... The optimal control sequence is obtained by solving the following optimization problem:
[0082] in, To control the input sequence, The objective function is denoted as .
[0083] An improved chaotic particle swarm optimization algorithm is used to solve the problem, and the optimal control sequence is obtained:
[0084] in, This is the optimal control sequence.
[0085] In control input constraints The particle positions and velocities are randomly initialized internally. To avoid premature convergence, a Logistic chaotic map is introduced to perturb the initial particles:
[0086] in, These are chaotic variables. An initial population is generated through chaotic traversal, increasing diversity.
[0087] The position of each particle, i.e., the candidate control sequence, is substituted into the prediction model, and the future state variables are recursively derived using the fourth-order Runge-Kutta method, thereby calculating the objective function value. The individual optimal and global optimal are then updated.
[0088] Updated according to the standard PSO formula:
[0089]
[0090] in, The updated particle velocity; Let be the velocity vector of the particle in the j-th iteration, representing the direction and magnitude of the position change; The optimal position for an individual particle is the best candidate solution obtained in the particle's historical iterations. The position is the global optimum, which is the best candidate solution obtained throughout the entire history of particle swarm iterations; For inertial weights, , As a learning factor, , It is a random number.
[0091] At regular intervals of iterations, apply a chaotic perturbation to the global optimal solution:
[0092] in, The amplitude of the disturbance; It is a chaotic vector.
[0093] Boundary constraints are applied to the updated particles to ensure that the control input meets the system's physical constraints. The process terminates when the maximum number of iterations is reached or the fitness change is less than a threshold, and the optimal control sequence is output.
[0094] in, This is the optimal control sequence.
[0095] Step S5: Extract the first control quantity from the optimal control sequence as the actual control input at the current moment. Repeat the above process at the next sampling moment to achieve rolling optimization closed-loop control.
[0096] Only the first term of the optimal control sequence is executed as the current control input:
[0097] Repeat steps S1 to S4 at the next sampling time to achieve rolling optimization control, so that the system state gradually converges to the target value, while optimizing power generation efficiency and operational stability.
[0098] Example 2 This embodiment discloses a microbial fuel cell operation optimization system based on NMPC; like Figure 4 As shown, a microbial fuel cell operation optimization system based on NMPC includes: The data acquisition and modeling module is configured to: establish a kinetic model of the microbial fuel cell and acquire system operation data in real time, including current substrate concentration, biomass concentration, output voltage, and output current. The parameter estimation and mode discrimination module is configured to: obtain the equivalent internal resistance of the system using the recursive least squares method based on the collected output voltage and output current, and update the voltage prediction model; determine the current operating mode of the system according to the collected current substrate concentration and output voltage and the preset threshold discrimination criteria. The state prediction and optimization function construction module is configured to: discretize the dynamic model using the fourth-order Runge-Kutta method in the prediction time domain, recursively predict future state variables; and construct a multi-objective optimization function for nonlinear model predictive control based on the predicted values in the prediction time domain. The optimal sequence acquisition module is configured to: solve the multi-objective optimization function using an improved chaotic particle swarm optimization algorithm to obtain the optimal control input sequence in the prediction time domain; The rolling optimization control module is configured to extract the first control quantity from the optimal control sequence as the actual control input at the current moment, and repeat the above process at the next sampling moment to achieve rolling optimization closed-loop control.
[0099] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.
[0100] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the NMPC-based microbial fuel cell operation optimization method as described in Example 1.
[0101] Example 4 The purpose of this embodiment is to provide an electronic device.
[0102] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the NMPC-based microbial fuel cell operation optimization method described in Example 1.
[0103] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0104] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0105] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for optimizing the operation of a microbial fuel cell based on NMPC, characterized in that, include: A kinetic model of a microbial fuel cell was established, and system operation data, including current substrate concentration, biomass concentration, output voltage, and output current, were collected in real time. Based on the collected output voltage and output current, the equivalent internal resistance of the system is obtained by recursive least squares method, and the voltage prediction model is updated; according to the collected current substrate concentration and output voltage, the current operating mode of the system is determined according to the preset threshold discrimination criterion. In the prediction time domain, the dynamic model is discretized using the fourth-order Runge-Kutta method to recursively predict future state variables; And based on the predicted values, a multi-objective optimization function for nonlinear model predictive control is constructed in the prediction time domain; An improved chaotic particle swarm optimization algorithm is used to solve the multi-objective optimization function to obtain the optimal control input sequence in the prediction time domain; The first control variable is extracted from the optimal control sequence and used as the actual control input at the current moment. At the next sampling moment, the above process is repeated to achieve rolling optimization closed-loop control.
2. The method for optimizing the operation of a microbial fuel cell based on NMPC as described in claim 1, characterized in that, The kinetic model of the microbial fuel cell is as follows: in, Indicates the maximum substrate consumption rate; This represents the maximum microbial growth rate. It is the half-saturation constant, which physically represents the rate at which microorganisms reach their maximum growth rate. The substrate concentration corresponding to half; Represents the system dilution rate; Represents the rate of biomass mortality; Indicates the concentration of the feed substrate; state and These correspond to substrate concentration and biomass concentration, respectively.
3. The method for optimizing the operation of a microbial fuel cell based on NMPC as described in claim 1, characterized in that, The recursive least squares method is used to estimate the internal resistance parameters online, and the parameter update formula is as follows: in, time The parameter estimates correspond to the system's equivalent internal resistance. ; Let the regression vector be defined as follows: ; , , and They are time points The system output current, system output voltage, gain vector, and covariance matrix of parameter estimation error.
4. The method for optimizing the operation of a microbial fuel cell based on NMPC as described in claim 1, characterized in that, Based on the collected current substrate concentration and output voltage, the current operating mode of the system is determined according to a preset threshold discrimination criterion, the expression of which is: in, The substrate concentration threshold, Let be the substrate concentration at the k-th sampling time; Let k be the system output voltage at time k; This is the lower voltage threshold. For power generation mode; Stable mode.
5. The method for optimizing the operation of a microbial fuel cell based on NMPC as described in claim 1, characterized in that, In the prediction time domain, the dynamic model is discretized using the fourth-order Runge-Kutta method to recursively predict future state variables, including: The system was discretized using the fourth-order Runge-Kutta method to construct a state prediction model. The discretization prediction process for substrate concentration and biomass concentration is as follows: For discrete time Define the following intermediate variables: State update formula: in, , They represent the first Substrate concentration and biomass concentration at each sampling time. For the first Dilution rate of control input at each sampling time; and These are the system dynamics model equations constructed, respectively; Indicates substrate concentration In the The instantaneous increment of the step, Indicates biomass concentration In the The instantaneous increment; These correspond to the four calculation stages of RK4 and are used to combine them into the state prediction value for the next time step; , Given the predicted substrate concentration and biomass concentration at the (k+1)th sampling time, calculate the corresponding current based on the predicted state. and voltage .
6. The method for optimizing the operation of a microbial fuel cell based on NMPC as described in claim 1, characterized in that, The constructed multi-objective optimization function for nonlinear model predictive control is as follows: in, It is a multi-objective optimization function; For prediction in the time domain; This is the system state vector; The target reference state; This is the state weight matrix; This refers to the dilution rate; To control the weighting coefficients; This is the overall system performance loss function; Constraints to control input changes; The weighting coefficients for the constraint terms that control input variation.
7. The method for optimizing the operation of a microbial fuel cell based on NMPC as described in claim 1, characterized in that, The specific process of solving the multi-objective optimization function using the improved chaotic particle swarm optimization algorithm includes: The particle swarm is initialized within the control input constraints, the particle positions are represented as candidate control input sequences, and a chaotic map is introduced to perturb the initial particles. Substitute the control input sequence corresponding to each particle into the objective function to calculate the fitness value, and update the individual optimal solution and the global optimal solution; The particle position and velocity are iteratively updated based on the particle swarm optimization algorithm, and chaotic perturbations are introduced during the update process to enhance the global search capability. The particles are constrained, and the optimal control sequence is output when the termination condition is met. The first item is selected as the control input at the current time, and the process is iterated at the next sampling time to achieve rolling optimization control.
8. A microbial fuel cell operation optimization system based on NMPC, characterized in that, include: The data acquisition and modeling module is configured to: establish a kinetic model of the microbial fuel cell and acquire system operation data in real time, including current substrate concentration, biomass concentration, output voltage, and output current. The parameter estimation and mode discrimination module is configured to: obtain the equivalent internal resistance of the system using the recursive least squares method based on the collected output voltage and output current, and update the voltage prediction model; determine the current operating mode of the system according to the collected current substrate concentration and output voltage and the preset threshold discrimination criteria. The state prediction and optimization function construction module is configured to: discretize the dynamic model using the fourth-order Runge-Kutta method in the prediction time domain, recursively predict future state variables; and construct a multi-objective optimization function for nonlinear model predictive control based on the predicted values in the prediction time domain. The optimal sequence acquisition module is configured to: solve the multi-objective optimization function using an improved chaotic particle swarm optimization algorithm to obtain the optimal control input sequence in the prediction time domain; The rolling optimization control module is configured to extract the first control quantity from the optimal control sequence as the actual control input at the current moment, and repeat the above process at the next sampling moment to achieve rolling optimization closed-loop control.
9. A computer-readable storage medium having a program stored thereon, characterized in that, When executed by the processor, the program implements the steps in the NMPC-based microbial fuel cell operation optimization method as described in any one of claims 1-7.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the NMPC-based microbial fuel cell operation optimization method as described in any one of claims 1-7.