A method for adaptive control of fermentation process parameters

CN122923545APending Publication Date: 2026-10-16HENAN DIESEN LIQUOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611262611.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

常规的反馈控制虽具备一定的稳定性,但控制律参数往往难以根据系统演化程度进行调整,难以兼顾控制系统的响应速度与稳态精度

Benefits of technology

[0006]This invention, by calculating the local Lipschitz constant and combining a gated network with a Bayesian expert sub-model, can predict the future state trajectory and uncertainty range of the fermentation process, thus improving the accuracy of fermentation process modeling. At the control level, a time-varying weighted rolling optimization objective function positively correlated with the predicted Lipschitz constant is constructed. The outputs of the dual controllers are obtained by combining the dimensionless prediction confidence interval width and the feedback law, balancing predictive global optimization and feedback correction. Simultaneously, Shannon entropy is used to assess the uncertainty of expert structure selection, and the collaborative weights of the dual controllers are flexibly allocated accordingly: when the model determinism is high, predictive optimization control is emphasized to improve control accuracy; when uncertainty is high, feedback correction control is emphasized to ensure system safety. This improves the problems of large external disturbances and variable operating conditions during wine fermentation, enhances the stability, anti-interference ability, and accuracy of process parameter control, and ensures the final quality of fermented wine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122923545A_ABST
    Figure CN122923545A_ABST
Patent Text Reader

Abstract

The application provides a fermentation process parameter adaptive control method, which comprises the following steps: calculating a current local Lipschitz constant according to a fermentation real-time state variable and a control input sequence; outputting an activation weight probability distribution of a Bayesian expert sub-model through a gating network, weighting and combining each sub-model, and outputting a future time domain state trajectory, a prediction confidence interval and a prediction Lipschitz constant trajectory; constructing a time-varying weight rolling optimization objective function which is positively correlated with an error weight and a prediction Lipschitz constant, and solving to obtain a first controller output; obtaining a composite feedback gain adjustment factor by combining a confidence interval width and a local Lipschitz constant, and obtaining a second controller output through a feedback control law; calculating a Shannon entropy measurement expert structure selection uncertainty of the activation weight distribution, determining a cooperative weight according to the Shannon entropy measurement expert structure selection uncertainty, increasing the weight of the first controller when the entropy is reduced, otherwise increasing the weight of the second controller, and weighting and fusing the outputs of the two paths to generate a final control vector.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of wine fermentation, and in particular relates to an adaptive control method for fermentation process parameters. Background Technology

[0002] Wine fermentation is a system involving microbial growth, metabolism, and multiple biochemical reactions. During this process, the regulation of key parameters such as temperature, pressure, dissolved oxygen, and substrate or matrix concentration directly affects the yield and flavor quality of the final product. Conventional single-control strategies are ill-suited to adapting to the evolving characteristics of the system at each reaction cycle in such biological processes. When external environmental disturbances intervene or internal biochemical reaction conditions shift, traditional control methods often exhibit slow response or parameter oscillations, affecting the overall stability of the fermentation process and batch-to-batch consistency. For the aforementioned industrial processes, predictive control and feedback control are commonly used to improve the system's tracking performance. Predictive control largely relies on the accuracy of the established model; however, in the insufficiently stimulated regions of the fermentation system or during condition switching phases, the model is prone to mismatch. If rolling optimization is performed based on the predicted trajectory at these times, it may lead to system instability. While conventional feedback control possesses a certain degree of stability, the control law parameters are often difficult to adjust according to the system's evolution, making it difficult to balance the control system's response speed and steady-state accuracy. Furthermore, existing hybrid control schemes generally lack methods for measuring the uncertainty of expert structure selection. This results in limited effectiveness of predictive control when model prediction confidence is high, and difficulty in reasonably increasing the proportion of feedback control when confidence decreases. Therefore, designing a control method capable of real-time sensing of system local characteristics and predictive uncertainty, and achieving smooth collaborative scheduling among different control mechanisms to improve the control accuracy and anti-interference capability of the wine fermentation process, has become an urgent problem to be solved. Summary of the Invention

[0003] According to one aspect of the present invention, an adaptive control method for fermentation process parameters is proposed to improve the control accuracy and anti-interference ability of the wine fermentation process, comprising the following steps:

[0004] Based on the real-time acquired state variables and control input sequences of the fermentation process, the local Lipschitz constant at the current time point is calculated; using a gating network, the activation weights of each expert sub-model are calculated according to the state input to obtain the probability distribution; each expert sub-model is configured as a Bayesian structure and combined according to the activation weights, and is used to recursively predict the state trajectory, the corresponding prediction confidence interval, and the predicted Lipschitz constant trajectory in the future time domain, using the current state and the incremental sequence of control input to be optimized as input. Based on the state trajectory and the predicted Lipschitz constant trajectory, a time-varying weighted rolling optimization objective function is constructed, wherein the error weight coefficient in the time-varying weighted rolling optimization objective function is positively correlated with the predicted Lipschitz constant; by rolling the solution of the time-varying weighted rolling optimization objective function, the output vector of the first controller is obtained; based on the width of the predicted confidence interval and the local Lipschitz constant, the composite feedback gain adjustment factor is calculated, and combined with the preset feedback control law, the output vector of the second controller is calculated. Shannon entropy is calculated based on the probability distribution of the activation weights, and is used as a measure of the uncertainty in expert structure selection. Based on the measure, a collaborative weight coefficient is determined. When the Shannon entropy decreases, the weight of the first controller is increased, and vice versa. The output vectors of the first controller and the second controller are weighted and fused using the collaborative weight coefficient to generate the final control vector.

