Cheese filling flow real-time calibration control method and system

The cheese filling flow control method, which combines dynamic filtering and neural network models, solves the problems of signal interference and variable operating conditions during the cheese filling process, and achieves high-precision and stable flow control, ensuring product quality and production efficiency.

CN121106874APending Publication Date: 2025-12-12DR CHEESE (ANHUI) FOOD TECH CO LTD
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202511265896.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

During the cheese filling process, the flow signal is easily affected by temperature drift, mechanical vibration and turbulence noise. Traditional filtering methods cannot dynamically adapt the signal-to-noise ratio, resulting in insufficient flow control accuracy and stability, which affects product weight consistency and production efficiency.

Method used

By collecting filling pipeline information in real time, dynamically selecting the filter order, combining a neural network model to predict the dynamic viscosity of cheese, calibrating graded PID parameters, and optimizing flow control, adaptive adjustment is achieved.

Benefits of technology

It improves the accuracy of flow detection and control stability, ensures product weight consistency and production efficiency, and significantly enhances the control accuracy and robustness of the cheese filling process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121106874A_ABST
    Figure CN121106874A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of flow measurement and control, and particularly discloses a cheese filling flow real-time calibration control method and system.The cheese filling flow real-time calibration control method comprises the following steps that working condition information of cheese in a filling pipeline is collected in real time, and the working condition information comprises the temperature, the pressure, an original flow signal, the pump rotating speed and the proportional valve opening degree; dynamically selecting a filtering order according to the signal-to-noise ratio of the original flow signal, and outputting the filtered flow; and based on the acquired working condition information, predicting the dynamic viscosity of the cheese in real time through a neural network, fitting a flow-working condition relation function and calculating a target flow value. The signal-to-noise ratio of an original flow signal is dynamically adapted to optimize filtering processing, signal distortion caused by interference such as temperature drift and mechanical vibration is effectively eliminated, and the flow detection precision is improved; by means of the neural network, the dynamic viscosity of cheese is predicted in real time, the model is dynamically adjusted, the problems that traditional viscosity estimation lags behind, and the batch adaptability is poor are solved, and an accurate basis is provided for flow target value calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flow measurement and control technology, specifically to a method and system for real-time calibration and control of cheese filling flow. Background Technology

[0002] In cheese production, the accuracy of flow control during the filling process directly affects product weight consistency, packaging sealing, and final quality, making it a crucial step in ensuring production efficiency and product standardization. However, as a complex non-Newtonian fluid, cheese's physical properties (especially dynamic viscosity) are significantly influenced by factors such as temperature, pressure, and pump speed, leading to non-linear fluctuations in flow rate during filling. Traditional control methods struggle to meet the demands for high precision and stability in production, presenting the following key technical challenges: The cheese flow signal in the filling pipeline is easily affected by temperature drift, mechanical vibration and turbulence noise. Traditional filtering methods mostly use fixed-order filtering, which cannot dynamically adapt to the real-time changes in the signal-to-noise ratio. For example, during the stable flow stage, excessive filtering can easily lose details, while during the sudden flow stage, insufficient filtering can retain too much noise, resulting in distortion of the original flow signal, affecting the accuracy of subsequent control decisions, and thus causing flow deviation. Summary of the Invention

[0003] This invention aims to at least partially solve one of the technical problems in related technologies. Therefore, the objective of this invention is to propose a method and system for real-time calibration and control of cheese filling flow rate, so as to achieve adaptive control and adjustment of flow rate throughout the entire cheese filling process.

[0004] To achieve the above objectives, a first aspect of the present invention provides a method for real-time calibration and control of cheese filling flow rate, comprising the following steps: S1. Real-time acquisition of cheese operating conditions information in the filling pipeline, including temperature, pressure, raw flow signal, pump speed and proportional valve opening degree, dynamically selects the filtering order according to the signal-to-noise ratio of the raw flow signal, and outputs the filtered flow. S2. Based on the above-collected operating condition information, the dynamic viscosity of cheese is predicted in real time through a neural network model, the flow rate-operating condition relationship function is fitted, and the target flow rate value is calculated. S3. Trigger graded PID parameter calibration based on the residual between the target flow rate and the filtered flow rate, and optimize parameters by dividing the interval according to the preset viscosity threshold; S4. Based on the current operating conditions, predict the proportional valve action delay time, generate an advance command, and limit the valve action rate; S5. Update the model after single-bottle filling, and force calibration when the residual continues to exceed the limit.

[0005] To achieve the above objectives, a second aspect of the present invention provides a real-time calibration and control system for cheese filling flow rate, comprising: The operating condition acquisition module is used to collect real-time data on the temperature, pressure, raw flow signal, pump speed and proportional valve opening of the cheese in the filling pipeline, and transmit the collected data to the data processing module. The data processing module is communicatively connected to the operating condition acquisition module and is configured to dynamically select the filtering order based on the signal-to-noise ratio of the original flow signal and output the filtered flow. The filtering order selection logic includes temperature drift correction, adaptive sliding window calculation, and noise feature matching. The dynamic viscosity prediction module is connected to the data processing module and has a built-in lightweight neural network model for real-time prediction of the dynamic viscosity of cheese based on operating condition information, and for fitting the flow-operating condition relationship function to calculate the target flow value. The model supports batch initial correction, abnormal operating condition interpolation switching and small sample data expansion. The graded control module is connected to the data processing module and the dynamic viscosity prediction module respectively. It is configured to trigger graded PID parameter calibration based on the residual between the target flow rate and the filtered flow rate, optimize parameters according to viscosity range and achieve smooth transition, and generate advance command and limit valve action rate based on the prediction of proportional valve action delay time under current operating conditions. The model update module is connected in communication with the graded control module. It is used to update the parameters of the neural network model after a single bottle is filled. When the residual continuously exceeds the standard, a forced calibration mechanism is triggered, and calibration data is recorded to optimize subsequent control logic.

[0006] To achieve the above objectives, a third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein when the computer program is executed by the processor, it implements the above-described real-time calibration control method for cheese filling flow.

[0007] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention discloses a real-time calibration and control method and system for cheese filling flow. By dynamically adapting the signal-to-noise ratio of the original flow signal to optimize filtering, it effectively eliminates signal distortion caused by interference such as temperature drift and mechanical vibration, thereby improving flow detection accuracy. By using a neural network to predict the dynamic viscosity of cheese in real time and dynamically adjust the model, it solves the problems of lag in traditional viscosity estimation and poor batch adaptability, providing an accurate basis for calculating the target flow value. Furthermore, the graded PID parameter calibration and viscosity range-based optimization of control parameters enable smooth transition and adaptive adjustment of control parameters, avoiding flow fluctuations under different viscosity conditions and ensuring control stability during long-term operation. This solution achieves adaptive flow control throughout the cheese filling process, significantly improving the accuracy and robustness of flow control and effectively ensuring product weight consistency and production efficiency. Attached Figure Description

[0008] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein: Figure 1 This is a flowchart illustrating the real-time calibration and control method for cheese filling flow provided by the present invention. Figure 2 These are schematic diagrams (a), (b), and (c) comparing the signals before and after temperature drift correction in the real-time calibration and control method for cheese filling flow provided by this invention. Figure 3 These are schematic diagrams (d) and (e) comparing the dynamic filtering effects under different signal-to-noise ratios in the real-time calibration and control method for cheese filling flow provided by this invention. Figure 4 This is a scatter plot comparing the predicted and actual values ​​of the neural network model in the real-time calibration and control method for cheese filling flow provided by this invention. Figure 5 These are schematic diagrams (f) and (g) comparing the structural performance of different viscosity range models in the real-time calibration and control method for cheese filling flow provided by this invention. Figure 6 These are schematic diagrams (h) and (i) illustrating the valve command advance and rate limiting effects in the real-time calibration control method for cheese filling flow provided by this invention. Figure 7 This is a schematic diagram of the cheese filling flow real-time calibration control system provided by the present invention; Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0009] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0010] The following description, with reference to the accompanying drawings, illustrates a real-time calibration control method, system, and electronic device for cheese filling flow according to embodiments of the present invention.

[0011] Example 1: Figure 1 This is a flowchart illustrating the real-time calibration and control method for cheese filling flow provided by the present invention.

[0012] It is important to understand that in the filling process of cheese, a high-viscosity, non-Newtonian fluid, the accuracy and stability of the flow signal are the cornerstones of achieving precise control. However, two major technical challenges exist in actual working conditions: First, signal interference is complex: flow signals are highly susceptible to interference from various factors, such as high-frequency electromagnetic noise from equipment motors, low-frequency mechanical vibration caused by pump pulsation, and sensor baseline drift due to changes in ambient temperature. These interferences can severely contaminate the original flow signal, leading to a decrease in the signal-to-noise ratio (SNR). Secondly, the operating conditions are dynamic and changeable: the filling process is not a uniform steady state; the flow rate changes drastically at the moment of start-up, stop, and valve adjustment. Traditional fixed-parameter filters cannot simultaneously suppress noise during the steady phase and track signals during the abrupt change phase. If the filter is too strong, it will lead to signal delay and distortion; if the filter is too weak, it will not effectively filter out noise.

