Intelligent dispensing processing method and device based on multi-characteristic liquid medium characteristic identification

By measuring the characteristics of the liquid medium in real time and generating discrete-level code strings, and combining them with the allocation strategy library for bit-by-bit comparison and weighted adjustment, the problem of poor adaptability of multiple characteristic parameters in the liquid medium allocation system is solved, and efficient and real-time allocation control is achieved.

CN123047489APending Publication Date: 2026-11-06SUZHOU OEPOCH IND TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611209432.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing liquid medium distribution control systems cannot effectively adapt to the synergistic effects of multiple characteristic parameters, resulting in deviations in the distribution ratio, making it difficult to ensure stable operation of the process. Furthermore, they involve large computational loads, slow response times, and lack real-time performance and accuracy.

Method used

By measuring density, viscosity, conductivity, and transmittance in real time, the data are mapped to a grading table to generate discrete grade codes. These codes are then concatenated into a characteristic grade code string, which is compared bit by bit with the allocation strategy library. The weighting coefficients are dynamically adjusted to generate control signals for an electric regulating valve, enabling fast and accurate allocation decisions.

Benefits of technology

It simplifies the calculation process, improves the pertinence and adaptability of allocation decisions, meets the high real-time requirements of industrial sites, and improves the uniformity of medium mixing and the adjustment accuracy of branch pipelines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123047489A_ABST
    Figure CN123047489A_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent allocation processing method and apparatus based on multi-characteristic liquid medium property identification, belonging to the field of industrial fluid control technology. The method involves real-time acquisition of the liquid's density, viscosity, conductivity, and transmittance, mapping each parameter to a preset classification table and converting them into discrete level codes. These level codes are then concatenated in a fixed order to form a characteristic level code string. This string is compared bit-by-bit with candidate level code strings in a pre-built allocation strategy library, and the mismatch degree is calculated. The allocation strategy corresponding to the candidate string with the smallest mismatch degree is selected, from which the flow allocation coefficients of each branch pipe are extracted, thereby generating the control signal for the electric regulating valve. This invention effectively reduces computational resource consumption while significantly improving the adaptability to the coordinated changes of multiple liquid medium properties and the allocation accuracy, overcoming the limitations of traditional methods that rely on fixed parameters and single feedback signals. This invention also discloses an apparatus for implementing this method, improving the real-time performance and accuracy of liquid medium allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention discloses an intelligent distribution processing method and device based on the identification of multi-characteristic liquid media, belonging to the field of industrial fluid control technology. Background Technology

[0002] Traditional distribution methods often employ mechanical throttle valves or proportional regulation based on total flow feedback. The distribution ratio remains fixed after equipment installation or process settings, or relies solely on a single physical quantity such as main pipeline pressure or total flow for feedback correction. However, in actual production, liquid media often exhibit simultaneous changes in multiple characteristic parameters such as density, viscosity, conductivity, and transmittance due to batch differences, temperature fluctuations, upstream process changes, or component adjustments. Existing control systems generally ignore the synergistic effects of these multiple characteristic parameters, relying solely on instantaneous readings from flow meters or pressure transmitters for simple closed-loop regulation. This leads to a significant deviation between the actual distribution ratio of branch pipelines and the target ratio when the medium characteristics deviate significantly from the original settings, making it difficult to ensure the stable operation of subsequent processes.

[0003] For the distribution control requirements of multi-characteristic liquid media, some improved solutions have attempted to introduce characteristic parameters as the basis for control, but they generally suffer from the following shortcomings: First, directly feeding multiple sensor outputs into a proportional-integral-derivative controller or a fuzzy logic rule table, this type of method is highly dependent on the engineering tuning of controller parameters and rule bases, and the size of the rule table grows exponentially with the increase in the number of characteristic parameter combinations, making actual debugging difficult; Second, performing mathematical transformations or statistical feature extraction on the collected multi-source data, and then using a pre-trained offline model for distribution decisions, this type of solution requires a large amount of historical sample data and arduous training. First, the computation is cumbersome, and once the model is deployed, it is difficult to update incrementally online, making it unsuitable for production scenarios with dynamically changing media characteristics. Second, when integrating multiple characteristic parameters into a single matching index, existing solutions often use fixed weighting coefficients for summation. However, these weighting coefficients do not change with the type of task allocation, such as high viscosity-sensitive or high density-sensitive tasks, which weakens the distinguishability of key characteristic parameters under specific tasks and affects matching accuracy. Third, the matching process of characteristic parameters often uses exhaustive search or iterative optimization algorithms, which have a large computational load and can easily lead to a prolonged control cycle, making them unsuitable for real-time allocation control with millisecond-level responses.

[0004] Existing allocation schemes relying solely on control algorithms lack integrated pipeline actuators adapted to media with diverse characteristics: high-viscosity oil-based concentrates lack dedicated screw pumps, and conventional flow meters cannot accurately measure non-conductive oily liquids; concentrates and water rely on static pipeline mixing, resulting in insufficient emulsification and dispersion, and exacerbating fluctuations in media characteristics; multi-branch pipelines lack independent flow detection and electric adjustment mechanisms, making it impossible to dynamically correct the allocation ratio of each branch based on real-time multi-characteristics of the liquid; manual step-by-step pipeline operation is lagging and cannot match the millisecond-level real-time control requirements of the algorithm, preventing the algorithm's advantages from being realized. Summary of the Invention

[0005] The main objective of this application is to provide an intelligent allocation processing method based on the identification of multi-characteristic liquid media. This method maps real-time measured density, viscosity, conductivity, and transmittance to their respective preset classification tables, outputting corresponding discrete level codes. These level codes are then concatenated in a fixed order to form a characteristic level code string, which is compared bit-by-bit with candidate level code strings in a pre-built allocation strategy library. The optimal allocation strategy is selected based on the criterion of minimum mismatch. Finally, control signals for the electric regulating valves of each branch pipeline are generated based on the flow allocation coefficient in this strategy. This method requires no standardization or normalization of the original data, no model training, and no mathematical equation establishment. It can quickly locate a suitable allocation scheme simply through hierarchical coding and string matching. Furthermore, in the mismatch calculation, the weighting coefficients of each level code can be dynamically adjusted according to different task types. When multiple candidate strings have the same minimum mismatch, the sum of the level difference between the center value of the level code interval corresponding to each candidate string and the current real-time characteristic value is compared to achieve secondary selection, thereby effectively improving the pertinence and adaptability of the allocation decision. The entire processing procedure is simple and consumes few computing resources, which can meet the high real-time allocation and control requirements of industrial sites and overcome the shortcomings of existing technologies, such as insufficient utilization of multiple characteristic parameters, poor adaptability, and heavy computing burden.

[0006] The second objective of this invention is to provide an integrated distribution mechanical device adapted to the above-mentioned intelligent distribution and processing method for multi-characteristic liquid media. Through the coordinated operation of the raw liquid delivery pipeline, multi-stage centrifugal water pump, clean water mixing branch, main detection pipeline, multi-branch distribution pipeline and PLC control unit, the hardware structure and hierarchical coding matching algorithm are deeply coupled to improve the uniformity of media mixing, the accuracy of multi-parameter sampling and the dynamic distribution adjustment capability of each branch.

[0007] To achieve the above objectives, this application provides the following technical solution:

[0008] A smart dispensing processing method based on the identification of multi-characteristic liquid media features includes:

[0009] S1, in response to the allocation trigger signal, reads the real-time density value, real-time viscosity value, real-time conductivity value and real-time transmittance value of the liquid medium in the main pipeline;

[0010] S2, based on the position of the real-time density value in the preset density grading table, output the density grade code; based on the position of the real-time viscosity value in the preset viscosity grading table, output the viscosity grade code; based on the position of the real-time conductivity value in the preset conductivity grading table, output the conductivity grade code; based on the position of the real-time transmittance value in the preset transmittance grading table, output the transmittance grade code.

[0011] S3, connect the density code, viscosity code, conductivity code and transmittance code in a predetermined order to form a characteristic code string;

[0012] S4. Match the feature-level code string with each candidate-level code string in the allocation strategy library, compare the level code differences between the feature-level code string and the candidate-level code string bit by bit, and accumulate the number of differences as the mismatch degree.

[0013] S5, select the allocation strategy corresponding to the candidate level code string with the smallest mismatch, and extract the flow allocation coefficient of each branch pipeline from the allocation strategy.

[0014] S6 generates control signals for each electric regulating valve based on the flow distribution coefficient, outputs the control signals to each electric regulating valve, and each electric regulating valve adjusts its opening degree in response to the control signals.

[0015] Furthermore, the preset density grading table is constructed as follows:

[0016] The density range of the liquid medium under standard operating conditions is divided into a first number of density sub-intervals at equal intervals from the minimum to the maximum value. Each density sub-interval is assigned a unique density level code, and the density level codes are sequentially increased in ascending order according to the numerical values ​​of the density sub-intervals.