[0005] According to another aspect of the present invention, an adaptive control system for fermentation process parameters is proposed, comprising the following modules: The calculation module is used to calculate the local Lipschitz constant at the current time point based on the real-time acquired state variables of the fermentation process and the control input sequence; using a gating network, it calculates the activation weights of each expert sub-model according to the state input to obtain the probability distribution; each expert sub-model is configured as a Bayesian structure and combined according to the activation weights, and is used to recursively predict the state trajectory, the corresponding prediction confidence interval, and the predicted Lipschitz constant trajectory in the future time domain, using the current state and the incremental sequence of control input to be optimized as input. A construction module is used to construct a time-varying weighted rolling optimization objective function based on the state trajectory and the predicted Lipschitz constant trajectory, wherein the error weight coefficient in the time-varying weighted rolling optimization objective function is positively correlated with the predicted Lipschitz constant; the output vector of the first controller is obtained by solving the time-varying weighted rolling optimization objective function in a rolling manner; the composite feedback gain adjustment factor is calculated based on the width of the predicted confidence interval and the local Lipschitz constant, and the output vector of the second controller is calculated by combining it with a preset feedback control law; The generation module is used to calculate Shannon entropy based on the probability distribution of the activation weights, and use the Shannon entropy as a measure of the uncertainty of expert structure selection; determine the collaborative weight coefficient based on the measure, increase the weight of the first controller when the Shannon entropy decreases, and increase the weight of the second controller when the Shannon entropy increases; and use the collaborative weight coefficient to perform weighted fusion of the output vector of the first controller and the output vector of the second controller to generate the final control vector.

[0006] This invention, by calculating the local Lipschitz constant and combining a gated network with a Bayesian expert sub-model, can predict the future state trajectory and uncertainty range of the fermentation process, thus improving the accuracy of fermentation process modeling. At the control level, a time-varying weighted rolling optimization objective function positively correlated with the predicted Lipschitz constant is constructed. The outputs of the dual controllers are obtained by combining the dimensionless prediction confidence interval width and the feedback law, balancing predictive global optimization and feedback correction. Simultaneously, Shannon entropy is used to assess the uncertainty of expert structure selection, and the collaborative weights of the dual controllers are flexibly allocated accordingly: when the model determinism is high, predictive optimization control is emphasized to improve control accuracy; when uncertainty is high, feedback correction control is emphasized to ensure system safety. This improves the problems of large external disturbances and variable operating conditions during wine fermentation, enhances the stability, anti-interference ability, and accuracy of process parameter control, and ensures the final quality of fermented wine. Attached Figure Description

[0007] Figure 1 A flowchart of the first embodiment; Figure 2 This is a schematic diagram showing the local Lipschitz constant change over time during the fermentation process. Figure 3 This is a schematic diagram showing the change of activation weights of the expert sub-model over time. Detailed Implementation

[0008] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0009] In the first embodiment, the present invention proposes an adaptive control method for fermentation process parameters, such as... Figure 1 It includes the following steps: S1. Based on the real-time acquired state variables of the fermentation process and the control input sequence, calculate the local Lipschitz constant at the current time point; using a gating network, calculate the activation weights of each expert sub-model according to the state input to obtain the probability distribution; each expert sub-model is configured as a Bayesian structure and combined according to the activation weights, and is used to recursively predict the state trajectory, the corresponding prediction confidence interval, and the predicted Lipschitz constant trajectory in the future time domain, using the current state and the incremental sequence of control input to be optimized as input.

[0010] Temperature, pressure, and substrate concentration within the fermenter are collected as state variables, while the opening degree of the feed valve, the power of the temperature-controlled heat exchange actuator, and the opening degree of the exhaust valve or back pressure valve are collected as control input sequences. Missing value imputation and standardization preprocessing are performed on the collected time-series data to construct a state transition neural network composed of a multilayer perceptron. The `torch.autograd` function is used to calculate the Jacobian matrix of the state transition neural network under the current state and control inputs. Singular value decomposition is then performed on this Jacobian matrix, and the maximum singular value is extracted as an auxiliary estimate of local sensitivity. During online control execution, the local Lipschitz constant at the current time point is calculated according to the dimensionless ratio of the state difference vector to the input difference vector (described later). The maximum singular value is used for auxiliary verification or offline calibration of the local sensitivity trend. The curve showing the change of the local Lipschitz constant over time during the fermentation process is shown below. Figure 2 As shown.