[0013] Step S1 involves real-time acquisition of the cheese's operating conditions within the filling pipeline, including temperature, pressure, raw flow signal, pump speed, and proportional valve opening. The filtering order is dynamically selected based on the signal-to-noise ratio of the raw flow signal, and the filtered flow rate is output. By dynamically adapting the filtering order, interference in the raw flow signal, such as temperature drift, mechanical vibration, and electronic noise, is eliminated, resulting in a high-precision filtered flow rate. This provides a reliable data foundation for subsequent viscosity prediction and flow control. The implementation process revolves around three stages: signal correction, signal-to-noise ratio calculation, and targeted filtering, achieving a precise conversion from the raw signal to the effective signal.

[0014] The dynamic selection of the filter order based on the signal-to-noise ratio of the original flow signal includes the following steps: S11. Temperature drift correction is applied to the original flow signal because the baseline of the flow sensor drifts with temperature changes. For example, for every 5°C increase in temperature, the baseline shifts by 0.5% of full scale. However, temperature fluctuations during cheese filling are significant, typically ranging from 10-40°C, requiring a temperature correlation model to eliminate this interference. Therefore, the system simultaneously acquires temperature sensor readings while acquiring the original flow signal. This method establishes a quantitative correlation model between temperature and the zero-point drift of the flow sensor through experimental calibration or historical data analysis. During real-time operation, the system calculates the expected drift amount based on the currently acquired temperature using this model and subtracts this drift amount from the original flow signal, thus completing real-time compensation and correction of the signal.

[0015] For example, the specific operation can be: (1) Establishment of calibration curve: In the laboratory environment, keep other parameters (pressure, speed) constant and only change the temperature. Collect the baseline values ​​of the sensor at different temperatures and fit the "temperature-baseline drift" calibration curve.