[0017] The default viscosity classification table is constructed as follows: the viscosity range of the liquid medium under standard operating conditions is divided into a second number of viscosity sub-intervals at equal intervals from the minimum to the maximum value. Each viscosity sub-interval is assigned a unique viscosity grade code, and the viscosity grade codes are sequentially increased in ascending order according to the values ​​of the viscosity sub-intervals.

[0018] The default conductivity classification table is constructed as follows:

[0019] The conductivity range of the liquid medium under standard operating conditions is divided into a third number of conductivity sub-intervals at equal intervals from the minimum to the maximum value. Each conductivity sub-interval is assigned a unique conductivity level code, and the conductivity level codes are sequentially increased in ascending order according to the values ​​of the conductivity sub-intervals.

[0020] The preset transmittance grading table is constructed as follows:

[0021] The transmittance range of the liquid medium under standard operating conditions is divided into four transmittance sub-intervals at equal intervals from the minimum to the maximum value. Each transmittance sub-interval is assigned a unique transmittance level code, and the transmittance level codes increase sequentially in ascending order according to the values ​​of the transmittance sub-intervals.

[0022] Furthermore, when comparing the level code differences between the feature level code string and the candidate level code string bit by bit, a weighting coefficient is pre-set for each level code in the feature level code string to reflect the influence weight of the corresponding feature parameter in the allocation decision.

[0023] The weighting coefficients of different bit levels are either different or partially the same;

[0024] The mismatch degree is calculated as follows:

[0025] For each bit of the feature-level code string and the candidate-level code string, it is determined whether the two are equal. If they are not equal, a unit difference value is generated. This unit difference value is multiplied by the weighting coefficient corresponding to that bit to obtain the weighted difference value. The weighted difference values ​​of all bits of the feature-level code string are summed to obtain the mismatch degree. The set of weighting coefficients is determined by the allocation task type, which is specified by the external input signal. Different allocation task types correspond to different sets of weighting coefficients.

[0026] Further, S5 includes:

[0027] When the minimum mismatch corresponds to a unique candidate level code string, the candidate level code string is directly used as the target candidate level code string. When it corresponds to multiple candidate level code strings, for each candidate level code string with the minimum mismatch, the baseline traffic allocation coefficient in the allocation strategy associated with the candidate level code string and the center value of each characteristic level code interval corresponding to the candidate level code string are obtained respectively.

[0028] Calculate the absolute difference between the real-time characteristic value corresponding to each level code in the current characteristic level code string and the center value of the level code interval at the corresponding position in the candidate level code string. Add the absolute differences at the density level, viscosity level, conductivity level, and transmittance level to obtain the total level difference of the candidate level code string. Select the candidate level code string with the smallest total level difference as the target candidate level code string.

[0029] After determining the target candidate level code string, the basic traffic allocation coefficient is extracted from the allocation strategy corresponding to the target candidate level code string;

[0030] Based on the deviation direction of each bit of the current feature level code string relative to the corresponding bit of the target candidate level code string, determine the flow correction direction of each branch pipeline.

[0031] The flow correction range of each branch pipe is determined based on the deviation of each level code. The basic flow ratio of each branch pipe in the basic flow distribution coefficient is adjusted according to the corresponding flow correction direction and correction range to obtain the final flow distribution coefficient.

[0032] The control signals for each electric regulating valve are generated based on the final flow distribution coefficient.

[0033] Furthermore, the following steps are performed after S6:

[0034] Read the actual flow value measured by the flow meter installed on each branch pipe, and calculate the target flow value of each branch pipe based on the total flow value of the main pipe and the final flow distribution coefficient;

[0035] The flow deviation is obtained by subtracting the target flow value from the actual flow value of each branch pipe, and the relative deviation is obtained by dividing the absolute value of the flow deviation by the target flow value.

[0036] Determine if any branch pipe has a relative deviation exceeding the preset allowable deviation threshold. If so, generate an alarm signal and send it to the monitoring terminal. At the same time, record the branch pipe number that exceeds the tolerance and the corresponding relative deviation in the error log.

[0037] Furthermore, S1 includes:

[0038] Density sensor, viscosity sensor, conductivity sensor and transmittance sensor are installed at the same cross-sectional location of the main pipeline;

[0039] The allocation trigger signal is provided by the rising edge pulse generated by the external controller. When the rising edge pulse arrives, the four sensors start sampling operation simultaneously. The sampling duration is a fixed sampling window width. Within the sampling window width, each sensor continuously collects multiple instantaneous readings. The arithmetic mean of the multiple instantaneous readings collected by the same sensor is used as the real-time measurement value of the sensor.

[0040] Furthermore, the construction process of the allocation strategy library is as follows:

[0041] Determine the full range of density, viscosity, conductivity, and transmittance measurements. Divide this full range into multiple density intervals and assign density, viscosity, conductivity, and transmittance codes to each interval.

[0042] By combining all density ranges, all viscosity ranges, all conductivity ranges, and all transmittance ranges using Cartesian products, all possible code combinations can be obtained.

[0043] For each candidate code string, the median of the density range corresponding to the candidate code string is selected as the typical density value, the median of the viscosity range is selected as the typical viscosity value, the median of the conductivity range is selected as the typical conductivity value, and the median of the transmittance range is selected as the typical transmittance value. The corresponding liquid sample is prepared using the typical density value, typical viscosity value, typical conductivity value, and typical transmittance value, and the liquid sample is introduced into the main pipeline.

[0044] Install flow regulating valves and flow meters on each branch pipe. While keeping the total flow of the main pipe constant, adjust the flow regulating valves of each branch pipe in sequence until the flow meter readings on all branch pipes are stable and the sum of the flow of each branch pipe is equal to the total flow of the main pipe. Record the stable flow value of each branch pipe. Divide the stable flow value of each branch pipe by the total flow of the main pipe to obtain the reference flow ratio of that branch pipe under the candidate level code string. The reference flow ratios of all branch pipes together constitute the reference flow allocation coefficient corresponding to the candidate level code string.

[0045] The mapping relationship between each candidate level code string and its baseline traffic allocation coefficient is stored as a record in the allocation strategy library.

[0046] Furthermore, the predetermined sequence in S3 is as follows:

[0047] The density level code is placed in the first position of the characteristic level code string, the viscosity level code is placed in the second position, the conductivity level code is placed in the third position, and the transmittance level code is placed in the fourth position.

[0048] The predetermined order is determined based on the degree of physical influence of each characteristic parameter on the flow behavior of the liquid medium in the branch pipe, with the degree of influence from high to low being density, viscosity, electrical conductivity, and light transmittance.

[0049] Furthermore, in S6, the control signal is a pulse width modulation signal with a fixed frequency. The duty cycle of the pulse width modulation signal is linearly proportional to the flow ratio of the corresponding branch pipe in the final flow distribution coefficient.

[0050] The specific method for generating control signals for each electric regulating valve is as follows:

[0051] For each branch pipe, the flow ratio of that branch pipe in the final flow distribution coefficient is multiplied by the reference duty cycle to obtain the target duty cycle. The target duty cycle is written into the comparison register of the pulse width modulation generator. The pulse width modulation generator outputs a square wave signal with the corresponding duty cycle according to the value of the comparison register. The square wave signal is used as the control signal of the electric regulating valve on that branch pipe.

[0052] The pulse width modulation signals of different branch pipes are independent of each other and have the same frequency.

[0053] Furthermore, the following recording operations are performed after S6:

[0054] The allocation record is composed of the real-time density value, real-time viscosity value, real-time conductivity value, real-time transmittance value, characteristic level code string, mismatch degree value, the identifier of the selected target candidate level code string, and the final flow allocation coefficient. The allocation record is appended to the log area of ​​the non-volatile memory in chronological order, and the current system timestamp and the sequence number of the allocation trigger signal are added to each allocation record.

[0055] When the number of allocated records in the log area reaches the preset maximum number of storage entries, the earliest allocated record is overwritten in chronological order to maintain the circular storage of the log area.

[0056] Based on the same inventive concept, this application also provides the following technical solutions:

[0057] A smart dispensing and processing device based on multi-characteristic liquid medium property identification, the device being used to execute the method described above, the device comprising:

[0058] The raw liquid delivery pipeline includes, in sequence along the flow direction of the raw liquid medium, a first on-off valve, a screw pump, an ultrasonic flow meter, and a second on-off valve. The outlet of the first on-off valve is connected to the medium inlet of the screw pump, the medium outlet of the screw pump is connected to the fluid inlet of the ultrasonic flow meter, and the fluid outlet of the ultrasonic flow meter is connected to the inlet of the second on-off valve. After the raw liquid medium is opened by the first on-off valve, it is sent to the screw pump for pressurization, flows through the ultrasonic flow meter to complete the flow measurement, and the pipeline is opened and closed by the second on-off valve. It is used to deliver and measure the raw liquid medium.

[0059] A multi-stage centrifugal water pump, the medium inlet of which is connected to the outlet of the second on / off valve;

[0060] The clean water mixing branch includes a third on / off valve, the outlet of which is connected to the medium inlet of the multi-stage centrifugal water pump. The raw medium and clean water undergo turbulent shearing and online demulsification and homogenization inside the multi-stage centrifugal water pump.

