A kind of industrial automation PLC is completed by discrete sampling smoothing defoaming method of vacuum concentration equipment
By optimizing the defoaming process through PLC discrete sampling and high-order fitting algorithms, the problem of vacuum balance disruption caused by traditional defoaming methods was solved, enabling efficient and stable operation of vacuum concentration equipment and improving production efficiency and evaporation rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NO 703 RES INST OF CHINA SHIPBUILDING IND CORP
- Filing Date
- 2024-03-10
- Publication Date
- 2026-07-31
AI Technical Summary
When traditional PLCs are used for defoaming in vacuum concentration equipment, they can easily disrupt the vacuum balance, leading to a reduction in evaporation and affecting production efficiency. Furthermore, it is difficult to achieve smooth negative pressure regulation.
By using discrete sampling and high-order fitting algorithms of the PLC, the linear correspondence between the defoaming liquid level and the steam valve opening is calculated, forming a gradually regular defoaming process. The PLC's built-in pulse function and external programming tools are used for data fitting to optimize the defoaming algorithm.
It achieves a fast, efficient, and energy-saving defoaming process in vacuum concentration equipment, ensuring stable equipment operation, improving production efficiency and evaporation rate, and reducing the negative impact of reduced steam volume.
Smart Images

Figure CN118320470B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial control, specifically relating to a method for defoaming a vacuum concentration device using an industrial automation PLC through discrete sampling and smoothing. Background Technology
[0002] In the field of industrial control, the concentration of liquids in a vacuum pressure vessel to achieve a specified density is widely involved. Concentration efficiency, concentration time, and concentrate volume are crucial parameters that cannot be ignored. The liquid inside the equipment is heated by a steam valve to evaporate the water and retain the active ingredients. At the same time, the vacuum equipment attached to the equipment removes the heat generated by evaporation, and the heat exchange is achieved through the cooling water pipes on the equipment's pipelines, thus creating a favorable concentration environment.
[0003] The vacuum concentrator forms a virtuous cycle in the above process, but factors that can affect its normal operation also arise. Among these, material foaming is one of the most significant factors impacting the production process. During production, due to the characteristics of the material, the high-temperature concentration environment combined with the negative pressure of the vacuum system easily causes some substances inside to appear as foam. Moreover, the negative pressure environment leads to rapid foaming. If we do not depressurize and defoam, the material level will rise sharply and flow into the side with lower pressure (vacuum cooling tower), causing the effective components in the material to be rapidly lost. Therefore, we need to add a vent valve to the evaporation chamber side to balance the gas pressure and achieve the purpose of defoaming.
[0004] Traditional defoaming methods involve the PLC detecting that the liquid level has reached the high-level protection condition of the vacuum equipment and opening the vent valve to quickly eliminate foam. While this method can eliminate foam generation, it disrupts the original vacuum balance. Furthermore, in the condenser, the heating valves rely on vacuum pressure as a setpoint for PID calculations. When the vacuum decreases, the opening of the steam regulating valve decreases, leading to a reduction in the intake air volume and consequently, a decrease in evaporation. Therefore, balancing vacuum levels to regulate steam volume and defoaming has always been a challenging problem in industrial control systems. Summary of the Invention
[0005] The purpose of this invention is to provide a method that enables equipment to maintain a smooth negative pressure balance environment, preventing material leakage and ensuring efficient operation under PID control of steam calculation. This method improves the production efficiency of vacuum concentrators by using an industrial automation PLC to smoothly complete the defoaming process of the vacuum concentrator through discrete sampling.
[0006] An industrial automation PLC method for defoaming a vacuum concentrator is proposed. By using the PLC's built-in pulse function, discrete data is collected every 250ms and recorded in the background for curve fitting calculation. The relationship between the liquid level in the concentrator and the defoaming time is calculated, and the time axis is linearly correlated with the opening degree (0%-100%) to simulate different opening degrees at different liquid levels.
[0007] Furthermore, the defoaming method for the vacuum concentration equipment using discrete sampling smoothing via the industrial automation PLC specifically includes the following steps:
[0008] S1, PLC pulse acquisition related parameters;
[0009] S2, writes to the Excel template via VBA;
[0010] S3 uses Python to read relevant parameters;
[0011] S4, define the fitting curve, calculate the error, calculate the fitting coefficient, calculate the fitting curve, and obtain the fitting parameters;
[0012] S5. Write the fitted parameters back into the PLC using VBS, calculate the opening degree based on linearity, and obtain the fitted chart based on the fitting results.
[0013] Furthermore, in step S4, three sets of discrete data points that best approximate the known data points are identified. These data are then imported into Python using VBS code for curve fitting calculation. The equation of the fitted curve is:
[0014]
[0015] After averaging the three sets of formulas, the result is imported into the PLC to obtain the function that best fits the interval within that period.
[0016] Furthermore, in S5, the time axis x is replaced with the opening degree (0-100%), resulting in... That is, the maximum opening is used when the liquid level is high, and then the opening is smoothly adjusted according to the curve formula until it is closed.
[0017] The beneficial effects of this invention are as follows:
[0018] (1) In a vacuum concentration device, this invention uses PLC software to sample based on initial conditions, collect discrete data, and perform high-order fitting to form a gradually regular curve between the defoaming liquid level and the opening of the regulating valve, thus creating a fast, efficient, and energy-saving defoaming process. This achievement can be widely applied in the fields of vacuum equipment in dairy, pharmaceutical, daily chemical, beverage, oil, and chemical industries, ensuring that defoaming is completed smoothly in the shortest possible time with only a small loss in the equipment's vacuum level, thus guaranteeing the equipment's evaporation rate and operating efficiency. High accuracy is achieved through discrete sampling and multiple curve fitting.
[0019] (2) The present invention makes a linear correspondence between the defoaming liquid level and the opening of the venting regulating valve, so as to smoothly adjust the vacuum degree and ensure the stable operation of the equipment.
[0020] (3) The algorithm of this invention is relatively simple to implement. It utilizes the limited resources of PLC to achieve a high-precision control algorithm, thus achieving a balance between system overhead and system performance.
[0021] (4) The algorithm of this invention has good stability, the system runs stably, and the prediction curve is good.
[0022] (5) The present invention can predict the opening curve of other products at different liquid levels by using the curve of one product, thereby improving the versatility of the equipment. Attached Figure Description
[0023] Figure 1 Typical configuration diagram of vacuum concentration equipment after defoaming;
[0024] Figure 2 Sampling data for vacuum equipment production;
[0025] Figure 3 This is a diagram showing the connection between the defoaming point dynamic defoaming curves under vacuum concentration.
[0026] Figure 4 This is an approximate fitted curve simulated using discrete points;
[0027] Figure 5 Here is a flowchart of the defoaming algorithm;
[0028] Figure 6 The fitted curves are obtained after collecting data from three sets of discrete points.
[0029] Figure 7 The graph showing the change in vacuum level after algorithm optimization;
[0030] Figure 8 The liquid level change curve after algorithm optimization. Detailed Implementation
[0031] The present invention will now be further described with reference to the accompanying drawings.
[0032] Taking a vacuum concentration device as an example, the controlled object can be simplified to: Figure 1 The basic structure shown includes: TCV01, a steam regulating valve; PV01, a steam condensate bypass valve; PV02, a vent valve; PV03, a cleaning valve; PV04, a chemical inlet valve; PV05, a chemical outlet valve; PV06, a vacuum valve; PV07, a condensate circulation valve; PV08, a condensate discharge valve; PV09, a condensate connection valve; TE01, an evaporation chamber thermometer; PT01, an evaporation chamber pressure sensor; and PT02, a jacket pressure sensor. Heating is achieved through the steam regulating valve TCV01, and the vacuum concentrator removes excess moisture, completing the concentration process in the vacuum equipment. PV02 is optimized as a regulating valve TCV02, as shown in the typical diagram. Figure 1 As shown.
[0033] First, the concentration curve of a certain product produced by the vacuum concentrator's liquid level is collected. PLC pulse acquisition of the vacuum concentrator's liquid level data is then written to the DB data block for pulse sampling. Some of the collected data information is as follows: Figure 2 As shown; by connecting discrete points of a curve over a period of time, a set of curves can be obtained, such as... Figure 3 As shown; when the liquid level is above 550mm, the equipment exhibits regular foaming and defoaming cycles. Although these data are discrete and not continuous, making it impossible to obtain a definite functional equation describing this correlation, since the data distribution in a Cartesian coordinate system approximates a curve, an approximate equation describing this relationship can be obtained by plotting a line, and then fitted onto it, such as... Figure 4 As shown; all the data are distributed around a single curve, so many such curves can be drawn, and we need to find the one that best reflects the relationship between the variables, that is, to find a curve that "closest" to the known data points. Due to the limited computing power of the PLC, let the equation of this fitted curve be:
[0034]
[0035] According to formula (1), it can be broken down into the following processes, such as Figure 5 As shown;
[0036] When a drop in liquid level is detected, the PLC records data via pulses and exports the discrete data. Figure 4 The dataset is converted into three sets of discrete data. Using VBScript, the data is imported into Python for curve fitting calculation. The code is as follows: `import pandas as pd`
[0037] import numpy as np
[0038] from scipy.optimize import curve_fit
[0039] import matplotlib.pyplot as plt
[0040] # Read data from an Excel file
[0041] file_path = 'data1.xlsx' # Replace with your Excel file path data = pd.read_excel(file_path)
[0042] #Extraction time and liquid level data columns
[0043] time1, level1 = data['Time'], data['L1 level'] time2, level2 = data['Time'], data['L2 level'] time3, level3 = data['Time'], data['L3 level']
[0044] # Define the fitting function
[0045] def func(x,a,b,c,d):
[0046] return a*x**3+b*x**2+c*x+d
[0047] #Perform fitting
[0048] popt1,_=curve_fit(func,time1,level1)
[0049] popt2,_=curve_fit(func,time2,level2)
[0050] popt3,_=curve_fit(func,time3,level3)
[0051] #Calculate the fitted curve
[0052] fit_curve1=func(time1,*popt1)
[0053] fit_curve2=func(time2,*popt2)
[0054] fit_curve3=func(time3,*popt3)
[0055] # Calculate the fitting error (e.g., root mean square error RMSE)
[0056] def calculate_rmse(actual,fitted):
[0057] rmse=np.sqrt(np.mean((actual-fitted)**2))
[0058] return rmse
[0059] rmse1=calculate_rmse(level1,fit_curve1)
[0060] rmse2=calculate_rmse(level2,fit_curve2)
[0061] rmse3=calculate_rmse(level3,fit_curve3)
[0062] avg_rmse=np.mean([rmse1,rmse2,rmse3])
[0063] #Calculate the average fit coefficient
[0064] avg_a=np.mean([popt1[0],popt2[0],popt3[0]])
[0065] avg_b=np.mean([popt1[1],popt2[1],popt3[1]])
[0066] avg_c=np.mean([popt1[2],popt2[2],popt3[2]])
[0067] avg_d=np.mean([popt1[3],popt2[3],popt3[3]])
[0068] #Calculate the average fitted curve
[0069] avg_curve=func(time1,avg_a,avg_b,avg_c,avg_d)
[0070] # Convert time series and fitted curves to NumPy arrays
[0071] time1_array=time1.to_numpy()
[0072] fit_curve1_array=fit_curve1.to_numpy()
[0073] time2_array=time2.to_numpy()
[0074] fit_curve2_array=fit_curve2.to_numpy()
[0075] time3_array=time3.to_numpy()
[0076] fit_curve3_array=fit_curve3.to_numpy()
[0077] #Draw the original data and the fitted curve
[0078] plt.figure(figsize=(10,6))
[0079] #Plot three fitted curves
[0080] plt.plot(timel_array, fit_curve1_array, color='red', label=f'Fit Curve1(RMSE={rmse1:.2f})')
[0081] plt.plot(time2_array, fit_curve2_array, color='blue', label=f'FitCurve 2(RMSE={rmse2:.2f})')
[0082] plt.plot(time3_array, fit_curve3_array, color='green', label=f'FitCurve 3(RMSE={rmse3:.2f})')
[0083] #Draw a scatter plot of the original data
[0084] plt.scatter(time1_array, level1, label='Data 1', marker='o', color='red')
[0085] plt.scatter(time2_array, level2, label='Data 2', marker='o', color='blue')
[0086] plt.scatter(time3_array, level3, label='Data 3', marker='o', color='green')
[0087] The calculation results and fitting curve results are as follows: Figure 4 As shown.
[0088] The results obtained from the three sets of curve functions using the code are as follows:
[0089] y1 = 0.000939x 3 -0.11374x 2 -0.6109x+739.56 (2)
[0090] y2 = 0.001984x 3 -0.14574x 2 -0.9141x+744.72 (3)
[0091] y3 = -0.001159x 3 -0.02692x 2 -1.9754x+745.52 (4)
[0092] After averaging the three sets of formulas, the results were imported into the PLC as follows:
[0093]
[0094] Using this algorithm, three sets of variables are collected cyclically for periodic fitting to obtain the function that best fits the interval within the period. According to formula (5), its time axis x is replaced with the opening degree (0-100%) to obtain formula (6), that is, the maximum opening degree is adopted when it is in the high liquid level state, and then the opening degree is smoothly adjusted according to the curve formula until it is closed.
[0095]
[0096] The ported algorithm code was applied to the concentrator of a traditional Chinese medicine factory for venting and regulation calculations. Changes in liquid level and vacuum were observed during the concentrating process. The vacuum curve was obtained by sampling using the Siemens PLC's WinCC host computer software, as shown below. Figure 7 , Figure 8 As shown;
[0097] The vacuum equipment produces a smooth concentration curve, reduces concentration time by 15%, and increases the amount of concentrated paste by 5%.
[0098] Compared with the traditional on / off control method, the vacuum curve is smooth, which effectively reduces the negative impact of reduced steam volume, while meeting production efficiency requirements. The defoaming process of traditional on / off valves has been successfully optimized.
[0099] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for defoaming a vacuum concentration device using discrete sampling smoothing via an industrial automation PLC, characterized in that, Using the PLC's built-in pulse function, discrete data is collected every 250ms and recorded in the background for curve fitting calculation. The equation of the fitted curve is: The relationship between the liquid level in the concentrator and the defoaming time was calculated. Its time axis was linearly correlated with the opening degree from 0% to 100%, simulating different opening degrees at different liquid levels. By replacing the time axis x with the opening degree from 0% to 100%, the following results were obtained. When the liquid level is high, the maximum opening is used, and then the opening is smoothly adjusted according to the formula until it is closed.
2. The defoaming method for a vacuum concentration device using discrete sampling smoothing by an industrial automation PLC according to claim 1, characterized in that, The defoaming method for vacuum concentration equipment using discrete sampling smoothing via industrial automation PLC specifically includes the following steps: S1, PLC pulse acquisition related parameters; S2, writes to the Excel template via VBA; S3 reads relevant parameters using Python; S4, define the fitting curve, calculate the error, calculate the fitting coefficient, calculate the fitting curve, and obtain the fitting parameters; S5. The fitting parameters are written into the PLC via VBS to calculate the opening degree, and the fitting chart is obtained based on the fitting results.
3. The defoaming method for a vacuum concentration device using discrete sampling smoothing by an industrial automation PLC according to claim 2, characterized in that, In step S4, three sets of discrete data that are closest to the known data points are found. The data are then imported into Python using VBS code to perform curve fitting calculations. After averaging the three sets of formulas, the data is imported into the PLC to obtain the function that best fits the interval within the period.