[0016] For example, a linear or polynomial function: Baseline drift = k × temperature + b, where k and b are calibration coefficients; k is the temperature drift coefficient (unit: mL / (min・℃), representing the baseline drift corresponding to each 1℃ increase in temperature; b is the initial drift at 0℃ (unit: mL / min); k and b are calibrated experimentally, for example, by collecting at least 5 sets of temperature-drift data in the range of 10-40℃ and fitting them using the least squares method.

[0017] (2) Real-time correction: During the filling process, the temperature sensor collects the temperature of the cheese in the pipeline in real time. The sampling frequency is ≥100Hz. The baseline drift corresponding to the current temperature is calculated according to the calibration curve. The original flow signal is then compensated in reverse. That is, the corrected signal = the original signal - the baseline drift.

[0018] (3) Dynamic update: Before each batch of cheese is produced, the calibration curve is fine-tuned using the temperature and flow data of the first bottle filling. For example, when the deviation exceeds 0.2% of the full scale, the k and b values ​​are updated to adapt to the differences in thermal characteristics of different batches of cheese.

[0019] like Figure 2 A schematic diagram comparing the signals before and after temperature drift correction is shown. Figure (a) illustrates the relationship between temperature and baseline drift, where the blue curve simulates a scenario with significant temperature fluctuations (10-40℃) during the filling process, showing the change in cheese temperature inside the pipe over time; the red curve represents the drift calculated based on the temperature-baseline drift calibration curve. It clearly demonstrates how temperature changes directly and proportionally cause sensor baseline drift. Figure (b) shows the contaminated original signal, where the black dashed line represents the desired actual flow rate signal, containing a slow sinusoidal fluctuation and a step change (simulating filling start-up or stop); the red curve is the simulated original flow rate signal. It is evident that the overall shape of the red curve no longer coincides with the black dashed line, and its peaks and troughs are distorted by the temperature / drift curve in Figure (a). For example, at approximately t=25 seconds (temperature peak), the overall amplitude of the red signal is significantly increased, empirically demonstrating the technical problem of temperature drift causing distortion of the original flow rate signal. Figure (c) shows the signal after correction using this method, where the green curve represents the result after applying the method (corrected signal = original signal - baseline drift). The green curve closely matches the black dashed line, especially in the low-frequency trend and absolute amplitude of the signal. The temperature-induced rise and fall were effectively eliminated. This strongly demonstrates the success of the temperature drift correction to the original flow signal. After correction, the signal more accurately reflects the true changes in flow rate, providing a reliable data basis for viscosity prediction in the subsequent S2 step.

[0020] Compared to traditional methods that ignore the effects of temperature, this step significantly improves the absolute measurement accuracy of the flow signal and avoids cumulative errors, which is crucial for ensuring the consistency of gram weight in single-bottle filling.

[0021] S12. The sliding window size is adaptively selected based on the flow rate change to calculate the signal-to-noise ratio (SNR). This is because the accuracy of the SNR calculation depends on the sliding window size: a fixed window is prone to introducing redundant noise when the flow is stable, and is prone to losing signal details when the flow changes abruptly. However, by dynamically adjusting the window based on the flow rate change, the accuracy of the SNR can be balanced between stable and abrupt operating conditions.

[0022] Therefore, the system calculates the rate of change of the flow signal after temperature correction in real time, i.e., the derivative or difference. When the rate of change is below a preset stability threshold, it means that the flow is in a stable or slowly changing phase. At this time, the system uses a large sliding window (e.g., containing hundreds of sampling points) to calculate the signal-to-noise ratio (SNR). When the rate of change exceeds the stability threshold, it means that the flow is experiencing abrupt changes such as rapid start-up, shutdown, or regulation. At this time, the system immediately switches to a smaller sliding window (e.g., containing only dozens of sampling points). The calculated SNR result is also smoothed to prevent frequent jumps in window size due to small fluctuations.

[0023] For example, the specific operation can be: Flow rate change calculation: Based on the corrected flow signal, calculate the flow rate change at adjacent time points according to the time series (e.g., every 10ms).

[0024] Window size switching rules: Set the threshold to 5 mL / s². When the rate of change of flow rate is less than or equal to the steady-state threshold, it is determined to be in a steady state. Use a large window, such as 50 sampling points, corresponding to 500 ms. By accumulating more data, noise is smoothed and the accuracy of SNR calculation is improved. SNR = signal power / noise power. Signal power calculation is more stable under a large window. When the rate of change in flow rate is greater than the steady-state threshold, it is determined to be a sudden change in flow rate, such as when filling starts or when switching bottles: immediately switch to a small window, such as 10 sampling points, corresponding to 100ms, to quickly capture the characteristics of the sudden change in signal and avoid signal lag caused by a large window. For example, the SNR under the new steady state can be accurately calculated within 300ms after the sudden change.

[0025] Smoothing: When switching windows, weighted averaging is used to avoid jumps in the calculated SNR value. The specific operation of weighted averaging is that the weight of the data in the previous window decreases linearly over time, while the weight of the data in the new window increases linearly. For example, the weight transition is completed within 3 sampling points before and after the switch to prevent frequent switching of the filter order.

[0026] In a stable state, a large window can incorporate more data, making the signal-to-noise ratio calculation results more stable and accurate; in a sudden state, a small window allows the system to quickly capture changes in signal characteristics and noise levels, resulting in a more sensitive response. This design perfectly resolves the contradiction between computational accuracy and system response speed in traditional methods.

[0027] S13. Perform spectrum analysis on the corrected signal to match the corresponding filter order to the identified noise type. This is because the noise in the original flow signal has clear frequency characteristics, such as mechanical pump vibration being low-frequency noise and sensor electronic noise being high-frequency noise. Therefore, by locating the noise frequency band through spectrum analysis and matching the corresponding filter order, precise noise reduction can be achieved, preserving effective signal components and suppressing noise components. By performing Fast Fourier Transform (FFT) or similar time-frequency analysis on the temperature-corrected signal, its spectrum is obtained. By analyzing the energy distribution of different frequency bands in the spectrum, the system can identify the main type of current noise. For example, if the energy is concentrated in a specific high-frequency band, it is determined to be electromagnetic noise; if the energy is concentrated in a low-frequency band related to pump speed, it is determined to be mechanical vibration or fluid pulsation noise. Combining the signal-to-noise ratio calculated in the previous step, this method will match the optimal filter order and type for the currently identified noise type and intensity from a preset noise feature-filter parameter rule base. For example, a high-order low-pass filter is used for high-frequency noise, while a notch filter may be introduced for mechanical noise of a specific frequency.

[0028] For example, the specific operation can be: Spectrum analysis: Fast Fourier Transform (FFT) is performed on the corrected signal after sliding window processing to obtain the frequency-energy distribution spectrum of the signal, with a frequency range of 0-1000Hz, covering the common noise frequency bands in cheese filling.

[0029] Noise type identification includes: Low-frequency noise (e.g., 10-50Hz): mainly originates from the mechanical vibration of the pump body, which is manifested by a high energy peak in this frequency band in the spectrum; High-frequency noise (e.g., 500-1000Hz): mainly originates from sensor electronic interference, manifested as the continuous presence of high-frequency energy; Impulse noise (no fixed frequency band, sudden energy peak): mainly originates from pipe turbulence, which is due to the non-Newtonian fluid characteristics of cheese.

[0030] Filter order matching rules include: For low-frequency noise: use low-order filtering, such as 2nd-4th order Butterworth filters, to avoid distortion of the low-frequency trend of the flow signal (such as the slow change of flow during the filling process) caused by over-filtering.

[0031] For high-frequency noise: use high-order filtering, such as 6th-8th order Butterworth filters, to enhance the attenuation of high-frequency components and reduce electronic interference.

[0032] For impulse noise: temporarily increase the filter order to 8th order (duration = impulse noise duration + 50ms) to quickly suppress sudden interference, and then restore it to the order of the matching frequency band.

[0033] like Figure 3 A schematic diagram comparing the dynamic filtering effects under different signal-to-noise ratios is shown. Figure (d) shows the original input signal: the black dashed line is the actual flow signal, which undergoes a step change at t=10s; the gray curve is the contaminated signal after superimposing two types of noise (5Hz low-frequency mechanical vibration and Gaussian-distributed high-frequency electronic noise). This figure clearly shows the complexity and challenges of the signal to be processed. Figure (e) shows the effect of dynamic filtering according to the present invention. The green curve simulates the ideal effect of dynamically selecting the filtering order. In the abrupt change region (red shaded area): the green curve changes almost synchronously with the black dashed line, and the step response is fast and the distortion is small. This indicates that when the flow rate changes abruptly, the system, as described in step S12, immediately switches to a smaller sliding window and uses low-order filtering, solving the delay problem caused by high-order filtering and preserving transient characteristics. In the stable region (blue shaded area): the green curve is as smooth as the red curve, and high-frequency noise is effectively filtered out. This indicates that when the flow rate is stable, the system, as described in step S12, uses a larger sliding window and uses high-order filtering, solving the problem of insufficient noise suppression in low-order filtering. In the stable region, the accuracy of dynamic filtering is comparable to that of high-order filtering and far superior to that of low-order filtering; in the abrupt change region, the accuracy of dynamic filtering is much higher than that of high-order filtering and comparable to or better than that of low-order filtering, because low-order filtering is greatly affected by noise in this region.

[0034] This method is highly adaptable to noise changes under different production environments and equipment conditions. No matter how the noise source changes, the system can automatically identify and take the optimal response strategy, ensuring that the filtered output flow signal is stable and reliable in the long term.

[0035] S2. Based on the working condition information collected in step S1, the dynamic viscosity of cheese is predicted in real time and accurately using a neural network model. This is a key characteristic of non-Newtonian fluids, directly affecting flow control accuracy, and the target flow rate is calculated based on the correlation between viscosity and operating conditions. This step solves the industry problem of inaccurate flow control caused by dynamic viscosity changes during the filling process of non-Newtonian fluids like cheese. Traditional methods typically rely on fixed parameters or simple linear models, which cannot adapt to real-time changes in operating conditions such as temperature, shear force (reflected by pump speed), and pressure. This method, however, introduces a neural network model to construct an intelligent mapping from real-time operating condition information to the precise target flow rate. It does not directly measure viscosity, but rather predicts the dynamic viscosity under current operating conditions in real time, and then fits the complex nonlinear relationship between flow rate and operating conditions based on this, ultimately calculating the precise flow rate required to achieve the target weight. This represents a paradigm shift from passive compensation to active prediction.

[0036] The real-time prediction of cheese dynamic viscosity using a neural network model includes the following steps: S21. Decouple and dynamically weight the features in the operating condition information. Decoupling and dynamic weighting specifically include: First, the coupling relationship between temperature, rotational speed, and pressure is separated using feature importance analysis algorithms (such as ranking importance and SHAP value analysis). The contribution percentage of temperature, rotational speed, and pressure to the current viscosity is calculated in real time. Under temperature-dominated conditions, the weight of the temperature feature is increased; under shear-dominated conditions, the weight of the rotational speed feature is increased. For example, when cheese is first pumped from the insulated tank, temperature is the most significant factor affecting viscosity, contributing 70%, at which point the system enters the temperature-dominated condition. However, when the flow is stable in the pipeline, the shear thinning effect caused by the pump's rotational speed becomes the main influencing factor, contributing 65%, at which point the system switches to the shear-dominated condition. The decoupling method involves using partial least squares regression (PLSR) to separate the independent influencing components of each feature and eliminate cross-interference. For example, spurious correlations caused by pressure fluctuations are removed from the temperature feature, retaining only the pure temperature effect on viscosity.

[0037] Then, a dynamic weighting strategy is proposed: under temperature-dominant conditions, the weight of temperature characteristics is increased from the basic value (e.g., 0.3) to 0.5-0.6, while the weight of rotational speed is reduced, such as from 0.4 to 0.2-0.3, to ensure that the influence of the dominant factor is fully captured; while under shear-dominant conditions (high rotational speed): the weight of rotational speed characteristics is increased to 0.5-0.6, and the weight of temperature is reduced to 0.2-0.3, to adapt to the significant influence of shear force on the viscosity of non-Newtonian fluids.

[0038] Finally, a feature interaction term is introduced to capture nonlinear correlations, and the synergistic influence of temperature and rotation speed is modeled through hidden layer mapping, thereby improving the accuracy of identifying the contribution of each feature to viscosity prediction.

[0039] For example, the system generates a new composite feature, such as temperature × rotational speed. This interaction term characterizes the complex physical phenomenon that the effect of rotational speed on viscosity varies at different temperatures. This new interaction term, along with other original features, is fed into the hidden layer of the neural network. Through the complex nonlinear activation function of the hidden layer, such as ReLU, the model can learn and build a model of the synergistic effect of factors such as temperature and rotational speed on viscosity, rather than treating them as isolated variables.

[0040] The neural network is configured with 2-3 hidden layers, each containing 16-32 neurons. The ReLU activation function is used to model the complex mapping between interaction terms and viscosity. For example, the first layer processes independent features, the second layer processes interaction terms, and the third layer fuses the outputs of both, enabling the synergistic effect of temperature and rotational speed to be accurately learned.

[0041] like Figure 4 As shown in the figure, each point represents a data sample, with the horizontal axis representing the true viscosity value and the vertical axis representing the predicted value of the neural network model. The black dashed line (y=x) is the reference line for perfect prediction. If all points fall on this line, the prediction is completely accurate. Point distribution: As can be seen from the generated chart, the vast majority of data points are closely distributed on both sides of the black reference line, forming a narrow elliptical cloud map. This intuitively demonstrates that the lightweight neural network model and its feature processing strategy constructed in this invention have high prediction accuracy; Furthermore, the colors of the points in the graph are differentiated according to their actual viscosity values, based on the viscosity thresholds explicitly defined above (low: ≤500 cP, medium: 500-2500 cP, high: ≥2000 cP). Blue (low viscosity), green (medium viscosity), and orange (high viscosity) points are mixed together, but are all closely distributed around the y=x line. This indicates that the neural network model of this invention performs excellently across the entire wide viscosity range, without the problem of being effective only in certain intervals and ineffective in others, thus laying a solid foundation for subsequent precise control.

[0042] S22. Due to the limited computing power of edge devices (such as PLCs and embedded controllers) in the filling production line, traditional deep neural networks (such as CNNs with more than 10 layers) are difficult to meet real-time requirements (requiring prediction latency <50ms). At the same time, cheese has a wide viscosity range (such as 100-5000cP), and the characteristics of low viscosity and high viscosity are very different. Fixed structure models are prone to "overfitting at low viscosity and underfitting at high viscosity". Therefore, it is necessary to build a lightweight network model suitable for edge devices and dynamically adjust its structural complexity according to the viscosity range.

[0043] For example, the specific operation can be: Lightweight network infrastructure: adopts a simplified MLP (Multilayer Perceptron) architecture: its input layer includes 5 features: temperature, pressure, rotation speed, filtered flow rate, proportional valve opening → hidden layer (1-3 layers, dynamically adjusted according to viscosity range) → output layer (1 node, output dynamic viscosity).

[0044] Lightweighting measures: By pruning the model, neurons with a contribution of less than 1% are removed, and weight quantization is used to reduce the parameter size, ensuring that the computing power of edge devices is adapted, such as achieving a single prediction time of less than 30ms on embedded ARM chips.

[0045] Dynamic structural adjustment based on viscosity range: Low viscosity range (<500 cP): 1 hidden layer (16 neurons) is used because the characteristics are relatively simple at low viscosity, mainly affected by temperature, and the nonlinearity is weak. Simplifying the structure can reduce redundant calculations; Medium viscosity range (500-2000 cP): 2 hidden layers (16+16 neurons) are used to balance complexity and accuracy; High viscosity range (>2000 cP): 3 hidden layers (24+24+16 neurons) are used because the nonlinear effects of shear force and pressure are significant at high viscosity, requiring a more complex structure to capture details.

[0046] like Figure 5 A visual comparison of model structure performance across different viscosity ranges is presented. Figure (f) shows the prediction errors (RMSE) of three network architectures with varying complexities (1 layer / 2 layers / 3 layers) in the low, medium, and high viscosity ranges. In the low viscosity range: the accuracy of the simple 1-layer network (blue bars) is comparable to or even slightly better than the more complex networks. This verifies that at low viscosity, the characteristics are relatively simple, primarily influenced by temperature, with weak nonlinearity, and simplified structures can reduce redundant calculations. In the high viscosity range: the error of the simple 1-layer network (blue bars) increases sharply, while the 3-layer complex network (yellow bars) maintains the highest accuracy. This verifies that at high viscosity, the nonlinear effects of shear force and pressure are significant, requiring more complex structures to capture details. In the medium viscosity range: the 2-layer network (red bars) achieves the best balance. Therefore, it can be concluded that the most suitable model structure must be intelligently selected based on the current viscosity.

[0047] Figure (g) illustrates the time required for a single prediction (inference time) for the three network architectures. The inventors state that the more complex the model, the longer the inference time. The inference time of a 3-layer network is more than three times that of a 1-layer network. In simple conditions like low viscosity, using a complex 3-layer network not only excessively reduces accuracy (see Figure f) but also represents a huge waste of computational resources, failing to meet real-time requirements (prediction latency < 50ms).

[0048] Therefore, a simple single-layer network is used in the low viscosity range to maximize speed, a complex three-layer network is used in the high viscosity range to ensure accuracy, and a two-layer network is used in the medium viscosity range to achieve the best balance. This intelligent resource allocation strategy ensures that the system remains in optimal condition throughout the entire operating range.

[0049] S23. Due to differences in the basic components (such as fat content and moisture) of cheese from the same batch, viscosity characteristics may shift, leading to batch-to-batch adaptation bias in the fixed model. During the filling process, sensor malfunctions, turbulence interference, and other factors may cause abnormal flow signals, making direct model predictions inaccurate. Therefore, the model is corrected using the information from the first sample bottle at the initial stage of each batch, and interpolation prediction is switched when an abnormal flow signal is detected to ensure the model's adaptability and stability.

[0050] For example, the specific operation can be: If the model predicts a target flow rate that results in a filling volume of 100g, but the actual volume is only 98g, this method will automatically calculate a correction coefficient or adjust the bias of the model's output layer, and apply this adjustment to the filling control of all subsequent products in that batch. Because the system has built-in real-time monitoring and diagnostic logic for flow sensor signals, it can identify abnormal states such as signal spikes, disconnections, or prolonged periods of inactivity. Once an anomaly is detected, the system will not stop production but will immediately and seamlessly switch to the backup interpolation prediction mode. In this mode, the system will estimate the current flow rate based on the last few valid flow readings before the anomaly occurred, combined with current stable operating parameters such as motor speed and temperature, using interpolation algorithms (such as linear interpolation or polynomial interpolation) to maintain production continuity and simultaneously issue a sensor maintenance alarm to the operator.

[0051] As an example, we first perform initial batch corrections (taking batch 100 as an example): First bottle measured viscosity: ; Initial predicted viscosity of the model: ; Deviation viscosity calculation: ; Correction formula: ,in, The decay coefficient is initially 1.0, decreasing linearly with each batch, decreasing by 0.1 for every 100 bottles filled, down to 0.3.

[0052] When an anomaly occurs, the anomaly handling steps are as follows (flow signal fluctuation > ): The first 3 valid data points of the anomaly: (t=1.0s) (t=1.1s) (t=1.2s); At the abnormal time t=1.25s, linear interpolation is used for prediction: Substituting, we get: ; After the signal is recovered (t=1.5s), switch back to model prediction, and the error... .

[0053] The above operations greatly improved the stability of the production process and the consistency of product quality, reduced the defect rate and production line downtime caused by batch differences in raw materials and sensor failures, directly brought significant economic benefits to the enterprise, and improved the automation and unmanned level of the entire production system.

[0054] In some embodiments of the present invention, the modified model in step S23 specifically includes: First, to address the data imbalance problem in rare working conditions such as high viscosity, virtual samples are generated by applying small perturbations that conform to physical laws to real samples, or by using transfer learning techniques to transfer the basic physical laws of medium viscosity working conditions to the high viscosity region and make fine adjustments, thereby expanding the training dataset, improving the model's generalization ability under extreme working conditions, and reducing the risk of overfitting. Secondly, to address the issue of operating condition drift caused by equipment aging and environmental changes, a periodic online correction mechanism is established. By periodically obtaining the true viscosity value from offline calibration and comparing it with the online predicted value, the deviation is used as an error signal to backpropagate and train the neural network. The feature weights and network parameters are dynamically adjusted to ensure that the model can continuously adapt to the slow changes in the production environment and maintain long-term prediction accuracy and system reliability.

[0055] S3. Based on the residual between the target flow rate and the actual flow rate, determine whether calibration is needed, trigger graded PID parameter calibration, adjust only for systematic deviations, and dynamically optimize parameters according to a preset viscosity range to avoid flow fluctuations under different operating conditions. This step solves the technical pain points of traditional PID control, such as poor adaptability due to fixed parameters and flow oscillations caused by parameter jumps at interval boundaries, significantly improving control stability.

[0056] Specifically, triggering the graded PID parameter calibration includes: S31. Since the flow residual (the difference between the target flow rate and the filtered flow rate) during the filling process may be caused by instantaneous disturbances (such as micro-turbulence in the pipeline) or systematic deviations (such as viscosity drift and valve wear), blindly calibrating for instantaneous disturbances will lead to frequent parameter fluctuations; while calibrating only for systematic deviations can ensure control stability. Here, the trend of residual change is calculated through a sliding window, and calibration is triggered only when the residual is determined to be a systematic deviation. S32. Then, based on the degree to which the residual deviates from the dynamic threshold, the calibration is divided into fine-tuning, medium-tuning, or full-tuning levels, and the parameters are smoothly transitioned when switching levels.

[0057] For example, the specific operation can be: (1) Sliding window calculation of residual variation trend Residual definition: Let the target flow rate be... The filtered flow rate is Then the residual (Unit: L / min)

[0058] Sliding window settings: Use a length of A dynamically adjusted sliding window is used to calculate two core features of the residuals within the window, including the sampling period. , One sampling period, this range is based on validation of 100 sets of filling data, 5 A 20-cycle timeframe can balance response speed and stability.

[0059] Trend of change The slope of the linear fit between adjacent residuals within the window reflects whether the residuals continue to increase / decrease. The time series values ​​of the residuals:

[0060] Accumulated energy The sum of the absolute values ​​of the residuals within the window reflects the severity of the residuals.

[0061] (2) Determination of systematic deviation Two-condition trigger: Only if both of the following conditions are met simultaneously and continue... Each sampling period, A value of 3 to 5 effectively distinguishes between transient disturbances and systematic deviations, ultimately determining it to be a systematic deviation. ① Trend of change ,in, That is, the residual continues to increase; ② Accumulated energy ( Adjust dynamically according to viscosity, relaxing the adjustment to [a certain limit] at high viscosity. Tighten at low viscosity ).

[0062] Transient disturbance elimination: If only a single condition is met (e.g.) Exceeding the standard but If the value is 0, it is considered a transient disturbance and calibration is not triggered.

[0063] (3) Dynamic threshold setting (adaptive threshold based on operating conditions) Dynamic threshold Output from a pre-trained reinforcement learning model, with the current temperature as the input , pressure , dynamic viscosity :

[0064] Where: is the viscosity coefficient (unit: L / (min·cP)), is the temperature coefficient (unit: L / (min·°C)), is the pressure coefficient (unit: L / (min·bar)), is the constant term (unit: L / min); each coefficient is calibrated through experiments, for example, obtained by fitting the threshold values with temperature, pressure, and viscosity data under 100 different working conditions.

[0065] Exemplarily: Set , , , , and = 0.0002 is determined based on the threshold response characteristics under high viscosity (2000 - 5000 cP) working conditions; At high temperature and high viscosity ( , ), ; At low temperature and low viscosity (T = 15°C, = 500 cP), (tighten the threshold and increase the sensitivity).

[0066] (4) Hierarchical calibration and smooth transition ​​​​​​​​​​​​​​​​​​​​​

[0068] in, (t) Decays linearly over time (decay time t transition is dynamically set according to viscosity: low viscosity t transition = 50ms, high viscosity t transition = 200ms, transition time is based on viscosity-inertia experiment: high viscosity fluid has large inertia, requiring 200ms smooth transition to avoid impact; low viscosity has small inertia, 50ms is sufficient to ensure response speed).

[0069] For example: when switching from fine-tuning to mid-tuning, =5.0, =6.5 (mid-range amplitude 20%), t transition = 100ms, then To avoid parameter jumps.

[0070] In addition, due to the varying viscosities of cheese, the sensitivity of its flow rate to PID parameters differs significantly. For example, a larger proportional gain is needed to overcome inertia at high viscosity, while a smaller integral time is required to avoid overshoot at low viscosity. If intervals are rigidly divided according to a fixed threshold, sudden parameter changes at the boundaries will cause flow oscillations. Therefore, fuzzy logic is needed to achieve a smooth transition. Optimizing parameters by dividing intervals according to a preset viscosity threshold specifically includes: Fuzzy logic is used to define the membership degrees of low viscosity, medium viscosity, and high viscosity segments. By calculating the membership degrees at the interval boundaries, the parameters can be smoothly transitioned, avoiding parameter jumps at the interval boundaries.

[0071] For example, the specific operation can be: (1) Definition of viscosity range and membership function Range division: Preset viscosity thresholds: low viscosity range ≤1000cP, 500cP < medium viscosity range <2500cP, high viscosity range ≥2000cP (ranges overlap to facilitate boundary transition).

[0072] Membership function: The membership degree of each interval is defined using the triangular membership function. , , ∈[0,1], and + + =1), specifically: Low viscosity membership:

[0073] Membership of medium viscosity:

[0074] High viscosity membership:

[0075] (2) Interval parameter fusion (avoiding boundary jumps) Preset baseline PID parameters for each interval: Low viscosity range: , , ; Medium viscosity range: , , ; High viscosity range: , , ; in, This is the common proportional coefficient for PID controllers. , as well as This serves as the reference proportionality coefficient for low, medium, and high viscosity ranges. For the integral time of the PID controller, , as well as The reference integration time is used for the low, medium, and high viscosity ranges. For the derivative time of the PID controller, , as well as The reference differential time is used for low, medium, and high viscosity ranges.

[0076] The actual application parameters are a weighted fusion of the benchmark parameters for each interval: ; ; ; As an example, when (At the low-to-medium boundary): , , ; ; If a hard division is used... It will mutate from 3.0 to 5.0, and after fusion, smoothly transition to 2.5 to avoid abrupt changes.

[0077] when (Middle-high boundary): , , ; (Similarly, smoothing).

[0078] In the precision filling of high-viscosity fluids such as cheese, there is an inherent delay and nonlinearity between the control system's commands and the actual response of the actuator (proportional valve). This is the main root cause of inaccurate filling volumes, and mainly includes the following three technical issues: Technical Issue 1: Time Error Due to Response Delay. From the time the controller issues a command (such as "open the valve") to the time the valve actually completes the action and changes the flow rate, there is a delay time that includes mechanical inertia, electrical response, and fluid dynamics. Without compensation, the timing of filling start and stop will inevitably be inaccurate, resulting in either too little filling (late start) or too much filling (late stop, i.e., overfill). Technical Issue 2: System instability caused by excessively rapid action. To overcome the delay, a simple idea is to make the valve act as quickly as possible. However, in high-viscosity fluid systems, rapid opening and stopping of the valve can cause severe pressure fluctuations, i.e., the water hammer effect, leading to instantaneous overshoot and splashing of the flow rate. This not only affects the metering accuracy but may also damage the physical structure of the cheese. Technical Issue 3: Parameter Failure Due to Varied Operating Conditions. The aforementioned delay times and optimal action rates are not fixed values. They dynamically change with variations in cheese viscosity (affected by temperature and batch), pipeline pressure, and the valve's own health (such as aging and wear). Any fixed lead time or fixed valve rate cannot adapt to complex and variable actual operating conditions, resulting in poor system robustness.