[0061] The main detection pipeline is connected to the medium outlet of the multi-stage centrifugal water pump. The main detection pipeline includes a sensing and detection component, which includes a density sensor, a viscosity sensor, a conductivity sensor, and a transmittance sensor. The sensing and detection component is used to synchronously collect the medium characteristic parameters of the liquid.

[0062] A multi-branch distribution pipeline is connected to the output end of the main detection pipeline, and each branch distribution pipeline is equipped with an electromagnetic flow meter and an electric regulating valve in sequence.

[0063] The PLC control unit is electrically connected to the sensing and detection components, screw pump, ultrasonic flow meter, multi-stage centrifugal water pump, on / off valves, branch electromagnetic flow meters and branch electric regulating valves. The PLC control unit is configured to execute steps S1 to S6 of the method according to any one of claims 1 to 9 and output corresponding control signals to regulate each execution component.

[0064] This invention discloses an intelligent allocation processing method based on the identification of multi-characteristic liquid media, belonging to the field of industrial fluid control technology. By real-time acquisition of the liquid's density, viscosity, conductivity, and transmittance, each parameter is mapped to a preset classification table and converted into discrete level codes. These level codes are then concatenated in a fixed order to form a characteristic level code string. This string is compared bit-by-bit with candidate level code strings in a pre-built allocation strategy library. The mismatch degree is calculated, and the allocation strategy corresponding to the candidate string with the smallest mismatch degree is selected. The flow allocation coefficients for each branch pipe are extracted from this strategy, and control signals for electric regulating valves are generated accordingly. This invention effectively reduces computational resource consumption, meets the high real-time control requirements of industrial sites, and significantly improves the adaptability and allocation accuracy to the coordinated changes of multiple liquid media characteristics, overcoming the limitations of traditional methods that rely on fixed parameters and single feedback signals.

[0065] This invention discloses an intelligent distribution and processing device based on multi-characteristic liquid medium property identification. It achieves real-time online demulsification and dispersion of the raw liquid and purified water through multi-stage centrifugal pumps, eliminating property detection errors caused by medium stratification and component inhomogeneity, and improving the accuracy of multi-parameter sampling. The main pipeline synchronously collects four parameters: density, viscosity, transmittance, and conductivity, avoiding the problem of inconsistent medium states caused by segmented sampling. Each branch pipeline is independently equipped with an electromagnetic flowmeter and an electric regulating valve. The PLC can output independent PWM adjustment signals based on the hierarchical coding matching algorithm of this invention, realizing dynamic and independent correction of the flow rate of each branch. The entire mechanical pipeline and control algorithm are integrated and adapted, with the hardware execution speed matching the algorithm's real-time performance, effectively solving the shortcomings of existing pure software algorithms that lack supporting dedicated actuators and have insufficient actual distribution accuracy. Attached Figure Description

[0066] Figure 1 This is a flowchart illustrating the process of an intelligent dispensing method based on the identification of multi-characteristic liquid media, as claimed in an embodiment of the present invention.

[0067] Figure 2 This is a second flowchart of an intelligent dispensing and processing method based on the identification of multi-characteristic liquid media, as claimed in an embodiment of the present invention.

[0068] Figure 3 The third flowchart is shown for an intelligent allocation and processing method based on the identification of multi-characteristic liquid media, as claimed in an embodiment of the present invention.

[0069] Figure 4 This is a schematic diagram of a smart dispensing and processing device based on the identification of multi-characteristic liquid media, as claimed in an embodiment of the present invention.

[0070] Figure 5 for Figure 4 A magnified view of part A above.

[0071] Figure 6 This is another schematic diagram of a smart dispensing and processing device based on the identification of multi-characteristic liquid media, which is claimed in an embodiment of the present invention.

[0072] The reference numerals in the attached drawings are explained as follows: 101, First on / off valve; 102, Screw pump; 103, Ultrasonic flow meter; 104, Second on / off valve; 2, Clean water mixing branch; 201, Third on / off valve; 3, Multistage centrifugal water pump; 4, Main detection pipeline; 5, Multi-branch distribution pipeline; 501, Electromagnetic flow meter; 502, Electric regulating valve; 6, PLC control unit; 7, Calibration column. Detailed Implementation

[0073] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0074] The terms "first," "second," and "third" in this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of those features. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications in the embodiments of this application, such as up, down, left, right, front, back, etc., are only used to explain the relative positional relationships and movements between components in a specific orientation as shown in the accompanying drawings. If the specific orientation changes, the directional indications will change accordingly. Furthermore, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0075] References to embodiments herein mean that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0076] According to the first embodiment of the present invention, referring to Figure 1 This invention claims protection for an intelligent dispensing processing method based on the identification of multi-characteristic liquid media properties, comprising:

[0077] S1, in response to the allocation trigger signal, reads the real-time density value, real-time viscosity value, real-time conductivity value and real-time transmittance value of the liquid medium in the main pipeline;

[0078] S2, based on the position of the real-time density value in the preset density grading table, output the density grade code; based on the position of the real-time viscosity value in the preset viscosity grading table, output the viscosity grade code; based on the position of the real-time conductivity value in the preset conductivity grading table, output the conductivity grade code; based on the position of the real-time transmittance value in the preset transmittance grading table, output the transmittance grade code.

[0079] S3, connect the density code, viscosity code, conductivity code and transmittance code in a predetermined order to form a characteristic code string;

[0080] S4. Match the feature-level code string with each candidate-level code string in the allocation strategy library, compare the level code differences between the feature-level code string and the candidate-level code string bit by bit, and accumulate the number of differences as the mismatch degree.

[0081] S5, select the allocation strategy corresponding to the candidate level code string with the smallest mismatch, and extract the flow allocation coefficient of each branch pipeline from the allocation strategy.

[0082] S6 generates control signals for each electric regulating valve based on the flow distribution coefficient, outputs the control signals to each electric regulating valve, and each electric regulating valve adjusts its opening degree in response to the control signals.

[0083] In this embodiment, in a chemical raw material preparation workshop, a programmable logic controller is equipped with a cyclic timer with a period of 500 milliseconds. Each time the timer overflows, it generates a high-level pulse of a distribution trigger signal.

[0084] In one loop, the allocation trigger signal is set to active; the programmable logic controller then reads the 4 to 20 mA current signal output by the density transmitter installed on the same straight section of the main pipeline through the analog input channel, and converts the current signal into a real-time density value, which in this example is 1120 kg / m³; at the same time, it reads the frequency signal output by the rotary viscometer and converts it into a real-time viscosity value, which in this example is 45 centistokes; at the same time, it reads the resistance voltage divider signal output by the conductivity sensor and converts it into a real-time conductivity value, which in this example is 2.5 millisiemens per centimeter; at the same time, it reads the photocurrent signal output by the transmittance sensor and converts it into a real-time transmittance value, which in this example is 88%. The programmable logic controller (PLC) has a density grading table pre-stored inside. This table divides the density from 800 kg / m³ to 1500 kg / m³ into seven grade ranges. Each grade range corresponds to a one-bit integer grade code. The current real-time density value of 1120 kg / m³ falls within the third grade range, and the PLC outputs the density grade code as the number 3.

[0085] Similarly, the viscosity grading table divides viscosity from 10 centistokes to 100 centistokes into six grade ranges, with 45 centistokes falling into the second grade range, outputting the viscosity grade code as the number 2; the conductivity grading table divides conductivity from 0.5 millisiemens per centimeter to 5.0 millisiemens per centimeter into nine grade ranges, with 2.5 falling into the fourth grade range, outputting the conductivity grade code as the number 4; the transmittance grading table divides transmittance from 20% to 95% into eight grade ranges, with 88% falling into the fifth grade range, outputting the transmittance grade code as the number 5; the programmable logic controller (PLC) concatenates these four grade codes in the order of density, viscosity, conductivity, and transmittance into a four-digit characteristic grade code string 3-2-4-5, where each digit is separated by a hyphen, and internally stores it as four consecutive bytes of data; the PLC also internally stores an allocation strategy library, which contains Multiple records are generated, each consisting of a candidate level code string and a set of traffic allocation coefficients. The controller extracts the characteristic level code string 3-2-4-5 and compares it bit by bit with the first candidate level code string 3-1-4-5 in the policy library. The first bit is the same, the second bit is different, the third bit is the same, and the fourth bit is the same, with a cumulative difference of 1, so the mismatch degree is 1. It then compares it with the second candidate level code string 3-2-5-5, with the first bit being the same, the second bit being the same, the third bit being different, and the fourth bit being the same, so the mismatch degree is also 1. It then compares it with the third candidate level code string 3-2-4-6, with only the fourth bit being different, so the mismatch degree is 1. The comparison continues to the fifth candidate level code string 3-2-4-5, with all bits being the same, the difference is 0, and the mismatch degree is 0. The controller selects the one with the smallest mismatch degree from all candidate level code strings, i.e., the allocation policy corresponding to 3-2-4-5 with a mismatch degree of 0. The allocation strategy stores the flow allocation coefficients for four branch pipes: branch A 0.25, branch B 0.35, branch C 0.20, and branch D 0.20. The sum of all coefficients equals 1.