[0011] A feedforward neural network with three fully connected layers was constructed as a gated network, using preprocessed fermentation state variables as input features. The hidden layers were activated using ReLU, and the number of neurons in the output layer matched the number of expert sub-models. The original logistic values ​​of the output layer were normalized, mapping the values ​​to the interval between 0 and 1, with a sum of 1, to obtain the activation weight probability distribution assigned to each expert sub-model. The activation weight curves of each expert sub-model over time are shown below. Figure 3 As shown.

[0012] Each expert sub-model is constructed as a Bayesian neural network, with Gaussian prior distributions assigned to the network weights. A stochastic variational inference algorithm is used to approximate the posterior distribution of the network. During the prediction phase, Monte Carlo sampling is employed to perform multiple forward propagations on each expert sub-model, generating multiple sets of state samples within the future prediction time domain. The mean and variance of the samples are calculated, and the mean of each expert is weighted and summed based on the activation weights output by the gating network to obtain the predicted state trajectory. The variance of each expert is weighted and summed, and the overall variance is calculated by combining the dispersion of the predicted mean. The prediction confidence interval is defined by adding or subtracting a preset multiple of the overall standard deviation based on the normal distribution characteristics, or by using the Monte Carlo sampling quantiles. At each discrete step size in the prediction time domain, the predicted state vector and predicted control input are substituted into a difference estimation rule consistent with online computation to obtain the predicted Lipschitz constant sequence. In implementations with explicit state transition neural networks, the maximum singular value of the Jacobian matrix can also be used to assist in verifying this sequence.

[0013] In an optional embodiment, calculating the local Lipschitz constant at the current time point based on the real-time acquired fermentation process state variables and control input sequence includes: The process state variable sequences of the current time step and the previous time step are collected to form a state difference vector, and the L2 norm is calculated after the state difference vector is dimensionless. Extract the sequence of control inputs at the corresponding time step to form an input difference vector, and calculate the L2 norm after dimensionless processing of the input difference vector; The quotient obtained by dividing the L2 norm of the state difference vector by the sum of the L2 norm of the input difference vector and a minimal positive constant is set as the local Lipschitz constant estimate at the current time point.

[0014] The sensor collects process state variables such as temperature, pressure, and matrix concentration in real time at the current time step k and the previous time step k-1 at a fixed sampling period. This fixed sampling period is preferably 1 to 5 minutes, for example, 3 minutes. These are denoted as follows: and Construct the state difference vector The extreme value normalization method is used to... Dimensionless processing is performed by dividing the data of each dimension of the vector by the maximum design measurement range of the corresponding state variable. For example, the temperature range is 0 to 40 degrees Celsius, the pressure range is 0 to 0.5 MPa, and the concentration range is 0 to 20 g / L. The L2 norm of the dimensionless state difference vector is then calculated. .

[0015] Extract the control inputs corresponding to the time step, such as the opening degree of the feed valve, the power of the temperature control heat exchange actuator, and the opening degree of the exhaust valve or back pressure valve, to form a sequence. and Calculate the input difference vector The vector is then dimensionless using the maximum output threshold of each actuator constraint, and the L2 norm is calculated. To avoid calculation errors caused by a denominator of 0, a very small positive integer is pre-input into the control algorithm. To the denominator, the preferred range of values ​​for this minimal positive number is... to For example, Through formula The calculated quotient The specific value is set as the local Lipschitz constant estimate representing the current nonlinearity of fermentation. When there is a response lag in the fermentation process, the control input difference vector and the state difference vector corresponding to the preset lag step size are paired for calculation. The obtained local Lipschitz constant estimate is then processed by moving average and upper and lower limit truncation to reduce instantaneous misjudgment caused by natural fermentation fluctuations or external disturbances.

[0016] In an optional embodiment, the step of using a gating network to calculate the activation weights of each expert sub-model based on the state input to obtain the probability distribution includes: The real-time fermentation process status data, including temperature, pressure, and substrate concentration, is input into the gated network, which outputs a set of hidden feature vectors. The Softmax function is used to map the hidden feature vector set to the activation probability distribution of each expert sub-model. The activation weight of any expert sub-model is the power of the natural constant with the corresponding real value of the hidden feature as the exponent, divided by the sum of the power values ​​of all expert sub-models. The real value of the hidden feature is the real value feature term in the hidden feature vector set corresponding to each expert sub-model.