[0079] Step S4 is proposed here, which predicts the proportional valve's action delay time based on the current operating conditions, generates an advance command, and limits the valve's action rate. Its core objective is to achieve timely, smooth, and precise flow control under any operating condition by using a predictive and adaptive dynamic control strategy that can accurately compensate for response delays and intelligently constrain valve behavior.

[0080] To achieve the above objectives, in step S4, delay compensation and rate limiting are organically combined through a closed-loop logic of prediction-decision-execution-feedback.

[0081] For example, the specific operation can be: S41, Predicting the proportional valve's action delay time

[0082] Implementation process: First, a pre-trained delay time prediction model is used. To calculate the expected delay under the current operating conditions, the model's input is "current operating condition information," and its core parameters include the dynamic viscosity predicted in step S2. Real-time collected pipeline pressure and cheese temperature This model can be a multivariate nonlinear regression model, or even a small neural network, and its expression can be:

[0083] in, : Predicted action delay time (unit: milliseconds, ms); Dynamic viscosity (unit: Pascal-second) The higher the viscosity, the slower the fluid response and the longer the delay. Pipeline pressure (unit: bar); Pressure affects the resistance to valve opening and the initial acceleration of the fluid, thus affecting the delay. Temperature (unit: degrees Celsius); Temperature directly affects viscosity and can also be used as an auxiliary input for the model. A neural network model trained on experimental data or a multiple linear regression model; Predictions using data-driven models replace the traditional approach of relying on fixed empirical values, accurately reflecting the real impact of different operating conditions on delay time and achieving high prediction accuracy.

[0084] S42. Generate advance instructions This is an application of feedforward control. When the upper-level control logic (such as a PID controller) determines that the target time is needed... This step will not occur when the valve reaches a certain state. Instead of issuing the command immediately, the command issuance time is advanced by a delay time. The calculation formula can be:

[0085] in, : The actual system time when the command was issued; : The expected system time for the valve to complete its action.

[0086] This measure directly compensates for the system's response delay, ensuring that the valve's action occurs at the precise moment it is most needed, fundamentally solving the problem of inaccurate start-stop timing, and is key to ensuring the accuracy of filling weight.

[0087] S43, Dynamically limiting valve operating rate This is the essence of this step, as it ensures the smoothness and adaptability of valve operation.

[0088] (1) Set the rate limit benchmark

[0089] Implementation process: The system first determines the dynamic viscosity To determine a basic and reasonable maximum valve operating rate, the physical logic is: the higher the viscosity and the thicker the fluid, the gentler the valve operation should be to prevent shock; conversely, the operating rate can be appropriately increased.

[0090] The calculation formula can be: This relationship is usually inversely proportional, and can be achieved through a function. To define.

[0091]

[0092] in, : Viscosity-based baseline rate limit (unit: % opening size / second); : Rate coefficient calibrated by experiment, a constant (unit: Pa・s・% opening degree / second).

[0093] (2) Dynamic correction based on real-time operating conditions Implementation process: The baseline rate is only an ideal value. The system will also dynamically adjust the baseline rate based on other real-time operating conditions by introducing a series of correction coefficients to obtain the final execution rate limit. The calculation formula can be:

[0094] in, (Valve Health Coefficient): The system assesses the health status of a valve by tracking data such as response time and current of its historical actions. For example, a healthy valve... When signs of aging or lag are detected, this coefficient will dynamically decrease (e.g., drop to a certain level). This actively slows down the valve's movement, compensating for its performance degradation in a smoother manner and preventing shocks caused by sudden movements after jamming. (Pressure fluctuation correction factor): The system monitors the fluctuation rate of the pressure signal in real time. When the pressure is stable, If a drastic pressure fluctuation is detected, it indicates that the system is in an unstable state, and in this case, it will be temporarily switched off. Reduce (e.g., to) This forces the valve to slow down, thus actively suppressing system oscillations.

