Sensor-based beer fermentation degree real-time monitoring system
Through multi-spectral sensor array and adaptive filtering technology, the beer fermentation degree is monitored in real time, solving the response lag and error accumulation problems of traditional methods, and real-time monitoring and parameter stability are achieved with high precision and anti-interference.
Patent Information
- Application Number
- CN202510748364.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-07-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional beer fermentation degree monitoring methods have lagging responses, cumbersome operation and are susceptible to human errors. It is difficult for the sensor calibration model to accurately correlate the spectra and fermentation kinetics under small sample conditions, resulting in error accumulation and model parameter offset.
The multi-spectral sensor array is used for real-time data acquisition, combined with timestamp synchronization, multi-scale wavelet transformation and band-stop filter processing, data fusion is carried out through optocoupling analysis and gated attention coupling module, and KL divergence feature alignment and momentum reprojection stable parameters are used to realize adaptive filtering and model update.
Real-time monitoring of beer fermentation degree is realized in seconds, reducing noise pollution, enhancing the generalization ability and parameter stability of the model, avoiding error accumulation and model offset, and improving the timeliness and reliability of process control.
Smart Images

Figure CN120275316A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent brewing, and particularly to a real-time monitoring system for beer fermentation degree based on sensors. Background Technique
[0002] Beer brewing is a food production process with a long history and highly dependent on process control. Among them, fermentation, as the core link of beer brewing, directly determines the flavor, alcohol content, stability and consistency of the finished wine. In this process, yeast converts the fermentable sugars in wort into alcohol and carbon dioxide, and a variety of flavor substances are produced. The whole process is affected by many factors such as temperature, pH value, dissolved oxygen, and nutrient components.
[0003] Traditionally, the monitoring of the beer fermentation process mainly relies on manual experience judgment and laboratory off-line detection methods. For example, the fermentation progress is estimated by regularly sampling and measuring the wort density or residual sugar concentration. However, these methods have obvious limitations: one is the response lag, which cannot timely reflect the changes in the fermentation state; the second is the cumbersome operation, which increases the risk of human error; the third is the difficulty in realizing the dynamic tracking and closed-loop control of the whole process.
[0004] The Chinese invention patent with the publication number CN113029993A discloses a rapid total nitrogen on-line detection method based on an attention mechanism. First, the data changes of the ultraviolet spectrum during the total nitrogen oxidation digestion process are detected in-situ by a micro ultraviolet spectrometer; further, a multivariate time series prediction algorithm based on an attention mechanism is used to extract the ultraviolet spectrum data change characteristics, establish a relationship model between the ultraviolet spectrum data change characteristics during the digestion process and the total nitrogen concentration, and predict the total nitrogen concentration based on the whole oxidation digestion process and the full-band spectrum data to improve the total nitrogen detection accuracy; then, according to the model attention spatio-temporal distribution result, the necessary total nitrogen digestion time is compressed within the allowable range of detection accuracy, and the total duration of total nitrogen detection is shortened to achieve the purpose of rapid total nitrogen detection.
[0005] During the process of monitoring the beer fermentation degree, there is a complex non-linear coupling relationship between the malt characteristic spectrum collected by the sensor and the real fermentation degree parameter. Under the condition of small samples, it is difficult for traditional calibration models to accurately correlate and model the spectrum and fermentation kinetics, resulting in a small initial prediction error. And this small initial prediction error will be further amplified during the dynamic fermentation process due to the spectral drift effect caused by the change of yeast metabolic activity. Therefore, when the production formula is switched, the mutation of the sensor feature space will not only exacerbate the error accumulation, but also cause irreversible deviation of the model parameters, thereby increasing the performance attenuation of the system. Summary of the Invention
[0006] The object of the present invention is to provide a real-time monitoring system for beer fermentation degree based on sensors, so as to solve the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solution: A real-time monitoring system for beer fermentation degree based on sensors, comprising:
[0008] A spectral processing module, which constructs a multi-spectral sensor array, obtains the diffuse reflection spectrum in the fermentation tank, and through timestamp synchronization, synchronizes the data of the diffuse reflection spectrum, obtains the absorbance value after baseline calibration, and at the same time processes the absorbance value after baseline calibration to obtain the output voltage, including:
[0009] SA1: Perform multi-scale wavelet transform: According to the absorbance value after baseline calibration and the scale factor, obtain wavelet coefficients, and through the wavelet coefficients, adjust the scale factor, and according to the adjusted scale factor, obtain the adjusted wavelet coefficients;
[0010] SA2: Band-stop filter processing: According to the real-time fermentation temperature and pressure in the fermentation tank, determine the interference bandwidth of the band-stop filter, and set the band-stop filter according to the interference bandwidth. At the same time, through the set band-stop filter and the adjusted wavelet coefficients, obtain the voltage signal;
[0011] A channel constraint module, which processes the output voltage and the substrate concentration and strain parameters in the fermentation tank through an optocoupler analysis channel, a kinetic channel and a gated attention coupling module, and obtains a fusion vector;
[0012] A parameter stability module, which performs KL divergence feature alignment and momentum reprojection according to the output voltage and the substrate concentration and strain parameters in the fermentation tank.
[0013] Furthermore, through timestamp synchronization, the data of the diffuse reflection spectrum is synchronized to obtain the absorbance value after baseline calibration, specifically:
[0014]
[0015] Where: is the calibrated absorbance value corresponding to removing environmental interference at wavelength ; is the original absorbance value corresponding to wavelength ; is the total number of reference layers; is the absorbance value corresponding to the i-th reference layer at wavelength ; is the layer index of the reference layer; is the wavelength of light.
[0016] Further, obtaining the adjusted wavelet coefficients includes:
[0017] SA1.1: Determine the current signal-to-noise ratio: According to the wavelet coefficients, obtain the current signal-to-noise ratio, specifically:
[0018]
[0019] Where: is the current signal-to-noise ratio, is the wavelet coefficient corresponding to the scale factor of 5 and the translation parameter of at, is the wavelet coefficient corresponding to the scale factor of 1 and the translation parameter of at, is the translation parameter;
[0020] SA1.2: Scale factor adjustment: Compare the current signal-to-noise ratio with the target signal-to-noise ratio threshold, obtain the signal-to-noise ratio deviation between the current signal-to-noise ratio and the target signal-to-noise ratio threshold, and at the same time, according to the signal-to-noise ratio deviation and the scale factor, obtain the adjusted scale factor, specifically:
[0021]
[0022] Where: is the adjusted scale factor, is the initial scale factor, is the current signal-to-noise ratio, is the target signal-to-noise ratio threshold;
[0023] SA1.3: Wavelet coefficient adjustment: According to the adjusted scale factor and the wavelet coefficient acquisition formula, obtain the adjusted wavelet coefficients. The wavelet coefficient acquisition formula is specifically:
[0024]
[0025] Where: is the wavelet coefficient corresponding to the scale factor of and the translation parameter of at, is the scale factor, is the translation parameter, is the wavelength at the corresponding calibrated absorbance value after removing environmental interference, is the wavelength of light, is the discretized wavelet basis function.
[0026] Further, through the set band-stop filter and the adjusted wavelet coefficients, obtain the voltage signal, including:
[0027] SA2.1: Obtain the yeast activity index: Through the temperature sensor and the pressure sensor, obtain the fermentation temperature and pressure in the fermenter, and determine the yeast activity index, specifically:
[0028]
[0029] Where: is the yeast activity index, is the current fermentation temperature, is the minimum activation temperature of yeast, is the maximum tolerance temperature of yeast, is the current fermenter pressure, is the saturation pressure threshold;
[0030] SA2.2: Judge the interference bandwidth: Compare the yeast activity index with the adjusted wavelet coefficients, and judge the interference bandwidth according to the comparison result;
[0031] SA2.3: Determine the voltage signal: Set a band-stop filter according to the interference bandwidth, and at the same time obtain the voltage signal according to the band-stop filter and the adjusted wavelet coefficients, specifically:
[0032]
[0033] Where: is the output voltage, is the adjusted wavelet coefficient, is the DAC conversion coefficient, is the attenuation.
[0034] Furthermore, judging the interference bandwidth includes:
[0035] SA2.2.1: Obtain the expected interference frequency band: Compare the yeast activity index with the activity offset threshold, and determine the expected interference frequency according to the comparison result and the reference center frequency, specifically:
[0036]
[0037] Where: is the dynamic center frequency, is the reference center frequency, is the frequency adjustment amplitude, is the hyperbolic tangent function, is the yeast activity index, is the activity offset threshold;
[0038] SA2.2.2: Obtaining the energy ratio: Based on the expected interference frequency and the preset frequency fluctuation value, determine the target frequency band. Meanwhile, based on the adjusted wavelet coefficients within the target frequency band and the adjusted wavelet coefficients across the entire frequency band, determine the corresponding energy ratio. Specifically:
[0039]
[0040] Where: is the energy ratio, is the set of target frequency bands, is the set of the entire frequency band, is the wavelet coefficient corresponding to the scale factor of and the translation parameter of ;
[0041] SA2.2.3: Determining the interference state: Compare the energy ratio and the yeast activity index with the preset energy ratio threshold range and the preset activity index threshold range respectively, and determine the interference state according to the comparison results. Specifically:
[0042] When the energy ratio is greater than the upper threshold of the preset energy ratio threshold range and the yeast activity index is greater than the upper threshold of the preset activity index threshold range, it is in a narrowband interference state. When the energy ratio is less than the lower threshold of the preset energy ratio threshold range or the yeast activity index is less than the lower threshold of the preset activity index threshold range, it is in a broadband interference state. Otherwise, it is in a transition state.
[0043] Furthermore, when in the narrowband interference state, by adjusting the analog circuit parameters and the filter parameters, set a band-stop filter, including:
[0044] SA2.3.1.1: Adjusting the analog circuit parameters: Based on the dynamic center frequency, determine the voltage corresponding to the center frequency and the filter clock frequency. Specifically:
[0045]
[0046] Where: is the voltage corresponding to the center frequency, is the reference voltage, is the lower limit wavelength of the range, is the total adjustment range, is the voltage span, is the dynamic center frequency, is the filter clock frequency, is the frequency multiplication factor;
[0047] SA2.3.1.2: Adjusting the filter parameters: Based on the dynamic center frequency, determine the actual set frequency and the actual stopband width. Specifically:
[0048]
[0049] Wherein: is the actual set frequency, is the dynamic center frequency, is the frequency step size, is the actual stopband width, is the calculated Q value, is the lower limit of the Q value, is the upper limit of the Q value.
[0050] Furthermore, when in the narrowband interference state, by setting the configuration parameters and filter parameters of the triple-peak stopband, a band-stop filter is set, including:
[0051] SA2.3.2.1: Set the configuration parameters of the triple-peak stopband: According to the dynamic center frequency, the main center frequency, the low-frequency auxiliary peak, and the high-frequency auxiliary peak are determined, specifically:
[0052]
[0053] Wherein: is the low-frequency auxiliary peak, is the main center frequency, is the high-frequency auxiliary peak, is the dynamic center frequency, is the auxiliary peak frequency offset;
[0054] SA2.3.2.2: Set the filter parameters: According to the capacitance network in the filter, the quality factor and the stopband width are determined, specifically:
[0055]
[0056] Wherein: is the quality factor, is the input resistance, is the feedback resistance, is the stopband width, is the reference resistance, is the total capacitance.
[0057] Furthermore, a fusion vector is obtained, including:
[0058] SB1: Extract time-frequency features: Through the optocoupler analysis channel, the time-frequency feature intensity is extracted from the output voltage, specifically:
[0059]
[0060] Wherein: is the time-frequency feature intensity, is the output voltage, is the voltage - coefficient conversion factor;
[0061] SB2: Construct a dynamic parameter library: Through the kinetic channel, obtain the specific growth rate according to the substrate concentration and strain parameters in the fermenter, and construct a dynamic parameter library according to the specific growth rate, substrate concentration, and cell yield coefficient;
[0062] SB3: Determine the fusion vector: Through the gated attention coupling module, fuse the time - frequency feature intensity and the kinetic parameters in the dynamic parameter library to obtain a fusion vector, specifically:
[0063]
[0064] Where: is the fusion vector, is the dynamic weight, is the attention score vector, is the time - frequency feature intensity, is the kinetic feature vector in the dynamic parameter library, is the Sigmoid function, is the Sigmoid function.
[0065] Furthermore, perform KL - divergence feature alignment and momentum reprojection, including:
[0066] SC1: KL - divergence feature alignment: According to the time - frequency feature intensity and the kinetic parameters in the dynamic parameter library, obtain the KL - divergence, and at the same time compare the KL - divergence with the preset divergence threshold range, and perform alignment processing on the KL - divergence features according to the comparison result, specifically:
[0067] When the KL - divergence is less than the lower limit of the preset divergence threshold, continue fermentation. When the KL - divergence is within the preset divergence threshold range, update the kinetic parameters until the KL - divergence is less than the lower limit of the preset divergence threshold. Otherwise, start an alarm signal;
[0068] SC2: Perform momentum reprojection: According to the kinetic parameters and momentum projection processing, obtain the final stable value of the kinetic parameters, specifically:
[0069]
[0070] Where: is the projection parameter at the t - th moment, is the momentum coefficient, is the projection parameter at the (t - 1) - th moment, is the total number of time, is the time index, is the t - t’ Projection parameters at a moment.
[0071] Furthermore, the kinetic parameters are updated through an update formula, and the specific update formula is:
[0072]
[0073] Where: is the updated parameter value, is the update coefficient, is the historical stable parameter value, is the actually obtained parameter value.
[0074] Compared with the prior art, the beneficial effects of the present invention are:
[0075] First: Through the multispectral sensor array, the present invention collects multi-dimensional data in the fermentation tank in real time, and synchronizes the multi-dimensional data through timestamp synchronization, realizes second-level data update, and adaptively filters out interference signals according to the real-time fermentation conditions, dynamically adjusts the band-stop filter, avoids error accumulation caused by spectral drift, thus eliminates the lag of the traditional method, realizes continuous dynamic monitoring of the entire fermentation cycle, and improves the timeliness of process control;
[0076] Second: By dynamically adjusting the scale factor, the present invention optimizes the signal-to-noise ratio, separates the effective spectral features from the noise, and expands the stopband range under the broadband interference state, so as to effectively suppress multi-band noise, that is, through adaptive filtering and signal reconstruction, reduces the pollution of noise to spectral data, reduces the error growth rate, and improves the reliability of data;
[0077] Third: Through gated attention coupling, the present invention fuses time-frequency features and kinetic parameters, and updates the model parameters by monitoring the distribution differences between time-frequency features and kinetic parameters, so as to prevent model parameter deviation, solves the non-linear coupling problem of spectra and kinetics, and enhances the generalization ability of the model under small sample conditions;
[0078] Fourth: Through momentum re-projection, the present invention performs a moving average process on the kinetic parameters, suppresses short-term fluctuation interference, and combines historical stable parameters and real-time calculated values to balance the differences between new and old data, avoids parameter oscillations caused by mutations, so as to ensure parameter stability during formula switching or environmental mutations, extends the effective life cycle of the model, and reduces the maintenance frequency. Description of the Drawings
[0079] Figure 1 is the system flow chart of the real-time monitoring system for beer fermentation degree in the present invention;
[0080] Figure 2It is the processing diagram of the spectral signal in the present invention;
[0081] Figure 3 It is the comparison diagram of the spectral signal in the present invention;
[0082] Figure 4 It is the verification diagram of parameter stability in the present invention. Specific Embodiment
[0083] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
[0084] During the process of monitoring the beer fermentation degree, there is a complex non - linear coupling relationship between the malt characteristic spectrum collected by the sensor and the true fermentation degree parameter. Under the condition of small samples, it is difficult for the traditional calibration model to accurately correlate the spectrum and fermentation kinetics and build a model, resulting in a small initial prediction error. And during the dynamic fermentation process, this small initial prediction error will be further amplified due to the spectral drift effect caused by the change of yeast metabolic activity. Therefore, when continuously monitored by the LSTM time - series model, the error growth rate will accumulate over time. So when the production formula is switched, the mutation of the sensor feature space will not only exacerbate the error accumulation, but also cause irreversible deviation of the model parameters, thus increasing the performance attenuation of the system. The technical solution of this application realizes high - precision and anti - interference real - time monitoring of the beer fermentation degree by collecting the diffuse reflection spectrum in the fermentation tank in real time, adaptively adjusting the parameters of the band - stop filter according to the obtained yeast activity index to suppress the spectral drift. At the same time, the extracted time - frequency features are fused with the dynamic parameter library to achieve weighted fusion of multi - source data, and the KL divergence feature alignment is used to monitor the model deviation and trigger parameter update, and the momentum re - projection algorithm is combined to stabilize the parameter output, thus solving the problems of response lag, error accumulation and model deviation of the traditional method.
[0085] Embodiment 1
[0086] Reference Figures 1 - 4, this embodiment provides a real-time monitoring system for beer fermentation degree based on sensors. The real-time monitoring system for beer fermentation degree includes a spectral processing module, a channel constraint module, and a parameter stability module. In this embodiment, the spectral processing module constructs a multi-spectral sensor array by spirally arranging multiple multi-spectral sensors in the fermentation tank, including but not limited to near-infrared spectral sensors, temperature sensor groups, and pressure sensors, to obtain the diffuse reflection spectrum in the fermentation tank. That is, through the set spectral sensor array, the diffuse reflection spectra of the upper, middle, and lower layers in the fermentation tank are obtained. At the same time, through timestamp synchronization, multiple diffuse reflection spectra obtained in the spectral sensor array are data-synchronized to obtain the absorbance value after baseline calibration, specifically:
[0087]
[0088] Where: is the calibrated absorbance value corresponding to removing environmental interference at wavelength , is the original absorbance value corresponding to wavelength , is the total number of reference layers, is the absorbance value corresponding to the i-th reference layer at wavelength , is the layer index of the reference layer, is the wavelength of light.
[0089] In the process of specific implementation, at a light wavelength of 1200 nm, the obtained original absorbance value is 1.10, and the absorbances corresponding to the upper, middle, and lower layers in the fermentation tank are 0.05, 0.07, and 0.06 respectively, then the corresponding calibrated absorbance value is 1.04.
[0090] Furthermore, through the combined setting of multi-scale wavelet transform and band-stop filter, the obtained calibrated absorbance value is processed to obtain the corresponding output voltage. Specifically as follows:
[0091] Step SA1: Perform multi-scale wavelet transform. That is, take the obtained calibrated absorbance value as the input, and at the same time, according to the current scale factor size, output and obtain the corresponding wavelet coefficients, specifically:
[0092]
[0093] Where: is the wavelet coefficient corresponding to the scale factor of and the translation parameter of at wavelength is the scale factor, is the translation parameter, is the wavelength The calibrated absorbance value corresponding to the removal of environmental interference is the wavelength of light, is the discrete wavelet basis function.
[0094] Furthermore, by obtaining the wavelet coefficients, the current scale factor is adjusted, and based on the adjusted scale factor, the wavelet coefficients are re-adjusted. Specifically as follows:
[0095] Step SA1.1: Determine the current signal-to-noise ratio. That is, based on the obtained wavelet coefficients, the current signal-to-noise ratio is obtained, specifically:
[0096]
[0097] Where: is the current signal-to-noise ratio, is the wavelet coefficient corresponding to the scale factor of 5 and the translation parameter of at the position, is the wavelet coefficient corresponding to the scale factor of 1 and the translation parameter of at the position, is the translation parameter.
[0098] Step SA1.2: Scale factor adjustment. That is, compare the current signal-to-noise ratio obtained in step SA1.1 with the set target signal-to-noise ratio threshold (which is specifically set according to actual needs, so it is not specifically elaborated in this embodiment) to obtain the signal-to-noise ratio deviation between the current signal-to-noise ratio and the target signal-to-noise ratio threshold. At the same time, based on the obtained signal-to-noise ratio deviation and the scale factor, the adjusted scale factor is obtained, specifically:
[0099]
[0100] Where: is the adjusted scale factor, is the initial scale factor, is the current signal-to-noise ratio, is the target signal-to-noise ratio threshold.
[0101] Step SA1.3: Wavelet coefficient adjustment. That is, based on the adjusted scale factor determined in step SA1.2, and at the same time according to the wavelet coefficient acquisition formula in step SA1, the adjusted wavelet coefficients are obtained.
[0102] Step SA2: Band-stop filter processing. That is, based on the real-time fermentation temperature and pressure in the fermenter, the interference bandwidth of the band-stop filter is determined, and the band-stop filter is set according to the interference bandwidth. At the same time, through the set band-stop filter, the adjusted wavelet coefficients obtained in step SA1.3 are processed to obtain the corresponding voltage signal. Specifically as follows:
[0103] Step SA2.1: Obtain the yeast activity index. That is, through the temperature sensor and the pressure sensor, obtain the fermentation temperature and pressure in the fermentation tank respectively. At the same time, according to the threshold temperature at which yeast in the fermentation tank starts to metabolize, the upper temperature limit at which yeast metabolic activity starts to decline, and the upper pressure limit during normal yeast metabolism in the fermentation tank, determine the yeast activity index, specifically as follows:
[0104]
[0105] Wherein: is the yeast activity index, is the current fermentation temperature, is the minimum activation temperature of yeast, is the maximum tolerance temperature of yeast, is the current fermentation tank pressure, is the saturation pressure threshold.
[0106] In the process of specific implementation, the current fermentation temperature in the fermentation tank is 18 °C, the threshold temperature at which yeast in the fermentation tank starts to metabolize is 8 °C, the upper temperature limit at which yeast metabolic activity starts to decline is 22 °C, and at the same time the current fermentation tank pressure is 1.3 bar, and the upper pressure limit during normal yeast metabolism in the fermentation tank is 1.5 bar. Then the corresponding yeast activity index is 0.62.
[0107] Reference Figure 2 and Figure 3 , Figure 2 is the processing diagram of the spectral signal in this embodiment, Figure 3 is the comparison diagram of the spectral signal in this embodiment. From Figure 2 and Figure 3 it can be seen that: through timestamp synchronization and baseline calibration, environmental interference can be successfully eliminated, the signal-to-noise ratio can be increased by 20 dB, thereby improving the purity of spectral data and reducing the impact of spectral drift on the model.
[0108] Step SA2.2: Judge the interference bandwidth. That is, compare the yeast activity index obtained in step SA2.1 with the wavelet coefficients obtained in step SA1.3, and judge the interference bandwidth according to the comparison result, specifically as follows:
[0109] Step SA2.2.1: Obtain the expected interference frequency band. That is, compare the yeast activity index obtained in step SA2.1 with the set activity offset threshold, and determine the expected interference frequency according to the comparison result and the reference center frequency, specifically as follows:
[0110]
[0111] Wherein: is the dynamic center frequency, is the reference center frequency, is the frequency adjustment amplitude, is the hyperbolic tangent function, is the yeast activity index, is the activity offset threshold.
[0112] In the process of specific implementation, the yeast activity index is 0.62, the activity offset threshold is 0.5, the reference center frequency is 1300 nm, and the frequency adjustment amplitude is 50 nm. Then the corresponding expected interference frequency is 1328 nm.
[0113] Step SA2.2.2: Obtain the energy ratio. That is, according to the dynamic center frequency and the preset frequency fluctuation value obtained in step SA2.2.1, determine the target band. At the same time, according to the adjusted wavelet coefficients obtained in step SA1.3, obtain all the wavelet coefficients in the full band and all the wavelet coefficients in the target band, and determine the corresponding energy ratio. Specifically:
[0114]
[0115] Where: is the energy ratio, is the set of target bands, is the set of full bands, is at the scale factor of and the translation parameter is the corresponding wavelet coefficient at.
[0116] In the process of specific implementation, the set of full bands is set to the band of 1200 - 1450 nm, the expected interference frequency is 1328 nm, and the preset frequency fluctuation value is set to 25 nm. Then the corresponding set of target bands is the band of 1303 nm - 1353 nm. That is, by obtaining the wavelet coefficients in the range of 1200 - 1450 nm and the wavelet coefficients in the range of 1303 nm - 1353 nm, the corresponding energy ratio is determined to be 83%.
[0117] Step SA2.2.3: Determine the interference state. That is, compare the energy ratio obtained in step SA2.2.2 and the yeast activity index obtained in step SA2.1 with the preset energy ratio threshold range and the preset activity index threshold range respectively, and determine the interference state according to the comparison results. Specifically:
[0118] When the obtained energy ratio is greater than the upper threshold of the preset energy ratio threshold range, and the obtained yeast activity index is greater than the upper threshold of the preset activity index threshold range, it is in a narrowband interference state at this time. Further, when the obtained energy ratio is less than the lower threshold of the preset energy ratio threshold range, or the obtained yeast activity index is less than the lower threshold of the preset activity index threshold range, it is in a wideband interference state at this time. Otherwise, it is in a transition state.
[0119] Step SA2.3: Determine the voltage signal. That is, according to the bandwidth interference determined in step SA2.2.3, set a band-stop filter, and obtain the corresponding voltage signal through the set band-stop filter and the adjusted wavelet coefficients obtained in step SA1.3. Specifically:
[0120]
[0121] Where: is the output voltage, is the adjusted wavelet coefficient, is the DAC conversion coefficient, is the attenuation.
[0122] In the process of specific implementation, the adjusted wavelet coefficient is 0.25, the DAC conversion coefficient is 3.3, then the corresponding input voltage is 0.825, and the attenuation in this embodiment is set to -40, then the corresponding output voltage is 0.00825.
[0123] In this embodiment, the channel constraint module processes the voltage signal obtained in step SA2.3 through the optocoupler analysis channel to obtain the corresponding time-frequency feature intensity. Construct a dynamic parameter library through the kinetic channel and the substrate concentration and strain parameters in the fermenter to obtain the kinetic feature vector. Through the gated attention coupling module, fuse the obtained time-frequency feature intensity and kinetic feature vector to obtain the fusion vector. Specifically as follows:
[0124] Step SB1: Extract time-frequency features. That is, through the optocoupler analysis channel, extract the corresponding time-frequency feature intensity from the voltage signal obtained in step SA2.3. Specifically:
[0125]
[0126] Where: is the time-frequency feature intensity, is the output voltage, is the voltage-coefficient conversion factor.
[0127] In the process of specific implementation, the output voltage is 0.00825, and the voltage - coefficient conversion factor is 3.3, so the corresponding time - frequency feature intensity is 0.0025.
[0128] Step SB2: Construct a dynamic parameter library. That is, through the kinetic channel, according to the substrate concentration and strain parameters in the fermenter, the corresponding specific growth rate is obtained, specifically:
[0129]
[0130] Where: is the specific growth rate, is the maximum specific growth rate, is the substrate concentration, is the half - saturation constant, is the hardware multiplier, is the hardware adder, is the number of characteristic wavelengths, is the regression coefficient of the j - th wavelength, is the index of the characteristic wavelength, is the wavelength The corresponding calibrated absorbance value after removing environmental interference at, is the wavelength of light.
[0131] In the process of specific implementation, the substrate concentration in the fermenter is 12.5 g / L, the half - saturation constant is 0.8 g / L, and the maximum specific growth rate is 0.35 h -1 , then the corresponding specific growth rate is 0.329 h -1 .
[0132] Furthermore, the obtained specific growth rate, substrate concentration, and cell yield coefficient are used as a set of characteristic data to construct a dynamic parameter library.
[0133] Step SB3: Determine the fusion vector. That is, through the gated attention coupling module, according to the time - frequency feature intensity obtained in step SB1 and the kinetic parameters in the dynamic parameter library constructed in step SB2, the attention score vector is determined, specifically:
[0134]
[0135] Where: is the attention score vector, is the time - frequency feature intensity, is the trainable weight matrix, is the kinetic feature vector in the dynamic parameter library, is the characteristic dimension constant.
[0136] Furthermore, according to the determined attention score vector, the time-frequency feature intensity obtained in step SB1 and the kinetic parameters in the dynamic parameter library constructed in step SB2 are combined to obtain a corresponding fusion vector, specifically:
[0137]
[0138] Where: is the fusion vector, is the dynamic weight, is the attention score vector, is the time-frequency feature intensity, is the kinetic feature vector in the dynamic parameter library, is the Sigmoid function, is the Sigmoid function.
[0139] In this embodiment, the parameter stability module aligns the KL divergence features according to the time-frequency feature intensity obtained in step SB1 and the kinetic parameters in the dynamic parameter library constructed in step SB2, and at the same time performs momentum reprojection, specifically as follows:
[0140] Step SC1: KL divergence feature alignment. That is, according to the time-frequency feature intensity obtained in step SB1 and the kinetic parameters in the dynamic parameter library constructed in step SB2, the corresponding KL divergence is obtained, specifically:
[0141]
[0142] Where: is the KL divergence, is the feature dimension index, is the total number of feature dimensions, is the r-th time-frequency feature intensity, is the r-th kinetic feature vector in the dynamic parameter library.
[0143] Furthermore, the obtained KL divergence is compared with the preset divergence threshold range, and according to the comparison result, the KL divergence features are aligned. Specifically:
[0144] When the obtained KL divergence is less than the lower limit of the preset divergence threshold, continue fermentation. When the obtained KL divergence is within the preset divergence threshold range, update the kinetic parameters in the dynamic parameter library until the obtained KL divergence is less than the lower limit of the preset divergence threshold. Otherwise, run through the time-frequency feature intensity and kinetic feature vector in the safe mode, and at the same time start the alarm signal.
[0145] Furthermore, the kinetic parameters in the dynamic parameter library are updated through the update formula, which is specifically:
[0146]
[0147] where: is the updated parameter value, is the update coefficient, is the historical stable parameter value, is the actually obtained parameter value.
[0148] In the process of specific implementation, the kinetic parameters are updated through the update formula, and the following update data table in Table 1 is obtained, specifically:
[0149] Table 1: Update Data Table
[0150]
[0151] Step SC2: Perform momentum reprojection. That is, according to the kinetic parameters in the dynamic parameter library constructed in step SB2, momentum projection processing is performed on each kinetic parameter to obtain the final stable value of each kinetic parameter, specifically:
[0152]
[0153] where: is the projection parameter at the t-th moment, is the momentum coefficient, is the projection parameter at the (t - 1)-th moment, is the total number of time, is the time index, is the projection parameter at the (t - t ’ -th moment.
[0154] In the process of specific implementation, the maximum specific growth rates obtained at three consecutive moments are 0.35 h -1 , 0.33 h -1 and 0.34 h -1 respectively. At the same time, the momentum coefficient is set to 0.9, and the stable value of the corresponding maximum specific growth rate is 0.341 h -1 .
[0155] Refer to Figure 4 , Figure 4 which is the parameter stability verification diagram in this embodiment. It can be seen from Figure 4 that through KL divergence dynamic alignment and momentum reprojection optimization, the model convergence speed can be improved, parameter deviation under small samples can be avoided, and the performance decay problem of traditional static models during formula switching can be solved.
[0156] Example 2
[0157] This embodiment provides a real-time monitoring system for beer fermentation degree based on sensors. The specific implementation method is the same as that of Embodiment 1, except that in step SA2.3, a band-stop filter is set according to the bandwidth interference determined in step SA2.2.3. The present invention will be illustrated below in conjunction with the specific implementation manners of this embodiment.
[0158] In this embodiment, the band-stop filter is set as follows:
[0159] Step SA2.3.1: Narrowband interference processing. That is, when in the narrowband interference state, the analog circuit parameters and filter parameters are adjusted. Specifically as follows:
[0160] Step SA2.3.1.1: Adjust the analog circuit parameters. That is, according to the dynamic center frequency determined in step SA2.2.1, the voltage corresponding to the center frequency and the filter clock frequency are determined. Specifically:
[0161]
[0162] Wherein: is the voltage corresponding to the center frequency, is the reference voltage, is the lower wavelength limit of the range, is the total adjustment range, is the voltage span, is the dynamic center frequency, is the filter clock frequency, is the frequency multiplication factor.
[0163] Step SA2.3.1.2: Adjust the filter parameters. That is, according to the dynamic center frequency determined in step SA2.2.1, the actual set frequency and the actual stopband width are determined. Specifically:
[0164]
[0165] Wherein: is the actual set frequency, is the dynamic center frequency, is the frequency step size, is the actual stopband width, is the calculated Q value, is the lower limit of the Q value, is the upper limit of the Q value.
[0166] Step SA2.3.2: Wideband interference processing. That is, when in the wideband interference state, the configuration parameters and filter parameters for setting a three-peak stopband are adjusted. Specifically as follows:
[0167] Step SA2.3.2.1: Set the configuration parameters of the triple-peak stopband. That is, according to the dynamic center frequency determined in Step SA2.2.1, determine the main center frequency, the low-frequency auxiliary peak, and the high-frequency auxiliary peak. Specifically:
[0168]
[0169] Where: is the low-frequency auxiliary peak, is the main center frequency, is the high-frequency auxiliary peak, is the dynamic center frequency, is the auxiliary peak frequency offset.
[0170] Step SA2.3.2.2: Set the filter parameters. That is, according to the setting of the capacitor network in the filter, determine the quality factor and the stopband width. Specifically:
[0171]
[0172] Where: is the quality factor, is the input resistance, is the feedback resistance, is the stopband width, is the reference resistance, is the total capacitance.
[0173] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principle and spirit of the present invention. The scope of the present invention is defined by the appended embodiments and their equivalents.
Claims
1. A sensor-based real-time monitoring system for beer fermentation degree, characterized in that, It includes: A spectrum processing module that constructs a multispectral sensor array, obtains the diffuse reflection spectrum inside the fermenter, synchronizes the data of the diffuse reflection spectrum through timestamp synchronization, obtains the absorbance value after baseline calibration, and simultaneously processes the absorbance value after baseline calibration to obtain an output voltage, including: SA1: Perform multi-scale wavelet transform: According to the absorbance value after baseline calibration and the scale factor, obtain wavelet coefficients, adjust the scale factor through the wavelet coefficients, and obtain the adjusted wavelet coefficients according to the adjusted scale factor; SA2: Band-stop filter processing: Determine the interference bandwidth of the band-stop filter according to the real-time fermentation temperature and pressure inside the fermenter, set the band-stop filter according to the interference bandwidth, and simultaneously obtain a voltage signal through the set band-stop filter and the adjusted wavelet coefficients; A channel constraint module that processes the output voltage and the substrate concentration and strain parameters inside the fermenter through an optocoupler analysis channel, a kinetics channel, and a gated attention coupling module to obtain a fusion vector; A parameter stability module that performs KL divergence feature alignment and momentum reprojection according to the output voltage and the substrate concentration and strain parameters inside the fermenter.
2. The real-time monitoring system for beer fermentation degree based on sensors according to claim 1, characterized in that, Through timestamp synchronization, synchronize the data of the diffuse reflection spectrum to obtain the absorbance value after baseline calibration, specifically: ; Wherein: is the calibration absorbance value corresponding to the removal of environmental interference at wavelength , is the original absorbance value corresponding to wavelength , is the total number of reference layers, is the absorbance value of the i-th reference layer at wavelength , is the layer index of the reference layer, is the wavelength of light.
3. A real-time monitoring system for beer fermentation degree based on sensors according to claim 1, characterized in that Obtain the adjusted wavelet coefficients, including: SA1.1: Determine the current signal-to-noise ratio: According to the wavelet coefficients, obtain the current signal-to-noise ratio, specifically: ; Wherein: is the current signal-to-noise ratio, is the wavelet coefficient corresponding to the scale factor of 5 and the translation parameter of at the position, is the wavelet coefficient corresponding to the scale factor of 1 and the translation parameter of at the position, is the translation parameter; SA1.2: Scale factor adjustment: Compare the current signal-to-noise ratio with the target signal-to-noise ratio threshold, obtain the signal-to-noise ratio deviation between the current signal-to-noise ratio and the target signal-to-noise ratio threshold, and simultaneously obtain the adjusted scale factor according to the signal-to-noise ratio deviation and the scale factor, specifically: ; Wherein: is the adjusted scale factor, is the initial scale factor, is the current signal-to-noise ratio, is the target signal-to-noise ratio threshold; SA1.3: Wavelet coefficient adjustment: According to the adjusted scale factor and the wavelet coefficient acquisition formula, obtain the adjusted wavelet coefficients, and the wavelet coefficient acquisition formula is specifically: ; Wherein: is the wavelet coefficient corresponding to the scale factor of and the translation parameter of ; is the scale factor, is the translation parameter, is the wavelength is the calibrated absorbance value corresponding to the removal of environmental interference at is the wavelength of light, is the discretized wavelet basis function.
4. The real-time monitoring system for beer fermentation degree based on sensors according to claim 1, wherein Obtain a voltage signal through the set band-stop filter and the adjusted wavelet coefficients, including: SA2.1: Obtain the yeast activity index: Obtain the fermentation temperature and pressure inside the fermenter through a temperature sensor and a pressure sensor, and determine the activity index of the yeast, specifically: ; Wherein: is the yeast activity index, is the current fermentation temperature, is the minimum activation temperature of the yeast, is the maximum tolerance temperature of the yeast, is the current fermenter pressure, is the saturation pressure threshold; SA2.2: Judge the interference bandwidth: Compare the activity index of the yeast with the adjusted wavelet coefficients, and judge the interference bandwidth according to the comparison result; SA2.3: Determine the voltage signal: Set the band-stop filter according to the interference bandwidth, and simultaneously obtain the voltage signal according to the band-stop filter and the adjusted wavelet coefficients, specifically: ; Wherein: is the output voltage, is the adjusted wavelet coefficient, is the DAC conversion coefficient, is the attenuation amount.
5. The real-time monitoring system for beer fermentation degree based on sensors according to claim 4, wherein Judge the interference bandwidth, including: SA2.2.1: Obtain the expected interference frequency band: Compare the activity index of the yeast with the activity offset threshold, and determine the expected interference frequency according to the comparison result and the reference center frequency, specifically: ; Wherein: is the dynamic center frequency, is the reference center frequency, is the frequency adjustment amplitude, is the hyperbolic tangent function, is the yeast activity index, is the activity offset threshold; SA2.2.2: Obtain the energy ratio: Based on the expected interference frequency and the preset frequency fluctuation value, determine the target band. At the same time, based on the adjusted wavelet coefficients within the target band and the adjusted wavelet coefficients in the full band, determine the corresponding energy ratio. Specifically: ; Wherein: is the energy ratio, is the target band set, is the full band set, is at the scale factor of , and the translation parameter is the corresponding wavelet coefficient at that position; SA2.2.3: Determine the interference state: Compare the energy ratio and the yeast activity index with the preset energy ratio threshold range and the preset activity index threshold range respectively, and determine the interference state according to the comparison results. Specifically: When the energy ratio is greater than the upper threshold of the preset energy ratio threshold range and the yeast activity index is greater than the upper threshold of the preset activity index threshold range, it is in the narrowband interference state. When the energy ratio is less than the lower threshold of the preset energy ratio threshold range or the yeast activity index is less than the lower threshold of the preset activity index threshold range, it is in the wideband interference state. Otherwise, it is in the transition state.
6. The real-time monitoring system for beer fermentation degree based on sensors according to claim 4, characterized in that When in the narrowband interference state, set the band-stop filter by adjusting the analog circuit parameters and the filter parameters, including: SA2.3.1.1: Adjust the analog circuit parameters: Determine the voltage corresponding to the center frequency and the filter clock frequency through the dynamic center frequency. Specifically: ; Wherein: is the voltage corresponding to the center frequency, is the reference voltage, is the lower wavelength limit of the range, is the total adjustment range, is the voltage span, is the dynamic center frequency, is the filter clock frequency, is the frequency multiplication factor; SA2.3.1.2: Adjust the filter parameters: Determine the actual set frequency and the actual stopband width through the dynamic center frequency. Specifically: ; Wherein: is the actually set frequency, is the dynamic center frequency, is the frequency step size, is the actual stopband width, is the calculated Q value, is the lower limit of the Q value, is the upper limit of the Q value.
7. A real-time monitoring system for beer fermentation degree based on sensors according to claim 4, characterized in that, When in the narrowband interference state, set the band-stop filter by setting the configuration parameters and the filter parameters of the triple-peak stopband, including: SA2.3.2.1: Set the configuration parameters of the triple-peak stopband: Determine the main center frequency, the low-frequency secondary peak, and the high-frequency secondary peak according to the dynamic center frequency. Specifically: ; Wherein: is a low-frequency auxiliary peak, is the main center frequency, is a high-frequency auxiliary peak, is the dynamic center frequency, is the auxiliary peak frequency offset; SA2.3.2.2: Set the filter parameters: Determine the quality factor and the stopband width according to the capacitor network in the filter. Specifically: ; Wherein: is the quality factor, is the input resistance, is the feedback resistance, is the stopband width, is the reference resistance, is the total capacitance.
8. A real-time monitoring system for beer fermentation degree based on sensors according to claim 1, characterized in that Obtain the fusion vector, including: SB1: Extract time-frequency features: Extract the time-frequency feature intensity from the output voltage through the optocoupler analysis channel. Specifically: ; Wherein: is the time-frequency feature intensity, is the output voltage, is the voltage-coefficient conversion factor; SB2: Construct the dynamic parameter library: Through the kinetics channel, obtain the specific growth rate according to the substrate concentration and the strain parameters in the fermenter, and construct the dynamic parameter library according to the specific growth rate, the substrate concentration, and the cell yield coefficient; SB3: Determine the fusion vector: Through the gated attention coupling module, fuse the time-frequency feature intensity and the kinetic parameters in the dynamic parameter library to obtain the fusion vector. Specifically: ; Wherein: is the fusion vector, is the dynamic weight, is the attention score vector, is the time-frequency feature intensity, is the kinetic feature vector in the dynamic parameter library, is the Sigmoid function, is the Sigmoid function.
9. The real-time monitoring system for beer fermentation degree based on sensors according to claim 1, characterized in that, Perform KL divergence feature alignment and momentum reprojection, including: SC1: KL divergence feature alignment: Obtain the KL divergence according to the time-frequency feature intensity and the kinetic parameters in the dynamic parameter library. At the same time, compare the KL divergence with the preset divergence threshold range, and perform alignment processing on the KL divergence features according to the comparison results. Specifically: When the KL divergence is less than the lower limit of the preset divergence threshold, continue the fermentation. When the KL divergence is within the preset divergence threshold range, update the kinetic parameters until the KL divergence is less than the lower limit of the preset divergence threshold. Otherwise, start the alarm signal; SC2: Perform momentum reprojection: According to the kinetic parameters and momentum projection processing, obtain the final stable value of the kinetic parameters, specifically: ; Wherein: is the projection parameter at the t-th moment, is the momentum coefficient, is the projection parameter at the (t - 1)-th moment, is the total number of time, is the time index, is the projection parameter at the t - t ’ moment.
10. A real-time monitoring system for beer fermentation degree based on sensors according to claim 9, characterized in that, Update the kinetic parameters through an update formula, and the specific update formula is: ; Wherein: is the updated parameter value, is the update coefficient, is the historical stable parameter value, is the actually obtained parameter value.
Citation Information
Patent Citations
Online rapid ultraviolet spectrum total nitrogen detection method based on attention mechanism
CN113029993A
Cited By
Beer gas stripping hop adding control method and device based on parameter self-adjustment
CN120758301A