A PID-based temperature control method for microbial fermentation
By introducing metaheuristic algorithms into the microbial fermentation temperature control system to improve the traditional PID control algorithm and dynamically adjust the control parameters to compensate for system hysteresis and overshoots, the problem of poor control effect in the handling of complex fermentation processes is solved, and more efficient and more accurate temperature control is achieved.
Patent Information
- Application Number
- CN202510146919.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-02-11
AI Technical Summary
When traditional PID control algorithms deal with complex, nonlinear, time-varying, large hysteresis, and uncertain multivariate input and output systems during microbial fermentation, they cannot accurately capture and respond to dynamic changes during fermentation, resulting in poor control effects.
The introduction of the meta-heuristic algorithm (MOA) has been used to improve the traditional PID control algorithm. By dynamically adjusting the PID control parameters Kp, Ki and Kd, it compensates for the hysteresis and overshoot problems in the temperature control system, and achieves accurate and fast temperature regulation.
Through the improved PID control algorithm, the system can respond quickly in a nonlinear and large hysteresis environment, reduce overshoot and steady-state errors, accelerate the system stability time, and significantly improve the accuracy and efficiency of temperature control.
Smart Images

Figure CN119620804B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of temperature control, and particularly relates to a temperature control method for microbial fermentation based on PID. Background Art
[0002] Temperature is one of the key factors affecting the enzyme reaction rate. Within a suitable temperature range, the growth rate of microorganisms will increase with the increase of temperature; however, when the temperature exceeds a certain limit, the catalytic activity of the enzyme will decline, resulting in a slowdown or even stop of the microbial growth rate.
[0003] PID control is a widely used automatic control technology, including a proportional coefficient (P), an integral coefficient (I), and a derivative coefficient (D); during the microbial fermentation process, when the temperature deviates from the set value, the proportional coefficient will immediately respond, accelerating the heating or cooling rate to quickly bring the temperature back near the set value. The integral coefficient integrates the deviation, and the integral control will continuously adjust the control output until the deviation is completely eliminated, thus stabilizing the temperature at the set value; during the fermentation process, the change trend of the temperature can reflect the dynamic characteristics of the fermentation process, and the derivative control can adjust the control output according to this trend to make the temperature control more stable and accurate; however, the microbial fermentation process is a non-linear, time-varying, large-delay, uncertain multi-variable input-output system, involving the growth and reproduction process of living organisms, and the mechanism is very complex. When the traditional PID control algorithm processes such a complex system, it cannot accurately capture and respond to the dynamic changes during the fermentation process, resulting in poor control effects.
[0004] The Mother Optimization Algorithm (MOA) is a newly proposed meta-heuristic algorithm, whose design inspiration comes from the interaction behavior of a mother with her children in three stages: education, advice, and cultivation. It constructs mathematical models of two strategies, search and development. This algorithm is particularly suitable for solving complex engineering optimization problems and has demonstrated its superiority in global search and local search capabilities on multiple standard test functions. Summary of the Invention
[0005] Based on the above background, temperature is a key parameter in the fermentation process, and its control effect is directly related to the efficiency and quality of fermentation. The present invention proposes a temperature control method for microbial fermentation based on PID, introducing a meta-heuristic algorithm to improve the traditional PID control algorithm, compensating for the hysteresis problem between the feedback output and the target value of the microbial fermentation temperature control system and the overshoot problem of temperature control, and accurately and quickly adjusting the temperature of microbial fermentation.
[0006] To achieve the above object, the present invention provides the following technical solution: A temperature control method for microbial fermentation based on PID, and the specific steps are as follows:
[0007] S101. Build a microbial fermentation temperature control model, where the microbial fermentation temperature control model includes a temperature monitoring model, an improved PID control model, a temperature driving model, a temperature error model, and an objective function model.
[0008] S102. The improved PID control model includes a maternal optimization algorithm and an improved PID control algorithm; the improvement of the maternal optimization algorithm includes: S201. Dynamically improve the search strategy of the maternal optimization algorithm based on the historical search results of the maternal optimization algorithm; S202. Construct an individual position diversity strategy between populations to improve the development strategy of the maternal optimization algorithm, and the improved development strategy is segmented; the improved PID control algorithm includes tuning the Kp, Ki, and Kd coefficients of the traditional PID control algorithm by guiding the improved maternal optimization algorithm through the objective function.
[0009] S103. Normalize the deviation value between the target temperature and the real-time temperature within the range of [0, 1] to obtain the normalized temperature deviation value between the real-time temperature and the target temperature.
[0010] S104. Input the normalized temperature deviation value into the improved PID control model, and output a temperature control signal after adjustment by the improved PID control algorithm. The temperature control signal controls and adjusts the microbial fermentation temperature through the temperature driving model, realizing precise and rapid adjustment of the microbial fermentation temperature.
[0011] Preferably, the microbial fermentation temperature control is in a closed-loop control mode. Among them, the temperature monitoring model monitors the temperature value of the closed environment of the microbial fermentation experiment in real time, inputs the temperature of the closed environment of the microbial fermentation experiment into the temperature error model, calculates the deviation value e(t) between the target temperature and the real-time temperature, normalizes the deviation value within the range of [0, 1], inputs the normalized temperature deviation value of the closed environment of the microbial fermentation experiment into the improved PID control model, optimizes the traditional PID control algorithm using the improved maternal optimization algorithm, uses the obtained optimal proportional coefficient, integral coefficient, and differential coefficient to regulate the temperature deviation of the closed environment of the microbial fermentation experiment, outputs a temperature control signal u(t) and inputs it into the temperature driving model, and the temperature driving model regulates the temperature of the closed environment of the microbial fermentation experiment; among them, the temperature driving model is a second-order inertia model, reflecting the corresponding relationship between the temperature of the closed environment of the microbial fermentation experiment and the temperature control signal u(t); monitor the adjusted temperature through the temperature monitoring model and input it into the temperature error model, and continue to regulate the temperature of the closed environment of the microbial fermentation experiment through the improved PID control model until the temperature value of the closed environment of the microbial fermentation experiment reaches the target temperature.
[0012] Preferably, the temperature-driven model describes the dynamic change of the heat inside the sealed environment of the microbial fermentation experiment, which is obtained from the heat balance equation, the relationship between heat input and output, and the dynamic response principle. Its mathematical model in the time domain is as follows:
[0013]
[0014] In the formula, T(t) is the temperature value of the sealed environment of the microbial fermentation experiment at the t-th second, w n is the natural frequency, reflecting the dynamic response speed of the system, q u is the gain, describing the amplification factor of the temperature control signal on the temperature change, and u(t) is the temperature control signal.
[0015] Preferably, the improved maternal optimization algorithm includes a search strategy and a development strategy. A position update mathematical model is established through the two strategies, and the position of the agent individual is updated through the position update mathematical model. During the process of updating the position, the improved maternal optimization algorithm is guided by the fitness value to output the best position of the agent individual. Among them, the best position of the agent individual is the position of the agent individual corresponding to the minimum fitness value. The smaller the fitness value, the better the position of the agent individual, and vice versa.
[0016] Preferably, the fitness value is calculated by the objective function model. The objective function is designed by inputting the deviation value e(t) between the target temperature and the real-time temperature and the response time tr. The smaller the fitness value, that is, the smaller the output value of the objective function, the smaller the deviation value e(t) and the response time tr, indicating that the temperature control effect is better at that time. The objective function reflects the control effect of the improved PID control model on the temperature of the sealed environment of the microbial fermentation experiment under the current optimal proportional coefficient, integral coefficient, and differential coefficient; map the position X j of the agent individual to Kp, Ki, and Kd of the improved PID control algorithm. The mathematical model is: X j =[X1, X2, X3]=[Kp, Ki, Kd], then the best position of the agent individual is the best Kp, Ki, and Kd of the improved PID control algorithm; the mathematical model of the objective function J:
[0017] where T is the total running time.
[0018] Preferably, the search strategy of the maternal optimization algorithm is dynamically improved based on the historical search results of the maternal optimization algorithm. Specifically, the historical search results are reflected by the fitness value of the current iteration and the fitness value of the previous iteration. Design an adaptive factor α. The mathematical model is:
[0019]
[0020] In the formula, α(k) is the value of the adaptive factor α at the k-th iteration, αmax is the maximum value of the adaptive factor, α min is the minimum value of the adaptive factor is the minimum fitness value of the k-th iteration is the minimum fitness value of the (k - 1)-th iteration, N is the scale of the surrogate individuals of the improved maternal optimization algorithm, and i = 1, 2, 3,..., N.
[0021] Preferably, in the mathematical model of the adaptive factor α, logarithmic and exponential transformations are performed on the change of the fitness value to enhance the sensitivity of dynamic adjustment. The cosine function is used to control the non-linear periodic change of the adaptive factor, so that the maternal optimization algorithm is dynamically balanced between search and development, and avoiding falling into local optima; When the difference with is large, α(k) tends to a smaller value, enhancing the search ability of the maternal optimization algorithm. Conversely, when the difference is small, α(k) tends to a larger value, enhancing the local development ability; The adaptive factor is introduced into the search strategy of the maternal optimization algorithm, and the position update mathematical model of the original search strategy is improved to obtain an improved search strategy. The mathematical model is:
[0022]
[0023] In the formula, SBB is the set of the last 20 surrogates in the fitness ranking during the current iteration, and SBB i,j is the position value of the j-th dimension of the i-th surrogate in the SBB set; is the position value of the j-th dimension of the best surrogate individual in the k-th iteration, is the position value of the j-th dimension of the i-th surrogate individual in the k-th iteration, is the updated position value of the j-th dimension of the i-th surrogate individual; rand is a random number between 0 and 1.
[0024] Preferably, a strategy for the diversity of individual positions among populations is constructed to improve the exploitation strategy of the maternal optimization algorithm, and to improve the search range and accuracy of the exploitation strategy control. The strategy for the diversity of individual positions among populations is specifically: divide the search space [ub j , lb j of the j-th dimension of the i-th surrogate individual into M equally spaced intervals Count the number of surrogate individuals U in the m-th interval of the j-th dimension in the population j,m of the probability p j,m , and the mathematical model is: Calculate the entropy of the surrogate individuals of the entire population in the j-th dimension. The mathematical model is: H j reflects the overall position distribution complexity of the entire population in the j-th dimension. The distribution differences of all sub-populations are weighted and averaged to define the diversity of individual positions among the overall populations. The mathematical model is: The entropy values of all D dimensions are averaged to obtain the diversity of the entire surrogate population, reflecting the complexity of the distribution of the entire population in the multi-dimensional space; the individual position diversity strategy σ between populations pop The value range of is determined by the number M of equally spaced intervals, and the range is [0, lg(M)].
[0025] Preferably, the position update mathematical model of the original exploration strategy of the maternal optimization algorithm is improved by using the individual position diversity strategy between populations. When the population diversity is low, exploratory is enhanced by introducing random perturbations to increase the randomness of position adjustment; when the population diversity is high, exploitative is enhanced by reducing the amplitude of position adjustment to enable the population to search the current area more precisely. The mathematical model is:
[0026]
[0027] In the formula, is the position value of the j-th dimension of the i-th surrogate individual at the k-th iteration, is the updated position value of the j-th dimension of the i-th surrogate individual, rand is a random number between 0 and 1, ub j is the upper bound of the j-th dimension position value of the surrogate individual, lb j is the lower bound of the j-th dimension position value of the surrogate individual, K is the maximum number of iterations, is the average value of the positions of all surrogate individuals at the k-th iteration, rn is a minimum value, and k is the current iteration number.
[0028] Preferably, the Kp, Ki, and Kd parameters of the traditional PID control algorithm are tuned by using the objective function to guide the improved maternal optimization algorithm. During the tuning process of the proportional coefficient, integral coefficient, and differential coefficient, the normalized temperature deviation value is simulated by a unit step signal. The specific steps are as follows:
[0029] S401. Initialize the population, including: initializing the population size N of the surrogate individuals, the maximum number of iterations K, and the upper bound ub and lower bound lb of the surrogate individual positions; among them, the population size N, that is, there are N surrogate individuals, and there are N groups of Kp, Ki, and Kd coefficients of the PID control algorithm accordingly;
[0030] S402. Calculate the fitness value. For each surrogate individual in the population, the corresponding coefficients of the PID control algorithm are used to improve the PID control model, the unit step signal is input into the improved PID control model, and the objective function value is calculated according to the output of the temperature drive model. Record the optimal objective function value in the population, denoted as and the corresponding PID control parameters, denoted as the best Kp, Ki, Kd coefficients;
[0031] S403. Enter the iterative loop, calculate the adaptation factor α value of the current iteration and the individual position diversity among populations, and update the positions of the surrogate individuals using the improved search strategy and the improved exploitation strategy;
[0032] S404. Calculate the fitness value of each surrogate individual based on the updated positions, compare the new positions with the old positions, retain the positions of the surrogate individuals with smaller fitness values, and update the global optimal solution of the current iteration population and the corresponding objective function value;
[0033] S405. Whether the current iteration number k is equal to the maximum iteration number K at this time. If so, output the global optimal solution of the current iteration population and parse it into the optimal combination of Kp, Ki, and Kd coefficients. Otherwise, return to execute S402.
[0034] Compared with the prior art, the advantages and positive effects of the present invention are as follows: The present invention uses the improved maternal optimization algorithm to intelligently tune the PID control parameters, enabling the temperature system to still achieve fast response in a non-linear and large-delay environment. By dynamically adjusting the Kp, Ki, and Kd parameters, overshoot and steady-state error are reduced, and at the same time, the system stabilization time is accelerated. The present invention realizes efficient and stable performance improvement during the process of optimizing the PID control parameters, providing an intelligent and high-precision optimization method for solving complex fermentation temperature control problems. This technology has broad application prospects and promotion value in the field of industrial automation control. Brief Description of the Drawings
[0035] Figure 1 is a flowchart of the PID-based microbial fermentation temperature control method.
[0036] Figure 2 is a flowchart of tuning the Kp, Ki, and Kd coefficients of the traditional PID control algorithm by the improved maternal optimization algorithm guided by the objective function.
[0037] Figure 3 is the optimization fitness value graph of the improved maternal optimization algorithm and the standard maternal optimization algorithm of the present invention.
[0038] Figure 4 is the tuning result graph of the Kp, Ki, and Kd coefficients of the improved maternal optimization algorithm of the present invention.
[0039] Figure 5 is the tuning result graph of the Kp, Ki, and Kd coefficients of the standard maternal optimization algorithm.
[0040] Figure 6 is the controlled function effect graph of the microbial fermentation temperature control. Detailed Embodiments
[0041] The above description is only an overview of the technical solution of this application. In order to be able to understand the technical means of this application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of this application more obvious and understandable, the specific embodiments of this application are specifically given below; in order to make the purpose, technical solution and advantages of this application clearer, the following will further describe this application in detail with reference to the drawings. The described embodiments should not be regarded as a limitation of this application. All other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of this application.
[0042] The embodiment of this application provides a method for controlling the temperature of microbial fermentation based on PID, as Figure 1 shown, the method includes:
[0043] S101. Construct a temperature control model for microbial fermentation. The temperature control model for microbial fermentation includes a temperature monitoring model, an improved PID control model, a temperature driving model, a temperature error model, and an objective function model;
[0044] S102. The improved PID control model includes a maternal optimization algorithm and an improved PID control algorithm; the improvement of the maternal optimization algorithm includes: S201. Dynamically improve the search strategy of the maternal optimization algorithm based on the historical search results of the maternal optimization algorithm; S202. Construct an individual position diversity strategy between populations to improve the development strategy of the maternal optimization algorithm, and the improved development strategy is segmented; the improved PID control algorithm includes guiding the improved maternal optimization algorithm through the objective function to tune the Kp, Ki, and Kd coefficients of the traditional PID control algorithm;
[0045] S103. Normalize the deviation value between the target temperature and the real-time temperature within the range of [0, 1] to obtain the normalized temperature deviation value between the real-time temperature and the target temperature;
[0046] S104. Input the normalized temperature deviation value into the improved PID control model, and output a temperature control signal after being adjusted by the improved PID control algorithm. The temperature control signal controls and adjusts the temperature of microbial fermentation through the temperature driving model, realizing precise and rapid adjustment of the temperature of microbial fermentation.
[0047] Specifically, the temperature control of microbial fermentation is in a closed-loop control mode. Among them, the temperature monitoring model monitors the temperature value of the closed environment of the microbial fermentation experiment in real time, inputs the temperature of the closed environment of the microbial fermentation experiment into the temperature error model, calculates the deviation value e(t) between the target temperature and the real-time temperature, normalizes the deviation value within the range of [0, 1], inputs the normalized temperature deviation value of the closed environment of the microbial fermentation experiment into the improved PID control model, optimizes the traditional PID control algorithm using the improved maternal optimization algorithm, uses the obtained optimal proportional coefficient, integral coefficient, and differential coefficient to regulate the temperature deviation of the closed environment of the microbial fermentation experiment, outputs the temperature control signal u(t) and inputs it into the temperature drive model, and the temperature drive model regulates the temperature of the closed environment of the microbial fermentation experiment; among them, the temperature drive model is a second-order inertia model, reflecting the corresponding relationship between the temperature of the closed environment of the microbial fermentation experiment and the temperature control signal u(t); the adjusted temperature is monitored through the temperature monitoring model and input into the temperature error model, and the temperature of the closed environment of the microbial fermentation experiment is continuously regulated through the improved PID control model until the temperature value of the closed environment of the microbial fermentation experiment reaches the target temperature.
[0048] Specifically, take the difference between the deviation value of the current target temperature and the real-time temperature and the set minimum deviation value, divided by the difference between the deviation value of the current target temperature and the real-time temperature and the set maximum deviation value, to normalize the deviation value of the target temperature and the real-time temperature within the range of [0, 1]; among them, the set minimum deviation value is 0.01, and the maximum deviation value is 10.
[0049] Specifically, for the improvement of the maternal optimization algorithm in S102, it is specifically to dynamically improve the search strategy of the maternal optimization algorithm based on the historical search results of the maternal optimization algorithm; among them, the historical search results are reflected by the fitness value of the current iteration and the fitness value of the previous iteration, design an adaptive factor α, and the mathematical model is:
[0050]
[0051] In the formula, α(k) is the value of the adaptive factor α at the k-th iteration, α max is the maximum value of the adaptive factor, α min is the minimum value of the adaptive factor, is the minimum fitness value of the k-th iteration, is the minimum fitness value of the (k - 1)-th iteration, N is the scale of the surrogate individuals of the improved maternal optimization algorithm, i = 1, 2, 3,..., N; introduce the adaptive factor into the search strategy of the maternal optimization algorithm, and improve the position update mathematical model of the original search strategy to obtain an improved search strategy, and the mathematical model is:
[0052]
[0053] where \(SBB\) is the set of the 20 agents with the lowest fitness rankings in the current iteration process, and \(SBB\) i,j is the position value of the \(j\)-th dimension of the \(i\)-th agent in the \(SBB\) set; is the position value of the \(j\)-th dimension of the best agent individual in the \(k\)-th iteration, is the position value of the \(j\)-th dimension of the \(i\)-th agent individual in the \(k\)-th iteration, is the updated position value of the \(j\)-th dimension of the \(i\)-th agent individual; \(rand\) is a random number between 0 and 1.
[0054] Specifically, for the improvement of the maternal optimization algorithm in S102, it is specifically to construct a strategy for the diversity of individual positions among populations to improve the exploitation strategy of the maternal optimization algorithm, and the improved exploitation strategy is segmented; among them, the strategy for the diversity of individual positions among populations is specifically: divide the search space \([ub j , lb j \) of the \(j\)-th dimension of the \(i\)-th agent individual into \(M\) equally spaced intervals Statistically count the number \(U\) of agent individuals in the \(m\)-th interval of the \(j\)-th dimension in the population j,m The probability \(p\) j,m , and the mathematical model is: Calculate the entropy of the agent individuals in the entire population in the \(j\)-th dimension, and the mathematical model is: \(H\) j reflects the overall position distribution complexity of the entire population in the \(j\)-th dimension. Take the weighted average of the distribution differences of all sub-populations to define the diversity of individual positions among the overall populations, and the mathematical model is: Take the average of the entropy values of all \(D\) dimensions to obtain the diversity of the entire agent population, which reflects the complexity of the distribution of the entire population in the multi-dimensional space; the strategy \(\sigma\) for the diversity of individual positions among populations pop The value range is determined by the number \(M\) of equally spaced intervals, and the range is \([0, \lg(M)]\).
[0055] Specifically, use the strategy for the diversity of individual positions among populations to improve the position update mathematical model of the original exploitation strategy of the maternal optimization algorithm. When the population diversity is low, enhance the exploration by introducing random perturbations to increase the randomness of position adjustment; when the population diversity is high, enhance the exploitation by reducing the amplitude of position adjustment to make the population search the current area more precisely, and the mathematical model is:
[0056]
[0057] In the formula, is the position value of the \(j\)-th dimension of the \(i\)-th agent individual in the \(k\)-th iteration, is the updated position value of the \(j\)-th dimension of the \(i\)-th agent individual, \(rand\) is a random number between 0 and 1, \(ub j is the upper bound of the position value of the \(j\)-th dimension of the agent individual, \(lb jis the lower bound of the j - th dimensional position value of the agent individual, K is the maximum number of iterations, is the average value of the positions of all agent individuals at the k - th iteration, rn is a very small value, and k is the current iteration number.
[0058] Specifically, the improved maternal optimization algorithm guided by the objective function is used to tune the Kp, Ki, and Kd coefficients of the traditional PID control algorithm. During the tuning process of the proportional coefficient, integral coefficient, and differential coefficient, the normalized temperature deviation value is simulated by a unit - step signal. The specific implementation steps are as follows Figure 2 shown, and the optimal Kp, Ki, Kd parameters obtained are as Figure 4 shown, Kp = 13.2365, Ki = 1.17048, Kd = 2.72867;
[0059] S401. Initialize the population, including: initializing the population size N of the agent individuals, the maximum number of iterations K, the upper bound ub and the lower bound lb of the agent individual positions; among them, the population size N means that there are N agent individuals, and correspondingly, there are N groups of Kp, Ki, and Kd coefficients of the PID control algorithm;
[0060] S402. Calculate the fitness value. For each agent individual in the population, use the corresponding coefficients of the PID control algorithm for the improved PID control model, input the unit - step signal into the improved PID control model, calculate the objective - function value according to the output of the temperature - driving model, record the optimal objective - function value in the population, denoted as and the corresponding PID control parameters, denoted as the optimal Kp, Ki, Kd coefficients;
[0061] S403. Enter the iterative loop, calculate the adaptation factor α value of the current iteration and the individual - position diversity among the population, and update the agent - individual positions using the improved search strategy and the improved exploitation strategy;
[0062] S404. Calculate the fitness value of each agent individual according to the updated position, compare the new position with the old position, retain the agent - individual position with a smaller fitness value, and update the global optimal solution of the current - iteration population and the corresponding objective - function value; S405. Whether the current iteration number k is equal to the maximum number of iterations K at this time. If so, output the global optimal solution of the current - iteration population and parse it into the optimal combination of Kp, Ki, Kd coefficients, otherwise return to execute S402.
[0063] Specifically, the objective - function value is denoted as the fitness value, and the mathematical model of the objective function J is:
[0064]
[0065] In the formula, tr is the response time.
[0066] Specifically, the optimal Kp, Ki, and Kd parameters are used for the improved PID control algorithm. The normalized temperature deviation value is input, and after being adjusted by the improved PID control algorithm, the temperature control signal u(t) is output and executed according to the mathematical model.
[0067]
[0068] In the formula, e(t) is the normalized temperature deviation value between the real-time temperature and the target temperature, and τ = 0, 1,..., t.
[0069] Specifically, the temperature drive model is obtained from the heat balance equation, the relationship between heat input and output, and the dynamic response principle. The temperature control signal u(t) is input to drive the temperature change, and its mathematical model in the time domain is:
[0070]
[0071] In the formula, T(t) is the temperature value of the closed environment of the microbial fermentation experiment at the t-th second, w n is the natural frequency, reflecting the dynamic response speed of the system, q u is the gain, describing the amplification factor of the temperature control signal on the temperature change, and u(t) is the temperature control signal.
[0072] Furthermore, the PID-based microbial fermentation temperature control method is simulated in Matlab and Simulink, including simulating the normalized temperature deviation value through a unit step signal to obtain the optimal Kp, Ki, and Kd parameters, and using the optimal Kp, Ki, and Kd parameters for the microbial fermentation temperature control model to obtain the microbial fermentation temperature control effect.
[0073] Furthermore, in Matlab, based on Figure 2 and the position update mathematical model of the maternal optimization algorithm, the program design of the improved maternal optimization algorithm is completed, including setting the population size N of the proxy individuals to 40, the maximum number of iterations K to 70, the upper bound ub of the proxy individual positions to the three-dimensional set {100, 10, 100}, and the lower bound lb to the three-dimensional set {0.001, 0, 0.001}. The positions of each proxy individual in the population are initialized using the random initialization method, and the objective function is mapped to the fitness function, with the objective function value recorded as the fitness function value. In Simulink, the temperature monitoring model, improved PID control model, temperature drive model, temperature error model, and objective function model of the microbial fermentation temperature control system are simulated. Among them, the temperature error model uses a unit step signal to simulate the normalized temperature deviation value, and the complex frequency domain mathematical model of the temperature drive model is used as the controlled function.
[0074] Further, perform Laplace transform on the time-domain mathematical model of the temperature-driven model with the initial condition being zero. The formula is: where s is the complex-frequency domain time value; after simplification, we get The transfer function of the microbial fermentation temperature control is: where q u is 4, w n is 1, and the controlled function is specifically: The controlled function reflects the effect of the control method of the present invention. Set the running time to 20 seconds and run the simulation model to obtain the effect diagram as Figures 3 to 6 shown.
[0075] Further, set the running time to 20 seconds and run the simulation model to obtain the effect diagram as Figures 3 to 6 shown, as Figure 3 , for the changes in the fitness values during the tuning process of the Kp, Ki, and Kd coefficients of the traditional PID control algorithm by the method of the present invention and the standard maternal optimization algorithm. According to the design of the objective function of the present invention, the smaller the fitness value, the more accurate the Kp, Ki, and Kd coefficients. It can be seen from Figure 1 that the fitness value of the method of the present invention tends to be stable when the number of iterations reaches 32 times, and the minimum fitness value is 0.628554; the fitness value of the standard maternal optimization algorithm tends to be stable when the number of iterations reaches 12 times, and the minimum fitness value is 0.834896. In comparison, the fitness value of the method of the present invention for the tuning process of the Kp, Ki, and Kd coefficients of the traditional PID control algorithm is smaller, indicating that the Kp, Ki, and Kd coefficients obtained by optimizing the method of the present invention have higher accuracy for the microbial fermentation temperature control; Figure 4 and Figure 5 are the tuning results of the Kp, Ki, and Kd coefficients of the traditional PID control algorithm by the method of the present invention and the standard maternal optimization algorithm. Input them into the improved PID control model, and output the temperature control signal to act on the complex-frequency domain mathematical model of the temperature-driven model to obtain Figure 6 the effect diagram of the controlled function.
[0076] As Figure 6As shown, the unit step signal simulates the normalized temperature deviation value, and the dynamic response comparison of the two control methods under the unit step input is output. The control method of MOA+PID shows a large overshoot phenomenon. The response value of the microbial fermentation temperature control quickly exceeds the target value (the maximum value is close to 1.5), and then obvious oscillations occur. The overshoot is large, which easily causes the temperature to exceed the safe range, affects the stability of the system, and takes a long time to gradually converge to the target value of 1. The settling time is long, showing a weak control effect. The response curve of the method of the present invention is smoother, the overshoot is very small, hardly exceeding the target value of 1, there is no obvious oscillation phenomenon, the curve quickly approaches the target value, and it stabilizes in a short time. The steady-state error is close to 0, and the control effect is significantly better than the traditional method.
Claims
1. A PID-based microbial fermentation temperature control method, characterized in that: Specifically include: S101, constructing a microbial fermentation temperature control model, wherein the microbial fermentation temperature control model includes a temperature monitoring model, an improved PID control model, a temperature driving model, a temperature error model and an objective function model; S102, the improved PID control model includes a parent optimization algorithm and an improved PID control algorithm; Improvements to the maternal optimization algorithm include: S201, dynamically improving the search strategy of the maternal optimization algorithm based on the historical search results of the maternal optimization algorithm; S202, improving the development strategy of the maternal optimization algorithm by constructing an individual position diversity strategy between populations, and the improved development strategy is a segmented type; the improved PID control algorithm includes adjusting the Kp, Ki and Kd coefficients of the traditional PID control algorithm by guiding the improved maternal optimization algorithm through the objective function; the improvement of the maternal optimization algorithm, the historical search results are reflected by the fitness value of the current iteration and the fitness value of the previous iteration, and the adaptive factor α is designed, and the mathematical model is: Where α(k) is the value of the kth iteration of the adaptive factor α, max is the maximum value of the adaptive factor, α min is the minimum value of the adaptive factor, is the minimum fitness value of the kth iteration, is the minimum fitness value of the k-1th iteration, N is the agent individual scale of the improved maternal optimization algorithm, i=1, 2, 3, ..., N; the adaptive factor is introduced into the search strategy of the maternal optimization algorithm, and the position update mathematical model of the original search strategy is improved to obtain an improved search strategy, and the mathematical model is: In the formula, SBB is the set of the bottom 20 agents in fitness ranking in the current iteration, SBB i,j is the position value of the jth dimension of the ith agent in the SBB set; is the position value of the j-th dimension of the best agent individual in the k-th iteration, is the position value of the j-th dimension of the i-th agent individual in the k-th iteration, is the updated position value of the jth dimension of the ith agent; rand is a random number between 0 and 1; The individual position diversity strategy among populations is specifically as follows: the i-th proxy individual j-dimensional search space [ub j , lb j ] is divided into M equally spaced intervals Count the number of agent individuals U in the mth interval of the jth dimension in the population j,m The probability p j,m , the mathematical model is: Where N is the population size, and the entropy of the entire population agent in the jth dimension is calculated. The mathematical model is: H j It reflects the overall position distribution complexity of the entire population in the jth dimension, takes the weighted average of the distribution differences of all sub-populations, and defines the position diversity of proxy individuals among the entire population. The mathematical model is: The entropy values of all D dimensions are averaged to obtain the diversity of the entire agent population, reflecting the complexity of the distribution of the entire population in multidimensional space; the individual position diversity strategy σ pop The value range of is determined by the number of equally spaced intervals M, which is in the range of [0, lg(M)]; Among them, the position update mathematical model of the original development strategy of the maternal optimization algorithm is improved by using the individual position diversity strategy among populations. The improved development strategy mathematical model is: In the formula, is the position value of the j-th dimension of the i-th agent individual in the k-th iteration, is the updated position value of the jth dimension of the ith agent, rand is a random number between 0 and 1, and ub j is the upper bound of the position value of the agent's j-th dimension, lb j is the lower bound of the position value of the agent's j-th dimension, K is the maximum number of iterations, is the average value of the individual positions of the agents in the kth iteration, rn is a minimum value, and k is the current iteration number; S103, normalizing the deviation value between the target temperature and the real-time temperature within the range of [0,1] to obtain a normalized temperature deviation value between the real-time temperature and the target temperature; S104, inputting the normalized temperature deviation value into the improved PID control model, outputting a temperature control signal after adjustment through the improved PID control algorithm, and the temperature control signal controls and adjusts the microbial fermentation temperature through the temperature drive model, thereby achieving accurate and rapid adjustment of the microbial fermentation temperature.
2. A PID-based microbial fermentation temperature control method according to claim 1, characterized in that: The temperature driving model in S101 controls the temperature of the closed environment of the microbial fermentation experiment. The temperature driving model is a second-order inertia model, which reflects the corresponding relationship between the temperature of the closed environment of the microbial fermentation experiment and the temperature control signal u(t); the adjusted temperature is monitored by the temperature monitoring model and input into the temperature error model, and the temperature of the closed environment of the microbial fermentation experiment is continuously controlled by the improved PID control model until the temperature value of the closed environment of the microbial fermentation experiment reaches the target temperature; the temperature driving model is obtained by the heat balance equation, the relationship between heat input and output, and the dynamic response principle, and the time domain mathematical model is: Where T(t) is the temperature of the closed environment of the microbial fermentation experiment at the tth second, w n is the natural frequency, reflecting the dynamic response speed of the system, q u is the gain, which describes the amplification factor of the temperature control signal to the temperature change, and u(t) is the temperature control signal.
3. A PID-based microbial fermentation temperature control method according to claim 2, characterized in that: The improved parent optimization algorithm guided by the objective function is used to adjust the Kp, Ki and Kd coefficients of the traditional PID control algorithm. In the process of adjusting the proportional coefficient, the integral coefficient and the differential coefficient, the normalized temperature deviation value is simulated by a unit step signal. The specific steps are as follows: S401, initializing the population, including: initializing the population size N and the maximum number of iterations K of the proxy individuals and the upper bound ub and lower bound lb of the proxy individual positions; wherein the population size N, that is, there are N proxy individuals, corresponds to N groups of Kp, Ki and Kd coefficients of the PID control algorithm; S402, calculate the fitness value, for each agent in the population, use the coefficient of the corresponding PID control algorithm to improve the PID control model, input the unit step signal into the improved PID control model, calculate the objective function value according to the temperature drive model output, and record the optimal objective function value in the population, which is recorded as and the corresponding PID control parameters are recorded as the optimal Kp, Ki, and Kd coefficients; S403, entering an iterative loop, calculating the adaptive factor α value of the current iteration and the individual position diversity among populations, and updating the agent individual position using an improved search strategy and an improved development strategy; S404: Calculate the fitness value of each agent according to the updated position, compare the new position with the old position, retain the agent position with the smaller fitness value, and update the global optimal solution of the current iterative population. and the corresponding objective function value; S405: Is the current number of iterations k equal to the maximum number of iterations K? If so, the global optimal solution of the current iteration population is Output, resolve to the best combination of Kp, Ki, Kd coefficients, otherwise return to execute S402.
Citation Information
Patent Citations
Lysozyme fermentation temperature control method based on LSTM-PID
CN115966267A
Temperature control optimization method for automatic tea dryer
CN118466626A