[0095] S44, Closed-loop feedback control This step is not simply a combination of "delay prediction" and "rate limiting," but a closed loop of collaborative optimization, including the following: ① Sensing operating conditions: The system collects information such as temperature and pressure in real time, and combines it with the prediction of S2 to obtain dynamic viscosity. ; ② Collaborative decision-making: Based on the same set of operating condition data, the system calculates the required advance delay time in parallel. and the maximum permissible rate of motion These two are interconnected: for example, high viscosity conditions naturally lead to a longer [period / time period]. And a slower one ; ③ Precise execution: In At any given moment, the system issues commands and ensures that the valve's rate remains constant throughout its entire operation. Restrictions; ④ Feedback loop: The action of the valve will cause actual changes in flow and pressure. These changes are collected as new "operating condition information" in the next control cycle, thus forming a complete closed loop of real-time perception, dynamic decision-making and precise execution.

[0096] Regarding step S4 above, two specific scenarios are presented here to verify the control effect.

[0097] Suppose a filling task requires the valve to open from 0% to 70%, what is the rate coefficient? Calibrated as .

[0098] Scenario 1: Low Temperature and High Viscosity Condition - Condition: Cheese temperature is low, step S2 predicts dynamic viscosity. The valve is in good health. The pressure is stable. ).

[0099] 1. Delay Prediction: Delay Model Based on this operating condition, the delay time is predicted. ; 2. Rate Calculation: Reference Rate Final rate ; 3. Control Execution: If the target time is Then the advance instruction is in Issued at the specified time. The instruction is: [to be issued at a time not exceeding...] The rate at which this increases the valve opening to 70% requires [a certain amount of time / effort]. .

[0100] Scenario 2: Low viscosity at room temperature and slight valve aging - Operating condition: Cheese temperature is normal, step S2 predicts dynamic viscosity. The system detected a slight delay in valve response, and the health coefficient dropped to [value missing]. Pressure level ( ).

[0101] 1. Delay Prediction: Delay Model Based on the new operating conditions, the predicted delay time is shortened to ; 2. Rate Calculation: Reference Rate Final rate ; 3. Control Execution: If the target time is still... Then the advance instruction is in Issued at the specified time. The instruction is: [to be issued at a time not exceeding...] The rate at which this increases the valve opening to 70% requires [a certain amount of time / effort]. .

[0102] Conclusion: Comparing the two scenarios, this method demonstrates a high degree of intelligence and adaptability. It can automatically adjust the control strategy according to changes in operating conditions: at high viscosity, it issues commands earlier and executes them in a slower and more stable manner; at low viscosity but with aging equipment, it appropriately advances commands and proactively reduces the execution rate to ensure stability.

[0103] refer to Figure 6 The diagram illustrates the effects of valve command advance and rate limiting. Figure (h) is a comparison of control commands: the black dashed line represents the desired valve movement trajectory; the red curve (Strategy 2) shows the application of only the advance command. It issues the command at the target time, and the command itself is an instantaneous, unrestricted ramp with a very steep slope, corresponding to the second technical problem mentioned above: system instability (water hammer effect) caused by excessively rapid movement. The blue curve (Strategy 3, this solution) shows the combination of advance command and rate limiting. It issues the command at the advance moment, but the rate of rise of the command is strictly limited to a low value, which visually demonstrates the specific implementation of limiting the valve movement rate.

[0104] Figure (i) is a schematic diagram comparing system responses. The purple curve (Strategy 1) shows the consequences of no compensation. Due to system delay, the valve response lags significantly behind the expected trajectory, inevitably leading to insufficient filling (late start-up). The red curve (Strategy 2) shows the consequences of only advancing the command. The delay is indeed compensated, and the response time is basically accurate. However, due to the excessively fast command rate, the valve action is too abrupt, resulting in severe overshoot in the actual response (the actual opening far exceeds the target value, then oscillates and falls back). This leads to overfilling (overshoot) and pressure shock. The blue curve (Strategy 3, this solution) shows some of the effects of this solution. It not only compensates for the delay (timely response), but also, due to the rate limitation, the entire action process is smooth, stable, and without overshoot, overlapping and intersecting with the expected trajectory. This proves that this solution can accurately compensate for the response delay and intelligently constrain valve behavior, thereby achieving the core objective of timely, smooth, and accurate flow control under any operating conditions.

[0105] S5. Update the above model after each bottle is filled, and force calibration is required if the residual continues to exceed the limit. This design aims to ensure that the system can not only self-optimize under stable operating conditions, but also quickly recover stability when the operating conditions undergo significant changes, thereby comprehensively guaranteeing the long-term accuracy of filling.

[0106] S51. Because the physical properties of cheese (especially viscosity) are not constant during continuous production, they gradually drift due to pressure changes caused by a drop in the liquid level in the tank, prolonged shearing, or slow fluctuations in ambient temperature. Simultaneously, the equipment itself (such as pumps and valves) also experiences slight performance degradation due to prolonged operation. If the control model (such as the neural network model in S2) is static, these gradual changes will lead to a slow decrease in prediction accuracy, with accumulated errors increasing, ultimately affecting filling accuracy. Therefore, in step S5, a conventional adaptive mechanism is first proposed.

[0107] For example, the specific operation can be: Each time a bottle of cheese is filled, the system has a complete and high-quality data log package. This package contains the time-series data of the entire filling process from start to finish, namely a series of {temperature, pressure, pump speed, proportional valve opening} as input features, and the corresponding {filtered flow rate} as the output result after processing in step S1.

[0108] The system uses this newly generated data sample package as a new training sample to incrementally update the neural network prediction model and flow-condition relationship function established in step S2. Specifically, an online learning algorithm can be used, such as performing one or several rounds of backpropagation training with small steps on the neural network model. The advantage of this approach is that the model does not need to be retrained from scratch; instead, it is fine-tuned based on the latest real data, thereby learning the latest patterns under the current operating conditions. This update process is executed automatically after each bottle is filled. Through thousands of iterations, the model can track and adapt to various gradual changes occurring during the production process in real time.

[0109] Through continuous self-fine-tuning, this mechanism effectively suppresses the accumulation of control errors, ensuring that filling accuracy remains at an extremely high level during continuous production lasting for hours or even tens of hours, significantly reducing reliance on manual monitoring and frequent shutdowns for calibration.

[0110] As an example, suppose that during the production process, due to reduced air conditioning effectiveness in the workshop, the ambient temperature slowly rises by 3°C over 2 hours, causing a slight decrease in the overall viscosity of the cheese. Conventional fixed models cannot detect this change. However, the single-bottle update mechanism of this invention, after each filling, uses samples containing the latest temperature information to fine-tune the model, allowing the neural network to gradually learn that under the current operating conditions, a slightly higher temperature corresponds to a slightly lower viscosity. This automatically adjusts the control strategy to maintain precise flow output and ensure stable bottle weight.

[0111] S52. In addition to the gradual drift problem addressed above, production sometimes encounters sudden, abrupt changes in operating conditions. For example: A batch of new raw materials with significantly different viscosity characteristics was replaced; large air bubbles suddenly entered the pipeline, or a momentary partial blockage occurred; unstable power supply voltage caused the pump's performance to change instantaneously.

[0112] In this situation, the residual E can become extremely large instantly, and the update mechanism of fine-tuning each bottle may not be able to correct it quickly enough, resulting in multiple bottles of products failing to meet standards. In this case, a forced error correction mechanism is necessary.

[0113] For example, the specific operation can be: (1) The determination of triggering conditions includes: Residual: The difference between the target flow rate calculated in S3 and the filtered flow rate; Exceeding the limit: The system sets an allowable residual threshold (e.g., ±2% of the target flow). Continuous: The system will set a counter, for example, Z consecutive bottles.

[0114] Judgment Logic: After each bottle is filled, the system checks its average residual. If the absolute value of the average residual of N consecutive bottles exceeds a set threshold, it is determined that the residual is continuously exceeding the limit, and a forced calibration procedure is immediately triggered. This continuous condition is crucial, as it effectively filters out single-bottle errors caused by accidental disturbances (such as a single valve jamming), responding only to systemic, continuous problems.

[0115] (2) Forced calibration execution: Once triggered, the system will perform a deeper and more extensive calibration operation than a regular update. This can be a combination of one or more actions, including: Model weight reset and rapid relearning: The system may increase the learning rate of the neural network and use the data from the most recent Z bottles (i.e., the Z bottles that triggered calibration) for concentrated, high-intensity training, enabling it to quickly adapt to the new working conditions after drastic changes. In some strategies, it is even possible to partially or completely reset the historical parameters of the model, forcing the model to forget the old rules and learn new rules from the latest data; Global retuning of PID parameters: Forcefully trigger the PID parameter optimization program in S3, but instead of fine-tuning, perform a global search or full-range optimization to find a new and optimal combination of PID parameters for the current drastically changed operating conditions. Data window sliding: When updating the model, the system may selectively discard some old historical data before the drastic change, increase the weight of new data in the training set, and accelerate the convergence of the model.