[0086] The programmable logic controller (PLC) generates four analog voltage control signals based on these four coefficients. The controller then transmits these analog voltage signals to the analog input terminals of four electric regulating valves through the output channels. After receiving the voltage signal, each valve moves its valve core opening linearly according to the voltage value. The higher the voltage, the larger the opening, thus completing one distribution process.

[0087] Furthermore, the preset density grading table is constructed as follows:

[0088] The density range of the liquid medium under standard operating conditions is divided into a first number of density sub-intervals at equal intervals from the minimum to the maximum value. Each density sub-interval is assigned a unique density level code, and the density level codes are sequentially increased in ascending order according to the numerical values ​​of the density sub-intervals.

[0089] The default viscosity classification table is constructed as follows: the viscosity range of the liquid medium under standard operating conditions is divided into a second number of viscosity sub-intervals at equal intervals from the minimum to the maximum value. Each viscosity sub-interval is assigned a unique viscosity grade code, and the viscosity grade codes are sequentially increased in ascending order according to the values ​​of the viscosity sub-intervals.

[0090] The default conductivity classification table is constructed as follows:

[0091] The conductivity range of the liquid medium under standard operating conditions is divided into a third number of conductivity sub-intervals at equal intervals from the minimum to the maximum value. Each conductivity sub-interval is assigned a unique conductivity level code, and the conductivity level codes are sequentially increased in ascending order according to the values ​​of the conductivity sub-intervals.

[0092] The preset transmittance grading table is constructed as follows:

[0093] The transmittance range of the liquid medium under standard operating conditions is divided into four transmittance sub-intervals at equal intervals from the minimum to the maximum value. Each transmittance sub-interval is assigned a unique transmittance level code, and the transmittance level codes increase sequentially in ascending order according to the values ​​of the transmittance sub-intervals.

[0094] In this embodiment, before the system is put into operation, the process engineer builds a density grading table in the host computer configuration software of the programmable logic controller.

[0095] The engineers first determined the minimum possible density of the liquid medium under standard operating conditions (normal pressure and temperature), setting it at 800 kg / m³ according to the Material Safety Data Sheet (MSDS). The maximum density was set at 1500 kg / m³, and the range was 700 kg / m³. The engineers then divided this range into seven equally spaced density sub-ranges, each spanning 100 kg / m³. The first sub-range (800-900) was assigned density code 1, the second (900-1000) code 2, the third (1000-1100) code 3, the fourth (1100-1200) code 4, the fifth (1200-1300) code 5, the sixth (1300-1400) code 6, and the seventh (1400-1500) code 7. The code value strictly increases with increasing density. For viscosity, the engineers set the minimum value of the full range to 10 centistokes, the maximum value to 100 centistokes, and the range to 90 centistokes, dividing it into six equally spaced viscosity sub-ranges, each spanning 15 centistokes. The first 10 to 25 centistokes was assigned code 1, the second 25 to 40 centistokes to code 2, the third 40 to 55 centistokes to code 3, the fourth 55 to 70 centistokes to code 4, the fifth 70 to 85 centistokes to code 5, and the sixth 85 to 100 centistokes to code 6, with the code increasing sequentially.

[0096] For conductivity, the full-scale range has a minimum value of 0.5 millisiemens per centimeter, a maximum value of 5.0, and a range of 4.5. It is divided into nine equally spaced conductivity sub-intervals, each spanning 0.5, assigned code 1 from 0.5 to 1.0, and so on up to code 9 for 4.5 to 5.0. For transmittance, the full-scale range has a minimum value of 20%, a maximum value of 95%, and a range of 75 percentage points. It is divided into eight equally spaced transmittance sub-intervals, each spanning 9.375 percentage points, which is rounded to 9.5%.

[0097] Furthermore, when comparing the level code differences between the feature level code string and the candidate level code string bit by bit, a weighting coefficient is pre-set for each level code in the feature level code string to reflect the influence weight of the corresponding feature parameter in the allocation decision.

[0098] The weighting coefficients of different bit levels are either different or partially the same;

[0099] The mismatch degree is calculated as follows:

[0100] For each bit of the feature-level code string and the candidate-level code string, it is determined whether the two are equal. If they are not equal, a unit difference value is generated. This unit difference value is multiplied by the weighting coefficient corresponding to that bit to obtain the weighted difference value. The weighted difference values ​​of all bits of the feature-level code string are summed to obtain the mismatch degree. The set of weighting coefficients is determined by the allocation task type, which is specified by the external input signal. Different allocation task types correspond to different sets of weighting coefficients.

[0101] In this embodiment, the programmable logic controller (PLC) does not treat every bit of the level code difference equally when calculating the mismatch. Internally, the controller pre-stores a set of weighting coefficients for each bit of the characteristic level code string. The weighting coefficient for the first bit (density level code) is 0.2, for the second bit (viscosity level code) it is 0.5, for the third bit (conductivity level code) it is 0.2, and for the fourth bit (transmittance level code) it is 0.1. The sum of these four weighting coefficients is 1. This set of weighting coefficients is determined by the current allocation task type, which is specified by an integer variable sent by the external operator station via Ethernet. When the integer variable value is 1, it represents a regular mixed task, using the default weighting coefficients. When the integer variable value is 2, it represents a high viscosity-sensitive allocation task, in which case the viscosity bit weighting coefficient is adjusted to 0.7, the density bit to 0.1, the conductivity bit to 0.1, and the transmittance bit to 0.1.

[0102] In this example, the operator sends an integer variable of 2, so the controller uses the weighted coefficient set corresponding to the high viscosity-sensitive task. The controller then compares the characteristic level code string 3-2-4-5 bit by bit with a candidate level code string 3-1-4-5: the first bit is 3 in both, no difference, unit difference value is 0, and the weighted contribution is 0; the second bit is currently 2 and the candidate is 1, they are not equal, the unit difference value is recorded as 1, multiplied by the weighting coefficient of 0.7, resulting in a weighted difference value of 0.7; the third bit is 4 in both, contributing 0; the fourth bit is 5 in both, contributing 0, and the final mismatch degree of this candidate level code string is 0.7; if compared with another candidate string 3-2-5-5, the third bit is different, the weighting coefficient of this bit is 0.1, and the mismatch degree is 0.1; after weighting, the mismatch of viscosity bits under the high viscosity task is significantly amplified, causing the allocation strategy to prioritize candidate schemes with completely identical viscosity level codes, while the difference in transmittance bits has almost no impact on the selection result.

[0103] Furthermore, referring to Figure 2 S5 includes:

[0104] When the minimum mismatch corresponds to a unique candidate level code string, the candidate level code string is directly used as the target candidate level code string. When it corresponds to multiple candidate level code strings, for each candidate level code string with the minimum mismatch, the baseline traffic allocation coefficient in the allocation strategy associated with the candidate level code string and the center value of each characteristic level code interval corresponding to the candidate level code string are obtained respectively.

[0105] Calculate the absolute difference between the real-time characteristic value corresponding to each level code in the current characteristic level code string and the center value of the level code interval at the corresponding position in the candidate level code string. Add the absolute differences at the density level, viscosity level, conductivity level, and transmittance level to obtain the total level difference of the candidate level code string. Select the candidate level code string with the smallest total level difference as the target candidate level code string.

[0106] After determining the target candidate level code string, the basic traffic allocation coefficient is extracted from the allocation strategy corresponding to the target candidate level code string;

[0107] Based on the deviation direction of each bit of the current feature level code string relative to the corresponding bit of the target candidate level code string, determine the flow correction direction of each branch pipeline.

[0108] The flow correction range of each branch pipe is determined based on the deviation of each level code. The basic flow ratio of each branch pipe in the basic flow distribution coefficient is adjusted according to the corresponding flow correction direction and correction range to obtain the final flow distribution coefficient.

[0109] The control signals for each electric regulating valve are generated based on the final flow distribution coefficient.

[0110] In this embodiment, after completing the mismatch calculation, the programmable logic controller found that two candidate level code strings had the same minimum mismatch value of 0.5.

[0111] The first candidate level code string is 3-2-4-5, and the second candidate level code string is 3-2-4-6. The controller detects that the minimum mismatch corresponds to multiple candidate level code strings, so it starts the tie-breaking logic. The controller first reads the baseline flow allocation coefficient in the allocation strategy associated with the first candidate level code string 3-2-4-5. At the same time, the controller obtains the center value of the sub-interval corresponding to each feature level code in the candidate level code string. The controller then reads the baseline flow allocation coefficient of the second candidate level code string 3-2-4-6.

