Online viscosity control system and method for continuous production of antibacterial gel
By using an online viscosity control system and hardware synchronous pulse and multimodal collaborative control technology, the problems of viscosity control lag and parameter coupling in the production of antibacterial gels were solved, and the real-time stability of gel viscosity and the continuous production requirements of product quality were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING ZHONGJIAXIN HEALTH MANAGEMENT CO LTD
- Filing Date
- 2026-04-21
- Publication Date
- 2026-07-31
AI Technical Summary
Existing antibacterial gel viscosity control in continuous production suffers from problems such as detection lag, strong subjectivity of manual adjustment, and severe interference from multiple parameter coupling, resulting in unstable product quality and difficulty in meeting the quality consistency requirements of continuous production.
An online viscosity control system is adopted, which uses hardware synchronous pulse latching to store multi-sensor data and combines feedforward and feedback controllers for multi-modal collaborative control. The neutralizer addition amount and stirring power are adjusted in real time, and the viscosity prediction model is used for advance compensation and integral correction to ensure that the gel viscosity is within the target control range.
This achieves real-time stable control of the viscosity of the antibacterial gel, avoiding product scrapping caused by viscosity deviation from the threshold and ensuring consistent quality in the continuous production process.
Smart Images

Figure CN122488872A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial process control technology, and in particular to an online viscosity control system and method for continuous production of antibacterial gel. Background Technology
[0002] Antibacterial gels, as a semi-solid formulation, are widely used in medical care, personal hygiene, and public health disinfection. Their rheological properties, especially viscosity, directly determine the product's spreadability, retention, release properties, and user experience. In continuous production processes, raw materials (such as carbomer, cellulose derivatives, and polyacrylic acid polymers) are continuously fed, neutralized, mixed, homogenized, and finally filled. The entire process places extremely high demands on viscosity stability.
[0003] In existing technologies, viscosity control of antibacterial gels often employs a post-test approach, using offline sampling and rotational viscometer measurements, or relies on operators manually adjusting the amount of neutralizer added or the stirring rate based on experience. This open-loop or semi-open-loop control mode has significant drawbacks: severe detection lag, failing to reflect viscosity fluctuations during production in real time; slow adjustment response, easily generating large quantities of substandard intermediates; and a lack of coordinated control over multiple process parameters (such as temperature, stirring power, neutralizer flow rate, and material residence time), making it difficult to meet the stringent quality consistency requirements of continuous production. Summary of the Invention
[0004] The purpose of this invention is to provide an online viscosity control system and method for the continuous production process of antibacterial gel, which solves the technical defects of existing offline detection, strong subjectivity of manual adjustment, and serious interference from multi-parameter coupling. It avoids the scrapping of the entire batch of products due to viscosity deviating from the threshold and ensures that the gel viscosity remains stable within the target control range throughout the continuous production process.
[0005] To achieve the above objectives, in a first aspect, the present invention provides an online viscosity control method in the continuous production process of antibacterial gel, comprising the following steps: A first flow meter, a second flow meter, a temperature sensor, a stirring power sensor, and an online viscometer are installed on the discharge pipes of the raw material feeding unit, the neutralizer addition unit, and the mixing and homogenizing unit, respectively. The measured values of each sensor are latched by a unified hardware synchronous pulse, and dynamic compensation and alignment are performed according to the response time constant of each sensor to generate a multi-dimensional process variable vector with a unified timestamp. When a step change in the instantaneous flow rate of raw materials or neutralizer exceeding a preset threshold is detected, the pre-stored viscosity prediction model is invoked. Based on the flow rate values before and after the change, the current gel temperature, and the stirring power, the predicted viscosity deviation is calculated and converted into a feedforward compensation command. The real-time viscosity measurement value obtained by the online viscometer is acquired with a fixed control cycle, compared with the target viscosity range, and a feedback adjustment command is calculated according to the proportional-integral-derivative control algorithm. When the feedforward compensation command is active, the integral accumulator of the feedback controller module is temporarily frozen. The feedforward compensation command and the feedback adjustment command are matched by type and converted into equivalent values and then superimposed. The final execution commands are then sent to the electronically controlled regulating valve, the variable frequency metering pump and the stirring frequency converter to perform multi-modal collaborative control.
[0006] The method further includes: During the transition period after formula switching, the proportional gain coefficient of the feedback controller module is increased, and the weight coefficients of the viscosity prediction model are updated online using a recursive least squares algorithm.
[0007] The viscosity prediction model consists of an input normalization layer, a nonlinear mapping core, and an output denormalization layer. Its inputs are the normalized raw material flow rate, neutralizer flow rate, gel temperature, and stirring power, and its output is the viscosity prediction value. When a flow step disturbance is detected, the disturbance scenario comparison method is adopted. The stable flow value before the disturbance and the flow value after the disturbance are used together with the current constant temperature and power to construct a baseline scenario vector and a disturbance-after scenario vector. The two vectors are input into the viscosity prediction model to obtain the baseline viscosity prediction value and the disturbance-after viscosity prediction value. The difference between the two is the predicted viscosity deviation.
[0008] The method further includes: Based on the segmented range of the current gel temperature and stirring power, the neutralizer flow rate change coefficient or stirring speed change coefficient required for the unit viscosity deviation is retrieved from the pre-stored reverse sensitivity table. The predicted viscosity deviation is multiplied by this coefficient to obtain the target flow rate change or the target speed change. Then, based on the valve characteristic curve or the frequency converter characteristics, it is converted into the percentage change of the opening of the electronic control regulating valve or the change of the stirring frequency. Finally, the compensation amount is limited in amplitude and rate before being output.
[0009] The control cycle duration is set to be less than one-fifth of the average residence time of the gel from the neutralizer addition point through the mixing and homogenizing unit to the online viscometer installation position; When the feedforward controller module receives the feedforward activation flag, the feedback controller module freezes the integral accumulator for a duration equal to the average dwell time, while maintaining the normal calculation and output of the proportional and derivative terms. After exiting integral suppression, the integral accumulator starts accumulating the residual deviation from the current value, gradually eliminating the steady-state error.
[0010] Specifically, the feedforward compensation command and the feedback adjustment command are matched by type and converted to be superimposed, and then the final execution commands are sent to the electronically controlled regulating valve, the variable frequency metering pump, and the stirring frequency converter, respectively, to perform multi-modal collaborative control, including: Based on the instruction type labels attached to the feedforward compensation instruction and the feedback adjustment instruction, the instructions for different actuators are uniformly converted into equivalent changes of the same physical quantity through the equivalent conversion coefficient table, and then algebraic superposition is performed. For adjusting the amount of neutralizer added, the variable frequency metering pump is automatically selected as the main channel and the electronically controlled regulating valve is selected as the auxiliary channel according to the viscosity deviation, or vice versa. After being superimposed and subjected to absolute amplitude and rate limits, the total command is sent to the positioner of the electronic control valve, the frequency converter of the variable frequency metering pump, and the frequency converter of the mixer via a 4-20 mA current signal or a 0-10 V voltage signal, respectively.
[0011] The multimodal collaborative control includes five operating modes: neutralizer-dominated mode, stirring-assisted mode, pure stirring mode, fast feedforward mode, and self-calibrating mode; The current mode is automatically selected based on the viscosity deviation, whether the amount of neutralizer added is equal to the process safety limit, the activation status of the feedforward controller, and the value of the model integral accumulator.
[0012] During the recipe switching transition state, the proportional gain coefficient of the feedback controller module increases to 1.2 to 1.5 times the steady-state value, the integral gain coefficient temporarily increases to 1.1 to 1.3 times the steady-state value, and the differential gain coefficient temporarily decreases to 0.5 times the normal value in the first three control cycles. At the same time, the feedforward controller module is temporarily disabled. When the real-time viscosity measurement value remains stable within the target viscosity range for five consecutive control cycles or when the duration of the transition state reaches the preset maximum duration, the transition state is exited and the steady-state parameters are restored.
[0013] Specifically, the weight coefficients of the viscosity prediction model are updated online using the recursive least squares algorithm as follows: Obtain a pre-defined covariance matrix with the same dimension as the weight coefficients. When the update trigger condition is met, collect the valid data pairs at the current time, calculate the prediction error of the current model, and assign different correction amounts to each weight coefficient according to the response intensity of the current input vector and each basis function and the correction step size factor determined by the covariance matrix. Add the correction amount to the old weight coefficients to obtain the updated new weight coefficients, and then update the covariance matrix according to the forgetting factor. During the first ten update cycles after the recipe switching transition ends, the forgetting factor is 0.95, and then returns to 0.99.
[0014] Secondly, the present invention provides an online viscosity control system for a continuous production process of antibacterial gel, applied to an online viscosity control method for a continuous production process of antibacterial gel as provided in the first aspect, comprising: The control module includes a command-based control electronically controlled regulating valve, a variable frequency metering pump, and a stirring frequency converter; The central control server integrates a data acquisition module, a feedforward controller module, a feedback controller module, and an instruction fusion and arbitrator. The data acquisition module is used to achieve time alignment of multi-sensor data through hardware synchronization pulses and response time compensation, and to generate a multi-dimensional process variable vector. The feedforward controller module is used to calculate the feedforward compensation command based on the flow step disturbance and viscosity prediction model; The feedback controller module is used to calculate feedback adjustment commands based on the deviation between the real-time viscosity measurement value and the target range using a proportional-integral-derivative algorithm, and can selectively freeze the integral accumulator when the feedforward is activated. The instruction fusion and arbitrator is used to perform type matching, equivalent conversion and superposition of feedforward compensation instructions and feedback adjustment instructions, and to distribute and send the final instructions to the execution adjustment module according to the multimodal collaborative control strategy.
[0015] This invention discloses an online viscosity control system and method for continuous production of antibacterial gels. It achieves time alignment of multi-sensor data through hardware synchronization pulses and response time compensation, constructing a multi-dimensional process variable vector. A feedforward controller, based on a viscosity prediction model, proactively compensates for flow step disturbances, while a feedback controller uses a proportional-integral-differential algorithm to correct residual deviations in real time, selectively freezing the integral accumulator when the feedforward is activated. Through instruction fusion and an arbitrator 1024, it achieves equivalent conversion and superposition output of multiple actuators, supporting multi-modal collaborative control such as neutralizer-led and stirring-assisted control. During formula switching, the feedback gain is temporarily increased, and a recursive least squares algorithm is used to update the model weight coefficients online. This invention overcomes the technical shortcomings of existing offline detection, such as lag, strong subjectivity in manual adjustment, and severe multi-parameter coupling interference, avoiding the scrapping of entire batches of products due to viscosity deviation from the threshold, and ensuring that the gel viscosity remains stable within the target control range throughout the continuous production process. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0017] Figure 1 This is a schematic diagram of the steps in an online viscosity control method during the continuous production process of an antibacterial gel according to the first embodiment of the present invention.
[0018] Figure 2 This is a schematic flowchart of an online viscosity control method in the continuous production process of an antibacterial gel provided by the present invention.
[0019] Figure 3 This is a schematic diagram of the online viscosity control system in the continuous production process of antibacterial gel according to the second embodiment of the present invention.
[0020] In the diagram: 101-Execution adjustment module, 102-Central control server, 1021-Data acquisition module, 1022-Feedforward controller module, 1023-Feedback controller module, 1024-Command fusion and arbitrator. Detailed Implementation
[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0022] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0023] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0024] The first embodiment of this application is as follows: Please see Figures 1-2 This invention provides an online viscosity control method in the continuous production process of antibacterial gel, comprising the following steps: S1. Install a first flow meter, a second flow meter, a temperature sensor, a stirring power sensor, and an online viscometer on the discharge pipes of the raw material feeding unit, the neutralizer addition unit, and the mixing and homogenizing unit, respectively. Use a unified hardware synchronous pulse to latch the measured values of each sensor, and perform dynamic compensation and alignment based on the response time constant of each sensor to generate a multi-dimensional process variable vector with a unified timestamp.
[0025] Specifically, on the main conveying pipeline of the raw material feeding unit, a Coriolis mass flow meter or electromagnetic flow meter is installed at least 5 times the pipe diameter from the outlet of the conveying pump, using a flange or clamp. This is designated as the first flow meter. The measuring electrode or vibrating tube of this flow meter is perpendicular to the pipe axis, and its signal converter is fixed on a bracket beside the pipeline. The downstream pipeline of the first flow meter maintains a straight section of at least 10 times the pipe diameter to ensure a stable flow field. This flow meter is used to continuously collect the instantaneous flow rate of the raw material, with a range covering 1.2 times the maximum capacity of the production line and an accuracy class of not less than 0.5. On the conveying pipeline of the neutralizer addition unit, a small-diameter Coriolis mass flow meter or thermal mass flow meter is also installed between the outlet of the precision metering pump and the injection valve. This is designated as the second flow meter. Since the neutralizer addition flow rate is usually much smaller than the raw material flow rate, this flow meter adopts a micro-volume design with an inner diameter of 2 to 8 mm, and is connected to the pipeline through a dedicated low dead volume connector. The second flow meter must be installed vertically or at an angle to avoid air bubble residue. Its signal converter has a fast response function with a response time of no more than 0.2 seconds. This flow meter is used to continuously collect the instantaneous flow rate of the neutralizing agent.
[0026] On the discharge pipe of the mixing and homogenizing unit, approximately 200 mm to 500 mm downstream of the mixing tank outlet flange, a radial mounting hole is made to insert a platinum resistance temperature sensor (Pt100 or Pt1000), with the probe extending to the center of the pipe. This location reflects the true temperature of the gel leaving the mixing tank while avoiding the effects of localized overheating in the stirring vortex zone. The temperature sensor uses a sanitary chuck connection, sealed with PTFE. A torque sensor or power transmitter is installed between the stirring motor and the reducer in the mixing and homogenizing unit, or on the motor power supply line. If a torque sensor is selected, it is connected in series between the motor output shaft and the stirrer input shaft via a flange. If a power transmitter is selected, current and voltage signals are taken from the motor's frequency converter output and converted into a 4-20 mA signal, which indirectly reflects the real-time stirring power. This design prefers a torque sensor because it is less affected by power frequency fluctuations. On the discharge pipe of the mixing and homogenizing unit, downstream of the temperature sensor, an installation interface is provided for mounting an online rotational viscometer or a vibratory viscometer. If an online rotational viscometer is selected, a coaxial cylindrical or rotor structure is used. Its measuring head is inserted into the main pipe via a three-way branch or directly. The gel continuously flows through the measuring gap, and the rotor rotates at a constant speed. The viscosity value is calculated by measuring the shear torque. If a vibratory viscometer is selected, a tuning fork or vibrating rod probe is used, directly inserted into the pipe. The viscosity is obtained by measuring the change in vibration damping. The sampling frequency of both viscometers can be set to 1 Hz or higher. The installation position of the viscometer must ensure that the gel is fully mixed and the temperature is stable, and that the pipe is full, without air bubbles or dead zones. The signal output lines of all the above sensors (first flow meter, second flow meter, temperature sensor, torque sensor or power transmitter, online viscometer) use shielded cables and are connected to the corresponding analog input channels of the data acquisition module 1021 of the central control server 102.
[0027] The data acquisition module 1021 of the central control server 102 actively sends a unified hardware synchronization pulse, triggering all sensors to simultaneously latch the current signal and generate a data frame with an absolute time stamp. The differences in physical response time between different sensors are then processed using linear interpolation within a sliding window. The specific integration process is as follows: The central control server 102 is equipped with a high-precision real-time clock module. This clock module periodically synchronizes with the network time protocol server on the production line via industrial Ethernet, ensuring that the drift during long-term operation does not exceed 1 millisecond. The clock module generates a synchronization pulse signal with a period of 1 second. This pulse signal is simultaneously transmitted via hardwired connection through the digital output channel of the data acquisition module 1021 to the signal processing units of the first flow meter, the second flow meter, the temperature sensor transmitter, the torque sensor transmitter, and the online viscometer. This hardwired synchronization signal forces all sensors to latch their instantaneous measurement values at the same microsecond level, and adds a timestamp generated by the internal crystal oscillator of the sensor (referenced to the system time base). This method fundamentally eliminates time misalignment caused by independent sampling and communication delays of each sensor.
[0028] The data acquisition module 1021 polls all the aforementioned sensors sequentially according to a preset scanning period (e.g., 50 milliseconds). However, unlike traditional polling, this data acquisition module 1021 internally allocates a circular buffer for each sensor. When a sensor is polled, it returns not only the current instantaneous value, but also the data latched at the most recent synchronization pulse moment and its accompanying absolute timestamp. The data acquisition module 1021 stores these data pairs (timestamp, measurement value) into the corresponding buffers, with each buffer storing a maximum of the most recent 100 data points.
[0029] Because different sensors have different physical response times (for example, due to mechanical inertia, the output value of an online rotational viscometer actually reflects the average viscosity over the past 0.3 to 0.5 seconds; while the response time of a Coriolis mass flow meter is only 0.05 seconds), relying solely on synchronous latching still results in dynamic deviations. Therefore, the data integration process of this invention further includes a dynamic compensation aligner, which is built into the software layer of the data acquisition module 1021. Specifically: For each sensor, its actual response time constant τ_i (where i represents the i-th sensor) is determined beforehand through a step response experiment. During production, when the data acquisition module 1021 obtains a set of raw data with a latch timestamp T_sync, it calculates the time point T_true = T_sync - τ_i corresponding to the actual measurement value as the gel material passes through the sensitive element, based on the sensor's response time constant τ_i.
[0030] Then, the data acquisition module 1021 extrapolates or interpolates all sensor measurements to the same unified target time point T_target. T_target is selected as the starting point of the least common multiple of the current system time period, for example, a target time point is generated every 0.1 seconds. For each sensor, the data acquisition module 1021 retrieves the two data points with timestamps closest to T_target from its circular buffer and calculates the estimated measurement value of the sensor at time T_target using linear interpolation. The linear interpolation process does not involve complex formulas, but is calculated proportionally based on the time difference and numerical difference between the two points.
[0031] After the aforementioned time alignment process, at each target time point T_target, the data acquisition module 1021 simultaneously obtains a set of aligned data: instantaneous flow rate of raw materials, instantaneous flow rate of neutralizing agent, real-time gel temperature, real-time stirring power, and real-time viscosity measurement. The central control server 102 arranges these values in a fixed order to form a five-dimensional process variable vector. This vector, along with its corresponding target timestamp, is stored in the real-time database of the central control server 102 for use by the feedforward controller module 1022 and the feedback controller module 1023.
[0032] To enhance the reliability of the integrated data, before constructing the vector, the data acquisition module 1021 performs a simple outlier removal step: for five consecutive measurements from each sensor, the median and absolute deviation are calculated. If a value deviates from the median by more than a preset threshold (e.g., 20% of the measurement range), it is identified as an outlier and replaced with the median. Subsequently, first-order low-pass digital filtering is applied to the flow, temperature, and power signals to suppress high-frequency noise; for the viscosity signal, a sliding window averaging (window width equal to the three most recent sampling points) is used to smooth out glitches caused by mechanical vibration. The filtering process does not change the timestamp alignment of the data.
[0033] The data acquisition module 1021 of the central control server 102 ultimately outputs a standardized data stream with a unified time stamp, strict synchronization of all physical quantities, and preprocessing. This data stream serves as the real-time information foundation for the entire online viscosity control method, ensuring the accuracy and speed of subsequent feedforward compensation and feedback adjustment.
[0034] S2. When a step change in the instantaneous flow rate of raw materials or neutralizer exceeding a preset threshold is detected, the pre-stored viscosity prediction model is invoked. The predicted viscosity deviation is calculated based on the flow rate values before and after the change, the current gel temperature, and the stirring power. This deviation is then converted into a feedforward compensation command.
[0035] Specifically, the viscosity prediction model is an offline-trained nonlinear mapper within the central control server 102. This model is not expressed using a single mathematical formula, but rather consists of the following three core components: Input normalization layer: Converts the four original physical quantities into dimensionless standardized values to eliminate the impact of dimensional differences on the internal calculations of the model.
[0036] Nonlinear Mapping Core: This core is a multilayer nonlinear regressor trained on historical production data. In practical engineering implementation, it can be a well-trained radial basis function network or a multivariate nonlinear mapping relationship stored using lookup tables and interpolation. This core maps four standardized inputs to an intermediate viscosity index.
[0037] Output denormalization layer: Converts the intermediate viscosity index into the actual viscosity prediction value according to the pre-stored viscosity range, in millipascals per second.
[0038] The entire model is stored as a parameter file in the non-volatile memory of the central control server 102 and supports online recursive updates as described in step five. The basic input-output relationship of the model can be understood as: viscosity prediction = F(raw material flow rate, neutralizer flow rate, gelation temperature, stirring power), where F is a nonlinear function.
[0039] Before feeding the four process variables collected in real time into the viscosity prediction model, the data acquisition module 1021 first preprocesses the raw data: For each sensor channel, set upper and lower limits for the process safety of the physical quantity. For example, the raw material flow rate cannot exceed 1.1 times the maximum design flow rate, nor can it be lower than zero; the gel temperature is usually controlled between 15 and 40 degrees Celsius; the stirring power varies between no-load and full-load. Any value exceeding the safety limit will be marked as invalid, trigger an alarm, and will not be included in subsequent model calculations.
[0040] To suppress high-frequency noise in the sensor signals, a first-order inertial filter is applied to each physical quantity after a validity check. This filter does not change the overall trend of the signal, but only weakens instantaneous spikes and glitches. The time constant of the filter is set individually according to the noise characteristics of different physical quantities: the time constant for the flow signal is set to 0.1 seconds, the time constant for the temperature signal is set to 0.5 seconds, and the time constant for the stirring power signal is set to 0.2 seconds. The filtered values replace the original values in the next step.
[0041] Because the four physical quantities have significantly different dimensions and numerical ranges (e.g., flow rate in liters per minute, temperature in degrees Celsius), they must be converted to a unified dimensionless range of 1. The normalization transformation uses a linear scaling method: for each physical quantity, its minimum normalization limit (called the lower limit) and maximum normalization limit (called the upper limit) are determined beforehand through offline experiments. The real-time filtered value is subtracted from the lower limit and then divided by the difference between the upper and lower limits to obtain a normalized value between 0 and 1. If a physical quantity slightly exceeds this range due to an anomaly, it is clamped to 0 or 1. Finally, the four normalized values constitute a four-dimensional input vector, denoted as the standard input vector.
[0042] The feedforward controller module 1022 is specifically designed to detect abnormal fluctuations in the flow rate of raw materials or neutralizing agents. This module operates with the same scan cycle (50 milliseconds) as the data acquisition module 1021, and its anomaly detection logic is divided into two levels: The first level, absolute threshold anomaly: When the instantaneous flow rate of raw materials or neutralizing agent exceeds the preset process safety threshold (e.g., flow rate below zero or above 1.1 times the maximum allowable flow rate), it is judged as a serious fault. At this time, the feedforward controller module 1022 does not issue any compensation command, but instead sends a fault alarm signal to the central control server 102, prompting the operator to check the delivery pump or flow meter.
[0043] The second layer, relative rate of change anomaly (i.e., step disturbance detection): This is the core trigger condition for feedforward control. The feedforward controller module 1022 internally maintains a sliding window with a length of three sampling periods to store the three most recent raw material flow rate and neutralizer flow rate values. At each sampling moment, the module calculates the absolute value of the difference between the current value of the raw material flow rate and the previous period's value, and the absolute value of the difference between the current value of the neutralizer flow rate and the previous period's value. If the absolute value of either difference exceeds a preset disturbance rate of change threshold (e.g., the change in raw material flow rate is greater than 5% of the rated flow rate, or the change in neutralizer flow rate is greater than 8% of the rated flow rate), and this change persists for two consecutive sampling periods (to exclude instantaneous spike interference), then a significant flow step disturbance is determined to have occurred.
[0044] Simultaneously, the module records detailed information about the moment the disturbance occurs: the disturbance type (raw material flow disturbance or neutralizer flow disturbance), the average flow rate of the last stable cycle before the disturbance, the current flow rate after the disturbance, and the gel temperature and stirring power simultaneously read at the moment the disturbance occurs (these two values are considered to have remained unchanged for this extremely short period). This information is encapsulated into a "disturbance event log" and passed to the next step.
[0045] This invention does not directly input the instantaneous flow rate value after disturbance into the model alone. The feedforward controller module 1022 adopts a disturbance scenario comparison method, the specific process of which is as follows: Extract the average feed flow rate and the average neutralizer flow rate from the last stable period before the disturbance event record. These two average flow rates, along with the gel temperature and stirring power at the moment of the disturbance (these two values are considered constant for a very short time before and after the disturbance), form a quadruple, called the baseline scenario vector. This vector, after undergoing the same filtering and normalization processes as described above, is fed into the viscosity prediction model to obtain the baseline viscosity prediction value, which represents the viscosity the gel would have reached without the flow disturbance.
[0046] Extract the feed flow rate and neutralizer flow rate (i.e., the new flow rate after the change) from the disturbance event records. Keep the gel temperature and stirring power exactly the same as in the baseline scenario to form another quadruple, called the post-disturbance scenario vector. After filtering and normalization, it is fed into the same viscosity prediction model to obtain the post-disturbance viscosity prediction value, which represents the viscosity that the gel will tend to when all other conditions remain unchanged and only the flow rate changes.
[0047] The predicted viscosity deviation is obtained by subtracting the baseline viscosity prediction from the predicted viscosity after perturbation. This deviation can be positive or negative: a positive value indicates that the flow perturbation will lead to an excessively high gel viscosity, while a negative value indicates that it will lead to an excessively low viscosity.
[0048] After obtaining the predicted viscosity deviation, the feedforward controller module 1022 needs to convert it into a specific actuator adjustment, namely, the change in the opening of the neutralizer regulating valve or the change in the frequency of the stirring motor inverter. This invention employs a calculation method based on a piecewise linearized inverse mapping table, eliminating the need for online iterative solutions and guaranteeing a millisecond-level response speed. The feedforward controller module 1022 first evaluates the current operating status of the neutralizer addition unit. If the current instantaneous flow rate of the neutralizer is close to the maximum allowable addition ratio of the formulation (e.g., it has reached the upper limit of the raw material flow rate), the stirring speed is adjusted first to compensate for the viscosity deviation; otherwise, if the neutralizer flow rate is within the safe range, the amount of neutralizer added is adjusted first, because changing the neutralizer has a more direct and wider effect on viscosity regulation.
[0049] The central control server 102 internally stores a set of inverse sensitivity tables obtained through open-loop step tests. These tables are segmented according to different temperature and stirring power ranges. For the currently measured gel temperature and stirring power, the system first determines its corresponding temperature and power range, and then, from the sub-table corresponding to that range, finds the required adjustment conversion coefficient based on the sign and magnitude of the predicted viscosity deviation. This coefficient represents "how much neutralizer flow rate needs to be changed per unit viscosity deviation" or "how much stirring speed needs to be changed per unit viscosity deviation." Because the segmentation is sufficiently fine, it can approximate a linear proportional relationship in practical use.
[0050] Multiply the predicted viscosity deviation by the conversion factor obtained from the inverse sensitivity table to obtain the target change in neutralizer flow rate (in liters per minute) or the target change in stirring speed (in revolutions per minute). To adapt to the actuator's control characteristics, this change needs to be converted into a specific actuator command: for neutralizer control valves, the flow rate change is converted into a percentage change in valve opening based on the valve characteristic curve; for stirring frequency converters, the speed change is converted into a change in the frequency converter's output frequency (Hertz).
[0051] The calculated compensation amount cannot be output without limit. The feedforward controller module 1022 will limit its amplitude: the change in the opening of the neutralizer regulating valve must not exceed ±20% of the current opening value, and the change in the stirring frequency must not exceed ±10% of the rated frequency. Simultaneously, to prevent excessively abrupt compensation actions that could cause system oscillation, the rate of change of the compensation amount is also limited; that is, the change in amplitude of a single compensation command relative to the previous compensation command does not exceed a preset maximum step size. The final compensation amount after amplitude and rate limits is the feedforward compensation command output by the feedforward controller module 1022.
[0052] The feedforward compensation command is sent to the execution regulation module 101 immediately within the next control cycle (not exceeding 100 milliseconds) after the disturbance event is identified. Due to the physical delay in material delivery and mixing between the disturbance point and the online viscometer, the compensation command begins to take effect before the viscosity change caused by the disturbance actually reaches the viscometer, thereby offsetting or significantly reducing the impact of the disturbance on the final gel viscosity.
[0053] S3. Obtain the real-time viscosity measurement value measured by the online viscometer with a fixed control cycle, compare it with the target viscosity range, calculate the feedback adjustment command according to the proportional-integral-derivative control algorithm, and temporarily freeze the integral accumulator of the feedback controller module 1023 when the feedforward compensation command is in the active state.
[0054] Specifically, the feedback controller module 1023, as a software functional block within the central control server 102, operates with a fixed control cycle. The duration of this control cycle must be less than one-fifth of the average residence time of the gel as it flows from the neutralizer addition point through the mixing and homogenizing unit and finally reaches the online viscometer mounting location. For example, if the average residence time is 10 seconds, the control cycle is set to no more than 2 seconds, typically 1 second. This requirement ensures that the feedback system has sufficient bandwidth to suppress low- and mid-frequency disturbances, while the feedforward controller operates with a cycle of 50 to 100 milliseconds, complementing each other on a time scale.
[0055] The feedback controller module 1023 has three input signals: Setpoint: The target viscosity range input by the operator based on the current antibacterial gel formulation. The controller internally takes the midpoint of this range as a fixed setpoint. For example, if the target range is 8000 to 12000 mPa·s, the setpoint is 10000 mPa·s. Process value: The real-time viscosity measurement value after time alignment and filtering as described in the first step. Feedforward status signal: A flag output by the feedforward controller, indicating whether a feedforward compensation command is currently being executed, and the type of feedforward command (adjusting neutralizing agent or adjusting stirring).
[0056] The output of the feedback controller module 1023 is a feedback adjustment command, which is also expressed as a percentage change in the opening of the neutralizer regulating valve, or a change in the frequency of the agitator inverter (in Hertz). The type of output command is the same physical quantity as the feedforward command, but can be selected independently: for example, if the feedforward adjusts the neutralizer, the feedback can still adjust the agitator simultaneously, and vice versa. This flexibility allows the system to distribute control tasks among different actuators.
[0057] At the beginning of each control cycle, the feedback controller module 1023 first calculates the current viscosity deviation, which is equal to the real-time viscosity measurement value minus the setpoint. The deviation can be positive (viscosity too high) or negative (viscosity too low). This deviation serves as the benchmark for all subsequent calculations.
[0058] The proportional term's output is proportional to the viscosity deviation in the current cycle. The controller internally stores a proportional gain coefficient, which is a positive number. The proportional term's output value equals the proportional gain coefficient multiplied by the viscosity deviation in the current cycle. The specific value of the proportional gain coefficient is obtained through offline tuning or online self-tuning. Its physical meaning is: when the viscosity deviation reaches half the width of the target range, the proportional term's output adjustment should enable the actuator to produce approximately 50% of its maximum stroke. The proportional term's function is to respond immediately to the current deviation; the larger the deviation, the larger the output adjustment. However, the proportional term alone cannot eliminate persistent small deviations because when the deviation is small enough, the proportional output is insufficient to overcome system friction or dead zones.
[0059] The output of the integral term is proportional to the cumulative viscosity deviation over time. The controller maintains an integral accumulator, which is updated in each control cycle according to the following logic: the viscosity deviation of the current cycle is multiplied by the control cycle duration (in seconds), then multiplied by the integral gain coefficient, and the product is added to the integral accumulator. The initial value of the integral accumulator is zero. To prevent the integral accumulator from increasing indefinitely and causing system runaway (i.e., integral saturation), the feedback controller module 1023 sets an integral limiting mechanism: the value of the integral accumulator is limited to a preset upper and lower limit, which corresponds to half of the actuator's maximum adjustable range. Furthermore, when the output command of the execution control module 101 has reached its physical limit (e.g., the control valve is fully open or fully closed) and the deviation has not been eliminated, the integral accumulator stops updating, i.e., it no longer accumulates new deviations, waiting for the actuator to exit the saturation region before resuming integral action. The output of the integral term is the current value of the integral accumulator. The function of the integral term is to eliminate steady-state residual deviation. As long as there is any small, persistent deviation between the viscosity measurement and the set point, the integral accumulator will slowly increase, eventually causing the feedback adjustment command to increase enough to completely eliminate the deviation.
[0060] The output of the derivative term is proportional to the rate of change of the viscosity deviation. The controller internally stores the viscosity deviation of the current cycle and the viscosity deviation of the previous cycle; subtracting the two yields the change in deviation. Dividing this change by the control cycle duration gives the rate of change of deviation. The output of the derivative term equals the derivative gain coefficient multiplied by this rate of change. The function of the derivative term is to predict the trend of deviation change and apply reverse adjustment in advance before the deviation further increases. For example, when the viscosity measurement is rising rapidly, the derivative term will generate a negative adjustment command (i.e., reduce the neutralizing agent or reduce the stirring speed) to dampen the system and prevent overshoot. Because the online viscometer signal may contain noise, and the derivative term can easily amplify noise, in practical engineering, the feedback controller module 1023 applies an additional first-order low-pass filter to the derivative term output to suppress high-frequency interference.
[0061] After the proportional, integral, and derivative terms are calculated separately within the same control cycle, the feedback controller module 1023 adds them together to obtain the original feedback control command. This command is also limited: its absolute value must not exceed 30% of the actuator's maximum adjustable range to ensure that the feedback command plays a supporting corrective role relative to the feedforward command, avoiding excessive feedback intervention. The value after limitation is the final output feedback control command.
[0062] When the raw material flow rate and neutralizing agent flow rate are stable and without step disturbances, the feedforward controller module 1022 is idle, and its output feedforward compensation command is zero. At this time, the feedback controller module 1023 independently undertakes the control task: it continuously calculates the deviation between the real-time viscosity measurement value and the set point according to the control cycle, and outputs feedback adjustment commands to stabilize the viscosity within the target range. Due to the existence of the integral term, the feedback controller can completely eliminate steady-state error caused by temperature drift, raw material batch differences, etc. Assuming that the raw material flow rate suddenly increases, the feedforward controller module 1022 detects the step disturbance within 50 milliseconds, calculates the predicted viscosity deviation according to the method described in step two, and then converts it into a feedforward compensation command. This command is sent to the execution adjustment module 101 less than 100 milliseconds after the disturbance occurs, for example, increasing the amount of neutralizing agent added or reducing the stirring speed to offset the viscosity increase trend caused by the increase in raw material flow rate. At this time, the online viscometer has not yet detected any change because the material is still being transported in the pipeline. Simultaneously with the output of the feedforward compensation command, the feedforward controller module 1022 sends a "feedforward activation" flag to the feedback controller module 1023. Upon receiving this flag, the feedback controller module 1023 enters a mode that temporarily suppresses integral accumulation: in this mode, the feedback controller still calculates the proportional and derivative terms normally and outputs feedback adjustment commands, but its integral accumulator stops updating (i.e., the integral term is frozen). This is because the feedforward compensation command is expected to cause a viscosity change within the next few seconds, and the real-time viscosity measurement seen by the feedback controller has not yet reflected this change. If integration continues, it will lead to a double effect of feedforward and feedback, causing overshoot. The suppression time is preset to the average residence time of the gel from the neutralizer addition point to the online viscometer, for example, 10 seconds. Meanwhile, the proportional and derivative terms of the feedback controller module 1023 still operate, because the proportional term can respond instantly to any unexpected fluctuations, and the derivative term can dampen any overshoot that feedforward may cause. After a period equal to the average residence time, the effect of the feedforward compensation command begins to appear in the online viscometer measurement. At this point, the feedforward activation flag is cleared, and the feedback controller module 1023 exits the integral suppression mode. If the feedforward compensation is perfectly accurate, the real-time viscosity measurement should have returned to near the setpoint, and the integral accumulator will slowly adjust from zero to eliminate minor steady-state errors. If there is an error in the feedforward compensation (e.g., the prediction model is not accurate enough), the real-time viscosity measurement will still have a certain deviation. The integral accumulator of the feedback controller module 1023 will begin to accumulate this deviation after exiting suppression and output additional feedback adjustment commands, superimposed on the feedforward commands, until the deviation is completely eliminated.
[0063] S4. The feedforward compensation command and the feedback adjustment command are matched by type and converted into equivalent values and then superimposed. The final execution commands are sent to the electronically controlled regulating valve, the variable frequency metering pump and the stirring frequency converter respectively to perform multi-modal collaborative control.
[0064] Specifically, the execution control module 101 contains three independent but cooperative actuators: Electro-controlled regulating valve: Installed on the neutralizer addition pipeline, it is used to continuously adjust the flow cross-sectional area of the neutralizer, thereby changing the addition flow rate. This valve uses an electro-pneumatic or electric actuator, with an input signal of a standard 4 to 20 mA current signal or a 0 to 10 volt voltage signal, corresponding to a valve opening from fully closed to fully open.
[0065] Variable frequency metering pump: Also installed on the neutralizer addition pipeline, it is connected in series or parallel with the electrically controlled regulating valve. When more precise or faster flow regulation is required, the variable frequency metering pump adjusts the output flow by changing the pump speed. The drive motor of the variable frequency metering pump is connected to a frequency converter, which receives frequency commands (typically 0 to 50 Hz or 0 to 100 Hz analog or digital signals) from the central control server 102.
[0066] Frequency converter: Installed on the stirring motor of the mixing and homogenizing unit, it is used to adjust the stirring speed. The frequency converter receives frequency commands from the central control server 102 to change the rotational speed of the stirring motor, thereby changing the shear strength experienced by the gel during the mixing process.
[0067] All three actuators mentioned above are redundantly configured: the amount of neutralizing agent added can be controlled by either a regulating valve or a variable frequency metering pump; both can be used individually or in combination, depending on the process requirements. The stirring variable frequency drive serves as an independent control channel.
[0068] The instruction stacking employs a weighted selective stacking strategy, and the specific stacking process is as follows: When outputting commands, the feedforward controller module 1022 and the feedback controller module 1023 not only output numerical values but also attach a command type label, which indicates the type of actuator the command targets: "neutralizer regulating valve," "variable frequency metering pump," or "stirring frequency converter." Since the two controllers may output commands targeting different types of actuators (e.g., a feedforward command requires adjustment of a regulating valve, while a feedback command requires adjustment of the stirrer), they cannot be directly added. Therefore, the command fusion and arbitrator 1024 first converts the two commands into an equivalent change in the same physical quantity.
[0069] The conversion uses an equivalent conversion coefficient table pre-stored in the central control server 102. For example, if the feedforward instruction is "change in valve opening by +5%" and the feedback instruction is "change in stirring frequency by -2 Hz", the arbitrator will look up the coefficient that "change in valve opening by 1%" is equivalent to "change in stirring frequency by how many Hz" based on the current gel formulation and temperature. If this coefficient is 0.3, then the feedforward instruction is equivalent to a change in stirring frequency of +1.5 Hz, and the feedback instruction is -2 Hz. The sum of the two is -0.5 Hz, and the final output is a change in stirring frequency of -0.5 Hz. If the two instructions target the same type of actuator (e.g., both target the control valve), they are directly algebraically added, but subsequent limiting processing is required.
[0070] For adjusting the amount of neutralizing agent added, the electronically controlled regulating valve and the variable frequency metering pump constitute a pair of redundant actuators. The arbitrator automatically selects the main regulating channel and the auxiliary regulating channel according to the current operating conditions. When viscosity deviations are large or changes drastically, a variable frequency metering pump with faster response speed is selected as the main channel, and an electronically controlled regulating valve is selected as the auxiliary channel. When steady-state precise regulation is required, the regulating valve is selected as the main channel, and the variable frequency metering pump is selected as the auxiliary channel. By default, feedforward commands are preferentially assigned to the variable frequency metering pump (because of its fast response), and feedback commands are preferentially assigned to the regulating valve (because of its smooth regulation and no pulsation), but the arbitrators can be interchanged according to the actual situation.
[0071] After completing instruction type matching and primary / secondary channel allocation, the arbitrator calculates the total instructions finally sent to each executor according to the following rules: For the actuator selected as the main channel: it receives the algebraic sum of feedforward compensation commands and feedback adjustment commands, but the weighting coefficient of the feedback commands is adjustable. When the viscosity deviation is large (e.g., exceeding 50% of the target range width), the weight of the feedback commands is set to 1.0, i.e., fully superimposed; when the viscosity deviation is small, the weight of the feedback commands is set to 0.5 to weaken the correction intensity of the feedback and avoid frequent actuator operation.
[0072] For actuators selected as auxiliary channels: only a portion of the feedback adjustment command (e.g., weight 0.3 to 0.5) is received, and the auxiliary channel is activated only when the adjustment amount of the primary channel exceeds 80% of its maximum capacity. This design ensures coordination between redundant actuators and avoids them acting in opposite directions.
[0073] For the stirring inverter: it independently receives the superimposed commands, but these commands only contain the stirring-related command components from the feedforward and feedback. Since the effect of stirring speed on viscosity is bidirectional (increasing the speed may reduce viscosity due to shear thinning, or it may promote thickening due to increased mixing uniformity, depending on the rheological type of the gel), the arbiter stores stirring influence direction coefficients for different formulations to ensure the correct command direction.
[0074] After superposition and channel allocation, the total command value corresponding to each actuator needs to pass two safety limits: The first is an absolute limit: the opening command of the electrically controlled regulating valve must not be less than 5% (to prevent valve core jamming) and not more than 95%; the speed of the variable frequency metering pump must not be less than 10% of the rated speed and not more than 100%; the frequency of the stirring variable frequency drive must not be less than 15% of the motor's rated frequency (to prevent overheating) and not more than 110% of the rated frequency. The second is a rate limit: the command change rate of each actuator must not exceed the preset maximum step size. For example, the opening change of the electrically controlled regulating valve must not exceed 10% per second; the speed change of the variable frequency metering pump must not exceed 20% of the rated speed per second; and the stirring frequency change must not exceed 5 Hz per second. The rate limit is achieved by comparing the target command with the current actual command in each control cycle. If the difference exceeds the maximum step size, only the change corresponding to the maximum step size is output in this cycle, and the remaining part is carried over to the next cycle.
[0075] After processing by the instruction fusion and arbitrator 1024, the central control server 102 obtains three final instruction values: Valve position instruction: corresponding to the target opening percentage of the electronically controlled regulating valve; Pump speed instruction: corresponding to the target speed percentage (or target frequency) of the variable frequency metering pump; Agitation frequency instruction: corresponding to the target output frequency of the agitator inverter.
[0076] These three instruction values are stored digitally in the output image area of the central control server 102. The central control server 102 is equipped with multiple analog output channels and digital output channels, and the specific transmission method is as follows: The central control server 102 converts the valve position command (0 to 100%) into a 4 to 20 mA current signal via a digital-to-analog converter module. The conversion uses a linear correspondence: 0% corresponds to 4 mA, and 100% corresponds to 20 mA. This current signal is transmitted to the positioner of the electrically controlled regulating valve via a shielded twisted-pair cable. After receiving the current signal, the positioner converts it into a pneumatic signal (20 to 100 kPa) or an electric drive signal to move the valve stem to the target opening. The entire signal transmission loop has a disconnection detection function: if the current signal is below 3.6 mA or above 20.5 mA, the valve automatically enters a safe position (usually fully closed or a preset fail-safe opening).
[0077] The variable frequency metering pump is driven by its matching frequency converter. The central control server 102 sends the pump speed command (0 to 100%) to the analog input terminal of the frequency converter. It also uses a 4 to 20 mA signal, corresponding to 0 to 100% speed. The frequency converter internally adjusts the output frequency based on this signal, thereby changing the speed of the metering pump motor. To ensure metering accuracy, the speed feedback signal of the variable frequency metering pump (acquired through an encoder or Hall sensor) is simultaneously transmitted back to the central control server 102, forming a partial closed loop. When sending the pump speed command, the central control server 102 compares the command value with the actual feedback value; if the deviation exceeds 5%, an alarm is triggered.
[0078] The signal transmission method of the agitator inverter is similar to that of the variable frequency metering pump, but the agitator inverter typically uses a 0 to 10 volt voltage signal or digital communication (such as Modbus RTU or PROFIBUS DP). The central control server 102 converts the agitation frequency command (e.g., 0 to 50 Hz) into a 0 to 10 volt voltage signal through the analog output channel and transmits it to the analog input terminal of the agitator inverter. The inverter adjusts the output frequency according to this voltage value to control the speed of the agitator motor. At the same time, the inverter transmits the actual output frequency, motor current, and torque signals back to the central control server 102 through the communication interface to monitor whether the agitation power is consistent with the measurement value of the torque sensor.
[0079] All signal transmissions are completed within each control cycle, with the cycle duration set according to the actuator's response speed: the instruction update cycle for the electronically controlled regulating valve and the variable frequency metering pump is 0.2 seconds; the instruction update cycle for the stirring variable frequency drive is 0.5 seconds (because the effect of stirring speed changes on viscosity is relatively slow).
[0080] Multimodal collaborative control refers to the automatic switching or mixed use of three actuator control modes according to different stages and operating conditions of gel production to achieve optimal viscosity control. This invention defines the following five operating modes, which are automatically selected by the central control server 102 based on process conditions and feedforward / feedback status: Mode 1: Neutralizer-dominated mode, suitable for normal steady-state production conditions. In this mode, viscosity deviation is small, and the system prioritizes adjusting the neutralizer dosage by regulating the electronically controlled valve or variable frequency metering pump, thereby adjusting the viscosity. The stirring speed remains constant at the set value in the formula. In this mode, both feedforward compensation commands and feedback adjustment commands are assigned only to the neutralizer adjustment channel. The advantages of this mode are direct adjustment and low energy consumption.
[0081] Mode 2: Stirring-Assisted Mode. When viscosity deviation persists, but the neutralizer addition is approaching the upper or lower limit of process safety (e.g., the neutralizer flow rate has reached 90% of the maximum allowable addition ratio), the system automatically enters the stirring-assisted mode. In this mode, the neutralizer channel continues to perform the main regulation task, while the stirring frequency converter receives some regulation commands to assist in viscosity regulation by changing the stirring speed. For example, when the viscosity is too high and the neutralizer cannot be reduced further, the stirring speed is moderately increased to reduce the viscosity using the shear thinning effect. The command allocation ratio between the two channels is dynamically calculated by the arbitrator based on the current deviation magnitude and the remaining neutralizer amount.
[0082] Mode 3: Pure stirring mode. In case of emergencies, such as low neutralizer tank level or neutralizer pipeline blockage, the system automatically switches to pure stirring mode. In this mode, the amount of neutralizer added remains constant, and all viscosity adjustment is handled by the stirring frequency converter. Although the adjustment range is limited in this mode, it can maintain continuous production until the fault is resolved. The central control server 102 simultaneously issues an alarm to alert operators to handle the neutralizer malfunction.
[0083] Mode 4: Fast Feedforward Mode. When the feedforward controller detects a severe step disturbance in flow, the system temporarily enters the fast feedforward mode. In this mode, the arbitrator sends the feedforward compensation command with the highest priority to the fastest responding actuator (usually a variable frequency metering pump), while the feedback regulation command is temporarily suppressed (the integral term is frozen, the proportional and derivative terms still operate but the output limit is further reduced). The duration of this mode is equal to the mean residence time, and it automatically exits after it ends. This mode ensures that the speed of the feedforward is not disturbed by feedback.
[0084] Mode 5: Self-calibrating mode. When the absolute value of the integral accumulator of the feedback controller module 1023 exceeds a preset threshold (e.g., reaching 20% of the actuator's maximum adjustment range), it indicates a systematic deviation in the viscosity prediction model. The system enters self-calibrating mode: the central control server 102 initiates the online model update algorithm described in step 5, and temporarily outputs the integral term of the feedback command as the model calibration signal. In this mode, the feedforward controller is temporarily disabled, and viscosity stability is maintained entirely by the feedback controller until the model update is completed, at which point the feedforward function is restored.
[0085] To achieve seamless switching between different modes, the central control server 102 employs output tracking and bumpless switching technology. Specifically, in each control cycle, the arbitrator calculates the target command value for the current mode and simultaneously calculates the initial command value required to switch to the backup mode. When the mode switching conditions are met, the arbitrator does not immediately jump to the command, but rather linearly transitions the current command value to the target mode command value within a transition time (e.g., 5 to 10 control cycles). The transition rate is limited by the actuator's maximum response speed. For the integral accumulator, its value is reset to the value required by the feedback adjustment command just moments before the switch during mode switching, avoiding abrupt changes in the integral term at the moment of switching.
[0086] S5. During the transition state after formula switching, increase the proportional gain coefficient of the feedback controller module 1023, and at the same time use the recursive least squares algorithm to update the weight coefficients of the viscosity prediction model online.
[0087] Specifically, the human-machine interface of the central control server 102 has a "Recipe Switching" operation button. Before starting the switch, the operator needs to select the new recipe number from the recipe library and enter the target viscosity range of the new recipe (such as the lower and upper limits) and initial process parameters (including the initial addition ratio of neutralizer, the initial setting of stirring speed, and the temperature setting). After the operator confirms the start of the switch, the central control server 102 enters the recipe switching transition state. The duration of this state is preset by the operator according to the pipeline length and cleaning time, and is usually set to two to three times the average residence time.
[0088] During the recipe switching transition, the central control server 102 performs the following three actions: First, the proportional gain coefficient of the feedback controller module 1023 is temporarily increased to 1.2 to 1.5 times the steady-state value, and the integral gain coefficient is temporarily increased to 1.1 to 1.3 times the steady-state value, while the derivative gain coefficient remains unchanged or is slightly reduced (to avoid noise amplification).
[0089] Second, temporarily disable the feedforward controller module 1022, that is, stop feedforward compensation for flow disturbances, because the viscosity prediction model of the old formula is no longer applicable to the new formula. If feedforward compensation is continued to be used at this time, it may introduce erroneous instructions.
[0090] Third, the output limit of the execution adjustment module 101 is temporarily relaxed: the opening change of the electronically controlled regulating valve is allowed to be expanded from ±20% to ±35%, and the change of the stirring frequency is allowed to be expanded from ±10% to ±18%, so as to give the feedback controller greater adjustment capability.
[0091] The proportional gain coefficient of the feedback controller module 1023 is set to a relatively conservative value during steady-state operation to ensure the stability margin of the system. However, in the initial stage after a formula change, the gel viscosity may deviate drastically from the target range, requiring stronger feedback to quickly pull the viscosity back. Temporarily increasing the proportional gain coefficient to 1.2 to 1.5 times means that when the viscosity deviation is the same, the adjustment command output by the proportional term is 20% to 50% larger than in steady-state, thereby accelerating the response speed.
[0092] Meanwhile, temporarily increasing the integral gain coefficient can accelerate the establishment of the integral accumulator, enabling the system to eliminate steady-state residual deviations more quickly. However, the integral gain should not be increased excessively, otherwise it may easily cause integral saturation. This invention adopts an adaptive rule: the temporary increase factor of the integral gain is positively correlated with the absolute value of the current viscosity deviation—the larger the deviation, the higher the increase factor, but not exceeding 1.3 times.
[0093] To prevent excessive spikes in the differential term due to a step change in the viscosity signal during the switching process, the central control server 102 temporarily multiplies the differential gain coefficient by an attenuation factor, such as 0.5, during the first three control cycles after entering the formula switching transition state, and then gradually restores it to the normal value.
[0094] The formula switching transition will not last indefinitely. The central control server 102 monitors real-time viscosity measurements and exits the transition state and resumes normal production when either of the following two conditions is met: Condition 1: The real-time viscosity measurement value remains stable within the target viscosity range for five consecutive control cycles, and the absolute value of the deviation from the set point is less than 10% of the width of the target range.
[0095] Condition 2: The duration of the formula switching transition state has reached the preset maximum duration (usually three times the average residence time). At this point, regardless of whether the viscosity is stable, the transition state is forcibly exited to avoid system instability caused by prolonged use of excessive gain.
[0096] After exiting the transition state, the gain coefficient of the feedback controller module 1023 returns to the steady-state value, the feedforward controller module 1022 is reactivated (but the viscosity prediction model may have been partially updated at this time), and the output limiting of the execution adjustment module 101 returns to the normal range.
[0097] After the formulation switchover transition is completed, or when model errors accumulate due to the slow drift of raw material batch characteristics during production, the central control server 102 initiates the online model update function. This function uses a recursive least squares algorithm to update the weight coefficients within the viscosity prediction model. To avoid using mathematical formulas, each step of the update process is described in detail below using engineering language.
[0098] The viscosity prediction model described in the second step of this invention is a nonlinear mapper, the core of which can be understood as a network with multiple internal nodes. Each node corresponds to a basis function (e.g., a radial basis function), and each basis function has a center position and a width parameter. The model's output (i.e., the viscosity prediction value) is obtained by summing the distances between the input vector (normalized feed flow rate, neutralizer flow rate, gel temperature, and stirring power) and each basis function as intermediate variables, multiplied by their respective weight coefficients. To simplify the complexity of online updates, in practical engineering implementations, the center position and width of the basis functions are usually fixed, and only the weight coefficients corresponding to each basis function are updated, because these weight coefficients directly determine the contribution of each basis function to the final output.
[0099] The number of weight coefficients depends on the complexity of the model, typically ranging from twenty to fifty. Each weight coefficient can be understood as a "response strength" of the model to a specific input pattern. Arranging all weight coefficients in a fixed order forms a weight coefficient vector, which fully describes the model's behavior at the current time step.
[0100] The core idea of the recursive least squares method is that whenever the system obtains a new set of real data (i.e., the real-time viscosity measurement value at the current moment), it uses this new data to correct the current weight coefficients, making the output of the corrected model under the input conditions closer to the real measurement value. Unlike batch calculations using all historical data at once, the recursive method only needs to retain a matrix that compresses historical information (called the covariance matrix), and each update requires only a small amount of computation, making it very suitable for real-time execution by embedded controllers.
[0101] The specific execution process for online updates is as follows: Step A: Determine if the update trigger condition is met. Online model updates are not performed in every control cycle, but only when one of the following conditions is met: Condition 1: The absolute value of the integral accumulator of the feedback controller module 1023 exceeds a preset threshold (e.g., reaching 20% of the actuator's maximum adjustment range), indicating a systematic deviation in the model. Condition 2: The formula switching transition has ended, but the model for the new formula has not yet been initialized and needs to adapt from scratch or from a general model. Condition 3: The operator manually activates the model self-learning function, for example, after changing to a new batch of raw materials. Condition 4: An update is automatically triggered every fixed production duration (e.g., 30 minutes) to track slow changes.
[0102] Step B: Collect valid data pairs for the current moment. When the update trigger condition is met, the central control server 102 reads a set of aligned data from the real-time database for the current moment, including: normalized instantaneous flow rates of raw materials, instantaneous flow rates of neutralizing agents, real-time gel temperature, and real-time stirring power (these four quantities serve as inputs to the model), as well as the corresponding real-time viscosity measurement (serving as the expected output of the model). To ensure the validity of the updated data, the system checks whether the current moment is under stable operating conditions: that is, the fluctuations in flow rate, temperature, and power over the past three control cycles are all less than 2% of their respective ranges, and the viscosity measurement is not in an abnormal jump state. Only data pairs that pass the validity check are used for updating.
[0103] Step C: Calculate the prediction error of the current model. Input the collected model data into the current viscosity prediction model (using the old weighting coefficients) to calculate a predicted viscosity value. Subtract this predicted viscosity value from the real-time viscosity measurement value to obtain the prediction error. The sign and magnitude of this error reflect the degree of deviation of the model under the current operating conditions: a positive error indicates that the model's predicted value is too low, requiring an increase in some weighting coefficients to improve the predicted value; a negative error indicates that the model's predicted value is too high, requiring a decrease in the weighting coefficients.
[0104] Step D: Determine the adjustment amount for each weight coefficient. The key to the recursive least squares algorithm is that when updating the weight coefficients, instead of adjusting all coefficients proportionally, it allocates a different adjustment amount to each weight coefficient based on the degree of matching between the current input vector and each basis function, as well as the amount of information accumulated from historical data. Specifically: First, the central control server 102 internally maintains a covariance matrix with the same dimension as the weight coefficient vector. Each element of this matrix represents the uncertainty and correlation between different weight coefficients. When the system is first started, this matrix is initialized as a matrix with large diagonal elements and zero off-diagonal elements, indicating that the initial estimate of the weight coefficients is very uncertain, so the update step size can be large.
[0105] Secondly, the response strength of each basis function to the current input vector is calculated (i.e., the output value of the basis function, which is between 0 and 1). The larger the response strength of the basis function, the closer the current input is to the center of the basis function, and the greater the influence of its corresponding weight coefficient on the current predicted value. Therefore, it should be given a larger correction amount. The basis function with a response strength close to zero has almost no influence on the current predicted value, and its correction amount should be close to zero.
[0106] Then, based on the information from the current covariance matrix, the correction step size factor for each weight coefficient is calculated. This factor takes into account historical information: if a weight coefficient has been updated multiple times in history and has a high confidence level (corresponding to a smaller diagonal element in the covariance matrix), the current correction step size should be smaller to avoid over-correction; conversely, if the weight coefficient has not been fully learned (the diagonal element in the covariance matrix is larger), the correction step size should be larger.
[0107] Step E: Update the weight coefficients. Multiply the prediction error by the correction step size factor corresponding to each weight coefficient to obtain the change in that weight coefficient. Add this change to the old weight coefficients to obtain the updated weight coefficients. After the update, the model's output under the current input will move one step closer to the real-time viscosity measurement. Because the correction step size factor is reasonably allocated, the update process will not oscillate and diverge due to an excessively large step size, nor will it converge too slowly due to an excessively small step size.
[0108] Step F: Update the covariance matrix. After updating the weight coefficients, the covariance matrix also needs to be updated according to the recursive least squares rule to reflect the reduction in uncertainty of each weight coefficient after this update. The update of the covariance matrix adopts a correction form to prevent numerical decay: after each update, the value of the covariance matrix is scaled according to a forgetting factor close to 1, so that the influence of historical data gradually decays. The value of the forgetting factor is usually between 0.95 and 0.99. The smaller the value, the stronger the model's dependence on recent data and the faster the forgetting of old data, which is suitable for rapid adaptation to the new formula after formula switching; the larger the value, the more stable the model, which is suitable for slow drift tracking under long-term steady-state production. In this invention, the central control server 102 automatically sets the forgetting factor to 0.95 to accelerate adaptation in the first ten update cycles after the formula switching transition state ends, and then restores it to 0.99 to maintain stability.
[0109] Step G: Convergence Judgment and Update Stopping Conditions. After each update, the central control server 102 calculates whether the absolute value of the prediction error is less than a preset convergence threshold (e.g., 5% of the target viscosity range width). If the absolute value of the prediction error is less than this threshold in five consecutive updates, and the average change in the weight coefficients is less than 1% of the initial absolute value of the weight coefficients, then the model is determined to have converged to the true characteristics of the current formulation. Batch updates after this formulation switch are stopped, and only fine-tuning updates are performed at fixed time intervals (e.g., 30 minutes).
[0110] For entirely new formulations (i.e., formulations never produced on this production line), there are no available old model parameters. In this case, the central control server 102 employs a model initialization method based on similar formulation migration: when the operator inputs a new formulation into the formulation library, they simultaneously specify an existing formulation closest to the new one as a reference formulation. The central control server 102 uses the viscosity prediction model weight coefficients of the reference formulation as the initial weight coefficients of the new formulation, and sets the diagonal elements of the covariance matrix to twice the corresponding values of the reference formulation (indicating higher initial uncertainty). If no similar reference formulation is available, a general default model is used, which assumes that the effects of the four input variables on viscosity are linear and at intermediate values. The initial weight coefficients of the general model are obtained through pre-training with offline experimental data. This initialization strategy significantly reduces the time required for the model to learn from scratch, allowing the viscosity of the new formulation to reach stable control within fewer residence periods.
[0111] The second embodiment of this application is as follows: Please see Figure 3 This invention provides an online viscosity control system for a continuous production process of antibacterial gel, applied to an online viscosity control method for a continuous production process of antibacterial gel as provided in the first embodiment, comprising: The control module 101 includes a command-based control electronic control valve, a variable frequency metering pump, and a stirring frequency converter. The central control server 102 integrates a data acquisition module 1021, a feedforward controller module 1022, a feedback controller module 1023, and an instruction fusion and arbitrator 1024. The data acquisition module 1021 is used to achieve time alignment of multi-sensor data through hardware synchronization pulses and response time compensation, and generate a multi-dimensional process variable vector. The feedforward controller module 1022 is used to calculate feedforward compensation commands based on the flow step disturbance and viscosity prediction model. The feedback controller module 1023 is used to calculate feedback adjustment commands according to the deviation between the real-time viscosity measurement value and the target range using a proportional integral derivative algorithm, and can selectively freeze the integral accumulator when the feedforward is activated. The instruction fusion and arbitrator 1024 is used to perform type matching, equivalent conversion and superposition of feedforward compensation instructions and feedback adjustment instructions, and to distribute and send the final instructions to the execution adjustment module 101 in accordance with the multimodal collaborative control strategy.
[0112] Regarding the system in the above embodiments, the specific ways in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0113] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0114] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. An online viscosity control method in the continuous production process of antibacterial gel, characterized in that, Includes the following steps: A first flow meter, a second flow meter, a temperature sensor, a stirring power sensor, and an online viscometer are installed on the discharge pipes of the raw material feeding unit, the neutralizer addition unit, and the mixing and homogenizing unit, respectively. The measured values of each sensor are latched by a unified hardware synchronous pulse, and dynamic compensation and alignment are performed according to the response time constant of each sensor to generate a multi-dimensional process variable vector with a unified timestamp. When a step change in the instantaneous flow rate of raw materials or neutralizer exceeding a preset threshold is detected, the pre-stored viscosity prediction model is invoked. Based on the flow rate values before and after the change, the current gel temperature, and the stirring power, the predicted viscosity deviation is calculated and converted into a feedforward compensation command. The real-time viscosity measurement value obtained by the online viscometer is acquired with a fixed control cycle, compared with the target viscosity range, and a feedback adjustment command is calculated according to the proportional-integral-derivative control algorithm. When the feedforward compensation command is active, the integral accumulator of the feedback controller module is temporarily frozen. The feedforward compensation command and the feedback adjustment command are matched by type and converted into equivalent values and then superimposed. The final execution commands are then sent to the electronically controlled regulating valve, the variable frequency metering pump and the stirring frequency converter to perform multi-modal collaborative control.
2. The online viscosity control method in the continuous production process of antibacterial gel as described in claim 1, characterized in that, The method further includes: During the transition period after formula switching, the proportional gain coefficient of the feedback controller module is increased, and the weight coefficients of the viscosity prediction model are updated online using a recursive least squares algorithm.
3. The online viscosity control method in the continuous production process of the antibacterial gel as described in claim 1, characterized in that, The viscosity prediction model consists of an input normalization layer, a nonlinear mapping core, and an output denormalization layer. Its inputs are the normalized raw material flow rate, neutralizer flow rate, gel temperature, and stirring power, and its output is the viscosity prediction value. When a flow step disturbance is detected, the disturbance scenario comparison method is adopted. The stable flow value before the disturbance and the flow value after the disturbance are used together with the current constant temperature and power to construct a baseline scenario vector and a disturbance-after scenario vector. The two vectors are input into the viscosity prediction model to obtain the baseline viscosity prediction value and the disturbance-after viscosity prediction value. The difference between the two is the predicted viscosity deviation.
4. The online viscosity control method in the continuous production process of the antibacterial gel as described in claim 3, characterized in that, The method further includes: Based on the segmented range of the current gel temperature and stirring power, the neutralizer flow rate change coefficient or stirring speed change coefficient required for the unit viscosity deviation is retrieved from the pre-stored reverse sensitivity table. The predicted viscosity deviation is multiplied by this coefficient to obtain the target flow rate change or the target speed change. Then, based on the valve characteristic curve or the frequency converter characteristics, it is converted into the percentage change of the opening of the electronic control regulating valve or the change of the stirring frequency. Finally, the compensation amount is limited in amplitude and rate before being output.
5. The online viscosity control method in the continuous production process of the antibacterial gel as described in claim 1, characterized in that, The control cycle duration is set to be less than one-fifth of the average residence time of the gel from the neutralizer addition point through the mixing and homogenizing unit to the online viscometer installation position; When the feedforward controller module receives the feedforward activation flag, the feedback controller module freezes the integral accumulator for a duration equal to the average dwell time, while maintaining the normal calculation and output of the proportional and derivative terms. After exiting integral suppression, the integral accumulator starts accumulating the residual deviation from the current value, gradually eliminating the steady-state error.
6. The online viscosity control method in the continuous production process of the antibacterial gel as described in claim 1, characterized in that, The feedforward compensation command and the feedback adjustment command are superimposed after type matching and equivalent conversion, and then the final execution commands are sent to the electronically controlled regulating valve, the variable frequency metering pump, and the stirring frequency converter, respectively, to perform multi-modal coordinated control, including: Based on the instruction type labels attached to the feedforward compensation instruction and the feedback adjustment instruction, the instructions for different actuators are uniformly converted into equivalent changes of the same physical quantity through the equivalent conversion coefficient table, and then algebraic superposition is performed. For adjusting the amount of neutralizer added, the variable frequency metering pump is automatically selected as the main channel and the electronically controlled regulating valve is selected as the auxiliary channel according to the viscosity deviation, or vice versa. After being superimposed and subjected to absolute amplitude and rate limits, the total command is sent to the positioner of the electronic control valve, the frequency converter of the variable frequency metering pump, and the frequency converter of the mixer via a 4-20 mA current signal or a 0-10 V voltage signal, respectively.
7. The online viscosity control method in the continuous production process of the antibacterial gel as described in claim 1, characterized in that, The multimodal collaborative control includes five operating modes: neutralizer-dominated mode, stirring-assisted mode, pure stirring mode, fast feedforward mode, and self-calibrating mode; The current mode is automatically selected based on the viscosity deviation, whether the amount of neutralizer added is equal to the process safety limit, the activation status of the feedforward controller, and the value of the model integral accumulator.
8. The online viscosity control method in the continuous production process of antibacterial gel as described in claim 2, characterized in that, During the recipe switching transition, the proportional gain coefficient of the feedback controller module increases to 1.2 to 1.5 times the steady-state value, the integral gain coefficient temporarily increases to 1.1 to 1.3 times the steady-state value, and the derivative gain coefficient temporarily decreases to 0.5 times the normal value in the first three control cycles. At the same time, the feedforward controller module is temporarily disabled. When the real-time viscosity measurement value remains stable within the target viscosity range for five consecutive control cycles or when the duration of the transition state reaches the preset maximum duration, the transition state is exited and the steady-state parameters are restored.
9. The online viscosity control method in the continuous production process of the antibacterial gel as described in claim 1, characterized in that, The recursive least squares algorithm is used to update the weight coefficients of the viscosity prediction model online as follows: Obtain a pre-defined covariance matrix with the same dimension as the weight coefficients. When the update trigger condition is met, collect the valid data pairs at the current time, calculate the prediction error of the current model, and assign different correction amounts to each weight coefficient according to the response intensity of the current input vector and each basis function and the correction step size factor determined by the covariance matrix. Add the correction amount to the old weight coefficients to obtain the updated new weight coefficients, and then update the covariance matrix according to the forgetting factor. During the first ten update cycles after the recipe switching transition ends, the forgetting factor is 0.95, and then returns to 0.
99.
10. An online viscosity control system for a continuous production process of antibacterial gel, applied to the online viscosity control method for the continuous production process of antibacterial gel as described in claim 1, characterized in that, include: The control module includes a command-based control electronically controlled regulating valve, a variable frequency metering pump, and a stirring frequency converter; The central control server integrates a data acquisition module, a feedforward controller module, a feedback controller module, and an instruction fusion and arbitrator. The data acquisition module is used to achieve time alignment of multi-sensor data through hardware synchronization pulses and response time compensation, and to generate a multi-dimensional process variable vector. The feedforward controller module is used to calculate the feedforward compensation command based on the flow step disturbance and viscosity prediction model; The feedback controller module is used to calculate feedback adjustment commands based on the deviation between the real-time viscosity measurement value and the target range using a proportional-integral-derivative algorithm, and can selectively freeze the integral accumulator when the feedforward is activated. The instruction fusion and arbitrator is used to perform type matching, equivalent conversion and superposition of feedforward compensation instructions and feedback adjustment instructions, and to distribute and send the final instructions to the execution adjustment module according to the multimodal collaborative control strategy.