[0017] N pre-configured Bayesian structural expert sub-models, trained for the fermentation initiation, logarithmic growth, and decline phases respectively, are used. Each Bayesian structural expert sub-model contains a Bayesian neural network structure, including an input layer, multiple Bayesian hidden layers, and an output layer. The input consists of a sequence of historical process state variables and a control input sequence, and the output is a predicted state vector for the current and future time steps. The preferred value of N is 3 to 5, for example, 3. Real-time multi-dimensional fermentation state data, such as temperature of 32.5 degrees Celsius, pressure of 0.12 MPa, and substrate concentration of 12.3 g / L, is standardized for mean and variance and then input into a gated network consisting of two fully connected neural networks. This gated network includes a sequentially connected input layer, hidden layer, and output layer. The input is the standardized multi-dimensional fermentation state data, and the output is the real values ​​of the hidden features corresponding to each expert sub-model. The ReLU function is preferably used as the activation function for the hidden layers. After calculation, a set of hidden feature vectors of dimension N is generated at the output layer, containing N real values ​​of hidden features, denoted as N(N, N ... .

[0018] The Softmax function is used to perform probability distribution mapping on the feature vector set output above to calculate weight allocation. In actual implementation, for any expert sub-model i, the activation weights are calculated. This ensures that the weights of all expert sub-models are mapped to a closed interval between 0 and 1, and their sum equals 1. For example, when the set of real values ​​of hidden features given by the output layer is z=[1.2,-0.5,0.3], the probability distribution calculated by the Softmax algorithm, i.e. the activation weights of each model, is approximately w=[0.65,0.12,0.23]. This weight array is used to indicate the confidence combination ratio of the expert models at each corresponding stage under the current fermentation biochemical state.

[0019] S2, based on the state trajectory and the predicted Lipschitz constant trajectory, a time-varying weighted rolling optimization objective function is constructed, wherein the error weight coefficient in the time-varying weighted rolling optimization objective function is positively correlated with the predicted Lipschitz constant; by rolling the solution of the time-varying weighted rolling optimization objective function, the output vector of the first controller is obtained; based on the width of the predicted confidence interval and the local Lipschitz constant, the composite feedback gain adjustment factor is calculated, and combined with the preset feedback control law, the output vector of the second controller is calculated.

[0020] A model framework for model predictive control is constructed using CasaADi. The rolling optimization objective function is set as the sum of the quadratic penalty of the tracking error of the state trajectory in the prediction time domain and the quadratic penalty of the control increment. When setting the state error penalty weight matrix, the basic diagonal weight matrix is ​​multiplied by an adjustment scalar. This adjustment scalar is obtained by adding the value of the corresponding time step in the predicted Lipschitz constant sequence to a preset baseline constant, achieving a positive correlation between the error weight coefficient and the predicted Lipschitz constant. This increases the penalty for state deviation during the fermentation stage, when the system is highly nonlinear and sensitive. During the rolling optimization solution process, the candidate control input increment sequences are progressively superimposed to obtain the candidate control input sequence. The candidate control input sequence and the current fermentation state are then input into the Bayesian expert prediction model to recursively generate the future state trajectory that changes with the candidate control input, thus forming a closed-loop relationship between the state error cost and the control variable to be optimized.

[0021] The safety constraints of the fermentation process, namely the upper and lower limits of temperature, pressure, and substrate concentration, as well as the limits on the opening of the feed valve, the power of the temperature control heat exchanger actuator, the opening of the exhaust valve or back pressure valve, and the rate of change of the actuator, are set as inequality constraints. The objective function and the constraints are encapsulated as a planning problem. An interior-point solver is called to perform iterative optimization calculations to find the optimal control input sequence that minimizes the objective function in the prediction time domain. The control vector of the first time step in this sequence is extracted as the current output vector of the first controller, which is also the model predictive controller.

[0022] The calculated upper and lower limits of the predicted confidence interval are subtracted to obtain the interval width difference vector. This vector is then dimensionlessly processed according to the range of each state variable or a preset normalization scale before calculating the L2 norm. Next, a power value is calculated with the natural constant as the base and the product of the preset positive constant and the L2 norm as the exponent. The sum of the product of the number 1, the square of the local Lipschitz constant at the current time point, and the preset dimensionless adjustment coefficient is used as the denominator. This power value is divided by the denominator and then limited according to preset upper and lower gain limits to obtain a dimensionless composite feedback gain adjustment factor. This composite feedback gain adjustment factor is not limited to the range of 0 to 1 and is used to increase the feedback correction strength when prediction uncertainty increases and to suppress excessive feedback gain to reduce control oscillation risk when local sensitivity is high. The preset feedback control law uses a proportional-integral-derivative (PID) control algorithm. Using an instantiated PID controller, the initial PID gain parameters of the controller are multiplied by the composite feedback gain adjustment factor, and then limited within the allowable range of the actuator. The deviation between the current fermentation state setpoint and the actual value is input into the PID controller after parameter adjustment, and the output vector of the second controller is calculated, providing conservative and stable bottom-line control when the model uncertainty is high.

[0023] In an optional embodiment, a time-varying weighted rolling optimization objective function is constructed based on the state trajectory and the predicted Lipschitz constant trajectory, wherein the error weight coefficients in the time-varying weighted rolling optimization objective function are positively correlated with the predicted Lipschitz constant; the output vector of the first controller is obtained by rollingly solving the time-varying weighted rolling optimization objective function, including: The time-varying weighted rolling optimization objective function is constructed, wherein the value of the time-varying weighted rolling optimization objective function is the sum of the error cost and control cost of each future step within the prediction time domain length, and the time-varying error weight coefficient is the sum of the prediction Lipschitz constant and the dimensionless preset positive constant of the corresponding future step. Under the conditions of satisfying input constraints and state constraints, the control input increment vector sequence is obtained by minimizing the objective function value of the time-varying weight rolling optimization. The first term of the control input increment vector sequence is inversely dimensionless and added to the actual absolute control input vector of the previous time step, and then used as the output vector of the first controller.

[0024] For the first controller, which acts as the predictive controller, the prediction time domain length for rolling optimization is preset. The preferred time step length is 10 to 30 time steps, for example, 15 time steps. When constructing the objective function in this time domain, the time-varying error weighting coefficients are determined. This coefficient is used to predict the local Lipschitz constant. Compared with the dimensionless preset reference positive constant The preferred value is obtained by adding 10.0 together, that is In the future time period of nonlinear enhancement, the penalty weight for state tracking of the control objective is amplified. The single-step cost of the objective function is calculated as the sum of the error cost and the control cost, where the error cost equals... Multiply by dimensionless future prediction state Reference trajectory with the set target The squared L2 norm of the deviation, the control cost is calculated by multiplying the constant control weight coefficient R by the control input increment. The L2 norm squared is used to construct the constant control weight coefficient R, which is preferably between 0.1 and 1.0, for example, 0.5.

[0025] After constructing the objective function, the planar solver is invoked. Under the conditions of satisfying valve opening limits (0% to 100%), rated power constraints of the temperature control heat exchanger actuator, and opening constraints of the exhaust valve or back pressure valve, the control input increment sequence that minimizes the total cost function is iteratively calculated. After convergence, the first-step control signal of this optimal increment sequence is extracted. Multiply the control signal by the corresponding actuator range recovery dimension, and then combine it with the absolute control vector actually output at the previous time step. Superimpose to generate the output vector of the first controller at the current time step. For example, the feed valve opening is 45.0%, the temperature control heat exchange actuator power is 2.5kW, and the exhaust valve or back pressure valve opening is 18.0%.

[0026] In an optional embodiment, the step of calculating the composite feedback gain adjustment factor based on the width of the predicted confidence interval and the local Lipschitz constant, and calculating the output vector of the second controller in combination with a preset feedback control law, includes: Calculate the difference vector between the upper and lower boundaries of the prediction confidence interval output by the Bayesian structure, and after performing dimensionless processing on the difference vector according to the range corresponding to each state variable or the preset normalization scale, calculate the L2 norm of the dimensionless difference vector. Calculate the power value with the natural constant as the base and the product of the preset positive constant and the second norm as the exponent. Use the sum of the product of the number 1 and the square of the local Lipschitz constant at the current time point and the preset dimensionless adjustment coefficient as the denominator. Divide the power value by the denominator and perform amplitude limiting according to the preset upper limit and the preset lower limit of gain to obtain the composite feedback gain adjustment factor, wherein the preset positive constant is the dimensionless adjustment constant.

[0027] To calculate the stochastic uncertainty of the underlying prediction model of the first controller, the 95% confidence interval of the predicted trajectory obtained by Monte Carlo forward random sampling in the Bayesian expert network is extracted. The Dropout method is preferred, performing 50 independent samplings. The upper boundary vector of the current step prediction state is then extracted. With the lower boundary vector First, calculate the difference vector between the two, and then perform dimensionless processing according to the range corresponding to the state variables such as temperature, pressure, and matrix concentration or a preset normalized scale. Then, calculate the L2 norm of the dimensionless difference vector. This variable serves as an evaluation of the dispersion of local predictions in the model. A preset dimensionless adjustment constant γ is input, preferably between 0.1 and 2.0, for example, 0.5, based on the fundamental norm of the state variables. An exponential term representing the confidence level is then calculated. .

[0028] Combined with the local Lipschitz constant at the current time point Using formula The dimensionless composite feedback gain adjustment factor was calculated. Where η is a preset dimensionless adjustment coefficient. and These are the preset lower gain limit and the preset upper gain limit, respectively. This is a dimensionless value. It will be used as a gain multiplier in the feedback loop of the second controller to increase the feedback loop correction strength when the prediction uncertainty increases, and to suppress excessive feedback and prevent control oscillation when the local Lipschitz constant is large.

[0029] S3, calculate Shannon entropy based on the probability distribution of the activation weights, and use the Shannon entropy as a measure of the uncertainty of expert structure selection; determine the collaborative weight coefficient based on the measure, increase the weight of the first controller when the Shannon entropy decreases, and increase the weight of the second controller when the Shannon entropy increases; use the collaborative weight coefficient to perform weighted fusion of the output vector of the first controller and the output vector of the second controller to generate the final control vector.

[0030] The activation weight probability values ​​of each expert sub-model output by the gating network are used as input. The Shannon entropy scalar value is obtained by calculating the negative sum of the products of the probability values ​​and their corresponding natural logarithms. The larger the Shannon entropy value, the more the gating network tends to average the selection of each expert model, indicating that the current fermentation condition exceeds the generalization range of a single expert model. Therefore, this entropy value is used as a measure of the uncertainty in the selection of expert structure.

[0031] The collaborative weighting coefficients are determined using an exponential decay function. The negative Shannon entropy value is used as the exponent of the natural constant to calculate the first controller weighting coefficient. Then, the first controller weighting coefficient is subtracted from 1 to obtain the second controller weighting coefficient, ensuring that the sum of the two weighting coefficients is 1. This ensures that the first controller weight automatically increases when the Shannon entropy decreases, i.e., the model confidence is high. The first controller output vector is multiplied by its first weighting coefficient, and the second controller output vector is multiplied by its second weighting coefficient. The two product vectors are then added element-wise. The resulting final control vector is transmitted to the field programmable logic controller (PLC) via the Modbus TCP transmission control protocol to drive the fermenter's feed valve, temperature control heat exchange actuator, and exhaust valve or back pressure valve.

[0032] In an optional embodiment, calculating the Shannon entropy based on the probability distribution of the activation weights, and using the Shannon entropy as a measure of uncertainty in expert structure selection, includes: The Shannon entropy is obtained by summing the negatives of the product of the activation weights and the corresponding natural logarithms of each expert sub-model. When the activation weight of any expert sub-model tends to 0, the product of the activation weight and the corresponding natural logarithm is set to 0.

[0033] To measure the confidence of the gating network in classifying the current fermentation stage and the uncertainty in expert structure selection, the activation weight vectors of each expert sub-model output by the gating network are received. And the Shannon entropy algorithm is used for calculation. Through the formula... The Shannon entropy is calculated, and a minimum threshold is set in the specific implementation. This threshold is preferably... When the weights of a certain sub-model When the product term is less than the threshold and approaches 0, the product term will be... The result of the operation is assigned to 0 to avoid problems such as no solution for the logarithm or data overflow during the calculation process.

[0034] For example, with three expert models configured, if the activation weights of the three sub-models calculated by the gating network are 0.9, 0.05, and 0.05 respectively, the current Shannon entropy H = -(0.9 × ln(0.9) + 2 × 0.05 × ln(0.05)) ≈ 0.394. This lower Shannon entropy indicates that the current fermentation stage of the system has a high degree of certainty. Conversely, if the weights assigned by the gating network during the fermentation phase transition are 0.33, 0.33, and 0.34, the calculated Shannon entropy H will increase to near the extreme value of 1.098. At this point, the higher Shannon entropy indicates that there is a divergence in the predictions of the sub-models, prompting the top-level collaborative mechanism to reduce the weight of the prediction model.

[0035] In an optional embodiment, determining the collaborative weighting coefficient based on the metric, increasing the weight of the first controller when the Shannon entropy decreases, and increasing the weight of the second controller when the Shannon entropy increases; and using the collaborative weighting coefficient to weight and fuse the output vectors of the first and second controllers to generate the final control vector, includes: Calculate the collaborative weighting coefficient, which is the product of the negative preset positive proportionality coefficient of the natural constant and the Shannon entropy raised to the power of the product. The final control vector is obtained by multiplying the collaborative weight coefficient by the output vector of the first controller, adding 1 to the result of multiplying the difference between the collaborative weight coefficient and the output vector of the second controller. The corresponding components in the final control vector are sent to the corresponding actuators to adjust the opening of the feed valve, the power of the temperature control heat exchange actuator, and the opening of the exhaust valve or back pressure valve during the fermentation process.

[0036] When calculating the final output, the Shannon entropy H(w) obtained from the activation weight probability distribution of each model is extracted, and the co-weight coefficients are calculated in combination with a preset negative exponential smooth decay function. , where k is a proportionality coefficient for adjusting the decay rate, preferably between 1.0 and 5.0, for example, 2.0. In actual operation, when the Shannon entropy is small, such as H=0.1, the calculated α is approximately 0.818, indicating that the system mainly relies on the first controller at this time; conversely, if the fermentation state changes and the Shannon entropy becomes high, such as H=1.0, then α decreases exponentially to approximately 0.135, increasing the weight of the second controller.

[0037] After completing the coefficient calculation, use the formula The first controller outputs the control vector. With the output vector of the second controller Perform weighted fusion. Assume that after fusion calculation, the component values ​​of the resulting control vector are... The result is converted and output through a digital-to-analog conversion module. The first channel generates a corresponding standard control current to drive the feed valve to adjust the opening to 65.3%. The second channel controls the temperature control heat exchange actuator to output 3.2kW power for temperature control through pulse width modulation command. The third channel drives the exhaust valve or back pressure valve to adjust the opening to 18.0% to maintain the fermenter pressure within a safe range.

[0038] In the second embodiment, the present invention also proposes an adaptive control system for fermentation process parameters, comprising the following modules: The calculation module is used to calculate the local Lipschitz constant at the current time point based on the real-time acquired state variables of the fermentation process and the control input sequence; using a gating network, it calculates the activation weights of each expert sub-model according to the state input to obtain the probability distribution; each expert sub-model is configured as a Bayesian structure and combined according to the activation weights, and is used to recursively predict the state trajectory, the corresponding prediction confidence interval, and the predicted Lipschitz constant trajectory in the future time domain, using the current state and the incremental sequence of control input to be optimized as input. A construction module is used to construct a time-varying weighted rolling optimization objective function based on the state trajectory and the predicted Lipschitz constant trajectory, wherein the error weight coefficient in the time-varying weighted rolling optimization objective function is positively correlated with the predicted Lipschitz constant; the output vector of the first controller is obtained by solving the time-varying weighted rolling optimization objective function in a rolling manner; the composite feedback gain adjustment factor is calculated based on the width of the predicted confidence interval and the local Lipschitz constant, and the output vector of the second controller is calculated by combining it with a preset feedback control law; The generation module is used to calculate Shannon entropy based on the probability distribution of the activation weights, and use the Shannon entropy as a measure of the uncertainty of expert structure selection; determine the collaborative weight coefficient based on the measure, increase the weight of the first controller when the Shannon entropy decreases, and increase the weight of the second controller when the Shannon entropy increases; and use the collaborative weight coefficient to perform weighted fusion of the output vector of the first controller and the output vector of the second controller to generate the final control vector.

[0039] The above description represents the preferred embodiments of the present invention. It should be noted that, for those skilled in the art, various improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. An adaptive control method for fermentation process parameters, characterized in that, include: Based on the real-time acquired state variables and control input sequence of the fermentation process, the local Lipschitz constant at the current time point is calculated; Using a gating network, the activation weights of each expert sub-model are calculated based on the state input to obtain the probability distribution; Each expert sub-model is configured as a Bayesian structure and combined according to the activation weights. It is used to recursively predict the future state trajectory, the corresponding prediction confidence interval, and the prediction Lipschitz constant trajectory in the time domain, taking the current state and the incremental sequence of the control input to be optimized as inputs. Based on the state trajectory and the predicted Lipschitz constant trajectory, a time-varying weighted rolling optimization objective function is constructed, wherein the error weight coefficient in the time-varying weighted rolling optimization objective function is positively correlated with the predicted Lipschitz constant; by rolling the solution of the time-varying weighted rolling optimization objective function, the output vector of the first controller is obtained; based on the width of the predicted confidence interval and the local Lipschitz constant, the composite feedback gain adjustment factor is calculated, and combined with the preset feedback control law, the output vector of the second controller is calculated. Shannon entropy is calculated based on the probability distribution of the activation weights, and the Shannon entropy is used as a measure of the uncertainty in expert structure selection. Based on the metric, a collaborative weighting coefficient is determined. When the Shannon entropy decreases, the weight of the first controller is increased; conversely, the weight of the second controller is increased. The collaborative weighting coefficient is used to weight and fuse the output vectors of the first controller and the second controller to generate the final control vector.

2. The method according to claim 1, characterized in that, The calculation of the local Lipschitz constant at the current time point based on the real-time acquired state variables of the fermentation process and the control input sequence includes: The process state variable sequences of the current time step and the previous time step are collected to form a state difference vector, and the L2 norm is calculated after the state difference vector is dimensionless. Extract the sequence of control inputs at the corresponding time step to form an input difference vector, and calculate the L2 norm after dimensionless processing of the input difference vector; The quotient obtained by dividing the L2 norm of the state difference vector by the sum of the L2 norm of the input difference vector and a minimal positive constant is set as the local Lipschitz constant estimate at the current time point.

3. The method according to claim 1, characterized in that, The process of using a gated network to calculate the activation weights of each expert sub-model based on the state input to obtain the probability distribution includes: The real-time fermentation process status data, including temperature, pressure, and substrate concentration, is input into the gated network, which outputs a set of hidden feature vectors. The Softmax function is used to map the hidden feature vector set to the activation probability distribution of each expert sub-model. The activation weight of any expert sub-model is the power of the natural constant with the corresponding real value of the hidden feature as the exponent, divided by the sum of the power values ​​of all expert sub-models. The real value of the hidden feature is the real value feature term in the hidden feature vector set corresponding to each expert sub-model.

4. The method according to claim 1, characterized in that, Based on the state trajectory and the predicted Lipschitz constant trajectory, a time-varying weighted rolling optimization objective function is constructed, wherein the error weight coefficient in the time-varying weighted rolling optimization objective function is positively correlated with the predicted Lipschitz constant. The output vector of the first controller is obtained by solving the time-varying weighted rolling optimization objective function, including: The time-varying weighted rolling optimization objective function is constructed, wherein the value of the time-varying weighted rolling optimization objective function is the sum of the error cost and control cost of each future step within the prediction time domain length, and the time-varying error weight coefficient is the sum of the prediction Lipschitz constant and the dimensionless preset positive constant of the corresponding future step. Under the conditions of satisfying input constraints and state constraints, the control input increment vector sequence is obtained by minimizing the objective function value of the time-varying weight rolling optimization. The first term of the control input increment vector sequence is inversely dimensionless and added to the actual absolute control input vector of the previous time step, and then used as the output vector of the first controller.

5. The method according to claim 1, characterized in that, The calculation of the composite feedback gain adjustment factor based on the width of the predicted confidence interval and the local Lipschitz constant, and the calculation of the output vector of the second controller in conjunction with a preset feedback control law, includes: Calculate the difference vector between the upper and lower boundaries of the prediction confidence interval output by the Bayesian structure, and after performing dimensionless processing on the difference vector according to the range corresponding to each state variable or the preset normalization scale, calculate the L2 norm of the dimensionless difference vector. Calculate the power value with the natural constant as the base and the product of the preset positive constant and the second norm as the exponent. Use the sum of the product of the number 1 and the square of the local Lipschitz constant at the current time point and the preset dimensionless adjustment coefficient as the denominator. Divide the power value by the denominator and perform amplitude limiting according to the preset upper limit and the preset lower limit of gain to obtain the composite feedback gain adjustment factor, wherein the preset positive constant is the dimensionless adjustment constant.

6. The method according to claim 1, characterized in that, The step of calculating Shannon entropy based on the probability distribution of the activation weights, and using Shannon entropy as a measure of uncertainty in expert structure selection, includes: The Shannon entropy is obtained by summing the negatives of the product of the activation weights and the corresponding natural logarithms of each expert sub-model. When the activation weight of any expert sub-model tends to 0, the product of the activation weight and the corresponding natural logarithm is set to 0.

7. The method according to claim 1, characterized in that, The collaborative weight coefficient is determined based on the metric, and the weight of the first controller is increased when the Shannon entropy decreases, and the weight of the second controller is increased when the Shannon entropy increases. The output vectors of the first controller and the second controller are weighted and fused using the collaborative weighting coefficients to generate the final control vector, including: Calculate the collaborative weighting coefficient, which is the product of the negative preset positive proportionality coefficient of the natural constant and the Shannon entropy raised to the power of the product. The final control vector is obtained by multiplying the collaborative weight coefficient by the output vector of the first controller, adding 1 to the result of multiplying the difference between the collaborative weight coefficient and the output vector of the second controller. The corresponding components in the final control vector are sent to the corresponding actuators to adjust the opening of the feed valve, the power of the temperature control heat exchange actuator, and the opening of the exhaust valve or back pressure valve during the fermentation process.

8. An adaptive control system for fermentation process parameters, characterized in that, include: The calculation module is used to calculate the local Lipschitz constant at the current time point based on the real-time acquired state variables of the fermentation process and the control input sequence. Using a gating network, the activation weights of each expert sub-model are calculated based on the state input to obtain the probability distribution; Each expert sub-model is configured as a Bayesian structure and combined according to the activation weights. It is used to recursively predict the future state trajectory, the corresponding prediction confidence interval, and the prediction Lipschitz constant trajectory in the time domain, taking the current state and the incremental sequence of the control input to be optimized as inputs. A construction module is used to construct a time-varying weighted rolling optimization objective function based on the state trajectory and the predicted Lipschitz constant trajectory, wherein the error weight coefficient in the time-varying weighted rolling optimization objective function is positively correlated with the predicted Lipschitz constant; the output vector of the first controller is obtained by solving the time-varying weighted rolling optimization objective function in a rolling manner; the composite feedback gain adjustment factor is calculated based on the width of the predicted confidence interval and the local Lipschitz constant, and the output vector of the second controller is calculated by combining it with a preset feedback control law; The generation module is used to calculate the Shannon entropy based on the probability distribution of the activation weights, and to use the Shannon entropy as a measure of the uncertainty of expert structure selection. Based on the metric, a collaborative weighting coefficient is determined. When the Shannon entropy decreases, the weight of the first controller is increased; conversely, the weight of the second controller is increased. The collaborative weighting coefficient is used to weight and fuse the output vectors of the first controller and the second controller to generate the final control vector.

9. The system according to claim 8, characterized in that, The calculation of the local Lipschitz constant at the current time point based on the real-time acquired state variables of the fermentation process and the control input sequence includes: The process state variable sequences of the current time step and the previous time step are collected to form a state difference vector, and the L2 norm is calculated after the state difference vector is dimensionless. Extract the sequence of control inputs at the corresponding time step to form an input difference vector, and calculate the L2 norm after dimensionless processing of the input difference vector; The quotient obtained by dividing the L2 norm of the state difference vector by the sum of the L2 norm of the input difference vector and a minimal positive constant is set as the local Lipschitz constant estimate at the current time point.

10. The system according to claim 8, characterized in that, The process of using a gated network to calculate the activation weights of each expert sub-model based on the state input to obtain the probability distribution includes: The real-time fermentation process status data, including temperature, pressure, and substrate concentration, is input into the gated network, which outputs a set of hidden feature vectors. The Softmax function is used to map the hidden feature vector set to the activation probability distribution of each expert sub-model. The activation weight of any expert sub-model is the power of the natural constant with the corresponding real value of the hidden feature as the exponent, divided by the sum of the power values ​​of all expert sub-models. The real value of the hidden feature is the real value feature term in the hidden feature vector set corresponding to each expert sub-model.