[0112] The controller calculates the sum of the level differences of the first candidate string. The second candidate string has a smaller sum of level differences, so the controller determines 3-2-4-6 as the target candidate level code string. Then, the controller extracts the basic flow distribution coefficient corresponding to the target candidate level code string. The controller further compares the current characteristic level code string 3-2-4-5 with the target candidate string 3-2-4-6 and finds that only the fourth bit of the transmittance level code has changed from 5 to 6. The deviation direction is that the level code increases, which means that the actual transmittance is lower than the center value of the transmittance interval corresponding to the target candidate string. The direction of increasing level code means that the flow ratio of some branch pipes that are strongly related to transmittance needs to be increased. According to the preset rule table, the controller finds that a transmittance level code deviation of 1 unit corresponds to an increase in the correction direction for branches A and C, and a decrease in the correction direction for branches B and D. The correction magnitude is positively correlated with the magnitude of the deviation. A deviation of 1 unit corresponds to an magnitude of 2%. Finally, the controller generates an analog voltage control signal based on this final coefficient.

[0113] Furthermore, the following steps are performed after S6:

[0114] Read the actual flow value measured by the flow meter installed on each branch pipe, and calculate the target flow value of each branch pipe based on the total flow value of the main pipe and the final flow distribution coefficient;

[0115] The flow deviation is obtained by subtracting the target flow value from the actual flow value of each branch pipe, and the relative deviation is obtained by dividing the absolute value of the flow deviation by the target flow value.

[0116] Determine if any branch pipe has a relative deviation exceeding the preset allowable deviation threshold. If so, generate an alarm signal and send it to the monitoring terminal. At the same time, record the branch pipe number that exceeds the tolerance and the corresponding relative deviation in the error log.

[0117] In this embodiment, after S6 is executed and the opening of each electric regulating valve stabilizes for five seconds, the programmable logic controller (PLC) starts the flow verification program. The controller reads the actual flow values ​​through the electromagnetic flow meters installed on the four branch pipes. The frequency signal output of the flow meter on branch A is converted to 23.8 liters per minute, branch B to 33.5 liters per minute, branch C to 21.2 liters per minute, and branch D to 20.5 liters per minute. At the same time, the controller reads the total flow of the main pipe as 100.0 liters per minute from the total flow meter installed at the main pipe inlet, and calculates the target flow values ​​for each branch pipe based on the final flow distribution coefficient: 28.0 liters per minute for branch A, 26.0 liters per minute for branch B, 28.0 liters per minute for branch C, and 18.0 liters per minute for branch D.

[0118] The controller subtracts the target value from the actual flow rate of each branch. Branch A actually gets -4.2 liters per minute, and takes the absolute value of 4.2; Branch B gets 7.5; Branch C gets -6.8, and takes the absolute value of 6.8; Branch D gets 2.5.

[0119] The controller divides each absolute deviation value by the corresponding target flow rate value. The controller's internal preset deviation tolerance threshold is fixed at 10%, which is unaffected by changes in liquid density or viscosity and remains at 10%. If all four channels exceed the tolerance, the controller immediately generates a warning signal, which is a 16-bit alarm word. The second, third, fourth, and fifth bits of the alarm word correspond to the out-of-tolerance flag bits of branches A, B, C, and D, respectively. The controller sends this alarm word to the operator station display in the central monitoring room via serial communication, where a flashing red warning box appears. At the same time, the controller records the timestamp of the current scan cycle, the out-of-tolerance branch numbers A, B, C, and D, and their respective relative deviation values ​​of 15%, 28.8%, 24.3%, and 13.9% at the end of the error log file in the programmable logic controller's internal memory card. Each record occupies a fixed length of bytes for subsequent retrieval and analysis by engineers.

[0120] Furthermore, S1 includes:

[0121] Density sensor, viscosity sensor, conductivity sensor and transmittance sensor are installed at the same cross-sectional location of the main pipeline;

[0122] The allocation trigger signal is provided by the rising edge pulse generated by the external controller. When the rising edge pulse arrives, the four sensors start sampling operation simultaneously. The sampling duration is a fixed sampling window width. Within the sampling window width, each sensor continuously collects multiple instantaneous readings. The arithmetic mean of the multiple instantaneous readings collected by the same sensor is used as the real-time measurement value of the sensor.

[0123] In this embodiment, on a horizontal straight section of the main pipeline, at a location at least ten times the pipe diameter away from the upstream bend, the process installation personnel drilled four sensor mounting holes. The four holes are located on the same cross-section and are evenly distributed around the central axis of the pipe at ninety degrees, that is, one is arranged every ninety degrees on the circumference.

[0124] The density sensor uses a vibrating cylinder probe, with its front end extending three centimeters into the inner wall of the main pipe and directly immersed in the flowing liquid medium. The viscosity sensor is a rotary type, with its rotor extending into the center region of the pipe diameter. The conductivity sensor is an electrode type, with two annular electrodes extending into the medium. The transmittance sensor is a through-beam type, with the transmitting and receiving ends extending from two opposite mounting holes, and the light path passing through the center of the pipe diameter.

[0125] The signal lines of these four sensors are all connected to the high-speed counting and analog input modules of the programmable logic controller (PLC). The allocation trigger signal is a rising edge pulse generated by the internal system clock of the PLC. The pulse width is two microseconds and the rising edge steepness is less than one microsecond. When the rising edge pulse reaches the interrupt input of the controller, the interrupt service routine is immediately started, and a synchronous sampling trigger signal is sent to the four sensors. The sampling duration is a fixed sampling window width, which is set to 200 milliseconds. Within these 200 milliseconds, the density sensor collects 60 instantaneous density readings at a sampling rate of 250 times per second, the viscosity sensor collects 60 instantaneous viscosity readings, the conductivity sensor collects 60 instantaneous conductivity readings, and the transmittance sensor collects 60 instantaneous transmittance readings. After the sampling window ends, the controller calculates the arithmetic mean of each group of 60 instantaneous readings. Taking density as an example, some of the 60 readings fall between 1118 and 1122 per cubic meter. Their sum divided by 60 gives an average value of 1120.3 per cubic meter. The controller rounds this value to the nearest integer as the real-time density value. The average viscosity reading is 45.2 centistokes, rounded to one decimal place as 45.2. The average conductivity is 2.51, rounded to two decimal places as 2.51. The average transmittance is 88.2, rounded to the nearest integer as 88. These four averages are ultimately used as the real-time density, real-time viscosity, real-time conductivity, and real-time transmittance values ​​for that sampling period in subsequent grading processing.

[0126] Furthermore, referring to Figure 3 The process of building the allocation strategy library is as follows:

[0127] Determine the full range of density, viscosity, conductivity, and transmittance measurements. Divide this full range into multiple density intervals and assign density, viscosity, conductivity, and transmittance codes to each interval.

[0128] By combining all density ranges, all viscosity ranges, all conductivity ranges, and all transmittance ranges using Cartesian products, all possible code combinations can be obtained.

[0129] For each candidate code string, the median of the density range corresponding to the candidate code string is selected as the typical density value, the median of the viscosity range is selected as the typical viscosity value, the median of the conductivity range is selected as the typical conductivity value, and the median of the transmittance range is selected as the typical transmittance value. The corresponding liquid sample is prepared using the typical density value, typical viscosity value, typical conductivity value, and typical transmittance value, and the liquid sample is introduced into the main pipeline.

[0130] Install flow regulating valves and flow meters on each branch pipe. While keeping the total flow of the main pipe constant, adjust the flow regulating valves of each branch pipe in sequence until the flow meter readings on all branch pipes are stable and the sum of the flow of each branch pipe is equal to the total flow of the main pipe. Record the stable flow value of each branch pipe. Divide the stable flow value of each branch pipe by the total flow of the main pipe to obtain the reference flow ratio of that branch pipe under the candidate level code string. The reference flow ratios of all branch pipes together constitute the reference flow allocation coefficient corresponding to the candidate level code string.

[0131] The mapping relationship between each candidate level code string and its baseline traffic allocation coefficient is stored as a record in the allocation strategy library.

[0132] In this embodiment, in a laboratory environment, the engineer determines the full range of density measurement values, with a lower limit of 800 kg per cubic meter and an upper limit of 1500 kg. This range is divided into seven density intervals D0-D6 at intervals of 100 per kilogram, and density level codes 0, 1, 2, 3, 4, 5, and 6 are assigned to D0, with the level codes increasing continuously from 0. Viscosity is defined as follows: lower limit 10 centistokes, upper limit 100 centistokes, divided into 15-centistokes intervals, resulting in V0 code 0, V1 code 1, V2 code 2, V3 code 3, V4 code 4, and V5 code 5. Conductivity is defined as follows: lower limit 0.5, upper limit 5.0, divided into 0.5 intervals, resulting in C0 code 0 to C8 code 8. Transmittance is defined as follows: lower limit 20%, upper limit 95%, divided into 9.5% intervals, resulting in T0 code 0 to T7 code 7. Then, engineers further defined density, viscosity, and conductivity intervals... The density and transmittance intervals are combined using Cartesian products, that is, one interval is selected from seven density intervals, one interval from six viscosity intervals, one interval from nine conductivity intervals, and one interval from eight transmittance intervals, resulting in a total of 3024 combinations. Each combination forms a candidate level code string. The first bit of the string is the density level code, the second bit is the viscosity level code, the third bit is the conductivity level code, and the fourth bit is the transmittance level code. For example, the candidate level code string 2-3-5-6 represents the density interval D2, viscosity interval V3, conductivity interval C5, and transmittance interval T6.

