A diluent filling machine pipeline residual liquid dynamic compensation filling method, device, product and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOFITEL (FUJIAN) NEW MATERIAL TECH CO LTD
- Filing Date
- 2026-06-17
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]然而,上述清洗排空方式存在明显的物料浪费问题
[0025]1、由于采用了获取当前订单配方和前一订单配方计算目标管路内的残液体积,确定残液成分数据并与当前配方数据逐项比对得到偏差值,当偏差值超出预设阈值范围时计算最小排液量并控制阀门和泵将对应体积的残液置换排出,再根据管路内当前存留液体的体积和各组分含量计算灌装目标量并按该目标量进行灌装,所以实现了配方切换时对管路残液的动态补偿控制,有效解决了现有技术中配方切换时需要完全排空和冲洗管路造成的物料浪费问题,进而实现了提高物料利用率和降低生产成本。
Smart Images

Figure CN122519974A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial automation control, and in particular to a method, equipment, product and medium for dynamic compensation of residual liquid in the pipeline of a diluent filling machine. Background Technology
[0002] With the rapid development of industries such as coatings, paints, and chemicals, thinners, as important supporting products, require precise filling according to different formulations during the production process. Thinners are typically composed of multiple components mixed in specific proportions, and different customer orders have varying requirements for the proportions of each component. To meet diverse market demands, thinner manufacturers need to frequently switch between different formulations for filling operations, which places high demands on the flexible production capacity of filling equipment and product quality control.
[0003] In related technologies, diluent filling equipment typically completes filling by conveying materials from a mixing tank to the filling container through pipelines. When a formula change is required, the operator first prepares the new formula material in the mixing tank and then directly starts the filling program. To ensure formula accuracy, some equipment will clean or drain the pipeline before formula switching. This involves opening the drain valve to completely drain the residual old formula liquid from the pipeline, then flushing the pipeline with the new formula material. Formal filling only begins after the flushing solution meets the requirements of the new formula. This cleaning and draining method eliminates the influence of the previous formula on the current formula through physical displacement.
[0004] However, the aforementioned cleaning and evacuation methods present significant material waste issues. Since filling pipelines typically have a certain volume, complete evacuation and flushing result in the loss of a substantial amount of qualified material. Especially in multi-variety, small-batch production models, frequent formula changes lead to an increased number of cleaning and evacuation operations, resulting in considerable accumulated material waste. This not only increases production costs but also fails to meet environmental protection requirements for energy conservation and emission reduction. Summary of the Invention
[0005] This application provides a method, equipment, product, and medium for dynamic compensation of residual liquid in the pipeline of a diluent filling machine, which is used to improve material utilization during formula switching.
[0006] In a first aspect, this application provides a dynamic compensation filling method for residual liquid in a diluent filling machine pipeline, applied to filling equipment. The method includes: acquiring the current order formula and the previous order formula to obtain current formula data and previous formula data; calculating the residual liquid volume in the target pipeline based on known parameters of the target pipeline to obtain a residual liquid volume value; determining the content of each component in the residual liquid in the target pipeline based on the previous formula data and the residual liquid volume value to obtain residual liquid composition data; comparing the residual liquid composition data with the target proportions of each component in the current formula data item by item to obtain deviation values for each component; if any deviation value exceeds a preset deviation threshold range, calculating a method to reduce all deviation values back to a minimum based on the residual liquid volume value and the deviation value. The minimum discharge volume is obtained by determining the required discharge volume within the deviation threshold range. Based on the minimum discharge volume, the control valve is switched to the discharge direction and the pump is started, pushing the new material from the mixing tank into the pipeline. The residual liquid corresponding to the minimum discharge volume is replaced and discharged from the discharge end, resulting in the liquid remaining in the target pipeline after replacement. Based on the volume of the liquid remaining in the target pipeline, the content of each component, the target ratio of each component in the current formula data, and the total filling volume of the current container, the amount of new material to be added from the mixing tank to ensure that the component ratio meets the target ratio after the current container is filled is calculated, resulting in the filling target volume. The valve and pump are opened to fill the current container through the pipeline. When the cumulative filling volume reaches the filling target volume, the valve and pump are closed.
[0007] In the above embodiments, the residual liquid volume in the target pipeline is calculated by obtaining the current order formula and the previous order formula, the residual liquid composition data is determined and compared with the current formula data item by item to obtain the deviation value. When the deviation value exceeds the preset threshold range, the minimum drainage volume is calculated and the valve and pump are controlled to replace and drain the corresponding volume of residual liquid. Then, the filling target amount is calculated based on the current volume of liquid remaining in the pipeline and the content of each component, and filling is carried out according to the target amount. This realizes dynamic compensation control of pipeline residual liquid when formula switching, and avoids material waste caused by completely emptying the pipeline.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, the step of calculating the amount of liquid required to bring all deviation values back to the deviation threshold range if any deviation value exceeds a preset deviation threshold range, based on the residual liquid volume value and the deviation value, to obtain the minimum liquid discharge amount, specifically includes: for each component whose deviation value exceeds the deviation threshold range, selecting a value on the same side as the deviation direction from the upper and lower limits of the deviation threshold range as the convergence boundary value of the component, based on the deviation direction of the component's deviation value relative to the target ratio of the component in the current formulation data; calculating the liquid discharge amount corresponding to the component's deviation value decreasing to the convergence boundary value based on the component's deviation value, convergence boundary value, and residual liquid volume value, according to the relationship that the deviation value decreases linearly with the increase of liquid discharge amount when the residual liquid in the pipeline is replaced by an equal volume of new material in the mixing tank, to obtain the critical liquid discharge amount corresponding to the component; and selecting the critical liquid discharge amount with the largest value as the minimum liquid discharge amount from the critical liquid discharge amounts corresponding to each of all components whose deviation values exceed the deviation threshold range.
[0009] In the above embodiments, for each component whose deviation value exceeds the threshold range, a convergence boundary value is selected according to the direction of deviation. The critical discharge volume is calculated according to the relationship that the deviation value decreases linearly with the increase of discharge volume when the residual liquid is replaced by an equal volume of new material. The maximum value is selected as the minimum discharge volume among the critical discharge volumes corresponding to all components that exceed the threshold range, ensuring that all components exceeding the standard can fall back to the threshold range through the minimum discharge volume, thus realizing the accurate calculation and minimization control of the discharge volume.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, the step of controlling the valve to switch to the drainage direction and starting the pump according to the minimum drainage volume, pushing the new material from the mixing tank into the pipeline, and displacing and discharging the residual liquid corresponding to the minimum drainage volume from the drainage end to obtain the residual liquid in the target pipeline after displacement, specifically includes: controlling the valve to switch to the drainage direction and starting the pump, pushing the new material from the mixing tank into the pipeline through the feed end of the pipeline, pushing the residual liquid in the pipeline to be discharged from the drainage end; accumulating the volume of liquid discharged from the drainage end in real time to obtain the cumulative drainage volume, and when the cumulative drainage volume reaches... At the minimum discharge rate, close the valve and stop the pump; calculate the volume of the residual liquid zone based on the residual liquid volume and the minimum discharge rate; based on the characteristic that the new material replaces the residual liquid along the pipeline in a piston-like propulsion manner from the feed end, divide the remaining liquid in the pipeline into a new material zone near the feed end with a volume equal to the minimum discharge rate and a residual liquid zone near the discharge end with a volume equal to the residual liquid zone volume; set the content of each component in the new material zone to the target ratio of each component in the current formula data, and set the content of each component in the residual liquid zone to the content of each component in the residual liquid composition data, thus obtaining the remaining liquid in the pipeline after replacement.
[0011] In the above embodiment, the control valve is switched to the drainage direction and the pump is started. The new material in the mixing tank is pushed into the pipeline to drive the residual liquid out from the drainage end. The drainage volume is accumulated in real time and the valve is closed when the minimum drainage volume is reached. According to the characteristic of the new material replacing the residual liquid in a piston-like propulsion manner, the liquid remaining in the pipeline is divided into a new material area and a residual liquid area, and the content of each component is set respectively. This realizes accurate modeling of the liquid remaining in the pipeline after replacement, and provides accurate initial state data for the calculation of the target filling volume.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, the step of calculating the amount of new material to be added from the mixing tank to ensure that the component proportions meet the target proportions after the current tank is filled, based on the volume of the liquid currently remaining in the target pipeline and the content of each component, the target proportions of each component in the current formula data, and the total filling volume of the current tank, specifically includes: calculating the deviation contribution of the remaining liquid to the component proportions after entering the current tank based on the difference between the component content in the liquid currently remaining in the pipeline and the target proportions of the components in the current formula data, and the volume of the remaining liquid, thereby obtaining the deviation contribution of each component; For each component with a non-zero deviation contribution, the minimum filling amount required to ensure that the proportion deviation of the components in the current container does not exceed the filling proportion tolerance is calculated based on the component's deviation contribution and the preset filling proportion tolerance. This yields the corresponding proportion constraint filling amount for the component. Among the proportion constraint filling amounts corresponding to all components with non-zero deviation contributions, the proportion constraint filling amount with the largest value is selected as the candidate filling amount. If the candidate filling amount is greater than the total filling amount of the current container, the filling target amount is set to the total filling amount of the current container. If the candidate filling amount is not greater than the total filling amount of the current container, the candidate filling amount is used as the filling target amount.
[0013] In the above embodiment, the deviation contribution is calculated based on the difference between the content of the component in the liquid currently remaining in the pipeline and the target ratio, and the volume of the remaining liquid. For each component with a non-zero deviation contribution, the ratio constraint filling amount is calculated based on the deviation contribution and the filling ratio tolerance. The maximum value among the ratio constraint filling amounts corresponding to all components is selected as the candidate filling amount, thus realizing the accurate calculation of the filling target amount and ensuring that the distribution ratio of each group meets the target ratio requirements after the current barrel is filled.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of closing the valve and pump when the cumulative filling volume reaches the target filling volume, the method further includes: calculating the mass of each component of the remaining liquid entering the current container based on the content and volume of each component of the liquid currently remaining in the pipeline; calculating the mass of each component of the new material entering the current container based on the target filling volume, the volume of the remaining liquid, and the target ratio of each component in the current formula data; determining the actual ratio value of each component in the current container based on the mass of each component of the remaining liquid, the mass of each component of the new material, and the target filling volume; comparing the actual ratio value of each component with the target ratio of each component in the current formula data item by item to obtain the actual deviation value of each component; if all actual deviation values do not exceed the product qualification threshold, then the current container is marked as a qualified product.
[0015] In the above embodiments, the mass of each component of the remaining liquid entering the current container is calculated based on the content and volume of each component in the liquid currently present in the pipeline. The mass of each component of the new material entering the current container is calculated based on the filling target quantity and the current formula data. The actual ratio of each component in the current container is determined based on the mass of each component of the remaining liquid and the mass of each component of the new material. The actual ratio is compared with the target ratio item by item to obtain the actual deviation value and determine the qualified status, thus realizing real-time verification and automatic judgment of the quality of the filled product.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of closing the valve and pump when the cumulative filling volume reaches the target filling volume, the method further includes: obtaining the detection ratio values of each component in the current container; comparing the detection ratio values with the target ratios of each component in the current formula data item by item to determine the filling qualification status of the current container; storing the previous formula data, current formula data, deviation value, minimum discharge volume, and filling qualification status as switching records; when the cumulative number of switching records for the same previous formula data and current formula data reaches a preset record quantity threshold, all switching records corresponding to the same previous formula data and current formula data are collected into a same formula pair record set; based on the deviation value, minimum discharge volume, and filling qualification status of each switching record in the same formula pair record set, calculating an update value for the deviation threshold range, and replacing the currently used deviation threshold range with the update value.
[0017] In the above embodiments, the detection ratio values of each component in the current container are obtained and the filling qualification status is determined. The previous formula data, current formula data, deviation value, minimum discharge volume and filling qualification status are stored as switching records. When the cumulative number of switching records reaches a preset threshold, they are collected into a set of records of the same formula. The updated value of the deviation threshold range is calculated based on the data of each switching record in the record set and the currently used deviation threshold range is replaced, thereby realizing the adaptive optimization of the deviation threshold range.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the step of calculating an updated value for the deviation threshold range based on the deviation value, minimum discharge volume, and filling qualification status of each switching record in the same formula pair record set, and replacing the currently used deviation threshold range with the updated value, specifically includes: screening switching records with a qualified filling qualification status from the same formula pair record set to form a qualified record subset; for each switching record in the qualified record subset, calculating the residual deviation degree of each component after residual liquid replacement based on the deviation value, residual liquid volume value, and minimum discharge volume of each component in the switching record, obtaining the residual deviation index of each component in the switching record; extracting statistical feature values from the residual deviation indices of all components in all switching records of the qualified record subset to obtain the historical compensable deviation boundary; and determining the updated value of the deviation threshold range based on the historical compensable deviation boundary and a preset safety margin coefficient.
[0019] In the above embodiments, a qualified record subset is formed by screening switching records with qualified filling status from the same formula pair record set. For each switching record in the qualified record subset, the residual deviation index of each component after residual liquid replacement is calculated. Statistical feature values are extracted from the residual deviation index of all components to obtain the historical compensable deviation boundary. The updated value of the deviation threshold range is determined according to the historical compensable deviation boundary and the preset safety margin coefficient, thereby realizing the dynamic adjustment of the deviation threshold range based on historical qualified data.
[0020] In a second aspect, embodiments of this application provide a filling apparatus comprising: one or more processors and a memory; the memory is coupled to the one or more processors and is used to store computer program code, the computer program code including computer instructions, wherein the one or more processors invoke the computer instructions to cause the filling apparatus to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a filling device, cause the filling device to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a filling device, cause the filling device to perform the method described in the first aspect and any possible implementation thereof.
[0023] Understandably, the filling equipment provided in the second aspect, the computer storage medium provided in the third aspect, and the computer program product provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0025] 1. By acquiring the current order formula and the previous order formula to calculate the residual liquid volume in the target pipeline, determining the residual liquid composition data, and comparing it item by item with the current formula data to obtain the deviation value, when the deviation value exceeds the preset threshold range, the minimum drainage volume is calculated and the valves and pumps are controlled to replace and drain the corresponding volume of residual liquid. Then, based on the current volume of liquid remaining in the pipeline and the content of each component, the target filling volume is calculated and filling is carried out according to the target volume. Therefore, dynamic compensation control of pipeline residual liquid is realized when formula changes, which effectively solves the material waste problem caused by the need to completely empty and flush the pipeline when formula changes in the existing technology, thereby improving material utilization and reducing production costs.
[0026] 2. By selecting a convergence boundary value based on the direction of deviation for each component whose deviation exceeds the threshold range, and calculating the critical discharge volume according to the relationship that the deviation value decreases linearly with the increase of discharge volume when the residual liquid is replaced by an equal volume of new material, the maximum value among the critical discharge volumes corresponding to all components exceeding the threshold range is selected as the minimum discharge volume. Therefore, it is ensured that all components exceeding the standard can fall back to the threshold range through this minimum discharge volume. This effectively solves the problem of material waste or excessive formula deviation caused by the inability to accurately calculate the minimum discharge volume required when switching formulas in the existing technology, thereby realizing the accurate calculation and minimization control of discharge volume.
[0027] 3. By switching the control valve to the drainage direction and starting the pump, the new material in the mixing tank is pushed into the pipeline, pushing the residual liquid out from the drainage end. The drainage volume is accumulated in real time, and the valve is closed when the minimum drainage volume is reached. Based on the characteristic that the new material replaces the residual liquid in a piston-like manner, the liquid remaining in the pipeline is divided into a new material area and a residual liquid area, and the content of each component is set separately. Therefore, accurate modeling of the liquid remaining in the pipeline after replacement is achieved. This effectively solves the problem of inaccurate subsequent filling ratio control caused by the inability to accurately grasp the liquid state in the pipeline after formula switching in the existing technology. In this way, accurate initial state data is provided for the calculation of the subsequent filling target amount. Attached Figure Description
[0028] Figure 1 This is a flowchart illustrating a dynamic compensation filling method for residual liquid in the pipeline of a diluent filling machine, as described in this application.
[0029] Figure 2 This is another schematic diagram of the dynamic compensation filling method for residual liquid in the pipeline of the diluent filling machine in this application embodiment;
[0030] Figure 3 This is a schematic diagram of the physical device structure of a filling equipment in the embodiments of this application. Detailed Implementation
[0031] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0032] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0033] For ease of understanding, the method provided in this implementation is described in process below. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating a dynamic compensation filling method for residual liquid in the pipeline of a diluent filling machine, as described in this application.
[0034] S101. Obtain the current order formula and the previous order formula, get the current formula data and the previous formula data, calculate the residual liquid volume in the target pipeline based on the known parameters of the target pipeline, and obtain the residual liquid volume value.
[0035] The current order formula represents the product formula information corresponding to the filling task currently being performed, including parameters such as the type and proportion of each component. The previous order formula represents the formula information used in filling tasks completed before the current order. Current formula data refers to the specific numerical information extracted from the current order formula, including the target proportions, component names, and densities of each component. Previous formula data refers to the specific numerical information extracted from the previous order formula, including the actual proportions and component names of each component. Target pipeline refers to the piping system connecting the mixing tank and the filling location for transporting materials. Known parameters represent the measurable or calibrated physical characteristics of the target pipeline, including the pipeline inner diameter, pipeline length, and pipeline material. Residual liquid volume value represents the space occupied by the previous formula material remaining inside the target pipeline, measured in volume units.
[0036] Specifically, the filling equipment's control system first retrieves the formula information for the currently pending filling order and the formula information for the previous completed filling order from the order management module. Through data parsing, it converts the formula information into structured formula data, extracting key parameters such as the name of each component, target mass fraction or volume fraction, and density. Subsequently, the control system accesses the pipeline parameter database to read the geometric dimensions of the target pipeline, including the inner diameter and length of each pipeline segment. Based on the pipeline geometry, it divides the pipeline into several cylindrical or other regular geometric segments, calculates the internal volume of each segment, and sums them to obtain the total internal volume of the pipeline. Considering that the pipeline is filled with the material from the previous formula after the previous order was filled, the total internal volume of the pipeline is used as the residual liquid volume value. This residual liquid volume value provides the basic data for subsequent calculations of the content of each component in the residual liquid and for determining the discharge volume.
[0037] In some embodiments, the residual liquid volume can be calculated in several ways. Optionally, for complex pipeline systems composed of multiple pipe sections with different diameters, the inner diameter, length, and connection relationship of each pipe section are first read from the pipeline configuration file. The internal volume of each straight pipe section is calculated using the cylinder volume formula. For irregular fittings such as elbows and tees, pre-calibrated volume data or volume values calculated by 3D modeling software are used. The volumes of all pipe sections and fittings are summed to obtain the total internal volume of the entire pipeline system, which is used as the residual liquid volume value. Optionally, for relatively simple single-diameter pipelines, the pre-calibrated total volume value of the pipeline is directly read from the equipment parameter database. This calibration value is obtained through actual liquid filling measurement or precise geometric measurement. The control system directly assigns this calibration value to the residual liquid volume variable without real-time calculation, saving computing resources and improving response speed. It is understood that other methods can also be used to obtain the residual liquid volume, such as real-time estimation of the liquid volume in the pipeline through a combination of pressure sensors and flow meters, which is not limited here.
[0038] S102. Based on the previous formula data and residual liquid volume value, determine the content of each component in the residual liquid in the target pipeline, obtain residual liquid composition data, and compare the residual liquid composition data with the target ratio of each component in the current formula data item by item to obtain the deviation value of each component.
[0039] The content of each component in the residual liquid represents the mass fraction or volume fraction of various chemical components in the residual material within the target pipeline. Residual liquid composition data refers to a structured data set describing the names of each component in the residual liquid and their corresponding content values. The target ratio represents the ideal mass fraction or volume fraction that each component should achieve as specified in the current formulation data. Item-by-item comparison refers to a one-to-one numerical comparison of the content of each component in the residual liquid composition data with the target ratio of the corresponding component in the current formulation data. The deviation value is used to indicate the degree of difference between the actual content of a component in the residual liquid and the target ratio of that component in the current formulation, and can be expressed in the form of absolute difference, relative percentage difference, etc.
[0040] Specifically, the control system determines the composition of the residual liquid in the pipeline based on the proportions of each component in the previous formula data and the residual liquid volume value obtained in step S101. Since the pipeline was filled with the material of the previous formula when the previous order was filled, the content of each component in the residual liquid is directly obtained from the proportions of each component in the previous formula data. Combined with the residual liquid volume value, the absolute mass or volume of each component can be further calculated. The control system organizes the residual liquid composition data into a data structure containing component names and content values. Subsequently, the control system traverses all components in the current formula data. For each component, it searches for the content value of the same component in the residual liquid composition data and compares this content value with the target proportion of that component in the current formula. The comparison method can be to obtain the absolute deviation by direct subtraction or to calculate the relative deviation percentage. For components present in the residual liquid but not in the current formula, the deviation value is set to the content value of that component in the residual liquid. For components present in the current formula but not in the residual liquid, the deviation value is set to the negative of the target proportion of that component. The deviation values of all components are summarized to form a deviation value dataset.
[0041] In some embodiments, the determination of the content of each component in the residual liquid and the calculation of the deviation value can be achieved in various ways. Optionally, the control system reads the mass fraction of each component from the previous formulation data, directly assigns these mass fractions to the content field of the corresponding component in the residual liquid composition data, and then, for each component i in the current formulation data, extracts the content Ci of component i from the residual liquid composition data, extracts the target ratio Ti of component i from the current formulation data, calculates the absolute deviation value Di = Ci - Ti, stores Di in the deviation value dataset and associates it with component i, and obtains the deviation value of all components after traversal. Optionally, the control system first constructs a component mapping table to establish the correspondence between the component names in the previous formulation and the current formulation. For components with matching names, the volume fraction of the component is extracted from the previous formulation data as the content of the component in the residual liquid, and the deviation value is obtained by subtracting it from the target volume fraction of the component in the current formulation. For components that are present in the previous formulation but not in the current formulation, their content in the previous formulation is used as a positive deviation value. For components that are present in the current formulation but not in the previous formulation, the negative value of their target ratio is used as the deviation value. It is understandable that other methods can be used to calculate the deviation value, such as measuring the component content of the residual liquid in the pipeline in real time through an online detection device, which is not limited here.
[0042] S103. If any deviation value exceeds the preset deviation threshold range, calculate the amount of liquid to be drained to bring all deviation values back to the deviation threshold range based on the residual liquid volume value and the deviation value, and obtain the minimum amount of liquid to be drained.
[0043] The deviation threshold range represents the acceptable range within which the content of each component in the residual liquid deviates from the target ratio of the current formulation, including an upper and lower limit. Exceeding the deviation threshold range means that the deviation value of a component is greater than the upper limit or less than the lower limit. Discharge volume represents the volume of liquid discharged from the drain end of the pipeline. Returning to the deviation threshold range means that by discharging a certain volume of residual liquid and adding new material, the deviation values of components that were originally outside the deviation threshold range fall back into that range. The minimum discharge volume represents the minimum volume of liquid required to discharge to bring all out-of-range component deviation values back to the deviation threshold range.
[0044] Specifically, the control system iterates through all component deviation values obtained in step S102, compares each deviation value with a preset deviation threshold range, and determines whether the deviation value falls between the upper and lower limits of the deviation threshold range. For any component, if its deviation value is greater than the upper limit of the deviation threshold range or less than the lower limit of the deviation threshold range, the component is marked as an out-of-standard component. When at least one out-of-standard component exists, the control system needs to calculate the minimum discharge volume. The calculation process is based on the physical process of residual liquid being replaced by new material in the pipeline. When a volume of new material of volume V is pushed into the mixing tank, an equal volume of residual liquid of volume V will be discharged from the discharge end of the pipeline. The part of the pipeline near the feed end is occupied by new material, while the part near the discharge end remains residual liquid. As the discharge volume increases, the volume of residual liquid decreases, the influence of residual liquid on the overall proportion gradually decreases, and the deviation values of each component decrease accordingly. For each out-of-standard component, based on its initial deviation value, residual liquid volume value, and deviation threshold range, the discharge volume required to decay the deviation value of the component to the boundary of the deviation threshold range is calculated using a linear decay model. Because the initial deviation values and target boundary values of different components are different, the required drainage volume for each component is also different. To ensure that all exceeding the standard components fall back to the deviation threshold range, the control system selects the maximum value among the drainage volumes corresponding to all exceeding the standard components as the minimum drainage volume.
[0045] In some embodiments, the minimum discharge volume can be calculated in various ways. Optionally, the control system first identifies all components whose deviation values exceed the deviation threshold range. For each out-of-standard component i, its deviation value Di and residual liquid volume value Vr are extracted. It is determined whether Di is a positive or negative deviation. If Di is a positive deviation, the upper limit value Tu of the deviation threshold range is selected as the target boundary. If Di is a negative deviation, the lower limit value Tl of the deviation threshold range is selected as the target boundary. An equation is established based on the linear decay relationship: deviation value after discharge = Di × (Vr - discharge volume) / Vr. This equation is set to equal the target boundary value to solve for the discharge volume, obtaining the critical discharge volume Vi corresponding to component i. All out-of-standard components are traversed to obtain the critical discharge volume set {V1, V2, ..., Vn}, and the maximum value is selected as the minimum discharge volume Vmin. Optionally, the control system employs an iterative trial algorithm. The initial discharge volume is set to zero, and the discharge volume is gradually increased in preset step sizes. After each step increase, the residual deviation values of all components are recalculated, and it is checked whether the residual deviation values of all components fall within the deviation threshold range. When this condition is met for the first time, the current discharge volume is recorded as the minimum discharge volume, and the iteration process terminates. It is understood that other methods can also be used to determine the minimum discharge volume, such as solving for the minimum discharge volume under multiple constraints using numerical optimization algorithms; this is not limited here.
[0046] In some embodiments, this step specifically includes: for each component whose deviation value exceeds the deviation threshold range, based on the deviation direction of the component's deviation value relative to the target ratio of the component in the current formulation data, selecting a value on the same side as the deviation direction from the upper and lower limits of the deviation threshold range as the convergence boundary value of the component; based on the component's deviation value, convergence boundary value, and residual liquid volume value, and according to the relationship that the deviation value decreases linearly with the increase of the discharge volume when the residual liquid in the pipeline is replaced by an equal volume of new material in the mixing tank, calculating the discharge volume corresponding to the component's deviation value decreasing to the convergence boundary value, obtaining the critical discharge volume corresponding to the component; and selecting the critical discharge volume with the largest value as the minimum discharge volume from the critical discharge volumes corresponding to all components whose deviation values exceed the deviation threshold range.
[0047] Deviation value refers to the numerical difference between the actual content of a component in the residual liquid and the target proportion of that component in the current formulation, expressed as a percentage or decimal. Deviation threshold range refers to the pre-defined upper and lower limits of allowable deviation values, consisting of an upper and lower limit, used to determine whether the residual liquid proportion is acceptable. Residual liquid volume refers to the total volume of the previous formulation material remaining in the pipeline, expressed in liters or milliliters. Drainage volume refers to the volume of liquid discharged from the pipeline; drainage reduces the absolute amount of excessive components in the residual liquid. Minimum drainage volume is the minimum drainage volume required to simultaneously satisfy the deviation threshold range for all excessive components. Deviation direction refers to the positive or negative nature of the deviation value relative to zero; a positive deviation indicates the component content is higher than the target value, and a negative deviation indicates it is lower than the target value. Convergence boundary value is the critical value selected from the upper or lower limit of the deviation threshold range, on the same side as the deviation direction, serving as the convergence target for the component's deviation value. The critical discharge volume refers to the volume of liquid required to reduce the deviation of a single component just to the convergence boundary value. For example, if the target proportion of a component is 30%, the actual content in the residual liquid is 35%, and the deviation is +5%, and if the deviation threshold range is ±2%, then the convergence boundary value is +2%, and the deviation needs to be reduced from +5% to +2% through discharge.
[0048] After the control system identifies components with deviation values exceeding the deviation threshold range, it initiates the discharge volume calculation process. The system first iterates through all components, filtering out the set of components with excessive deviation values. For each filtered out component, the system determines the sign of its deviation value. If the deviation value is positive, it indicates that the component content is higher than the target ratio, and the system extracts the upper bound value from the deviation threshold range as the convergence boundary value. If the deviation value is negative, it indicates that the component content is lower than the target ratio, and the system extracts the lower bound value as the convergence boundary value. The system establishes a mathematical relationship between the deviation value and the discharge volume based on a piston-type equal-volume displacement model. This model assumes that the new material in the mixing tank is pushed into the pipeline from the feed end in a piston-flow manner, and the residual liquid in the pipeline is discharged from the discharge end in an equal volume, maintaining a clear interface between the new material and the residual liquid without mixing. Under this piston-type displacement model, after discharging a residual liquid of volume V, the volume of the previous formulation material remaining in the pipeline decreases from V0 to (V0-V). The influence of the residual liquid components on the overall proportion in the pipeline decreases linearly with the remaining residual liquid percentage. Therefore, the deviation values of each component decrease linearly with the increase of the discharge volume. The system uses the linear decay formula D(V)=D0×(V0-V) / V0 to calculate the relationship between the discharge volume V and the deviation value D(V), where D0 is the initial deviation value and V0 is the residual liquid volume. Substituting the convergence boundary value D_boundary into this formula, the equation D0×(V0-V) / V0=D_boundary is solved to obtain the critical discharge volume V_critical=V0×(1-D_boundary / D0). After calculating the critical discharge volume for all exceeding components, the system compares the critical discharge volume values of each component and selects the maximum value as the minimum discharge volume. The reason for selecting the maximum value is that only when the discharge volume reaches the maximum critical discharge volume can the deviation values of all the out-of-standard components simultaneously meet their respective convergence boundary value requirements, ensuring that the overall residual liquid ratio falls back to the deviation threshold range. The system uses the calculated minimum discharge volume as the parameter of the discharge command, instructing the actuator to open the discharge valve and precisely control the discharge operation according to this discharge volume to complete the residual liquid adjustment process.
[0049] It should be noted that when all component deviation values obtained in step S102 do not exceed the preset deviation threshold range, it indicates that the ratio of the residual liquid in the pipeline is only slightly different from the target ratio of the current formula and is within an acceptable range, so there is no need to perform a draining and replacement operation. At this time, the minimum draining volume is zero, and all the residual liquid in the pipeline is the remaining liquid, the volume of which is equal to the residual liquid volume value, and the content of each component is equal to the content of each component in the residual liquid composition data. The control system directly skips the draining volume calculation in step S103 and the residual liquid replacement and draining operation in step S104, takes all the residual liquid in the pipeline as the current remaining liquid, and proceeds to step S105 to calculate the filling target amount. The subsequent process is the same as when a draining and replacement operation is performed.
[0050] S104. Based on the minimum discharge volume, control the valve to switch to the discharge direction and start the pump. The new material in the mixing tank is pushed into the pipeline, and the residual liquid corresponding to the minimum discharge volume is replaced and discharged from the discharge end to obtain the residual liquid in the target pipeline after replacement.
[0051] In this context, a valve refers to a mechanical device installed in a pipeline system to control the flow direction of fluid, with two operating states: filling direction and draining direction. Draining direction refers to the valve switching to a state where liquid in the pipeline can be discharged from the drain end. A pump is a device that provides power to the fluid, causing it to flow in the pipeline. A mixing tank is a container for storing fresh material prepared according to the current formula. Fresh material refers to material prepared according to the current formula data and meeting the target proportion requirements. The drain end refers to the outlet position in the pipeline system designed for discharging liquid. Displacement discharge refers to the process of pushing in fresh material to push out the original residual liquid in the pipeline from the drain end. Residual liquid refers to the liquid remaining in the pipeline after partial displacement discharge, consisting of a mixture or stratification of fresh material and undischarged residual liquid.
[0052] Specifically, based on the calculated minimum discharge volume, the control system issues a control command to switch the valve from its current state to the discharge direction, ensuring that the discharge end of the pipeline is open. Simultaneously, the control system starts the pump, allowing the new material in the mixing tank to enter the inlet end of the target pipeline through the feed pipe. Since the pipeline was originally filled with residual liquid from the previous formulation, the new material, upon entering, propels it forward in a piston-like manner, pushing the residual liquid towards the discharge end. The control system monitors the volume of liquid discharged from the discharge end in real time using a flow meter and accumulates the discharged volumes to obtain the cumulative discharge volume. When the cumulative discharge volume reaches the preset minimum discharge volume, the control system immediately issues a command to close the valve and stop the pump, terminating the discharge process. At this point, the portion of the pipeline near the inlet end is occupied by new material with a volume equal to the minimum discharge volume, while the portion near the discharge end remains residual liquid with a volume equal to the original residual liquid volume minus the minimum discharge volume. Based on the characteristic of the new material being propelled in a piston-flow manner, there is a clear interface between the new material zone and the residual liquid zone. The component contents of the two zones correspond to the target ratio of the current formula and the ratio of the previous formula, respectively. The control system records the volume of liquid remaining in the pipeline after replacement, the volume of the new material zone, the volume of the residual liquid zone, and their respective component contents, providing basic data for subsequent filling volume calculations.
[0053] In some embodiments, the displacement and discharge of residual liquid and the determination of the state of remaining liquid can be achieved in various ways. Optionally, the control system sends a valve switching command to the valve driver, which controls the valve to rotate or move to the discharge direction position. At the same time, it sends a pump start command to the frequency converter, which controls the pump to run at a preset speed. Fresh material enters the target pipeline from the mixing tank through the feed pipe. The flow meter continuously collects the instantaneous flow rate and transmits it to the control system. The control system integrates the instantaneous flow rate over time to obtain the cumulative discharge volume. When the cumulative discharge volume reaches 99% to 101% of the minimum discharge volume, the control system issues a stop command. The valve driver and the frequency converter control the valve to close and the pump to stop, respectively. Subsequently, the control system calculates the residual liquid zone volume Vr_remain based on the residual liquid volume value minus the minimum discharge volume, and divides the pipeline into a fresh material zone from the feed end to a distance L and a residual liquid zone from a distance L to the discharge end, where L is calculated from the volume of the fresh material zone and the cross-sectional area of the pipeline. Optionally, the control system employs a dual-flowmeter scheme, with flowmeters installed at both the inlet and outlet ends. The inlet flowmeter measures the amount of new material entering, while the outlet flowmeter measures the amount of residual liquid discharged. Theoretically, the readings of the two flowmeters should be equal. The control system compares the two readings in real time. When the cumulative value of the outlet flowmeter reaches the minimum discharge volume, the pump is stopped and the valve is closed. Simultaneously, the volume of the new material zone is determined based on the inlet flowmeter reading, and the volume of the residual liquid zone is the total pipeline volume minus the volume of the new material zone. It is understood that other methods can also be used to control the replacement process, such as using pressure sensors to monitor pipeline pressure changes to determine the completion time of replacement; this is not limited here.
[0054] In some embodiments, this step specifically includes: controlling the valve to switch to the discharge direction and starting the pump, pushing the new material from the mixing tank into the pipeline through the feed end of the pipeline, and pushing the residual liquid in the pipeline to be discharged from the discharge end; accumulating the volume of liquid discharged from the discharge end in real time to obtain the cumulative discharge volume, and closing the valve and stopping the pump when the cumulative discharge volume reaches the minimum discharge volume; calculating the volume of the residual liquid zone based on the residual liquid volume value and the minimum discharge volume; dividing the remaining liquid in the pipeline into a new material zone near the feed end with a volume equal to the minimum discharge volume and a residual liquid zone near the discharge end with a volume equal to the residual liquid zone volume based on the characteristic that the new material replaces the residual liquid in a piston-like propulsion manner along the pipeline from the feed end; setting the content of each component in the new material zone to the target ratio of each component in the current formula data, and setting the content of each component in the residual liquid zone to the content of each component in the residual liquid composition data, to obtain the remaining liquid in the pipeline after replacement.
[0055] Minimum discharge volume refers to the minimum volume of liquid required to simultaneously bring all deviation values of exceeding the standard components back to within the deviation threshold range, expressed in liters or milliliters. New material refers to the material in the mixing tank prepared according to the current formula target ratio, with the content of each component consistent with the target ratio in the current formula data. The feed end refers to the inlet position where the pipeline connects to the mixing tank; new material enters the pipeline from this end. The discharge end refers to the discharge port at the end of the pipeline, used to discharge liquid from the system. Cumulative discharge volume refers to the real-time cumulative value of the liquid volume discharged from the discharge end, continuously monitored and calculated by a flow meter. The residual liquid volume refers to the volume occupied by the previous formula material remaining in the pipeline after the replacement operation, equal to the original residual liquid volume value minus the minimum discharge volume. Piston-like propulsion refers to a flow pattern where, when new material is pushed into the pipeline, a clear interface is formed between the new material and the residual liquid, with the new material pushing the residual liquid forward without significant mixing. The new material zone refers to the area in the pipeline near the feed end after replacement; this area is completely filled with new material, and its volume is equal to the minimum discharge volume. The residual liquid zone refers to the area near the drain end of the pipeline after replacement. This area retains the residual liquid from the previous formulation, and its volume is equal to the volume of the residual liquid zone. For example, if the residual liquid volume in the pipeline is 10 liters, the calculated minimum drainage volume is 3 liters. After replacement, a 3-liter new material zone and a 7-liter residual liquid zone will be formed in the pipeline.
[0056] After the control system obtains the minimum discharge volume, it immediately sends a command to the valve control module, driving the valve actuator to rotate the valve core to the discharge position. At this time, the connection between the pipeline and the filling end is closed, and the discharge end channel is opened, establishing a direct flow path from the feed end to the discharge end. After the valve switching is completed, the system starts the pump drive motor, and the pump starts running and establishes positive pressure at the outlet of the mixing tank, forcing the new material in the mixing tank into the feed end of the pipeline. After the new material enters the pipeline, because the pipeline is a closed system and the fluid is incompressible, the new material exerts a thrust on the residual liquid in the pipeline, driving the residual liquid to move towards the discharge end. During the propulsion process, due to the small difference in density and viscosity and the moderate flow rate, a relatively clear liquid-liquid interface is formed between the new material and the residual liquid, exhibiting a piston-like propulsion characteristic. The thickness of the mixing layer between the new material zone and the residual liquid zone is usually less than 5 times the pipeline diameter. The control system monitors the instantaneous flow rate of the discharged liquid in real time using a flow meter installed at the discharge end. The flow meter collects flow data every 0.1 seconds. The control system integrates the collected flow values over time to calculate the cumulative discharge volume, using the formula V_cumulative=∫Q(t)dt, where Q(t) is the instantaneous flow rate and t is time. The system compares the cumulative discharge volume with the minimum discharge volume in real time. When the cumulative discharge volume reaches 99.5% of the minimum discharge volume, the system issues a warning signal and reduces the pump speed in advance to avoid excessive discharge. When the cumulative discharge volume precisely reaches the minimum discharge volume, the system immediately sends a shut-off command to the valve and simultaneously cuts off the pump's power. The valve closes completely within 0.5 seconds, and the pump stops after rotating no more than one revolution due to inertia, ensuring that the control accuracy of the discharge volume is within ±0.5% of the minimum discharge volume. After the replacement operation, the system calculates the volume of the residual liquid zone using the formula V_residual = V_old - V_drain, based on the residual liquid volume V_old and the minimum discharge rate V_drain. This volume represents the amount of material from the previous formulation still remaining in the pipeline. The system uses a piston-driven propulsion model to divide the remaining liquid in the pipeline into zones. The zone near the feed end with a volume of V_drain is defined as the new material zone, completely filled with new material, and the content of each component is exactly the same as the target ratio in the current formulation data. The zone near the discharge end with a volume of V_residual is defined as the residual liquid zone, which retains the material from the previous formulation, and the content of each component is consistent with the residual liquid composition data before replacement. The system records the volume of the new material zone, the content of each component in the new material zone, the volume of the residual liquid zone, and the content of each component in the residual liquid zone in the residual liquid data structure, forming a complete description of the liquid remaining in the pipeline after replacement. This data structure provides accurate initial conditions for the ratio calculation in subsequent filling operations, ensuring the accurate prediction of the final ratio in the current container.
[0057] S105. Based on the volume of liquid currently remaining in the target pipeline and the content of each component, the target ratio of each component in the current formula data and the total filling volume of the current barrel, calculate the amount of new material to be added from the mixing tank so that the distribution ratio of each component meets the target ratio after the current barrel is filled, and obtain the filling target amount.
[0058] The "Current Residual Liquid" refers to the liquid remaining in the pipeline, including the virgin material zone and the residual liquid zone. The "Component Content" indicates the mass or volume fraction of each component contained in the virgin material zone and the residual liquid zone, respectively. "Current Container" refers to the target container for this filling operation. "Total Filling" indicates the total volume or mass of material to be filled in the current container, determined by order requirements. "Complete Target Proportion" means that after mixing all materials in the current container, the final content of each component is consistent with or within the allowable deviation of the target proportion of each component in the current formula data. "Replenished Virgin Material" indicates the volume of virgin material pumped from the mixing tank into the pipeline that conforms to the current formula's target proportion. Since the pipeline is a constant-volume system, the volume of virgin material pumped into the pipeline is equal to the total volume of material flowing into the current container from the pipeline. Therefore, the target filling amount represents both the volume of virgin material pumped from the mixing tank and the total volume of material entering the current container.
[0059] Specifically, the control system calculates the target filling quantity based on detailed information about the liquid remaining in the pipeline, including the volume of the virgin material zone, the content of each component in the virgin material zone, the volume of the residual liquid zone, the content of each component in the residual liquid zone, the target proportion of each component in the current formula data, and the total filling quantity of the current container required by the order. The calculation process considers that all the liquid remaining in the pipeline will enter the current container, and that there will be deviations between the content of each component in the residual liquid and the target proportions. These deviations will affect the final proportions in the current container. To offset the proportion deviations caused by the residual liquid, a sufficient amount of virgin material needs to be added from the mixing tank so that the ratio of the total mass or volume of each component after mixing the residual liquid and the virgin material to the total filling quantity equals the target proportion. For each component in the residual liquid, the control system calculates the difference between the content of that component in the residual liquid and the target proportion, and combines this with the volume of the residual liquid to obtain the deviation contribution of that component. For components with non-zero deviation contribution, based on the principle of material balance, an equation is established to solve for the minimum filling quantity required to make the final proportion of that component meet the target proportion. Because the contribution of deviations from different components varies, the minimum filling volume corresponding to each component also differs. The control system selects the maximum value among the minimum filling volumes corresponding to all components to ensure that all components achieve the target ratio. If this maximum value exceeds the total filling volume of the current container, the target filling volume is set as the total filling volume, indicating that the ratio requirement can be met even if the current container is filled to the brim. If this maximum value does not exceed the total filling volume, this maximum value is used as the target filling volume, indicating that the ratio requirement can be met after filling to this volume.
[0060] In some embodiments, the target filling amount can be calculated in multiple ways. Optionally, the control system first calculates the total volume of the remaining liquid Vs = volume of the new material zone + volume of the residual liquid zone. For each component i, it calculates its average content in the remaining liquid Cs_i = (volume of the new material zone × content of component i in the new material zone + volume of the residual liquid zone × content of component i in the residual liquid zone) / Vs. It then calculates the deviation contribution of component i ΔCi = Cs_i - target ratio Ti. For components where ΔCi is not zero, it establishes the equation: (Vs × Cs_i + amount of new material added × Ti) / (Vs + amount of new material added) = Ti. The amount of new material added is then obtained, and the filling amount Vi corresponding to that component is obtained as Vi = Vs + amount of new material added. The filling amount set is obtained by traversing all components, and the maximum value Vmax is selected. If Vmax is greater than the total filling amount Vtotal, then the target filling amount = Vtotal; otherwise, the target filling amount = Vmax. Optionally, the control system employs an iterative optimization algorithm. The initial filling target quantity is set as the remaining liquid volume. The filling target quantity is gradually increased in preset steps. After each increase, the expected proportion of each component in the container is calculated. The expected proportion is compared item by item with the target proportion. When the proportion deviation of all components is less than the preset filling proportion tolerance, the current filling target quantity is recorded as the optimal solution, and the iteration terminates. Simultaneously, it is checked whether this optimal solution exceeds the total filling volume. If it does, the filling target quantity is corrected to the total filling volume. It is understood that other methods can also be used to determine the filling target quantity, such as solving for the minimum filling quantity that satisfies multiple distribution ratio constraints using linear programming or nonlinear optimization algorithms; this is not limited here.
[0061] In some embodiments, this step specifically includes: calculating the deviation contribution of the remaining liquid to the component ratio after entering the current container based on the difference between the content of the component in the liquid currently remaining in the pipeline and the target ratio of the component in the current formula data, and the volume of the remaining liquid, to obtain the deviation contribution of each component; for each component with a non-zero deviation contribution, calculating the minimum filling amount required to ensure that the ratio deviation of the component in the current container does not exceed the filling ratio tolerance based on the component's deviation contribution and the preset filling ratio tolerance, to obtain the ratio constraint filling amount corresponding to the component; selecting the ratio constraint filling amount with the largest value as the candidate filling amount from the ratio constraint filling amounts corresponding to all components with non-zero deviation contributions; if the candidate filling amount is greater than the total filling amount of the current container, then the filling target amount is set to the total filling amount of the current container; if the candidate filling amount is not greater than the total filling amount of the current container, then the candidate filling amount is used as the filling target amount.
[0062] The target pipeline refers to the specific pipeline used to transport materials to the current container after the displacement operation. The liquid ratio in the pipeline has been adjusted through drainage. The current remaining liquid refers to all the liquid remaining in the target pipeline after the displacement operation, consisting of a new material zone and a residual liquid zone, with a total volume equal to the sum of the volumes of the new material zone and the residual liquid zone. The component content refers to the mass fraction or volume fraction of each chemical component in the remaining liquid. The component content in the new material zone is consistent with the target ratio of the current formula, and the component content in the residual liquid zone is consistent with the residual liquid composition of the previous formula. The current formula data refers to the product formula information specified in the current order, including parameters such as component name, target ratio, and density. The target ratio refers to the ideal mass fraction that each component should achieve as specified in the current formula data; the sum of the target ratios of all components equals 100%. The current container refers to the target container for this filling operation, used to receive the material transported by the pipeline. The total filling volume refers to the standard filling capacity of the current container, determined by the order specifications, expressed in liters or kilograms as the total amount of material the container should receive. Fresh material quantity refers to the volume of new material added from the mixing tank to the current container, and the fresh material ratio conforms to the target ratio of the current formula. Target filling quantity refers to the total amount of material to be delivered to the current container during this filling operation, including residual liquid and fresh material. Calculations ensure that the component ratios in the current container meet the target requirements after filling. Deviation contribution refers to the deviation effect of a component's content in the residual liquid on the component ratio in the current container after it enters the container, due to the inconsistency between its content and the target ratio. It is expressed as mass or mass fraction. Filling ratio tolerance refers to the pre-set maximum allowable deviation of the component ratios in the current container from the target ratio after filling, used to ensure product quality. Ratio-constrained filling quantity refers to the minimum filling quantity that must be achieved to ensure that the ratio deviation of a component after filling does not exceed the filling ratio tolerance. Candidate filling quantity refers to the maximum value selected from the ratio-constrained filling quantities of all components, as the filling quantity scheme that meets the ratio requirements of all components. For example, if there are 10 liters of liquid in the pipeline, and the content of a certain component is 32% while the target ratio is 30%, and the filling ratio tolerance is ±1%, the minimum filling volume required to make the final ratio of this component between 29% and 31% needs to be calculated.
[0063] The control system first acquires detailed parameters of the liquid currently remaining in the target pipeline after replacement, including the volume of the new material zone V_new, the content of each component in the new material zone C_new_i, the volume of the residual liquid zone V_residual, and the content of each component in the residual liquid zone C_residual_i. The system reads the target proportion T_i and the new material density ρ_new for each component from the current formula data, and the total filling volume V_total for the current container from the order data. For each component i, the system calculates its weighted average content in the residual liquid C_storage_i = (V_new × C_new_i + V_residual × C_residual_i) / (V_new + V_residual), which reflects the overall contribution of the residual liquid to the proportion of component i. The system calculates the content deviation of component i ΔC_i = C_storage_i - T_i, which represents the difference between the content of component i in the residual liquid and the target proportion. The system calculates the deviation contribution of component i, M_deviation_i = V_storage × ρ_storage × ΔC_i, based on the total volume of the remaining liquid, V_storage = V_new + V_residual, and the content deviation ΔC_i. Here, ρ_storage is the weighted average density of the remaining liquid. A positive deviation contribution indicates that the component is in excess in the remaining liquid, a negative value indicates insufficient content, and zero indicates that the content matches the target ratio. The system iterates through all components, selecting the set of components with non-zero deviation contributions. For each component j in this set, the system calculates the ratio-constrained filling volume. The calculation is based on the principle of mass balance. Let the target filling volume be V_target. Then, the total mass of component j in the current container after filling is M_storage_j + V_added × ρ_new × T_j, where M_storage_j = V_storage × ρ_storage × C_storage_j is the mass of component j provided by the remaining liquid, and V_added = V_target - V_storage is the volume of new material added. The proportion of component j after filling is R_j = (M_storage_j + V_added × ρ_new × T_j) / (V_target × ρ_target), where ρ_target is the target product density. According to the filling proportion tolerance requirement T_j - ε ≤ R_j ≤ T_j + ε, where ε is the filling proportion tolerance, the system establishes inequality constraints. When C_storage_j>T_j, component j is in excess and must satisfy R_j≤T_j+ε. Substituting this into the equation, we can solve for V_target≥V_storage×ρ_storage×(C_storage_j-T_j-ε) / (ρ_new×ε).When C_storage_j < T_j, the component j is insufficient, and it is necessary to satisfy R_j ≥ T_j - ε. After substitution and solution, we get V_target ≥ V_storage × ρ_storage × (T_j - C_storage_j - ε) / (ρ_new × ε). The system takes the positive value of the above calculation result as the filling volume constraint for the ratio of component j. If the calculation result is negative or zero, it means that no additional constraint is required. The system calculates the filling volume constraints for the ratios of all components with non-zero deviation contributions respectively, and obtains the set of filling volume constraints for ratios {V_constraint_1, V_constraint_2,..., V_constraint_n}. The system selects the maximum value of the filling volume constraints for ratios in this set as the candidate filling volume V_candidate = max{V_constraint_i}, and selecting the maximum value ensures that the ratio requirements of all components are satisfied simultaneously. The system compares the candidate filling volume V_candidate with the total filling volume V_total of the current bucket. If V_candidate > V_total, it means that even if filled to the standard capacity, the ratio of all components still cannot meet the tolerance requirements. At this time, the system sets the filling target volume to V_total, accepts the result that the ratio deviation slightly exceeds the tolerance, and generates a ratio risk warning, recording the over-standard components and the expected deviation values. If V_candidate ≤ V_total, it means that by filling the material with a volume of V_candidate, the ratio of all components can meet the tolerance requirements. The system takes the candidate filling volume as the filling target volume V_target = V_candidate. The system writes the filling target volume into the filling control parameters as the flow control target for subsequent filling operations, ensuring that the current bucket receives the material with an accurate volume and achieving the ratio control target.
[0064] S106. Control to open the valve and the pump, and fill the current bucket through the pipeline. When the cumulative filling volume reaches the filling target volume, close the valve and the pump.
[0065] Among them, controlling to open the valve and the pump means that the control system issues an instruction to switch the valve to the filling direction and start the pump to work. The filling direction refers to the state where the valve is switched to make the liquid in the pipeline flow to the filling position and enter the current bucket. The cumulative filling volume refers to the total volume or total mass of the material transported to the current bucket from the start of filling to the current moment. Reaching the filling target volume means that the value of the cumulative filling volume is equal to or exceeds the calculated filling target volume. Closing the valve and the pump means that the control system issues an instruction to close the valve and stop the operation of the pump, terminating the material transportation.
[0066] Specifically, the control system initiates the filling operation process based on the target filling volume. First, the control system issues a valve switching command, switching the valve from the draining or closed state to the filling direction, ensuring connectivity between the pipeline and the current container. Then, the control system issues a pump start command, and the pump begins operation to provide power for material transport. New material in the mixing tank flows through the pipeline to the current container under the pump's drive. At the start of the filling process, the existing liquid in the pipeline is first pushed into the current container by the new material. As filling continues, new material gradually replenishes the pipeline and continues to be delivered to the current container. The control system collects instantaneous flow data in real time using flow meters installed on the filling pipeline, and integrates the flow over time to obtain the cumulative filling volume. This cumulative filling volume includes the total volume of material entering the current container, i.e., the sum of the existing liquid and the newly added material. The control system continuously monitors the cumulative filling volume and compares it with the target filling volume in real time. When the cumulative filling volume reaches or slightly exceeds the target filling volume, the control system determines that filling is complete and immediately issues valve closing and pump stop commands. The valve quickly closes to cut off the material flow channel, and the pump stops operating to terminate material delivery, completing the filling operation for the current container. At this point, the total amount of material in the current container and the proportions of each group should meet the order requirements and formula specifications.
[0067] In some embodiments, the filling process can be controlled in various ways. Optionally, the control system sends a valve switching command to the valve controller, which drives the valve to rotate or move to the filling direction position. Simultaneously, it sends a pump start command to the frequency converter. The frequency converter controls the pump speed according to preset filling flow rate parameters. The flow meter collects instantaneous flow rate at a fixed sampling frequency and transmits it to the control system via a communication bus. In each sampling cycle, the control system multiplies the instantaneous flow rate by the sampling time interval to obtain the flow rate increment for that cycle. The flow rate increments of all cycles are accumulated to obtain the cumulative filling volume. When the cumulative filling volume reaches 98% of the target filling volume, the control system reduces the pump speed to reduce the flow rate and achieve precise control. When the cumulative filling volume reaches the target filling volume, the control system issues a stop command, and the valve controller and frequency converter control the valve to close and the pump to stop, respectively. Optionally, the control system employs a weighing method to control the filling process. An electronic scale is installed at the bottom of the current container. The scale measures the total weight of the container in real time and transmits this data to the control system. Based on the empty weight of the container and the density of the filling material, the control system converts the target filling volume into a target weight increment. During the filling process, the system calculates the weight increment of the container in real time. When the weight increment reaches the target weight increment, a stop command is issued to shut down the valves and pump. It is understood that other methods can also be used to achieve precise control of the filling volume, such as using a visual sensor to detect the liquid level in the container to determine the completion time of filling; this is not limited here.
[0068] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2This is another flowchart illustrating the dynamic compensation filling method for residual liquid in the diluent filling machine pipeline in this application embodiment.
[0069] S201. Calculate the mass of each component of the liquid entering the current container based on the content and volume of each component of the liquid currently stored in the pipeline.
[0070] The liquid currently remaining in the pipeline refers to the liquid remaining in the target pipeline after completion, consisting of a virgin material zone and a residual liquid zone. The content of each component refers to the mass fraction or volume fraction of each chemical component contained in the virgin material zone and the residual liquid zone, respectively. Volume refers to the three-dimensional space occupied by the remaining liquid, equal to the sum of the volumes of the virgin material zone and the residual liquid zone. The remaining liquid entering the current container refers to all the remaining liquid flowing into the current container from the pipeline during the filling process. The mass of each component refers to the absolute mass value of each chemical component in the remaining liquid, expressed in units of mass.
[0071] The control system acquires detailed parameters of the remaining liquid, including the volume of the virgin material zone V_new, the content of each component i in the virgin material zone C_new_i, the volume of the residual liquid zone V_old, and the content of each component i in the residual liquid zone C_old_i. For each component i, the control system calculates its mass contribution in the virgin material zone and the residual liquid zone respectively. The mass of component i in the virgin material zone is calculated using the formula M_new_i = V_new × ρ_new × C_new_i, where ρ_new is the density of the virgin material, read from the current formulation data. The mass of component i in the residual liquid zone is calculated using the formula M_old_i = V_old × ρ_old × C_old_i, where ρ_old is the density of the residual liquid, read from the previous formulation data. The control system adds the two masses to obtain the total mass of component i in the remaining liquid M_i = M_new_i + M_old_i. The system iterates through all components in the current formulation data, performing the above calculations for each component to obtain a complete dataset of the masses of each component in the remaining liquid {M_1, M_2, ..., M_n}. This dataset provides the foundation for subsequent calculations of the actual proportions in the current container. The control system stores the calculation results in a remaining liquid mass data structure, associating each component name with its corresponding mass value.
[0072] S202. Calculate the mass of each component of the new material entering the current container based on the target filling volume, the volume of the remaining liquid, and the target proportion of each component in the current formula data.
[0073] The target filling volume refers to the total volume of material transported from the mixing tank to the current container via pipeline during this filling process, including residual liquid and newly added material. The volume of residual liquid refers to the space occupied by residual liquid within the pipeline, equal to the sum of the volumes of the new material zone and the residual liquid zone. Current formula data refers to the specific numerical information extracted from the current order formula, including the target proportions, component names, and densities of each component. The target proportions of each component refer to the ideal mass fraction or volume fraction that each component should achieve, as specified in the current formula data. New material entering the current container refers to the material that conforms to the target proportions of the current formula and is added to the current container from the mixing tank during the filling process. The mass of each component refers to the absolute mass value of each chemical component in the new material, expressed in mass units.
[0074] The control system acquires the target filling volume V_target and the remaining liquid volume V_storage, and calculates the added material volume V_added = V_target - V_storage. The added material volume V_added represents the amount of new material added from the mixing tank to the current container. The control system reads the density ρ_new of the new material from the current formula data and calculates the total mass of the added material M_added = V_added × ρ_new. For each component i in the current formula data, the control system reads the target proportion T_i of that component, expressed as a mass fraction. Based on the principle of mass conservation, the mass of component i in the new material is equal to the product of the total mass of the new material and the target proportion of that component, calculated as M_added_i = M_added × T_i. This calculation is performed on each component in the current formula data, resulting in a complete dataset of the masses of each component entering the current container: {M_added_1, M_added_2, ..., M_added_n}. This dataset reflects the contribution of the added material to the mass of each component in the current container. The control system stores the calculation results in the new material quality data structure, associating each component name with its corresponding quality value, providing data support for subsequent actual proportion calculations.
[0075] S203. Based on the mass of each component of the remaining liquid, the mass of each component of the new material, and the target filling amount, determine the actual ratio of each component in the current container.
[0076] The mass of each component in the remaining liquid refers to the absolute mass value of each chemical component in the remaining liquid. The mass of each component in the new material refers to the absolute mass value of each chemical component added to the new material. The target filling volume refers to the total volume of material delivered to the current container during this filling. Each component in the current container refers to all chemical components contained in the current container after filling. The actual proportion value refers to the proportion of each component's mass in the current container to the total mass, expressed as a mass fraction, reflecting the true content of each component after filling.
[0077] The control system acquires the mass datasets of each component in the stored liquid {M_storage_1, M_storage_2, ..., M_storage_n} and the mass datasets of each component in the new material {M_added_1, M_added_2, ..., M_added_n}. For each component i, the control system adds the mass of that component in the stored liquid to the mass of that component in the new material, obtaining the total mass of component i in the current container, M_total_i = M_storage_i + M_added_i. The control system sums the total masses of all components, obtaining the total mass of the material in the current container, M_sum = ΣM_total_i. Based on the definition of mass fraction, the actual proportion value R_actual_i of component i is calculated using the formula R_actual_i = M_total_i / M_sum, which represents the mass percentage of component i in the current container. The system iterates through all components, performing the above calculations for each component to obtain a dataset of actual proportions of each component in the current container: {R_actual_1, R_actual_2, ..., R_actual_n}. The control system verifies that the sum of all actual proportions equals 1 as a check for calculation accuracy. This dataset fully describes the proportions of materials in the current container, providing a basis for subsequent proportion deviation analysis and qualification determination. The control system stores the actual proportion data in the current container proportion information structure.
[0078] S204. Compare the actual proportions of each component with the target proportions of each component in the current formula data to obtain the actual deviation values of each component.
[0079] The actual proportion of each component refers to the mass fraction of each component in the current container. The target proportion of each component in the current formulation data refers to the ideal mass fraction that each component should achieve as specified in the current formulation. Item-by-item comparison refers to a one-to-one numerical comparison between the actual proportion of each component in the current container and the target proportion of the corresponding component in the current formulation. The actual deviation of each component refers to the difference between the actual proportion of each component and the target proportion, expressed numerically as the degree of deviation.
[0080] The control system acquires the actual proportion dataset {R_actual_1, R_actual_2, ..., R_actual_n} of each component in the current container, and reads the target proportion dataset {T_1, T_2, ..., T_n} of each component from the current formula data. For each component i, the control system extracts R_actual_i from the actual proportion dataset and T_i from the target proportion dataset, and calculates the actual deviation value of component i using the formula D_actual_i = R_actual_i - T_i. A positive actual deviation value D_actual_i indicates that the content of the component in the current container is higher than the target proportion, a negative value indicates that the content is lower than the target proportion, and zero indicates that the content is consistent with the target proportion. This calculation is performed for each component, iterating through all components to obtain the actual deviation value dataset {D_actual_1, D_actual_2, ..., D_actual_n} for each component. The control system associates and stores the actual deviation value data with the component name, generating a deviation analysis report. This deviation value reflects the accuracy of the proportioning control during the filling process and is used for subsequent qualification judgment and process optimization. The control system also calculates the statistical characteristics of the deviation value, including the maximum deviation value max(|D_actual_i|) and the average deviation value mean(|D_actual_i|), as quantitative indicators for filling quality assessment.
[0081] S205. If all actual deviation values do not exceed the product qualification threshold, then the current barrel shall be marked as a qualified product.
[0082] The total actual deviation value refers to the dataset of actual deviation values for all components in the current container. The product qualification threshold refers to the preset maximum allowable deviation between the actual proportion of each component and the target proportion, including both the upper and lower bounds. Not exceeding the product qualification threshold means that the actual deviation value of each component falls between the upper and lower bounds specified by the product qualification threshold. The current container refers to the target container for this filling operation. A qualified product refers to a product whose proportions meet quality standards and is ready for sale.
[0083] The control system acquires the actual deviation value dataset {D_actual_1, D_actual_2, ..., D_actual_n} for each component and reads the upper bound T_upper and lower bound T_lower of the product qualification threshold from the product quality standard database. For each component i, the control system determines whether the actual deviation value D_actual_i of the component satisfies the condition T_lower≤D_actual_i≤T_upper. If component i satisfies this condition, it is marked as qualified; otherwise, it is marked as unqualified. The control system iterates through the judgment results of all components, checking whether all components are marked as qualified. If all components are qualified, the control system writes a qualified product mark into the identification information of the current container, sets the quality status field of the container to "qualified", and generates a qualification certificate document, recording the order number, filling time, actual ratio value of each component, and deviation value of the current container. If any component is marked as non-conforming, the control system will mark the current container as non-conforming, set the quality status field to "non-conforming", generate a non-conforming report, record the name of the non-conforming component, the actual deviation value and the degree of exceeding the standard, and trigger the abnormal handling process to transfer the container to the waiting area.
[0084] S206. Obtain the test ratio values of each component in the current container, compare the test ratio values with the target ratios of each component in the current formula data item by item, and determine the filling qualification status of the current container.
[0085] The current component ratio values in the container refer to the actual mass fractions of each component measured by laboratory testing equipment or online analytical instruments. These ratio values are objective measurement results obtained based on physicochemical analysis methods, and form a verification relationship with the calculated actual ratio values. The target ratios of each component in the current formula data refer to the ideal mass fractions of each component specified in the current formula. Item-by-item comparison refers to a one-to-one numerical comparison between the measured ratio values of each component and the target ratios of the corresponding components in the current formula. The filling qualification status refers to the final conclusion, based on the comparison results of the measured ratio values and the target ratios, determining whether the current container meets the product quality standards.
[0086] The control system receives the current container's detection data from the quality inspection system. This data includes a dataset of detection ratio values for each component {C_detected_1, C_detected_2, ..., C_detected_n}. These ratio values are obtained through analytical instruments such as gas chromatography, liquid chromatography, mass spectrometry, or near-infrared spectroscopy. The control system reads the target ratio dataset for each component {T_1, T_2, ..., T_n} from the current formulation data. For each component i, the control system calculates the detection deviation value D_detected_i = C_detected_i - T_i. This deviation value reflects the difference between the detection result and the target ratio. The control system compares the detection deviation value D_detected_i with the product qualification threshold to determine if T_lower ≤ D_detected_i ≤ T_upper. If the detection deviation values for all components are within the product qualification threshold range, the control system sets the current container's filling qualification status to "inspection qualified" and records the container's qualification status and inspection report number in the product database. If the detection deviation value of any component exceeds the product qualification threshold, the control system will set the filling qualification status to "detection failure", generate a non-compliance notification, record the non-compliance component and the extent of the exceedance, and trigger the quality traceability process to analyze the reasons for the difference between the calculated value and the detected value.
[0087] S207. Store the previous formula data, current formula data, deviation value, minimum discharge volume, and filling qualification status as a switching record.
[0088] Previous formulation data refers to the actual proportions and names of each component extracted from the previous order formulation. Current formulation data refers to the target proportions, names, densities, and other specific numerical information of each component extracted from the current order formulation. Deviation values refer to the dataset of differences between the content of each component in the residual liquid and the target proportions of each component in the current formulation. Minimum discharge volume refers to the minimum volume of liquid required to bring all deviation values of exceeding the standard components back to the deviation threshold range. Filling qualification status refers to the judgment conclusion on whether the current container meets the product quality standards. Switching record refers to a structured record containing all the above data, used to describe the complete information of a formulation switch and filling process.
[0089] The control system creates a new switchover record data structure containing multiple fields to store key parameters for the formula switchover and filling process. The control system copies the entire contents of the previous formula data to the previous formula field of the switchover record, including component names and proportions. It also copies the entire contents of the current formula data to the current formula field of the switchover record, including component names, target proportions, and densities. The deviation value dataset {D_1, D_2, ..., D_n} is extracted and written to the deviation value field of the switchover record. The minimum discharge volume Vmin is extracted and written to the minimum discharge volume field of the switchover record. The filling pass status is extracted and written to the pass status field of the switchover record. The control system generates a unique identifier for this switchover record and records metadata such as the current timestamp, operator information, and equipment number. The control system stores the complete switchover record in the switchover record table of the historical database, creating an index to support subsequent queries and analysis. The storage operation uses a transaction mechanism to ensure data integrity, and the system returns a confirmation message indicating successful record saving upon completion.
[0090] S208. When the cumulative number of switching records for the same previous formula data and current formula data reaches a preset record quantity threshold, all switching records corresponding to the same previous formula data and current formula data are grouped into a same formula pair record set.
[0091] Identical previous and current formulation data refers to situations where the component types and proportions of the previous and current formulations are completely identical during multiple formulation changeovers. A changeover record is a structured record containing key parameters of the formulation changeover and filling process. Reaching a preset record count threshold means that the cumulative number of changeover records for the same formulation pair in the historical database reaches a pre-defined minimum sample size requirement; this threshold is typically set to 30 to 100 records. A set of records for the same formulation pair refers to the collection of all changeover records with identical previous and current formulations selected from the historical database, used for statistical analysis and process optimization.
[0092] The control system queries the latest saved switching record from the switching record table in the historical database, and extracts the previous recipe data and the current recipe data in this record as query conditions. The control system constructs a database query statement to retrieve all switching records in the historical database where the previous recipe field exactly matches the previous recipe data and the current recipe field exactly matches the current recipe data. The recipe matching judgment is based on逐项 comparison of the component names and the ratio values, and it is required that the names of all components in the two recipe data are exactly the same and the difference in the corresponding ratio values is less than 0.01%. The control system counts the number of records N in the query result, reads the preset record number threshold N_threshold from the configuration file, and usually N_threshold is set to 50. If N≥N_threshold, the control system归集 all N switching records obtained from the query into the same recipe pair record set, generates a record set identifier, and associates the characteristic values of the previous recipe and the current recipe. The control system writes the metadata of the same recipe pair record set into the record set index table, including the record set identifier, the number of records included, the recipe pair characteristics, and the creation time. If N<N_threshold, the control system does not perform the归集 operation and waits for subsequent switching records to accumulate to the threshold before triggering the归集 process.
[0093] S209. Calculate an updated value of the deviation threshold range based on the deviation values, the minimum drainage volume, and the filling qualification status of each switching record in the same recipe pair record set, and replace the currently used deviation threshold range with the updated value.
[0094] In some embodiments, the step of calculating an updated value of the deviation threshold range based on the deviation values, the minimum drainage volume, and the filling qualification status of each switching record in the same recipe pair record set, and replacing the currently used deviation threshold range with the updated value specifically includes:
[0095] Screen the switching records with a qualified filling qualification status from the same recipe pair record set to form a qualified record subset; for each switching record in the qualified record subset, calculate the residual deviation degree of each component after residual liquid replacement according to the deviation value, the residual liquid volume value of each component in the switching record, and the minimum drainage volume in the switching record, and obtain the residual deviation index of each component in the switching record; extract statistical characteristic values from the residual deviation indexes of all components of all switching records in the qualified record subset to obtain the historical compensable deviation boundary; determine the updated value of the deviation threshold range according to the historical compensable deviation boundary and the preset safety margin coefficient.
[0096] The filling device in the embodiment of the present invention application will be described from the perspective of hardware processing below. Please refer to Figure 3 , which is a schematic structural diagram of an entity device of the filling device in the embodiment of the present application.
[0097] It should be noted that Figure 3The structure of the filling equipment shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0098] like Figure 3 As shown, the filling device includes a CPU 301, which can perform various appropriate actions and processes according to a program stored in ROM 302 or a program loaded into RAM 303 from storage section 308, such as performing the methods described in the above embodiments. RAM 303 also stores various programs and data required for system operation. CPU 301, ROM 302, and RAM 303 are interconnected via bus 304. I / O interface 305 is also connected to bus 304.
[0099] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including hard disks, etc.; and communication section 309 including network interface cards such as LAN (Local Area Network) cards, modems, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.
[0100] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by CPU 301, it performs the various functions defined in the present invention.
[0101] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.
[0102] Specifically, the filling equipment in this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the dynamic compensation filling method for residual liquid in the pipeline of the diluent filling machine provided in the above embodiment.
[0103] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the filling equipment described in the above embodiments; or it may exist independently and not assembled into the filling equipment. The storage medium carries one or more computer programs that, when executed by a processor of the filling equipment, cause the filling equipment to implement the dynamic compensation filling method for residual liquid in the diluent filling machine pipeline provided in the above embodiments.
[0104] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0105] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
Claims
1. A method for dynamic compensation of residual liquid in the pipeline of a diluent filling machine, characterized in that, Applied to filling equipment, the method includes: Obtain the current order formula and the previous order formula to get the current formula data and the previous formula data. Calculate the residual liquid volume in the target pipeline based on the known parameters of the target pipeline to obtain the residual liquid volume value. Based on the previous formula data and the residual liquid volume value, the content of each component in the residual liquid in the target pipeline is determined to obtain residual liquid composition data. The residual liquid composition data is then compared item by item with the target ratio of each component in the current formula data to obtain the deviation value of each component. If any of the deviation values exceeds the preset deviation threshold range, then based on the residual liquid volume value and the deviation value, the amount of liquid to be drained that is required to bring all the deviation values back to the deviation threshold range is calculated, and the minimum amount of liquid to be drained is obtained. According to the minimum discharge volume, the control valve is switched to the discharge direction and the pump is started. The new material in the mixing tank is pushed into the pipeline, and the residual liquid corresponding to the minimum discharge volume is replaced and discharged from the discharge end to obtain the residual liquid in the target pipeline after replacement. Based on the volume of liquid currently remaining in the target pipeline and the content of each component, the target ratio of each component in the current formula data and the total filling volume of the current bucket, calculate the amount of new material to be added from the mixing tank so that the distribution ratio of each component meets the target ratio after the current bucket is filled, and obtain the filling target amount; The valve and pump are opened to fill the current container through the pipeline. When the cumulative filling amount reaches the target filling amount, the valve and pump are closed.
2. The method according to claim 1, characterized in that, If any of the deviation values exceeds a preset deviation threshold range, the step of calculating the amount of liquid to be drained to bring all the deviation values back to the deviation threshold range based on the residual liquid volume and the deviation value, and obtaining the minimum drainage amount, specifically includes: For each component whose deviation value exceeds the deviation threshold range, based on the deviation direction of the component's deviation value relative to the target proportion of the component in the current formulation data, a value on the same side as the deviation direction is selected from the upper and lower bounds of the deviation threshold range as the convergence boundary value of the component. Based on the deviation value of the component, the convergence boundary value, and the residual liquid volume value, and according to the relationship that the deviation value decreases linearly with the increase of the discharge volume when the residual liquid in the pipeline is replaced by an equal volume of new material in the mixing tank, the discharge volume corresponding to the decrease of the deviation value of the component to the convergence boundary value is calculated, and the critical discharge volume corresponding to the component is obtained. Among the critical discharge volumes corresponding to all components whose deviation values exceed the deviation threshold range, the critical discharge volume with the largest value is selected as the minimum discharge volume.
3. The method according to claim 1, characterized in that, The step of controlling the valve to switch to the discharge direction and starting the pump according to the minimum discharge volume, pushing the new material from the mixing tank into the pipeline, and displacing the residual liquid corresponding to the minimum discharge volume from the discharge end to obtain the residual liquid in the target pipeline after displacement, specifically includes: The control valve is switched to the discharge direction and the pump is started. The new material in the mixing tank is pushed into the pipeline through the feed end of the pipeline, and the residual liquid in the pipeline is pushed out from the discharge end. The volume of liquid discharged from the drain end is accumulated in real time to obtain the cumulative discharge volume. When the cumulative discharge volume reaches the minimum discharge volume, the valve is closed and the pump is stopped. The volume of the residual liquid zone is calculated based on the residual liquid volume value and the minimum discharge rate. Based on the characteristic that the new material replaces the residual liquid by piston-like propulsion from the feed end along the pipeline, the remaining liquid in the pipeline is divided into a new material zone near the feed end with a volume equal to the minimum discharge volume and a residual liquid zone near the discharge end with a volume equal to the volume of the residual liquid zone. The content of each component in the new material zone is set to the target ratio of each component in the current formula data, and the content of each component in the residual liquid zone is set to the content of each component in the residual liquid composition data, so as to obtain the residual liquid in the pipeline after replacement.
4. The method according to claim 1, characterized in that, The step of calculating the amount of new material to be added from the mixing tank to ensure that the component ratios meet the target ratios after the current container is filled, based on the volume of liquid currently remaining in the target pipeline, the content of each component, the target ratios of each component in the current formula data, and the total filling volume of the current container, specifically includes: Based on the difference between the content of the component in the liquid currently remaining in the pipeline and the target ratio of the component in the current formula data, and the volume of the remaining liquid, the deviation contribution of the remaining liquid to the component ratio after entering the current tank is calculated, and the deviation contribution of each component is obtained. For each component whose deviation contribution is not zero, the minimum filling amount required to ensure that the proportion deviation of the component in the current container does not exceed the filling proportion tolerance is calculated based on the deviation contribution of the component and the preset filling proportion tolerance, and the proportion constraint filling amount corresponding to the component is obtained. Among the proportion constraint filling amounts corresponding to each of the components for which the deviation contribution is not zero, the proportion constraint filling amount with the largest value is selected as the candidate filling amount. If the candidate filling amount is greater than the total filling amount of the current container, then the target filling amount is set to the total filling amount of the current container; if the candidate filling amount is not greater than the total filling amount of the current container, then the candidate filling amount is used as the target filling amount.
5. The method according to claim 4, characterized in that, After the step of closing the valve and pump when the cumulative filling volume reaches the target filling volume, the method further includes: Based on the content and volume of each component of the liquid currently remaining in the pipeline, calculate the mass of each component of the liquid entering the current container. Based on the target filling volume, the volume of the remaining liquid, and the target proportions of each component in the current formula data, calculate the mass of each component of the new material entering the current container; Based on the mass of each component of the remaining liquid, the mass of each component of the new material, and the target filling amount, determine the actual ratio of each component in the current container. The actual proportions of each component are compared with the target proportions of each component in the current formula data to obtain the actual deviations of each component. If all the actual deviation values do not exceed the product qualification threshold, the current bucket will be marked as a qualified product.
6. The method according to claim 1, characterized in that, After the step of closing the valve and pump when the cumulative filling volume reaches the target filling volume, the method further includes: Obtain the detection ratio values of each component in the current container, compare the detection ratio values with the target ratios of each component in the current formula data item by item, and determine the filling qualification status of the current container. The previous formula data, the current formula data, the deviation value, the minimum discharge volume, and the filling qualification status are stored as switching records; When the cumulative number of switching records for the same previous formula data and current formula data reaches a preset record number threshold, all switching records corresponding to the same previous formula data and current formula data are grouped into a same formula pair record set. Based on the deviation value, minimum discharge volume, and filling qualification status of each switching record in the same formula pair record set, an updated value for the deviation threshold range is calculated, and the currently used deviation threshold range is replaced with the updated value.
7. The method according to claim 6, characterized in that, The step of calculating an updated value for the deviation threshold range based on the deviation value, minimum discharge volume, and filling qualification status of each switching record in the same formula record set, and replacing the currently used deviation threshold range with the updated value, specifically includes: From the same formula pair record set, filter the switching records where the filling qualification status is qualified to form a qualified record subset; For each switching record in the qualified record subset, the residual deviation of each component after residual liquid replacement is calculated based on the deviation value of each component in the switching record, the residual liquid volume value, and the minimum discharge volume in the switching record, so as to obtain the residual deviation index of each component in the switching record. Statistical feature values are extracted from the residual deviation index of all components of all switched records in the qualified record subset to obtain the historical compensable deviation boundary. Based on the historical compensable deviation boundary and the preset safety margin coefficient, the updated value of the deviation threshold range is determined.
8. A filling device, characterized in that, The filling apparatus includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, and the one or more processors invoking the computer instructions to cause the filling apparatus to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the filling equipment, the filling equipment performs the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on the filling equipment, it causes the filling equipment to perform the method as described in any one of claims 1-7.