[0116] By setting trigger conditions for continuous exceedances, the system can promptly identify production anomalies and automatically take strong measures to correct them, controlling the number of continuously non-conforming products to a very small range (e.g., only N bottles), thus minimizing economic losses.

[0117] Example: A factory runs out of cheese batch Q1 and switches to batch Q2, which has a 20% higher viscosity. When the system starts filling the first bottle, because the model is still based on the patterns of batch Q1, the actual flow rate is much lower than the target flow rate, causing the residual to exceed the threshold. The second and third bottles show the same problem. When the system detects three consecutive bottles with excessive residuals, it immediately triggers a forced calibration. It increases the learning rate of the neural network by 10 times, uses the data from these three bottles to force-train the model, and re-optimizes the PID parameters globally. By the fourth or fifth bottle, the system has basically mastered the characteristics of batch Q2 cheese, the residual quickly returns to the allowable range, and filling resumes normally. The entire process is fully automated, avoiding the production of a large number of underweight products.

[0118] In addition, the dynamic selection of the filter order in step S1 also includes the following: (1) Regarding the signal abrupt change problem during order switching, such as switching from order 2 to order 6, the signal processing characteristics will change abruptly. If the switch is direct, it may cause step fluctuations in the flow signal. Especially for non-Newtonian fluids like cheese, the signal fluctuations are easily amplified into filling errors. The dynamic viscosity of cheese directly affects its flow inertia. That is, high-viscosity cheese has a slow flow response, and the order switching requires a longer transition time to avoid shock. Low-viscosity cheese has a fast response, and the transition time can be shortened to ensure real-time performance. Therefore, when the filter order needs to be switched, the transition time needs to be determined according to the dynamic viscosity, and a smooth switch can be achieved through weighted fusion.

[0119] For example, the specific operation can be: Transition time determination: Based on the dynamic viscosity value predicted in real time in step S2, a viscosity-transition time mapping relationship is established: the transition time for the low viscosity range (e.g., <500 cP) is set to T1 (e.g., 50 ms), for the medium viscosity range (500-2000 cP) to T2 (e.g., 100 ms), and for the high viscosity range (>2000 cP) to T3 (e.g., 200 ms). This mapping relationship is calibrated experimentally (e.g., testing the impact of order switching on the flow signal at different viscosities to deduce the minimum transition time).

[0120] If the viscosity changes during the switching process, such as from low viscosity to medium viscosity, the transition time is updated in real time to the corresponding range value, that is, dynamically adjusted from T1 to T2, to avoid insufficient adaptability caused by a fixed transition time.

[0121] Weighted fusion smooth handover: During the transition time, the filtering results before and after the handover are weighted and fused. Let the filtering result of the previous order be... The result of the post-order filtering is fused signal It can be represented as:

[0122] in, For transition coefficients, The pattern of change is as follows: at the initial moment =1 (completely retain the old order result), decays linearly with time to 0 (completely switch to the new order result), and the decay rate matches the transition time (e.g., when T1=50ms). (Decreases by 20 per second). For example, when switching from order 4 to order 6, at 0ms, =1 ( At 25ms, =0.5 ( At 50ms, =0 ( This allows for seamless signal transition.

[0123] (2) Regarding the issues of retaining transient characteristics and detecting fault linkage when the filter residual is abnormal, under normal circumstances, the residual should be stable within a small range of fluctuation, such as ±2%. If the residual changes abruptly, such as increasing by more than 3 times and lasting for a certain period of time, it may be a real transient event (such as partial blockage of pipeline or valve leakage) rather than noise. In this case, excessive filtering will mask the event characteristics, leading to subsequent control failure. Therefore, when an abnormal filter residual is detected, the filter order should be automatically reduced to retain transient characteristics, and potential blockage or leakage events should be detected in linkage.

[0124] For example, the specific operation can be: Abnormal residual determination: The absolute value and rate of change of the filtered residual are calculated in real time, and two thresholds are set: the absolute value of the residual > the absolute threshold A (e.g., 5% of full scale), and the rate of change of the residual > the rate of change threshold B (e.g., 10% / ms), and the duration is greater than 3 sampling periods (e.g., 30ms), then it is determined to be an abnormal residual. Thresholds A and B are dynamically adjusted according to the current dynamic viscosity, that is, the thresholds are relaxed at high viscosity because the residual is naturally larger due to fluid inertia; the thresholds are tightened at low viscosity to improve sensitivity.

[0125] Automatic reduction of filter order: Upon detecting an anomaly, the current filter order is immediately reduced by 2-4 orders, for example, from order 6 to order 2. The magnitude of the order reduction is positively correlated with the degree of residual error exceeding the limit; the larger the residual, the greater the order reduction. Low-order filtering has weak attenuation of high-frequency signals and can preserve transient characteristics, such as a sudden drop in flow during blockage or a sudden increase in flow during leakage. Simultaneously, the residual signal characteristics after order reduction, such as waveform and frequency, are recorded as a basis for event diagnosis.

[0126] Linked detection of blockage or leakage events, including blockage detection and leakage detection, specifically: Blockage detection: Combining the pressure signal (the pipeline pressure rises sharply when blocked) and the reduced flow signal (the flow rate drops sharply and the fluctuation frequency decreases), if both simultaneously meet the conditions of pressure > pressure threshold + 20% and flow rate < flow threshold - 30%, it is determined to be blocked. Immediately, a signal is sent to the graded control module to adjust the PID parameters to alleviate the blockage, such as increasing the proportional coefficient to enhance the valve driving force.

[0127] Leak detection: Combining the pressure signal (sudden drop in pipeline pressure during leakage) and the reduced flow signal (sudden increase in flow with irregular fluctuations), if both simultaneously meet the conditions of pressure < pressure threshold - 20% and flow > flow threshold + 30%, a leak is determined, and a shutdown inspection command is immediately triggered, such as shutting down the pump and valves, and recording the operating parameters (temperature, viscosity, valve opening) at the time of the leak for post-event analysis.

[0128] After the event is resolved, such as when the blockage is relieved or the leak is repaired, the original filter order is automatically restored, and the signal stability is verified through three filling cycles, which means that the abnormal handling mode is exited after the residual returns to the normal range.

[0129] Example 2: Corresponding to the above methods, such as Figure 7 As shown, this invention also proposes a real-time flow calibration and control system for cheese filling. The system adopts a modular design, facilitating integration into existing filling production lines (such as TetraPak or Krones filling machines). Through a real-time data-driven adaptive algorithm, it ensures flow control accuracy within ±0.5% in the filling of high-viscosity, non-Newtonian fluids (such as cheese), significantly reducing scrap rate and energy consumption. Specifically, it includes the following modules: The operational data acquisition module, serving as the system's sensing layer, uses a sensor array deployed on the filling pipeline to collect real-time data on the cheese's temperature, pressure, raw flow rate, pump speed, and proportional valve opening. The acquisition frequency can be set to 100-1000 times per second (depending on the production line speed). After being digitized via an analog-to-digital converter (ADC), the data is immediately transmitted to the data processing module. The process includes: sensor initialization, synchronous acquisition (ensuring all parameters are at the same timestamp), preliminary verification (such as range checks and discarding outliers), and transmission in data packet format (containing timestamps and values). The temperature sensor can be a PT100 platinum resistance thermometer, requiring an accuracy of ±0.1°C and resistance to high-temperature and corrosive environments. The pressure sensor can be a piezoresistive sensor (such as the Honeywell PX3 series), requiring a range of 0-10 bar and a response time of <1 ms.

[0130] The data processing module receives data from the operating condition acquisition module. First, it corrects the raw flow signal for temperature drift. Then, it adaptively selects the sliding window size based on the flow rate of change and calculates the signal-to-noise ratio. Finally, it identifies the noise type through spectrum analysis (FFT transform) and matches the filter order; for example, high-frequency noise is matched with a high-order low-pass filter. The filtered flow rate is then output and transmitted to subsequent modules. The entire process runs on the edge computing device. The processing chip can be an ARM Cortex-A series processor, requiring computing power to support real-time FFT (at least 1GHz clock speed, integrated DSP unit); the software requirements can be filtering algorithms developed based on MATLAB / Simulink or Python (SciPy library), integrated into a real-time operating system such as FreeRTOS; the communication interface is RS485 or Ethernet, requiring a data transmission rate >1Mbps.

[0131] The dynamic viscosity prediction module communicates with the data processing module and has a built-in lightweight neural network model. It is used to predict the dynamic viscosity of cheese in real time based on operating condition information and fit the flow rate-operating condition relationship function to calculate the target flow rate value. The model supports batch initial correction, abnormal operating condition interpolation switching and small sample data expansion. The graded control module is connected to the data processing module and the dynamic viscosity prediction module respectively. It is configured to trigger graded PID parameter calibration based on the residual between the target flow rate and the filtered flow rate, optimize parameters according to viscosity range and achieve smooth transition, and generate advance commands and limit valve action rate based on the prediction of proportional valve action delay time under current operating conditions. The model update module communicates with the hierarchical control module. After each bottle is filled, the data from that bottle is used to incrementally update the neural network, learning online and fine-tuning the weights through backpropagation. If the residuals of N consecutive bottles (N=3-5) continue to exceed the limit, a forced calibration is triggered, increasing the learning rate, resetting some parameters, and recording the data to the log to optimize the logic. The update results are fed back to the prediction module, forming a self-learning loop.

[0132] This system optimizes filtering by dynamically adapting the signal-to-noise ratio of the original flow signal, effectively eliminating signal distortion caused by temperature drift, mechanical vibration, and other interferences, thus improving flow detection accuracy. By leveraging neural networks to predict the dynamic viscosity of cheese in real time and dynamically adjust the model, it solves the problems of lag and poor batch adaptability in traditional viscosity estimation, providing a precise basis for calculating the target flow value. Furthermore, graded PID parameter calibration and viscosity range-based control parameter optimization achieve smooth transitions and adaptive adjustment of control parameters, avoiding flow fluctuations under different viscosity conditions and ensuring control stability during long-term operation. This solution realizes adaptive flow control throughout the entire cheese filling process, significantly improving the accuracy and robustness of flow control, and effectively ensuring product weight consistency and production efficiency.

[0133] This system is implemented through Example 3: Corresponding to the above embodiments, the present invention also proposes an electronic device.

[0134] like Figure 8 The diagram shows a structural schematic of an electronic device according to the present invention. The electronic device 200 includes a processor 201 and a memory 203. The processor 201 and the memory 203 are connected, for example, via a bus 202. Optionally, the electronic device 200 may further include a transceiver 204. It should be noted that in practical applications, the transceiver 204 is not limited to one unit, and the structure of this electronic device 200 does not constitute a limitation on the embodiments of the present invention.

[0135] Processor 201 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. Processor 201 may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0136] Bus 202 may include a path for transmitting information between the aforementioned components. Bus 202 may be a PCI bus or an EISA bus, etc. Bus 202 may be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0137] The memory 203 stores a computer program corresponding to the real-time calibration control method for cheese filling flow rate in the above embodiments of the present invention. This computer program is executed by the processor 201. The processor 201 executes the computer program stored in the memory 203 to implement the content shown in the aforementioned method embodiments.

[0138] Among them, electronic devices 200 include, but are not limited to: mobile terminals such as laptops and tablets, as well as fixed terminals such as desktop computers. Figure 8 The electronic device 200 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0139] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for real-time calibration and control of cheese filling flow rate, characterized in that, Includes the following steps: S1. Real-time acquisition of cheese operating conditions information in the filling pipeline, including temperature, pressure, raw flow signal, pump speed and proportional valve opening degree, dynamically selects the filtering order according to the signal-to-noise ratio of the raw flow signal, and outputs the filtered flow. S2. Based on the above-collected operating condition information, the dynamic viscosity of cheese is predicted in real time through a neural network model, the flow rate-operating condition relationship function is fitted, and the target flow rate value is calculated. S3. Trigger graded PID parameter calibration based on the residual between the target flow rate and the filtered flow rate, and optimize parameters by dividing the interval according to the preset viscosity threshold; S4. Based on the current operating conditions, predict the proportional valve action delay time, generate an advance command, and limit the valve action rate; S5. Update the model after single-bottle filling, and force calibration when the residual continues to exceed the limit.