[0133] For each candidate code string, engineers take the median values ​​of the corresponding density, viscosity, conductivity, and transmittance ranges. Then, based on these four median parameters, they prepare corresponding liquid samples in a mixing tank, adjusting the values ​​to the target values ​​by adding thickeners, salts, and dyes. The prepared samples are then introduced into a pilot-scale main pipeline system identical to the field system, maintaining a constant total flow rate of 100 liters per minute. The manual flow control valves on branches A, B, C, and D are adjusted sequentially, and the flow meter readings on each branch are observed. Stability is considered achieved when the fluctuation of the four flow meter readings does not exceed ±0.1 liters per minute within 30 consecutive seconds. At this point, the flow rates are recorded as 18 liters for branch A, 22 liters for branch B, 30 liters for branch C, and 30 liters for branch D. Each of these is divided by the total flow rate of 100 liters to obtain the baseline flow rate ratios: branch A 0.18, branch B 0.22, branch C 0.30, and branch D 0.30. 0.30, this ratio is used as the baseline flow allocation coefficient for the candidate level code string 2-3-5-6.

[0134] Engineers performed the above-mentioned liquid preparation, flow, and adjustment recording operations on all 3024 combinations one by one, obtaining a mapping relationship for each group. All mapping relationships were stored in the read-only memory area of ​​the programmable logic controller to form an allocation strategy library. This strategy library was completed before the system was officially put into operation and remained static throughout all subsequent allocation processes, without being modified online.

[0135] Furthermore, the predetermined sequence in S3 is as follows:

[0136] The density level code is placed in the first position of the characteristic level code string, the viscosity level code is placed in the second position, the conductivity level code is placed in the third position, and the transmittance level code is placed in the fourth position.

[0137] The predetermined order is determined based on the degree of physical influence of each characteristic parameter on the flow behavior of the liquid medium in the branch pipe, with the degree of influence from high to low being density, viscosity, electrical conductivity, and light transmittance.

[0138] In this embodiment, during the concatenation of characteristic level codes, the programmable logic controller (PLC) strictly fixes the arrangement order as follows: density code first, viscosity code second, conductivity code third, and transmittance code fourth. The physical basis for this order is as follows: the flow behavior of a liquid in a branch pipe primarily depends on the Reynolds number, which is directly proportional to density and flow velocity, and inversely proportional to viscosity. The effect of density on the Reynolds number is directly proportional to the first power. When density changes, the velocity distribution and turbulence intensity at the pipe wall change most significantly; therefore, density has the highest influence and is ranked first. Viscosity directly affects the internal friction and pressure drop of the fluid. Once determined, viscosity becomes the second largest factor determining the resistance distribution of each branch pipe, thus ranking second. Electrical conductivity mainly reflects the ion concentration in the liquid. In non-electromagnetic flow scenarios, it has a slight impact on the boundary layer charge distribution on the inner wall of the pipe, which may cause a small change in the local velocity profile of the fluid near the wall. However, this effect is much smaller than that of density and viscosity, so it ranks third. Light transmittance reflects suspended particles or color in the liquid. These optical properties have almost no impact on the mass flow and momentum transfer of the liquid on a macroscopic scale. They are only used as an auxiliary reference when multiphase flow or reaction kinetics are involved. Therefore, its influence is the lowest, ranking fourth.

[0139] For example, if a real-time measurement shows a density of 1100 kg / m³, a viscosity of 45 centistokes, an electrical conductivity of 2.5, and a transmittance of 88%, then concatenating these values ​​in this order yields 3-2-4-5. However, if the electrical conductivity and viscosity are interchanged, resulting in 3-4-2-5, the mismatch in the second digit will have a completely different meaning when matching with the strategy library. This embodiment uses a fixed order of density, viscosity, electrical conductivity, and transmittance to ensure that the physical meaning of each digit remains consistent across all candidate level code strings, thus avoiding confusion.

[0140] Furthermore, in S6, the control signal is a pulse width modulation signal with a fixed frequency. The duty cycle of the pulse width modulation signal is linearly proportional to the flow ratio of the corresponding branch pipe in the final flow distribution coefficient.

[0141] The specific method for generating control signals for each electric regulating valve is as follows:

[0142] For each branch pipe, the flow ratio of that branch pipe in the final flow distribution coefficient is multiplied by the reference duty cycle to obtain the target duty cycle. The target duty cycle is written into the comparison register of the pulse width modulation generator. The pulse width modulation generator outputs a square wave signal with the corresponding duty cycle according to the value of the comparison register. The square wave signal is used as the control signal of the electric regulating valve on that branch pipe.

[0143] The pulse width modulation signals of different branch pipes are independent of each other and have the same frequency.

[0144] In this embodiment, the programmable logic controller (PLC) does not output analog voltage signals, but instead outputs pulse width modulation (PWM) signals to control each electric regulating valve. The PPWM module of the controller has four independent channels, corresponding to branches A, B, C, and D respectively. The carrier frequency of all channels is fixed at 2 kHz, that is, each pulse period is 500 microseconds. The controller internally sets a reference duty cycle value of 70%, which corresponds to the drive requirement when the valve is fully open. After obtaining the final flow distribution coefficient, the controller multiplies the flow ratio of each branch by the reference duty cycle.

[0145] The controller has a 16-bit pulse width modulation (PWM) period register with a fixed value corresponding to a 2 kHz counting cycle, assuming 5,000 counting units. When the PWM module is running, the counter inside each channel increments from zero to the period register value of 5000. A high level is output when the counter value is less than the comparison register value, and a low level is output when the counter value is greater than or equal to the comparison register value, thus generating a square wave signal. These four square wave signals are transmitted to the PWM control input terminals of four electric regulating valves. The valve's built-in drive circuit controls the motor angle based on the duty cycle; a higher duty cycle results in a larger angle. Because the four channels have identical frequencies, the signal periods received by each valve are synchronized, preventing jitter caused by frequency differences.

[0146] Furthermore, the following recording operations are performed after S6:

[0147] The allocation record is composed of the real-time density value, real-time viscosity value, real-time conductivity value, real-time transmittance value, characteristic level code string, mismatch degree value, the identifier of the selected target candidate level code string, and the final flow allocation coefficient. The allocation record is appended to the log area of ​​the non-volatile memory in chronological order, and the current system timestamp and the sequence number of the allocation trigger signal are added to each allocation record.

[0148] When the number of allocated records in the log area reaches the preset maximum number of storage entries, the earliest allocated record is overwritten in chronological order to maintain the circular storage of the log area.

[0149] In this embodiment, after a complete allocation process is completed, the controller immediately performs a recording operation when the programmable logic controller finishes outputting the control signals of each valve. The controller retrieves the key data used in the entire process from its internal register: real-time density value of 1120 kg / m³, real-time viscosity value of 45 centistokes, real-time conductivity value of 2.5 millisiemens per centimeter, real-time transmittance value of 88%, and the characteristic level code string 3-2-4-5 generated from these values. It also adds the minimum mismatch value finally selected during the matching process, which is 0.5 in this example, and the identifier of the selected target candidate level code string. This identifier is the seven-digit character code STR-0045 assigned by the engineer when building the strategy library. Finally, it adds the final flow allocation coefficient obtained after balancing and directional amplitude adjustment as described in claim 4. The controller assembles all the above data into an allocation record according to a preset log format. The record is stored in a fixed length of 120 bytes. The first four bytes store the current system timestamp, which is provided by the real-time clock chip inside the controller. The next two bytes store the sequence number of the allocation trigger signal, which is an unsigned integer that increments by one for each trigger, starting from zero.

[0150] The controller appends the complete 120-byte record to the log area of ​​the non-volatile memory via the internal bus. This non-volatile memory is a ferroelectric random access memory with power-off retention capability. The log area is divided into 10,000 fixed-size storage slots, each slot accommodating exactly one record.

[0151] Before writing, the controller checks the total number of records in the current log area. If the total number of records is less than 10,000, the record is directly written to the next available slot. If the total number of records has reached 10,000, the controller moves the pointer to the slot containing the earliest record, overwrites the entire contents of that slot with the new record, and then moves the pointer one position to achieve cyclic overwriting. After writing is complete, the controller increments the total number of records counter by one. If it is already full, it remains at 10,000, and the record allocation operation for this time is finished. Subsequently, if engineers read the log area through maintenance software, they can view all historical allocation records in chronological or reverse order to trace the liquid characteristics and corresponding valve control parameters at a certain moment.

