A method and system for optimizing control of a beer fermentation apparatus
Patent Information
- Application Number
- CN202611451261.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-11-03
AI Technical Summary
Existing beer fermentation control methods struggle to quickly identify the growth dynamics of microbial communities, resulting in slow system response to minor state fluctuations and an inability to maintain optimal fermentation conditions. Furthermore, existing predictive optimization control methods are computationally burdensome, cannot effectively utilize historical control experience, and are unable to cope with complex operating conditions and environmental disturbances.
By acquiring the state parameters of the fermentation unit, a phase space trajectory vector is constructed. Data clusters are generated based on topological similarity clustering. A predictive sub-model is established, high-value control experience is extracted and encapsulated into a high-gain control paradigm. Compensation instructions are generated using parameterized correction operators. Gradient backpropagation is then used to fine-tune the process in conjunction with the actual sugar content change trajectory, eliminating inefficient control paradigms and achieving lightweight compensation calculation and continuous iterative optimization.
It improves the long-term operational stability and output efficiency of the fermentation process, enhances the response speed and strategy matching accuracy of the fermentation device, and solves the problems of delay and inefficiency of traditional control methods under complex operating conditions.
Smart Images

Figure CN123029803A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of control, and in particular relates to an optimized control method and system for a beer fermentation apparatus. Background Technology
[0002] Industrial fermentation is essentially a time-varying biochemical reaction system, where state parameters such as temperature, pressure, and sugar content within the reactor are constantly interacting and evolving. Traditional fermentation control relies heavily on empirical settings or conventional feedback control strategies. These methods struggle to identify the growth kinetics of microbial communities, resulting in slow system responses to minor fluctuations and difficulty in maintaining optimal fermentation conditions, thus limiting product conversion rates and batch stability. Data-driven and model-predictive intelligent control schemes are gradually becoming the mainstream trend in fermentation optimization. Faced with numerous parallel-operating fermentation units in modern large-scale production workshops, how to quickly extract reliable features from massive amounts of monitoring data to guide global optimization control has become a common technical challenge that urgently needs to be overcome in the industry.
[0003] Existing predictive optimization control methods generally suffer from excessive computational burden and low experience reuse rates when dealing with concurrent operation of multiple fermentation units and complex alternating operating conditions. These methods typically require real-time, computationally intensive online model derivation and command optimization for each independent control cycle. This computational mode, lacking a memory mechanism, not only easily leads to delays in the issuance of control commands but also causes the system to perform tedious repetitive calculations when facing similar operating conditions that have repeatedly occurred in historical cycles. It fails to transform the potential commonalities in state among multiple devices and successful historical control experience into reusable assets. Most existing control systems lack the ability to extract, match, and correct high-gain control strategies in a closed-loop manner. When unexpected disturbances occur in the fermentation environment or reactor characteristics drift over the life cycle, the rigid optimization mode cannot be agilely corrected by incorporating real-time state deviations, nor does it possess a self-evolutionary mechanism for weeding out inferior historical strategies. Therefore, there is an urgent need to explore a novel fermentation control architecture that can integrate state evolution patterns across units, establish an intelligent cache and fast retrieval mechanism for historical excellent control experience, and break down the barrier between control real-time performance and optimization accuracy through lightweight compensation calculation and continuous iterative evolution in practical applications. Summary of the Invention
[0004] To improve the long-term operational stability and production efficiency of the fermentation process, this disclosure provides an optimized control method and system for a beer fermentation apparatus.
[0005] In a first aspect, embodiments of this disclosure provide an optimized control method for a beer fermentation apparatus, comprising the following steps: The state parameters of the fermentation unit are obtained to construct the phase space trajectory vector. The fermentation unit is clustered based on topological similarity to generate data clusters and a prediction sub-model is generated for each data cluster. The prediction sub-model uses control commands and state parameters as input variables to predict future sugar content change data. The prediction sub-model is used to perform forward extrapolation and quantify the expected control gain of the historical control command sequence within the data cluster. The historical control instruction sequence with expected control gain greater than the first threshold is used as the basic instruction. The initial state domain in which the historical control instruction sequence is executed is associated as the trigger state domain, and a parameterized correction operator is associated. The sequence is encapsulated into a high-gain control paradigm and stored in the cache space. When a target fermentation unit is received for control, the current state feature is extracted, and the divergence between the current state feature and the trigger state domain is calculated to match the target high-gain control paradigm with a divergence less than the second threshold. The parameterized correction operator in the target high-gain control paradigm and the deviation vector between the current state feature and the trigger state domain are used to generate a compensation command. The compensation command is superimposed with the basic command to calculate and output a control command. After the control command is executed, the control effect error is calculated based on the actual sugar content change trajectory and the target sugar content change trajectory. The differentiable loss is calculated based on the predicted sugar content change trajectory and the target sugar content change trajectory. The corresponding parameterized correction operator is fine-tuned by gradient backpropagation. Based on the historical error record, high-gain control paradigms with scores below the third threshold are periodically eliminated.
[0006] Secondly, this disclosure also provides an optimized control system for a beer fermentation apparatus, comprising the following modules: The generation module is used to obtain the state parameters of the fermentation unit to construct the phase space trajectory vector, cluster the fermentation unit based on topological similarity to generate data clusters, and identify and generate a prediction sub-model for each data cluster. The prediction sub-model uses control commands and state parameters as input variables to predict future sugar content change data. The prediction sub-model is used to perform forward extrapolation and quantify the expected control gain of the historical control command sequence within the data cluster. The calculation module is used to take the historical control instruction sequence with the expected control gain greater than the first threshold as the basic instruction, associate the initial state domain in which the historical control instruction sequence is executed as the trigger state domain, associate the parameterized correction operator, encapsulate it into a high-gain control paradigm and store it in the cache space, extract the current state features when the target fermentation unit is received, and calculate the divergence between the current state features and the trigger state domain to match the target high-gain control paradigm with a divergence less than the second threshold. The control module is used to generate compensation instructions by utilizing the parameterized correction operator in the target high-gain control paradigm and the deviation vector between the current state features and the trigger state domain. The compensation instructions are superimposed with the basic instructions to calculate and output control instructions. After executing the control instructions, the control effect error is calculated based on the actual sugar content change trajectory and the target sugar content change trajectory. The differentiable loss is calculated based on the predicted sugar content change trajectory and the target sugar content change trajectory. The corresponding parameterized correction operator is fine-tuned by gradient backpropagation. Based on historical error records, high-gain control paradigms with scores below the third threshold are periodically eliminated.
[0007] This invention constructs phase space trajectory vectors by acquiring the state parameters of fermentation units and performs clustering modeling based on topological similarity, enabling in-depth exploration of the multidimensional state evolution laws during fermentation. The established predictive sub-model is used to perform forward extrapolation of historical command sequences to quantify expected control gains, extracting high-value control experience and encapsulating it in a cache space, thus improving the response speed and strategy matching accuracy of target unit regulation. Upon receiving a control request, high-gain control paradigms are quickly matched using state divergence, and compensation commands are generated by combining the current state deviation with parameterized correction operators. These compensation commands are then superimposed with basic commands, solving the problem that traditional single fixed commands cannot cope with complex and variable operating conditions, achieving high-precision collaborative regulation. The control effect error between the actual saccharimetry trajectory and the target saccharimetry trajectory is recorded to demonstrate paradigm performance. Based on the differentiable loss between the predicted and target saccharimetry trajectories, the correction operators are continuously fine-tuned and optimized. A periodic elimination mechanism removes inefficient control paradigms, ensuring continuous iteration and improvement of the entire control system, and enhancing the long-term operational stability and output efficiency of the fermentation process. Attached Figure Description
[0008] Figure 1 A flowchart of an optimized control method for a beer fermentation apparatus; Figure 2 This is a diagram illustrating data clustering. Figure 3 This is a schematic diagram of the sugar content prediction curve. Detailed Implementation
[0009] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0010] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0011] In the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0012] References to "one embodiment" or "some embodiments" as described in this application specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in another embodiment," "in yet another embodiment," etc., appearing in different parts of this application specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0013] This specification provides one or more embodiments of an optimized control method for a beer fermentation apparatus, such as... Figure 1 As shown, it includes the following steps: S1. Obtain the state parameters of the fermentation unit to construct the phase space trajectory vector. Based on topological similarity, cluster the fermentation units to generate data clusters and identify and generate prediction sub-models for each data cluster. The prediction sub-model uses control commands and state parameters as input variables to predict future sugar content changes. The prediction sub-model is used to perform forward extrapolation and quantify the expected control gain of the historical control command sequence within the data cluster.
[0014] Temperature, pressure, and sugar content within the fermenter are collected in real-time using a sensor array at a fixed sampling period as state parameters. A delayed phase space reconstruction algorithm is used to construct a phase space trajectory vector. Principal component analysis is used to extract the principal component features of the phase space trajectory vector, and the topological similarity between fermentation units is represented based on the Euclidean distance between the principal component features. K-means clustering algorithm is then used to cluster all fermentation units, grouping those with similar state evolution patterns into the same data cluster. For each data cluster, sugar content, temperature, pressure, and refrigeration valve opening command within the cluster are used as input variables, and the sugar content of the next sampling period is used as the output variable. A first-order autoregressive exogenous input prediction model is generated using the least squares method. The prediction sub-model is used to perform forward extrapolation on the historical control command sequence to obtain the predicted sugar content change curve. The expected control gain is calculated based on the integral area deviation and sampling point sugar content deviation between the predicted sugar content change curve and the target standard sugar content change curve.
[0015] In some embodiments, the step of obtaining the state parameters of the fermentation unit to construct the phase space trajectory vector includes: Simultaneously collect the temperature, internal pressure, and sugar content sensor values of each fermentation unit at the current moment; The temperature, tank pressure, and sugar content sensor values of each fermentation unit were compiled into a time series over multiple consecutive sampling periods. The time series is reconstructed using a delayed phase space reconstruction algorithm. A preset delay time and a preset embedding dimension are set. The multiple state row vectors generated by the reconstruction are arranged in chronological order to form a phase space trajectory matrix. The phase space trajectory matrix is then output as a phase space trajectory vector representing the system evolution.
[0016] In actual fermentation industrial settings, high-precision PT100 temperature sensors, piezoresistive pressure transmitters, and online refractometers are deployed in each fermenter to simultaneously acquire multi-source heterogeneous real-time data at a preset sampling frequency, such as once every 5 minutes as a sampling cycle. For a single fermentation unit, a continuous raw monitoring sequence of 250 minutes (50 sampling cycles) is extracted to form a multidimensional time series. The preferred temperature parameters are within the range of 8.0-22.0℃, and specific control intervals can be selected within this range depending on whether the fermentation process is lager or aer. The preferred pressure range within the fermenter is 0.05-0.15MPa, and the preferred sugar content range is 5.0-15.0°Bx. To represent the nonlinear evolution characteristics of the biochemical reaction, the delayed coordinate method in the Packard-Takens phase space reconstruction theory is used to process the above multidimensional time series.
[0017] The delay time of the phase space reconstruction algorithm is set to 2 sampling periods, or 10 minutes, to avoid information redundancy between neighboring sampling points. Simultaneously, the embedding dimension is set to 3 dimensions to expand the system attractor and avoid the curse of dimensionality. For each independent sequence of state variables, starting from the 5th sampling period, the values at the current moment and those at previous intervals of 2 and 4 sampling periods are extracted and combined into a 3D vector representation. The first 4 sampling points that do not meet the delay condition are discarded. These 3D vectors of the three parameters are then horizontally concatenated to construct local state row vectors of size 1×9 for the remaining 46 valid sampling moments. These row vectors are then stacked vertically to generate a 46×9 phase space trajectory matrix. This high-dimensional state matrix not only contains the current static state information of the fermentation system but also the temporal evolution trajectory of multi-dimensional variables such as temperature hysteresis, pressure fluctuations, and substrate consumption within the phase space, serving as the phase space trajectory vector representing the system's evolution.
[0018] In some embodiments, the step of clustering fermentation units based on topological similarity to generate data clusters and identifying and generating predictive sub-models for each data cluster, wherein the predictive sub-models use control commands and state parameters as input variables to predict future sugar content changes, includes: Clustering algorithms were used to divide the phase space trajectory vectors of all fermentation units into multiple independent sets; All fermentation units and phase space trajectory vectors contained in each independent set are merged to form a data cluster; Extract historical status parameters and refrigeration valve opening command records from the most recent few cycles within each data cluster; Using sugar content, temperature, tank pressure, and refrigeration valve opening command as input variables and sugar content as output variable, the parameters are identified by the least squares method, and a first-order autoregressive exogenous input prediction model is established for each data cluster as the prediction sub-model.
[0019] After obtaining the phase space trajectory vectors of all fermentation units within the cluster, principal component analysis is used to extract the principal component eigenvectors of the state matrix, and the Euclidean distance between the eigenvectors is calculated to measure topological similarity. The K-means clustering algorithm is called, specifying five cluster centers. After multiple iterations and optimizations (e.g., setting the maximum number of iterations to 100 and the convergence threshold to 0.0001), fermentation units exhibiting similar metabolic rates or thermodynamic characteristics are divided into five non-overlapping independent sets. The hardware identifiers of fermentation units belonging to the same independent set, such as the fermenter ID, are combined with the corresponding phase space trajectory vectors to establish data clusters representing different fermentation stages, such as the rapid glucose reduction period or the stable fermentation period. Figure 2 As shown, principal component 1 on the horizontal axis and principal component 2 on the vertical axis are the first principal component features and the second principal component features obtained by principal component analysis of the phase space trajectory vector, respectively. Each fermentation unit is distinguished by different geometric symbols. Samples of the same type are clustered in the two-dimensional principal component plane. Units of different metabolic stages are clearly separated. There is no large area overlap between the boundaries of each group, which is suitable for the five-group clustering logic.
[0020] For each generated data cluster, a historical time-series database is searched to extract the complete time-series operation logs of each unit within that cluster over the most recent twenty sampling periods (5 minutes per period, i.e., the past 100 minutes). The logs include environmental state parameters and key actuator statuses, with the refrigeration valve opening value continuously adjustable from 0-100%. When building the predictive sub-model, the current sugar content, temperature, tank pressure, and refrigeration valve opening command are configured as input variables, and the predicted sugar content for the next time step is configured as the output variable. The least squares algorithm is used to minimize the sum of squared historical residuals to estimate the weighted influence coefficients of each input item. Based on this, a first-order autoregressive exogenous input equation is fitted and used as the predictive sub-model for a specific data cluster to predict the fermentation trend.
[0021] In some embodiments, the step of using the predictive sub-model to forward extrapolate and quantify the expected control gain of the historical control command sequence within the data cluster includes: The series of refrigeration valve opening command sequences generated in the past operation of the data cluster, along with the corresponding initial sugar content, initial temperature, initial tank pressure, and temperature and tank pressure state sequences within the extrapolation window, are substituted into the first-order autoregressive exogenous input prediction model corresponding to the data cluster. The initial sugar content is used as the sugar content input for the first sampling period, and the predicted sugar content of the previous sampling period is recursively used as the sugar content input for the next sampling period. The predicted sugar content change curve data for the next fifty sampling periods are calculated and output. The Simpson integral method was used to calculate the area of integration of the predicted sugar content change curve data with respect to the time axis. The deviation between the integral area value and the target integral area value corresponding to the target standard sugar content change curve is calculated and dimensionless. The expected control gain is generated by combining the predicted sugar content change curve with whether it is within the preset allowable deviation range.
[0022] During the forward extrapolation process, a real and continuous sequence of refrigeration valve opening commands recorded within a specific data cluster is extracted. For example, this sequence might consist of 50 control steps, with the valve opening percentage in each cycle varying between 20% and 80% according to historical records. The initial fermentation tank saccharity value (e.g., 12.0°Bx), initial temperature value (e.g., 18.0℃), and initial tank pressure value (e.g., 0.11MPa) recorded before this command sequence occurred are used as initial boundary conditions. The temperature and tank pressure state sequences synchronously recorded within the execution window corresponding to this historical control command sequence are read as exogenous variables for temperature and pressure inputs in the next fifty sampling cycles. When used for real-time prediction and future measured temperature and pressure sequences are not yet available, the temperature and pressure values of the previous sampling cycle are kept constant, or the average temperature and pressure changes over the most recent twenty cycles within the corresponding data cluster are recursively used to generate the exogenous temperature and pressure input sequences. These known time-series variables and static boundary conditions are input in parallel into the first-order autoregressive exogenous input prediction model corresponding to the current cluster. Through iterative calculation using cyclic substitution, the initial sugar content is used as the sugar content input for the first sampling period, and the sugar content predicted in the previous sampling period is used as the sugar content input for the next sampling period. This process deduces the predicted sugar content state of the fermenter over the next fifty consecutive sampling periods under the influence of this time-series command. A sugar content decrease curve is generated in a two-dimensional plane, containing the initial sugar content point and the predicted sugar content points for the next fifty periods. For example, a sugar content decrease curve where the value gradually and non-linearly slides from the initial 12.0°Bx to 7.5°Bx. Figure 3 As shown, the target standard sugar content decrease curve is generated by fitting the target endpoint sugar content, target fermentation time, and historical qualified batch sugar content change curves set in the beer fermentation process formula, and is discretized into a target sugar content change trajectory of the same length as the predicted sugar content decrease curve according to the sampling period.
[0023] To represent the biochemical degradation efficiency indicated by the discrete prediction curves, the initial saccharide level point and the predicted saccharide level points for the next fifty sampling periods are combined to form fifty discrete points. Fifty equal-step integral sub-intervals are formed between adjacent discrete points, and the area of integration of the saccharide decrease curve with respect to the time axis is calculated using the complex Simpson integral method. The system compares the predicted saccharide decrease curve with a preset target standard saccharide decrease curve, calculates the deviation of their integral areas and the saccharide deviation at each sampling point, and performs dimensionless processing on the integral area deviation and the sampling point saccharide deviation. When both the integral area deviation and the sampling point saccharide deviation are within a preset allowable range, an expected control gain is generated according to the rule that the smaller the deviation, the higher the gain. When any deviation exceeds the preset allowable range, the expected control gain of the corresponding historical control command sequence is reduced or it is not considered a high-gain candidate sequence. For example, the dimensionless deviation of the integral area is denoted as... The dimensionless average deviation of sugar content at the sampling points is denoted as... If ε is set to a preset minimum positive number, then the expected control gain G is equal to , The reciprocal of the sum of α and β, where α and β are preset weighting coefficients; when or When the expected control gain exceeds the preset allowable range, the value will be set to a value lower than the first threshold.
[0024] S2, take the historical control instruction sequence with expected control gain greater than the first threshold as the basic instruction, associate the initial state domain in which the historical control instruction sequence is executed as the trigger state domain, associate the parameterized correction operator, encapsulate it into a high-gain control paradigm and store it in the cache space, extract the current state features when the target fermentation unit is received, calculate the divergence between the current state features and the trigger state domain to match the target high-gain control paradigm with a divergence less than the second threshold.
[0025] Iterate through all calculated expected control gains, filter out historical control command sequences with values greater than a first threshold, and mark these sequences as basic commands. Construct a linear parameterized correction operator consisting of temperature compensation gain, pressure response gain, and sugar content compensation gain. The parameterized correction operator is composed of temperature compensation gain, pressure response gain, and sugar content compensation gain. Each gain parameter is fitted based on the sensitive relationship between the historical state deviation and the historical refrigeration valve opening correction amount within the corresponding data cluster, or initialized based on preset process experience parameters. This is used to map the deviation vector of the current state characteristics relative to the center value of the trigger state domain into a refrigeration valve opening compensation signal, and calculate the state data of the initial stage of the historical execution window corresponding to the basic command. The continuous sampled state sequence of the initial stage of the historical execution window is dimensionless and reconstructed into a central reference phase space trajectory vector for subsequent state divergence matching. At the same time, the three dimensionless center values of temperature, pressure, and sugar content are extracted from the initial stage of the historical execution window to form a standard three-dimensional center value for subsequent compensation command calculation. The trigger state domain is characterized by the central reference phase space trajectory vector and the standard three-dimensional center value. The central reference phase space trajectory vector is used to determine whether the current dynamic evolution mode is similar, and the standard three-dimensional center value is used to calculate the deviation vector of the current state relative to the historical reference state.
[0026] Centered on the central reference phase space trajectory vector, and with the state divergence range defined by a second threshold as the matching boundary of the trigger state domain, the basic instructions, the weight parameters of the linear parameterized correction operator, the central reference phase space trajectory vector, and the standard three-dimensional center value are combined into a key-value pair data structure set as a high-gain control paradigm. This data is then serialized using a JSON library and stored in a Redis in-memory database to build a cache space. When the system receives a request for control from the target fermentation unit, it extracts the current state features from the request data stream, including the temperature, tank pressure, and sugar content records for the current moment and several consecutive previous sampling periods. The calculation module is invoked to construct the current phase space trajectory vector of the target fermentation unit using the same delayed phase space reconstruction algorithm as the offline phase space trajectory vector construction. The trajectory distance metric between this vector and the central reference phase space trajectory vectors of each trigger state domain in the Redis database is calculated as the state divergence value. The smaller the state divergence value, the closer the current operating condition is to the historical trigger operating condition.
[0027] By traversing and comparing, the trigger state domains with divergence values less than the second threshold are identified, and the corresponding high-gain control paradigms are loaded into the system memory as target high-gain control paradigms. When there are multiple high-gain control paradigms with divergence values less than the second threshold, the high-gain control paradigm with the smallest divergence value is selected first. If the divergence values are the same, the high-gain control paradigm with the higher expected control gain is selected as the target high-gain control paradigm.
[0028] When the state divergence values of all high-gain control paradigms are greater than or equal to the second threshold, it is determined that there is no matching historical paradigm for the current fermentation condition. The system calls the corresponding prediction sub-model according to the nearest data cluster to which the current phase space trajectory vector belongs, performs online forward extrapolation on the preset candidate refrigeration valve opening sequence, selects the candidate sequence whose predicted sugar content change trajectory is closest to the target sugar content change trajectory and meets the equipment opening constraint as a temporary control instruction, and writes the current condition and control results into the training record area. After the historical records meet the preset sample number, it returns to execute the high-gain control paradigm generation process.
[0029] In some embodiments, the step of extracting current state features upon receiving a target fermentation unit control request and calculating the divergence between the current state features and the trigger state domain to match a target high-gain control paradigm with a divergence less than a second threshold includes: Read the current state features of the target fermentation unit, which include the current state data and the historical state data of multiple consecutive sampling periods before the current time. Use the same delayed phase space reconstruction algorithm as the algorithm used to construct the phase space trajectory vector to construct the current phase space trajectory vector of the target fermentation unit, and read the central reference phase space trajectory vector associated with the trigger state domain of each high-gain control paradigm in the buffer space. The trajectory distance metric between the current phase space trajectory vector of the target fermentation unit and all central reference phase space trajectory vectors is calculated as the state divergence. Extract the above divergence, and find the high-gain control paradigm whose divergence is less than the second threshold as the target high-gain control paradigm.
[0030] During the fermentation process control execution triggering phase, when the target fermentation unit initiates an intervention control request, the physical state readings returned by the sensors from the unit's most recent consecutive sampling periods are captured. These most recent consecutive sampling periods must at least meet the preset embedding dimension and preset delay time requirements for delayed phase space reconstruction. In a preferred embodiment, the temperature, tank pressure, and sugar content readings from the most recent fifty sampling periods are captured as current state features. If the historical sampling quantity of the target fermentation unit is insufficient to complete phase space reconstruction, high-gain control paradigm matching is temporarily suspended, and a preset safety control strategy or a temporary predictive control strategy for the corresponding data cluster is adopted until the sampling records meet the phase space reconstruction conditions. To reduce distortion caused by inconsistencies in physical dimensions such as temperature (Celsius) and pressure (MPa), the Min-Max range normalization method is used to map the above parameters to a continuous dimensionless real number range from 0 to 1. The same delayed phase space reconstruction algorithm as used offline for constructing the phase space trajectory vector is then used to construct the current phase space trajectory vector of the target fermentation unit. The high-gain control paradigm array encapsulated in memory is then obtained. Each paradigm object has a built-in central reference phase space trajectory vector that has also undergone the aforementioned dimensionless scaling and phase space reconstruction processing. This vector represents the central reference dynamic evolution mode that the control strategy is suitable to trigger. At the same time, it retains a standard three-dimensional central value composed of temperature central value, pressure central value, and sugar content central value as a three-dimensional reference for subsequent compensation calculations.
[0031] The current phase space trajectory vector constructed from the target fermentation unit is paired with the central reference phase space trajectory vector carried by each candidate paradigm, and the trajectory distance metric between them is calculated as the state divergence, indicating the environmental fit. The state divergence is a distance-based index; the smaller the value, the closer the current phase space trajectory vector is to the central reference phase space trajectory vector, no longer using the judgment criterion of greater similarity. The comparator component compares each of these feature divergences against a configured second threshold, which is preferably 0.15 in the preferred implementation configuration. In the loop comparison logic, if the system finds that only one historical control paradigm has a divergence less than the set second threshold (e.g., the calculated value is only 0.08), then the historical control paradigm is selected as the target high-gain control paradigm. If multiple historical control paradigms have divergences less than the second threshold, they are sorted in ascending order of divergence, and the one with the smallest divergence is selected as the target high-gain control paradigm. When the divergences are the same, the one with the higher expected control gain is selected as the target high-gain control paradigm. If there is no historical control paradigm with a state divergence less than the second threshold, the system enters the no-match fallback branch, calls the prediction sub-model of the nearest data cluster to which the current fermentation unit belongs to generate temporary control instructions, and saves the no-match state and subsequent actual control effects as a new operating condition sample for subsequent updates to the prediction sub-model and supplementation of high-gain control paradigms.
[0032] S3, using the parameterized correction operator in the target high-gain control paradigm and the deviation vector between the current state feature and the trigger state domain, a compensation instruction is generated. The compensation instruction is superimposed with the basic instruction to calculate and output a control instruction. After executing the control instruction, the control effect error is calculated based on the actual sugar content change trajectory and the target sugar content change trajectory. The differentiable loss is calculated based on the predicted sugar content change trajectory and the target sugar content change trajectory. The corresponding parameterized correction operator is fine-tuned by gradient backpropagation. Based on historical error records, high-gain control paradigms with scores below the third threshold are periodically eliminated.
[0033] The dimensionless temperature, dimensionless pressure, and dimensionless sugar content corresponding to the current state characteristics at the current moment are used to form a three-dimensional current state vector. This three-dimensional current state vector is then subtracted from the standard three-dimensional center value stored in the target high-gain control paradigm to obtain a deviation vector. The temperature deviation, pressure deviation, and sugar content deviation in this deviation vector are multiplied by the corresponding proportional gain coefficients of the parameterized correction operator and summed to output a dimensionless compensation quantity in single scalar form. Assuming the allowable range of the refrigeration valve opening is Umin to Umax, the refrigeration valve opening range reference Uref is set to Umax-Umin. The dimensionless compensation quantity is then multiplied by Uref to obtain a compensation signal with valve opening percentage units. If the basic instruction is a sequence of refrigeration valve opening instructions with a length of fifty sampling periods, then the single scalar form of the compensation instruction is used as a uniform opening bias across the entire window. This is copied into an equal-length compensation instruction sequence according to the length of the basic instruction sequence. Then, the `add` function of the NumPy library is used to add the corresponding elements of the compensation instruction sequence to the basic instruction sequence element by element. The `clip` function is used to constrain the added value within the maximum and minimum allowable operating range of the equipment, generating a control instruction sequence that is then sent to the fermentation unit for execution. After the current control execution cycle ends, the actual sugar content data sequence fed back by the fermentation unit is collected to form the actual sugar content change trajectory. The `mean_squared_error` function is called to calculate the mean square error, and then the square root is performed to obtain the dimensionless error between the actual sugar content change trajectory and the target sugar content change trajectory. This dimensionless error is used for historical error recording and elimination scoring in the high-gain control paradigm. Simultaneously, the dimensionless error between the predicted sugar content trajectory generated by the first-order autoregressive exogenous input prediction model and the target sugar content trajectory is used as a differentiable loss to update the proportional gain coefficients of the parameterized correction operator using gradient descent, completing fine-tuning. Simultaneously, a sliding window is maintained to record the control effect error of the high-gain control paradigm in the last ten times. When the number of records is less than ten, the average error is calculated based on the existing control effect errors. When there are no control effect error records, it is not temporarily included in the elimination scan. The reciprocal of the sum of the average error and the preset minimum positive number ε is used as the score value. A Cron-based scheduled task is configured to scan the Redis database at fixed intervals, compare the score values of all high-gain control paradigms, and call the delete command to clear the data corresponding to the high-gain control paradigm with a score lower than the third threshold from the memory database to execute the elimination mechanism.
[0034] In some embodiments, generating a compensation instruction using the parameterized correction operator in the target high-gain control paradigm and the deviation vector between the current state features and the triggered state domain includes: The real-time temperature, pressure, and sugar content values currently measured in the target fermentation unit are processed into dimensionless values. Then, the dimensionless standard temperature, pressure, and sugar content center values set in the trigger state domain of the target high-gain control paradigm are subtracted from these values to obtain three dimensionless real number differences, which are combined to form a three-dimensional deviation vector as the deviation vector. The three values of the three-dimensional deviation vector are respectively multiplied by the corresponding proportional gain coefficients, which can be positive or negative, set in the parameterized correction operator; The product values of all the scalar multiplications are arithmetically summed to obtain the dimensionless compensation quantity. The dimensionless compensation quantity is then denormalized and mapped according to the refrigeration valve opening range reference, and converted into a compensation signal with the same unit as the refrigeration valve opening command, which serves as the compensation command.
[0035] During control intervention, once the target high-gain control paradigm is matched, the conversion module is invoked to extract the real-time physical variables of temperature, pressure, and saccharin content measured in the target fermenter, and convert them into a normalized data form between 0 and 1. The latest dimensionless state data is then element-wise subtracted from the standard three-dimensional center values stored within the matching control paradigm. These standard three-dimensional center values originate from the initial trigger domain centroid and are composed of the temperature, pressure, and saccharin center values from the initial stage of the historical execution window. These values are stored and used separately from the central reference phase space trajectory vector used for state divergence matching. After the subtraction operation, real differences with positive and negative labels, including temperature dispersion, pressure offset, and saccharin hysteresis, are independently obtained. These three independently calculated deviation differences are then constructed in the order of temperature, pressure, and saccharin content into a three-dimensional real vector, such as +0.05, -0.02, and +0.01, as the three-dimensional deviation vector for identifying the total deviation.
[0036] The constructed three-dimensional deviation vector is then integrated into a dedicated parameterized correction operator within the control paradigm structure. This virtual processing operator includes three proportional parameters corresponding to the single temperature compensation gain, pressure response amplification factor, and sugar content compensation gain, respectively. These parameters can take positive, negative, or zero values. Their initial signs and values are determined based on the sensitivity fitting results between historical state deviations and historical refrigeration valve opening corrections within the corresponding data cluster, or initialized according to preset process experience parameters. This causes the offset parameters within the deviation vector to be scalar-multiplied with specific proportional gain coefficient values bound to these parameters; for example, in the case of dimensionless temperature deviation calculation, this yields a single-dimensional component value of +0.5. The instruction adder channel arithmetically sums the three product values of each parameter dimension to obtain an aggregated output value. This aggregated output value is used as a dimensionless compensation quantity, and a dimensional inverse mapping is performed according to ΔU = Δu × Uref, where ΔU is a compensation signal in units of refrigeration valve opening percentage, Δu is the dimensionless compensation quantity, and Uref is the refrigeration valve opening range reference, preferably Umax-Umin, where Umax and Umin are the maximum and minimum allowable openings of the refrigeration valve, respectively. This converts the dimensionless compensation quantity into a compensation signal with the same units as the refrigeration valve opening command, serving as a compensation intervention command. When the basic instruction is a timing control sequence, the compensation signal is used as a common bias for each sampling period, and a compensation instruction sequence with the same length as the basic instruction sequence is formed. Then, the compensation instruction is added point by point to the refrigeration valve opening value corresponding to each sampling period in the basic instruction sequence, so as to ensure that the compensation instruction and the basic instruction can be superimposed in the time dimension. If the superimposed refrigeration valve opening value exceeds the allowable range of the equipment, it is truncated to between Umin and Umax to ensure that the output control instruction meets the physical constraints of the actuator.
[0037] In some embodiments, the step of calculating the control effect error based on the actual sugar content change trajectory and the target sugar content change trajectory, and calculating the differentiable loss based on the predicted sugar content change trajectory and the target sugar content change trajectory, and performing gradient backpropagation fine-tuning on the corresponding parameterized correction operator, includes: The root mean square error formula is used to calculate the root mean square error between the actual sugar content change trajectory and the target sugar content change trajectory of the fermentation unit in the current execution cycle. The root mean square error value is then divided by the preset sugar content range reference value to obtain the control effect error. The first-order autoregressive exogenous input prediction model is used as a differentiable replacement model for the fermentation unit. Based on the parameterized correction operator, compensation instructions are generated and superimposed with basic instructions to obtain control instructions. The control instructions, the initial sugar content of the current execution cycle, and the exogenous input sequences of temperature and tank pressure are input into the first-order autoregressive exogenous input prediction model to generate a predicted sugar content change trajectory. The dimensionless error between the predicted sugar content change trajectory and the target sugar content change trajectory is calculated and used as the differentiable loss. The backpropagation rule is used to solve the partial derivative of the differentiable loss with respect to each independent weight coefficient of the corresponding parameterized correction operator. During the backpropagation process, a gradient truncation strategy is adopted to alleviate the gradient instability problem caused by long-sequence recursive prediction. Subtract the product of the partial derivative and the preset learning rate from each independent weight coefficient, and use the resulting difference to replace the original weight coefficient to complete the parameter fine-tuning update.
[0038] After the actual equipment completes the currently defined control verification feedback phase, the system initiates a post-audit mechanism. This mechanism collects the actual measured sugar content time-series trajectory uploaded from the process layer network by the controlled equipment during this period and reads the preset target sugar content change trajectory. By calling the root mean square error loss assessment, the deviation between the actual sugar content time-series trajectory and the target sugar content change trajectory at the same sampling node is calculated. The overall deviation evaluation value is obtained by summing the squares, averaging, and taking the square root. This core numerical value, representing the degree of deviation between the target fermentation trajectory and the actual fermentation trajectory, will be used as the control effect error for this round and written into the historical error record of the corresponding high-gain control paradigm.
[0039] Considering the difficulty in establishing continuous derivative models for traditional hardware execution objects, a previously constructed first-order autoregressive exogenous input model is used as a differentiable alternative model for the fermentation unit. The chain rule is then used to calculate the differentiable loss between the predicted and target saccharity change trajectories, and the partial derivatives of each independent weight coefficient of the corresponding parameterized correction operator are solved. For example, the partial derivative with respect to the temperature weight is found to be +1.2. During backpropagation, a gradient truncation strategy is adopted for the long sequence computation graph generated by the recursive iteration of the first-order autoregressive exogenous input prediction model. When the backpropagation gradient exceeds a preset threshold, it is truncated to a preset range to alleviate the gradient vanishing or exploding problem and ensure the stability of the parameterized correction operator weight update. Gradient descent adjustment is performed during the update, with a constant learning rate of 0.1%. The original weights are subtracted from the product of this learning rate and the partial derivative, and the resulting subtraction output is written to storage in the background, completing the fine-tuning update of the parameterized correction operator parameters.
[0040] This specification also provides an optimized control system for a beer fermentation apparatus, comprising the following modules: (One or more embodiments of this specification are described) The generation module is used to obtain the state parameters of the fermentation unit to construct the phase space trajectory vector, cluster the fermentation unit based on topological similarity to generate data clusters, and identify and generate a prediction sub-model for each data cluster. The prediction sub-model uses control commands and state parameters as input variables to predict future sugar content change data. The prediction sub-model is used to perform forward extrapolation and quantify the expected control gain of the historical control command sequence within the data cluster. The calculation module is used to take the historical control instruction sequence with the expected control gain greater than the first threshold as the basic instruction, associate the initial state domain in which the historical control instruction sequence is executed as the trigger state domain, associate the parameterized correction operator, encapsulate it into a high-gain control paradigm and store it in the cache space, extract the current state features when the target fermentation unit is received, and calculate the divergence between the current state features and the trigger state domain to match the target high-gain control paradigm with a divergence less than the second threshold. The control module is used to generate compensation instructions by utilizing the parameterized correction operator in the target high-gain control paradigm and the deviation vector between the current state features and the trigger state domain. The compensation instructions are superimposed with the basic instructions to calculate and output control instructions. After executing the control instructions, the control effect error is calculated based on the actual sugar content change trajectory and the target sugar content change trajectory. The differentiable loss is calculated based on the predicted sugar content change trajectory and the target sugar content change trajectory. The corresponding parameterized correction operator is fine-tuned by gradient backpropagation. Based on historical error records, high-gain control paradigms with scores below the third threshold are periodically eliminated.
[0041] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. An optimized control method for a beer fermentation apparatus, characterized in that, Includes the following steps: The state parameters of the fermentation unit are obtained to construct the phase space trajectory vector. The fermentation unit is clustered based on topological similarity to generate data clusters and a prediction sub-model is generated for each data cluster. The prediction sub-model uses control commands and state parameters as input variables to predict future sugar content change data. The prediction sub-model is used to perform forward extrapolation and quantify the expected control gain of the historical control command sequence within the data cluster. The historical control instruction sequence with expected control gain greater than the first threshold is used as the basic instruction. The initial state domain in which the historical control instruction sequence is executed is associated as the trigger state domain, and a parameterized correction operator is associated. The sequence is encapsulated into a high-gain control paradigm and stored in the cache space. When a target fermentation unit is received for control, the current state feature is extracted, and the divergence between the current state feature and the trigger state domain is calculated to match the target high-gain control paradigm with a divergence less than the second threshold. The parameterized correction operator in the target high-gain control paradigm and the deviation vector between the current state feature and the trigger state domain are used to generate a compensation command. The compensation command is superimposed with the basic command to calculate and output a control command. After the control command is executed, the control effect error is calculated based on the actual sugar content change trajectory and the target sugar content change trajectory. The differentiable loss is calculated based on the predicted sugar content change trajectory and the target sugar content change trajectory. The corresponding parameterized correction operator is fine-tuned by gradient backpropagation. Based on the historical error record, high-gain control paradigms with scores below the third threshold are periodically eliminated.
2. The method according to claim 1, characterized in that, The step of obtaining the state parameters of the fermentation unit to construct the phase space trajectory vector includes: Simultaneously collect the temperature, internal pressure, and sugar content sensor values of each fermentation unit at the current moment; The temperature, tank pressure, and sugar content sensor values of each fermentation unit were compiled into a time series over multiple consecutive sampling periods. The time series is reconstructed using a delayed phase space reconstruction algorithm. A preset delay time and a preset embedding dimension are set. The multiple state row vectors generated by the reconstruction are arranged in chronological order to form a phase space trajectory matrix. The phase space trajectory matrix is then output as a phase space trajectory vector representing the system evolution.
3. The method according to claim 1, characterized in that, The process involves clustering fermentation units based on topological similarity to generate data clusters and identifying and generating predictive sub-models for each data cluster. These predictive sub-models use control commands and state parameters as input variables to predict future sugar content changes, including: Clustering algorithms were used to divide the phase space trajectory vectors of all fermentation units into multiple independent sets; All fermentation units and phase space trajectory vectors contained in each independent set are merged to form a data cluster; Extract historical status parameters and refrigeration valve opening command records from the most recent few cycles within each data cluster; Using sugar content, temperature, tank pressure, and refrigeration valve opening command as input variables and sugar content as output variable, the parameters are identified by the least squares method, and a first-order autoregressive exogenous input prediction model is established for each data cluster as the prediction sub-model.
4. The method according to claim 1, characterized in that, The step of using the prediction sub-model to forward extrapolate and quantify the expected control gain of the historical control command sequence within the data cluster includes: The series of refrigeration valve opening command sequences generated in the past operation of the data cluster, along with the corresponding initial sugar content, initial temperature, initial tank pressure, and temperature and tank pressure state sequences within the extrapolation window, are substituted into the first-order autoregressive exogenous input prediction model corresponding to the data cluster. The initial sugar content is used as the sugar content input for the first sampling period, and the predicted sugar content of the previous sampling period is recursively used as the sugar content input for the next sampling period. The predicted sugar content change curve data for the next fifty sampling periods are calculated and output. The Simpson integral method was used to calculate the area of integration of the predicted sugar content change curve data with respect to the time axis. The deviation between the integral area value and the target integral area value corresponding to the target standard sugar content change curve is calculated and dimensionless. The expected control gain is generated by combining the predicted sugar content change curve with whether it is within the preset allowable deviation range.
5. The method according to claim 1, characterized in that, The step of extracting the current state features upon receiving a control request from the target fermentation unit, and calculating the divergence between the current state features and the trigger state domain to match a target high-gain control paradigm with a divergence less than a second threshold, includes: Read the current state features of the target fermentation unit, which include the current state data and the historical state data of multiple consecutive sampling periods before the current time. Use the same delayed phase space reconstruction algorithm as the algorithm used to construct the phase space trajectory vector to construct the current phase space trajectory vector of the target fermentation unit, and read the central reference phase space trajectory vector associated with the trigger state domain of each high-gain control paradigm in the buffer space. The trajectory distance metric between the current phase space trajectory vector of the target fermentation unit and all central reference phase space trajectory vectors is calculated as the state divergence. Extract the above divergence, and find the high-gain control paradigm whose divergence is less than the second threshold as the target high-gain control paradigm.
6. The method according to claim 1, characterized in that, The step of generating compensation instructions using the parameterized correction operator in the target high-gain control paradigm and the deviation vector between the current state features and the trigger state domain includes: The real-time temperature, pressure, and sugar content values currently measured in the target fermentation unit are processed into dimensionless values. Then, the dimensionless standard temperature, pressure, and sugar content center values set in the trigger state domain of the target high-gain control paradigm are subtracted from these values to obtain three dimensionless real number differences, which are combined to form a three-dimensional deviation vector as the deviation vector. The three values of the three-dimensional deviation vector are respectively multiplied by the corresponding proportional gain coefficients, which can be positive or negative, set in the parameterized correction operator; The product values of all the scalar multiplications are arithmetically summed and converted into a compensation signal with the same unit as the refrigeration valve opening command, which serves as the compensation command.
7. The method according to claim 1, characterized in that, The process involves calculating the control effect error based on the actual and target sugar content change trajectories, calculating the differentiable loss based on the predicted and target sugar content change trajectories, and fine-tuning the corresponding parameterized correction operator through gradient backpropagation, including: The root mean square error formula is used to calculate the root mean square error between the actual sugar content change trajectory and the target sugar content change trajectory of the fermentation unit in the current execution cycle. The root mean square error value is then divided by the preset sugar content range reference value to obtain the control effect error. The first-order autoregressive exogenous input prediction model is used as a differentiable replacement model for the fermentation unit. Based on the parameterized correction operator, compensation instructions are generated and superimposed with basic instructions to obtain control instructions. The control instructions, the initial sugar content of the current execution cycle, and the exogenous input sequences of temperature and tank pressure are input into the first-order autoregressive exogenous input prediction model to generate a predicted sugar content change trajectory. The dimensionless error between the predicted sugar content change trajectory and the target sugar content change trajectory is calculated and used as the differentiable loss. The backpropagation rule is used to solve the partial derivative of the differentiable loss with respect to each independent weight coefficient of the corresponding parameterized correction operator. During the backpropagation process, a gradient truncation strategy is adopted to alleviate the gradient instability problem caused by long-sequence recursive prediction. Subtract the product of the partial derivative and the preset learning rate from each independent weight coefficient, and use the resulting difference to replace the original weight coefficient to complete the parameter fine-tuning update.
8. An optimized control system for a beer fermentation apparatus, characterized in that, Includes the following modules: The generation module is used to obtain the state parameters of the fermentation unit to construct the phase space trajectory vector, cluster the fermentation unit based on topological similarity to generate data clusters, and identify and generate a prediction sub-model for each data cluster. The prediction sub-model uses control commands and state parameters as input variables to predict future sugar content change data. The prediction sub-model is used to perform forward extrapolation and quantify the expected control gain of the historical control command sequence within the data cluster. The calculation module is used to take the historical control instruction sequence with the expected control gain greater than the first threshold as the basic instruction, associate the initial state domain in which the historical control instruction sequence is executed as the trigger state domain, associate the parameterized correction operator, encapsulate it into a high-gain control paradigm and store it in the cache space, extract the current state features when the target fermentation unit is received, and calculate the divergence between the current state features and the trigger state domain to match the target high-gain control paradigm with a divergence less than the second threshold. The control module is used to generate compensation instructions by utilizing the parameterized correction operator in the target high-gain control paradigm and the deviation vector between the current state features and the trigger state domain. The compensation instructions are superimposed with the basic instructions to calculate and output control instructions. After executing the control instructions, the control effect error is calculated based on the actual sugar content change trajectory and the target sugar content change trajectory. The differentiable loss is calculated based on the predicted sugar content change trajectory and the target sugar content change trajectory. The corresponding parameterized correction operator is fine-tuned by gradient backpropagation. Based on historical error records, high-gain control paradigms with scores below the third threshold are periodically eliminated.
9. The system according to claim 8, characterized in that, The step of obtaining the state parameters of the fermentation unit to construct the phase space trajectory vector includes: Simultaneously collect the temperature, internal pressure, and sugar content sensor values of each fermentation unit at the current moment; The temperature, tank pressure, and sugar content sensor values of each fermentation unit were compiled into a time series over multiple consecutive sampling periods. The time series is reconstructed using a delayed phase space reconstruction algorithm. A preset delay time and a preset embedding dimension are set. The multiple state row vectors generated by the reconstruction are arranged in chronological order to form a phase space trajectory matrix. The phase space trajectory matrix is then output as a phase space trajectory vector representing the system evolution.
10. The system according to claim 8, characterized in that, The process involves clustering fermentation units based on topological similarity to generate data clusters and identifying and generating predictive sub-models for each data cluster. These predictive sub-models use control commands and state parameters as input variables to predict future sugar content changes, including: Clustering algorithms were used to divide the phase space trajectory vectors of all fermentation units into multiple independent sets; All fermentation units and phase space trajectory vectors contained in each independent set are merged to form a data cluster; Extract historical status parameters and refrigeration valve opening command records from the most recent few cycles within each data cluster; Using sugar content, temperature, tank pressure, and refrigeration valve opening command as input variables and sugar content as output variable, the parameters are identified by the least squares method, and a first-order autoregressive exogenous input prediction model is established for each data cluster as the prediction sub-model.