2. The method according to claim 1, characterized in that, The step S1 of dynamically selecting the filtering order based on the signal-to-noise ratio of the original flow signal includes the following steps: Temperature drift correction is applied to the original flow signal; The sliding window size is adaptively selected based on the rate of change of flow to calculate the signal-to-noise ratio; Perform spectral analysis on the corrected signal to match the corresponding filter order to the identified noise type.

3. The method according to claim 2, characterized in that, The dynamically selected filter order also includes: When the filter order needs to be switched, the transition time is determined according to the dynamic viscosity, and a smooth switch is achieved through weighted fusion. When an abnormality in the filter residual is detected, the filter order is automatically reduced to preserve transient characteristics, and potential blockage or leakage events are detected in conjunction with the filter.

4. The method according to claim 1, characterized in that, The step S2, which involves real-time prediction of the dynamic viscosity of cheese using a neural network model, includes: The features in the operating condition information are decoupled and dynamically weighted; Build a lightweight network model suitable for edge devices and dynamically adjust its structural complexity according to the viscosity range; In the initial stage of each batch, the model is corrected using the information from the first sample bottle, and when an abnormal flow signal is detected, it is switched to interpolation prediction to ensure the model's adaptability and stability.

5. The method according to claim 4, characterized in that, The decoupling and dynamic weighting specifically include: The coupling relationship between temperature, rotational speed, and pressure is separated by feature importance analysis. The weight of temperature features is increased under temperature-dominant operating conditions, and the weight of rotational speed features is increased under shear-dominant operating conditions. Furthermore, feature interaction terms are introduced to capture nonlinear correlations, and the synergistic influence of temperature and rotation speed is modeled through hidden layer mapping, thereby improving the accuracy of identifying the contribution of each feature to viscosity prediction.

6. The method according to claim 4, characterized in that, The specific modifications to the model include: For low-sample working conditions such as high viscosity, training data can be expanded by generating virtual samples or by transfer learning to reduce overfitting; During the filling process, feature weights and network parameters are periodically adjusted based on the deviation between the predicted values ​​and subsequent calibration values.

7. The method according to claim 1, characterized in that, The specific steps in step S3 to trigger the graded PID parameter calibration include: The trend of the residuals is calculated using a sliding window, and calibration is triggered only when the residuals are determined to be systematic deviations. Based on the degree to which the residual deviates from the dynamic threshold, the calibration is divided into fine-tuning, medium-tuning, or full-tuning levels, and the parameters are smoothly transitioned when switching levels.

8. The method according to claim 1, characterized in that, The optimization parameters in step S3, which divide the interval according to the preset viscosity threshold, specifically include: Fuzzy logic is used to define the membership degrees of low viscosity, medium viscosity, and high viscosity segments. By calculating the membership degrees at the interval boundaries, the parameters can be smoothly transitioned, avoiding parameter jumps at the interval boundaries.

9. The method according to claim 1, characterized in that, The specific steps in step S4 of limiting the valve's operating rate include: Based on the dynamic viscosity setting rate limit benchmark, and combined with real-time operating conditions such as valve health and pressure fluctuations, dynamic correction is performed. By coordinating the predicted action delay time, the timing of the advance command triggering and the execution rate are optimized to form a closed-loop feedback control of operating condition-delay-rate.

10. A real-time calibration and control system for cheese filling flow rate, characterized in that, include: The operating condition acquisition module is used to collect real-time data on the temperature, pressure, raw flow signal, pump speed and proportional valve opening of the cheese in the filling pipeline, and transmit the collected data to the data processing module. The data processing module is communicatively connected to the operating condition acquisition module and is configured to dynamically select the filtering order based on the signal-to-noise ratio of the original flow signal and output the filtered flow. The filtering order selection logic includes temperature drift correction, adaptive sliding window calculation, and noise feature matching. The dynamic viscosity prediction module is connected to the data processing module and has a built-in lightweight neural network model for real-time prediction of the dynamic viscosity of cheese based on operating condition information, and for fitting the flow-operating condition relationship function to calculate the target flow value. The model supports batch initial correction, abnormal operating condition interpolation switching and small sample data expansion. The graded control module is connected to the data processing module and the dynamic viscosity prediction module respectively. It is configured to trigger graded PID parameter calibration based on the residual between the target flow rate and the filtered flow rate, optimize parameters according to viscosity range and achieve smooth transition, and generate advance command and limit valve action rate based on the prediction of proportional valve action delay time under current operating conditions. The model update module is connected in communication with the graded control module. It is used to update the parameters of the neural network model after a single bottle is filled. When the residual continuously exceeds the standard, a forced calibration mechanism is triggered, and calibration data is recorded to optimize subsequent control logic.

Citation Information

Cited By

  • Temperature-pressure coupling self-adaptive control method and system for curing process of autoclave

    CN121386999A

  • Anhydrous hydrogen fluoride automatic sampling control method and system

    CN121979089A

  • Water flow control method and system for pulse type electromagnetic valve

    CN122018575A

  • A method and system for controlling water flow in a pulse-type solenoid valve

    CN122018575B

  • Electromagnetic valve flow intelligent self-adaptive control method and system for composite working conditions

    CN122063899A