[0152] According to a second embodiment of the present invention, referring to Figures 4 to 6 As shown, this invention claims protection for an intelligent dispensing and processing device based on multi-characteristic liquid medium characteristic identification. This device is used to execute the method described in the first embodiment above. The device includes a raw liquid delivery pipeline, a multi-stage centrifugal water pump 3, a clean water mixing branch 2, a main detection pipeline 4, a multi-branch distribution pipeline 5, and a PLC control unit 6. Through the coordinated operation of the raw liquid delivery pipeline, the multi-stage centrifugal water pump 3, the clean water mixing branch 2, the main detection pipeline 4, the multi-branch distribution pipeline 5, and the PLC control unit 6, the hardware structure and the hierarchical coding matching algorithm are deeply coupled, improving the uniformity of medium mixing, the accuracy of multi-parameter sampling, and the dynamic distribution adjustment capability of each branch.

[0153] In this embodiment, the raw liquid delivery pipeline is arranged sequentially along the flow direction of the raw liquid medium, consisting of a first on / off valve 101, a screw pump 102, an ultrasonic flow meter 103, and a second on / off valve 104. The outlet of the first on / off valve 101 is connected to the medium inlet of the screw pump 102, the medium outlet of the screw pump 102 is connected to the fluid inlet of the ultrasonic flow meter 103, and the fluid outlet of the ultrasonic flow meter 103 is connected to the inlet of the second on / off valve 104. After the raw liquid medium is opened by the first on / off valve 101, it flows into the screw pump 102 for pressurized delivery. The pressurized raw liquid flows through the ultrasonic flow meter 103 for real-time flow measurement. Finally, the on / off control of the raw liquid delivery pipeline is achieved by the second on / off valve 104, and the entire pipeline achieves stable delivery and online measurement of the raw liquid.

[0154] In this embodiment, the first on / off valve 101 can be a manual ball valve, which serves as the main isolation element upstream of the raw liquid pipeline, allowing manual operation of pipeline opening / closing and equipment maintenance shutdown. The second on / off valve 104 can be a solenoid valve, which is electrically connected to the PLC control unit 6 and can receive electrical control signals to automatically open or close the raw liquid delivery path.

[0155] The clean water mixing branch 2 includes a third on-off valve 201. The outlet of the third on-off valve 201 is connected to the medium inlet of the multi-stage centrifugal water pump 3. Clean water flows into the multi-stage centrifugal water pump 3 after being regulated by the third on-off valve 201. In this embodiment, the third on-off valve 201 can be a ball valve or a solenoid valve, and the clean water supply path can be controlled by manual opening and closing or PLC electronic control automatic opening and closing according to process requirements.

[0156] The multistage centrifugal water pump 3 is equipped with a medium inlet, which is connected to the outlet of the second on-off valve 104 and the outlet of the third on-off valve 201. The raw liquid and the clean water transported by the raw liquid delivery pipeline metered by the clean water mixing branch 2 can be simultaneously merged into the multistage centrifugal water pump 3. High-speed shearing and online demulsification and homogenization are completed by relying on the turbulent mixing structure inside the pump, eliminating the medium characteristic detection error caused by liquid stratification and uneven composition.

[0157] The input end of the main detection pipeline 4 is connected to the medium outlet of the multi-stage centrifugal water pump 3 via a pipeline. The main detection pipeline 4 is equipped with a sensing and detection component (not shown in the figure). The sensing and detection component includes a density sensor (not shown in the figure), a viscosity sensor (not shown in the figure), a conductivity sensor (not shown in the figure), and a transmittance sensor (not shown in the figure). The four types of sensors are arranged at the same cross-sectional position of the main detection pipeline 4, which can simultaneously collect four medium characteristic parameters of density, viscosity, conductivity, and transmittance of the homogenized liquid, avoiding inconsistencies in the liquid medium state caused by segmented sampling and improving the accuracy of parameter acquisition.

[0158] The output end of the main detection pipeline 4 is split to form a multi-branch distribution pipeline 5. Each branch distribution pipeline is equipped with an electromagnetic flow meter 501 and an electric regulating valve 502 in sequence along the medium flow direction. Each branch pipeline is independent of each other. The electromagnetic flow meter 501 collects the actual liquid flow of the corresponding branch in real time, and the electric regulating valve 502 receives the independent PWM control signal output by the PLC to realize the individual dynamic adjustment and correction of the flow of a single branch.

[0159] The PLC control unit 6 is electrically connected to the sensing and detection components, screw pump 102, ultrasonic flow meter 103, multi-stage centrifugal water pump 3, each on / off valve, each branch electromagnetic flow meter 501, and each branch electric regulating valve 502 via signal lines. It can receive media characteristic data collected by each sensor and branch flow data fed back by each flow meter, and output drive signals to control the pump body and valve actions. The PLC control unit 6 internally stores a preset classification table and allocation strategy library. It is configured to execute the complete steps S1~S6 of the method described in Embodiment 1. After calculating the flow allocation coefficient of each branch based on the real-time media parameters, it outputs a matching PWM control signal to regulate the opening degree of each electric regulating valve 502, thereby completing the adaptive intelligent allocation of liquid.

[0160] Furthermore, a calibration column 7 is installed on the raw liquid delivery pipeline of this device, located between the screw pump 102 and the ultrasonic flow meter 103. The calibration column 7 is a vertical standard volume cylinder, which serves two purposes: firstly, it is used to calibrate the flow rate of the ultrasonic flow meter 103 and the screw pump 102 during the equipment commissioning phase, correcting the metering deviation under oily additive media; secondly, it can expel air bubbles carried by the liquid in the pipeline, stabilize the pipeline delivery pressure, and at the same time, visually observe the stratification and demulsification state of the raw liquid, reducing the interference caused by gas and medium inhomogeneity on the subsequent acquisition of multiple characteristic parameters and the accuracy of flow distribution.

[0161] This embodiment utilizes a hardware architecture that combines screw pump 102 for pressurization and metering, multi-stage pump for homogenization and mixing, synchronous acquisition of multiple parameters at the same cross section, and independent electric adjustment of multiple branches, with a hierarchical coding matching algorithm to improve the real-time performance and hierarchical distribution accuracy of industrial liquid media.

[0162] This invention discloses an intelligent distribution and processing device based on multi-characteristic liquid medium characteristic identification. It achieves real-time online demulsification and dispersion of the raw liquid and purified water through a multi-stage centrifugal water pump 3, eliminating characteristic detection errors caused by medium stratification and component inhomogeneity, and improving the accuracy of multi-parameter sampling. The main pipeline synchronously collects four parameters: density, viscosity, transmittance, and conductivity, avoiding the problem of inconsistent medium states caused by segmented sampling. Each branch pipeline is independently equipped with an electromagnetic flowmeter 501 and an electric regulating valve 502. The PLC can output independent PWM adjustment signals based on the hierarchical coding matching algorithm of this invention, realizing dynamic independent correction of the flow rate of each branch. The entire mechanical pipeline and control algorithm are integrated and adapted, with the hardware execution speed matching the algorithm's real-time performance, effectively solving the defects of existing pure software algorithms that lack supporting dedicated execution mechanisms and have insufficient actual distribution accuracy.

[0163] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0164] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

[0165] The specific embodiments of the invention have been described in detail above, but they are only examples, and this application is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications or substitutions to the invention are also within the scope of this application. Therefore, all equivalent changes, modifications, and improvements made without departing from the spirit and principles of this application should be covered within the scope of this application.

Claims

1. A smart dispensing and processing method based on the identification of multi-characteristic liquid media properties, characterized in that, include: S1, in response to the allocation trigger signal, reads the real-time density value, real-time viscosity value, real-time conductivity value and real-time transmittance value of the liquid medium in the main pipeline; S2, based on the position of the real-time density value in the preset density grading table, output the density grade code; based on the position of the real-time viscosity value in the preset viscosity grading table, output the viscosity grade code; based on the position of the real-time conductivity value in the preset conductivity grading table, output the conductivity grade code; based on the position of the real-time transmittance value in the preset transmittance grading table, output the transmittance grade code. S3, connect the density code, viscosity code, conductivity code and transmittance code in a predetermined order to form a characteristic code string; S4. Match the feature-level code string with each candidate-level code string in the allocation strategy library, compare the level code differences between the feature-level code string and the candidate-level code string bit by bit, and accumulate the number of differences as the mismatch degree. S5, select the allocation strategy corresponding to the candidate level code string with the smallest mismatch, and extract the flow allocation coefficient of each branch pipeline from the allocation strategy. S6 generates control signals for each electric regulating valve based on the flow distribution coefficient, outputs the control signals to each electric regulating valve, and each electric regulating valve adjusts its opening degree in response to the control signals.

2. The method according to claim 1, characterized in that, The preset density grading table is constructed as follows: The density range of the liquid medium under standard operating conditions is divided into a first number of density sub-intervals at equal intervals from the minimum to the maximum value. Each density sub-interval is assigned a unique density level code, and the density level codes are sequentially increased in ascending order according to the numerical values ​​of the density sub-intervals. The default viscosity classification table is constructed as follows: the viscosity range of the liquid medium under standard operating conditions is divided into a second number of viscosity sub-intervals at equal intervals from the minimum to the maximum value. Each viscosity sub-interval is assigned a unique viscosity grade code, and the viscosity grade codes are sequentially increased in ascending order according to the values ​​of the viscosity sub-intervals. The default conductivity classification table is constructed as follows: The conductivity range of the liquid medium under standard operating conditions is divided into a third number of conductivity sub-intervals at equal intervals from the minimum to the maximum value. Each conductivity sub-interval is assigned a unique conductivity level code, and the conductivity level codes are sequentially increased in ascending order according to the values ​​of the conductivity sub-intervals. The preset transmittance grading table is constructed as follows: The transmittance range of the liquid medium under standard operating conditions is divided into four transmittance sub-intervals at equal intervals from the minimum to the maximum value. Each transmittance sub-interval is assigned a unique transmittance level code, and the transmittance level codes increase sequentially in ascending order according to the values ​​of the transmittance sub-intervals.

3. The method according to claim 1, characterized in that, When comparing the differences between the characteristic level code string and the candidate level code string bit by bit, a weighting coefficient is pre-set for each level code in the characteristic level code string to reflect the influence weight of the corresponding characteristic parameter in the allocation decision. The weighting coefficients of different bit levels are either different or partially the same; The mismatch degree is calculated as follows: For each bit of the feature-level code string and the candidate-level code string, it is determined whether the two are equal. If they are not equal, a unit difference value is generated. This unit difference value is multiplied by the weighting coefficient corresponding to that bit to obtain the weighted difference value. The weighted difference values ​​of all bits of the feature-level code string are summed to obtain the mismatch degree. The set of weighting coefficients is determined by the allocation task type, which is specified by the external input signal. Different allocation task types correspond to different sets of weighting coefficients.

4. The method according to claim 1, characterized in that, S5 includes: When the minimum mismatch corresponds to a unique candidate level code string, the candidate level code string is directly used as the target candidate level code string. When it corresponds to multiple candidate level code strings, for each candidate level code string with the minimum mismatch, the baseline traffic allocation coefficient in the allocation strategy associated with the candidate level code string and the center value of each characteristic level code interval corresponding to the candidate level code string are obtained respectively. Calculate the absolute difference between the real-time characteristic value corresponding to each level code in the current characteristic level code string and the center value of the level code interval at the corresponding position in the candidate level code string. Add the absolute differences at the density level, viscosity level, conductivity level, and transmittance level to obtain the total level difference of the candidate level code string. Select the candidate level code string with the smallest total level difference as the target candidate level code string. After determining the target candidate level code string, the basic traffic allocation coefficient is extracted from the allocation strategy corresponding to the target candidate level code string; Based on the deviation direction of each bit of the current feature level code string relative to the corresponding bit of the target candidate level code string, determine the flow correction direction of each branch pipeline. The flow correction range of each branch pipe is determined based on the deviation of each level code. The basic flow ratio of each branch pipe in the basic flow distribution coefficient is adjusted according to the corresponding flow correction direction and correction range to obtain the final flow distribution coefficient. The control signals for each electric regulating valve are generated based on the final flow distribution coefficient.

5. The method according to claim 1 or 4, characterized in that, The following steps are performed after S6: Read the actual flow value measured by the flow meter installed on each branch pipe, and calculate the target flow value of each branch pipe based on the total flow value of the main pipe and the final flow distribution coefficient; The flow deviation is obtained by subtracting the target flow value from the actual flow value of each branch pipe, and the relative deviation is obtained by dividing the absolute value of the flow deviation by the target flow value. Determine if any branch pipe has a relative deviation exceeding the preset allowable deviation threshold. If so, generate an alarm signal and send it to the monitoring terminal. At the same time, record the branch pipe number that exceeds the tolerance and the corresponding relative deviation in the error log.

6. The method according to claim 1, characterized in that, S1 includes: Density sensor, viscosity sensor, conductivity sensor and transmittance sensor are installed at the same cross-sectional location of the main pipeline; The allocation trigger signal is provided by the rising edge pulse generated by the external controller. When the rising edge pulse arrives, the four sensors start sampling operation simultaneously. The sampling duration is a fixed sampling window width. Within the sampling window width, each sensor continuously collects multiple instantaneous readings. The arithmetic mean of the multiple instantaneous readings collected by the same sensor is used as the real-time measurement value of the sensor.

7. The method according to claim 1, characterized in that, The process of building the allocation strategy library is as follows: Determine the full range of density, viscosity, conductivity, and transmittance measurements. Divide this full range into multiple density intervals and assign density, viscosity, conductivity, and transmittance codes to each interval. By combining all density ranges, all viscosity ranges, all conductivity ranges, and all transmittance ranges using Cartesian products, all possible code combinations can be obtained. For each candidate code string, the median of the density range corresponding to the candidate code string is selected as the typical density value, the median of the viscosity range is selected as the typical viscosity value, the median of the conductivity range is selected as the typical conductivity value, and the median of the transmittance range is selected as the typical transmittance value. The corresponding liquid sample is prepared using the typical density value, typical viscosity value, typical conductivity value, and typical transmittance value, and the liquid sample is introduced into the main pipeline. Install flow regulating valves and flow meters on each branch pipe. While keeping the total flow of the main pipe constant, adjust the flow regulating valves of each branch pipe in sequence until the flow meter readings on all branch pipes are stable and the sum of the flow of each branch pipe is equal to the total flow of the main pipe. Record the stable flow value of each branch pipe. Divide the stable flow value of each branch pipe by the total flow of the main pipe to obtain the reference flow ratio of that branch pipe under the candidate level code string. The reference flow ratios of all branch pipes together constitute the reference flow allocation coefficient corresponding to the candidate level code string. The mapping relationship between each candidate level code string and its baseline traffic allocation coefficient is stored as a record in the allocation strategy library.

8. The method according to claim 1, characterized in that, The predetermined sequence in S3 is as follows: The density level code is placed in the first position of the characteristic level code string, the viscosity level code is placed in the second position, the conductivity level code is placed in the third position, and the transmittance level code is placed in the fourth position. The predetermined order is determined based on the degree of physical influence of each characteristic parameter on the flow behavior of the liquid medium in the branch pipe, with the degree of influence from high to low being density, viscosity, electrical conductivity, and light transmittance.

9. The method according to claim 1, characterized in that, The control signal in S6 is a pulse width modulation signal with a fixed frequency. The duty cycle of the pulse width modulation signal is linearly proportional to the flow ratio of the corresponding branch pipe in the final flow distribution coefficient. The specific method for generating control signals for each electric regulating valve is as follows: For each branch pipe, the flow ratio of that branch pipe in the final flow distribution coefficient is multiplied by the reference duty cycle to obtain the target duty cycle. The target duty cycle is written into the comparison register of the pulse width modulation generator. The pulse width modulation generator outputs a square wave signal with the corresponding duty cycle according to the value of the comparison register. The square wave signal is used as the control signal of the electric regulating valve on that branch pipe. The pulse width modulation signals of different branch pipes are independent of each other and have the same frequency.

10. An intelligent dispensing and processing device based on the identification of multi-characteristic liquid media properties, characterized in that, The apparatus is used to perform the method according to any one of claims 1-9, the apparatus comprising: The raw liquid delivery pipeline includes, in sequence along the flow direction of the raw liquid medium, a first on-off valve, a screw pump, an ultrasonic flow meter, and a second on-off valve. The outlet of the first on-off valve is connected to the medium inlet of the screw pump, the medium outlet of the screw pump is connected to the fluid inlet of the ultrasonic flow meter, and the fluid outlet of the ultrasonic flow meter is connected to the inlet of the second on-off valve. After the raw liquid medium is opened by the first on-off valve, it is sent to the screw pump for pressurization, flows through the ultrasonic flow meter to complete the flow measurement, and the pipeline is opened and closed by the second on-off valve. It is used to deliver and measure the raw liquid medium. A multi-stage centrifugal water pump, the medium inlet of which is connected to the outlet of the second on / off valve; The clean water mixing branch includes a third on / off valve, the outlet of which is connected to the medium inlet of the multi-stage centrifugal water pump. The raw medium and clean water undergo turbulent shearing and online demulsification and homogenization inside the multi-stage centrifugal water pump. The main detection pipeline is connected to the medium outlet of the multi-stage centrifugal water pump. The main detection pipeline includes a sensing and detection component, which includes a density sensor, a viscosity sensor, a conductivity sensor, and a transmittance sensor. The sensing and detection component is used to synchronously collect the medium characteristic parameters of the liquid. A multi-branch distribution pipeline is connected to the output end of the main detection pipeline, and each branch distribution pipeline is equipped with an electromagnetic flow meter and an electric regulating valve in sequence. The PLC control unit is electrically connected to the sensing and detection components, screw pump, ultrasonic flow meter, multi-stage centrifugal water pump, on / off valves, branch electromagnetic flow meters and branch electric regulating valves. The PLC control unit is configured to execute steps S1 to S6 of the method according to any one of claims 1 to 9 and output corresponding control signals to regulate each execution component.