Control method, device and equipment of online liquid preparation system and medium
By constructing a transfer function model and a fuzzy PID controller, the control parameters of the liquid preparation system are dynamically adjusted, solving the problem of decreased control performance in existing technologies and achieving high-precision and high-robust liquid preparation control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-10
AI Technical Summary
Existing control methods for liquid preparation systems suffer from reduced control performance when faced with nonlinear, time-varying, and large time-delay characteristics, and lack systematic design basis, making it difficult to achieve accurate and stable control.
By employing an optimized algorithm and an improved objective cost function, and constructing a transfer function model and a fuzzy PID controller, the liquid preparation control parameters are dynamically adjusted, and adaptive adjustment is performed in conjunction with the system identification results.
It significantly improves control precision and response accuracy, enhances robustness, effectively addresses system nonlinearity and time-varying characteristics, reduces overshoot and oscillation, and achieves precise and stable control of the liquid preparation system.
Smart Images

Figure CN121832290A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial process automatic control, and in particular to a control method, apparatus, equipment and medium for an online liquid preparation system. Background Technology
[0002] Liquid preparation is a crucial step in many process industries, including pharmaceuticals, chemicals, food and beverage, and water treatment. Its core task is to mix two or more liquid raw materials in a predetermined ratio and sequence to ensure that the final product's key quality indicators, such as concentration, pH, conductivity, and flow rate, meet stringent process requirements. However, this process exhibits significant nonlinearity, time-varying characteristics, and large time lag, and is easily affected by fluctuations in inlet flow rate and concentration, making control challenging.
[0003] Currently, industrial liquid preparation systems mostly employ traditional PID control. Because its parameters remain fixed, it cannot adaptively adjust during system dynamics, leading to decreased control performance and frequent problems such as excessive overshoot and slow response. While fuzzy PID control can improve performance, the design of controller parameters and rules in these methods relies heavily on experience, lacking a systematic design basis. Furthermore, conventional system identification methods have limited accuracy in dealing with nonlinearity and noise interference, and the identification process is often disconnected from control design, failing to fully utilize model information to guide controller optimization. In addition, existing methods lack theoretical guarantees for control system stability, relying primarily on trial-and-error methods and simulation verification.
[0004] In summary, how to accurately and stably control the liquid preparation control parameters (i.e., the controlled variables) of the liquid preparation system has become an urgent problem to be solved. Summary of the Invention
[0005] The purpose of this application is to provide a control method, device, equipment, and medium for an online liquid preparation system, which can achieve precise and stable control of the liquid preparation control parameters of the liquid preparation system.
[0006] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a control method for an online liquid preparation system, comprising: Obtain the actual index parameter values of the online solution preparation system under the solution preparation control parameters at the current moment; Input the actual index parameter value and the target index parameter value at the current moment into the fuzzy PID controller at the current moment to obtain the control quantity of the liquid preparation control parameter at the current moment; The solution preparation control parameters are adjusted for the next moment based on the control amount of the solution preparation control parameters. The method for determining the fuzzy PID controller includes: Obtain the preparation dataset of the online solution preparation system during the preparation process; the preparation dataset includes: a sequence of solution preparation control parameters and a sequence of index parameters; Based on the prepared dataset, a transfer function model of the online solution preparation system is constructed, and the model parameters in the transfer function model are identified by the system response characteristics to obtain the initial parameter values. Considering the mean squared error of the transfer function model, the penalty term for changes in control parameters, and the regularization term for model parameters, construct the objective cost function; Based on the initial parameter values and the target cost function, an optimization algorithm is used to iteratively optimize the model parameters in the transfer function model to obtain the optimal model parameters of the transfer function model. The initial PID control parameters are determined based on the optimal model parameters. Based on the initial PID control parameters, the fuzzy PID controller at different times is determined using the fuzzy control principle.
[0007] In one embodiment, the expression for the target cost function is: ; in, This represents the value of the objective cost function; This represents the mean square error of the transfer function model; This indicates the change in the solution preparation control parameters; This represents the model parameter vector in the transfer function model; This indicates a penalty for changes in control parameters; This represents the L1 norm regularization term of the model parameter vector in the transfer function model; This represents the non-negative weighting coefficient corresponding to the mean square error; This represents the non-negative weight coefficient corresponding to the penalty term; This represents the non-negative weight coefficient corresponding to the regularization term; Indicates time.
[0008] In one embodiment, based on the initial parameter values and the target cost function, an optimization algorithm is used to iteratively optimize the model parameters in the transfer function model to obtain the optimal model parameters of the transfer function model, specifically including: For the k-th iteration, a quadratic programming subproblem for the k-th iteration is constructed based on the model parameters in the transfer function model of the k-th iteration; wherein, in the 1st iteration, a quadratic programming subproblem for the 1st iteration is constructed based on the initial parameter values; Solve the quadratic programming subproblem of the k-th iteration to obtain the optimal search direction for the k-th iteration, and use the search strategy to determine the step size for the k-th iteration; Calculate the model parameters in the transfer function model of the (k+1)th iteration based on the optimal search direction of the kth iteration and the step size of the kth iteration. Substitute the model parameters from the transfer function model of the k-th iteration and the model parameters from the transfer function model of the (k+1)-th iteration into the target cost function, respectively. Based on the target cost function value of the k-th iteration, the target cost function value of the (k+1)-th iteration, the model parameters in the transfer function model of the k-th iteration, the model parameters in the transfer function model of the (k+1)-th iteration, and the gradient norm of the target cost function value of the k-th iteration, determine whether the set iteration termination condition has been met in the k-th iteration. If so, the model parameters in the transfer function model of the (k+1)th iteration are determined as the optimal model parameters of the transfer function model; otherwise, a quadratic programming subproblem for the (k+1)th iteration is constructed based on the model parameters in the transfer function model of the (k+1)th iteration, and the next iteration is carried out.
[0009] In one embodiment, initial PID control parameters are determined based on the optimal model parameters. Based on these initial PID control parameters, a fuzzy PID controller is determined at different times using fuzzy control principles. Specifically, this includes: Obtain a validation dataset of the online solution preparation system during the preparation process; the validation dataset includes: a sequence of solution preparation control parameters for validation and a sequence of index parameters for validation; The accuracy of the transfer function model for determining the optimal model parameters is verified using the aforementioned validation dataset. If the accuracy of the transfer function model with the optimal model parameters meets the preset accuracy requirement, then the optimal model parameters are determined as the finally identified model parameters. Calculate the initial PID control parameters based on the finally identified model parameters; The deviation and deviation rate between the actual index parameter value and the target index parameter value at the current moment are input into the fuzzy PID controller. Based on the fuzzy control rule table, the fuzzy quantity of the PID control parameter is calculated using the fuzzy inference algorithm, and the fuzzy quantity is converted into a correction value. Calculate the corrected PID control parameters for the current time based on the PID control parameters of the previous time step and the correction value for the current time step; where the current time step is the initial time step, the PID control parameters of the previous time step are the initial PID control parameters. The fuzzy PID controller for the current moment is determined based on the corrected PID control parameters at the current moment.
[0010] In one implementation, the expression for the quadratic programming subproblem in the k-th iteration is: ; in, Indicates the search direction; This represents the approximation of the Hessian matrix by the k-th iteration; This represents the model parameter vector in the transfer function model of the k-th iteration; This represents the gradient of the objective cost function value in the k-th iteration; T Indicates transpose; This indicates that the minimum value is being sought.
[0011] In one embodiment, the setting of the iteration termination condition includes: a first termination condition, a second termination condition, or a third termination condition; The first termination condition is that the absolute value of the difference between the target cost function value of the (k+1)th iteration and the target cost function value of the kth iteration is less than a first set threshold. The second termination condition is that the norm of the difference between the model parameters in the transfer function model of the (k+1)th iteration and the model parameters in the transfer function model of the kth iteration is less than a second set threshold. The third termination condition is that the gradient norm of the objective cost function value in the k-th iteration is less than a third set threshold.
[0012] In one embodiment, constructing a transfer function model of the online solution preparation system based on the preparation data specifically includes: The configuration dataset is preprocessed to obtain a preprocessed configuration dataset; the preprocessing includes linear interpolation and filtering. Using the sequence of control parameters for liquid preparation in the preprocessed preparation dataset as input and the sequence of index parameters in the preprocessed preparation dataset as output, a first-order inertial pure time delay model is constructed. The first-order inertial pure time delay model is determined as the transfer function model of the online liquid preparation system.
[0013] Secondly, this application provides a control device for an online liquid preparation system, comprising: The data acquisition module is used to acquire the actual index parameter values of the online solution preparation system under the solution preparation control parameters at the current moment; The control quantity determination module is used to input the actual index parameter value and the target index parameter value at the current moment into the fuzzy PID controller at the current moment to obtain the control quantity of the liquid preparation control parameter at the current moment. The solution preparation parameter adjustment module is used to adjust the solution preparation control parameters for the next moment according to the control amount of the solution preparation control parameters. The method for determining the fuzzy PID controller includes: Obtain the preparation dataset of the online solution preparation system during the preparation process; the preparation dataset includes: a sequence of solution preparation control parameters and a sequence of index parameters; Based on the prepared dataset, a transfer function model of the online solution preparation system is constructed, and the model parameters in the transfer function model are identified by the system response characteristics to obtain the initial parameter values. Considering the mean squared error of the transfer function model, the penalty term for changes in control parameters, and the regularization term for model parameters, construct the objective cost function; Based on the initial parameter values and the target cost function, an optimization algorithm is used to iteratively optimize the model parameters in the transfer function model to obtain the optimal model parameters of the transfer function model. The initial PID control parameters are determined based on the optimal model parameters. Based on the initial PID control parameters, the fuzzy PID controller at different times is determined using the fuzzy control principle.
[0014] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the control method of the online liquid preparation system described in any one of the above.
[0015] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the control method of the online liquid preparation system described in any one of the above descriptions.
[0016] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a control method, device, equipment, and medium for an online liquid preparation system. By employing an optimization algorithm and an improved objective cost function (considering the mean square error of the transfer function model, the penalty term for control parameter changes, and the regularization term of the model parameters), the model parameters are accurately identified to obtain a transfer function model that accurately characterizes the dynamic characteristics of the online liquid preparation system. This provides the controller with precise system dynamic information, thereby fundamentally and significantly improving control accuracy and response accuracy. The system identification results are deeply integrated into the design of the fuzzy PID controller. The parameters of the fuzzy PID controller are dynamically adjusted using the identified optimal model parameters, enabling the control strategy to adaptively adjust according to the real-time characteristics of the system. This effectively addresses the system nonlinearity and time-varying nature caused by changes in raw materials and environmental disturbances, significantly enhancing the robustness of the control system. Therefore, this application achieves online adaptive adjustment of the parameters of the fuzzy PID controller, resulting in a faster response, higher accuracy, and stronger robustness of the control system, achieving precise and stable control of the liquid preparation system's control parameters. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A schematic flowchart illustrating a control method for an online liquid preparation system provided in an embodiment of this application; Figure 2 A flowchart illustrating the method for determining a fuzzy PID controller provided in an embodiment of this application; Figure 3 A diagram illustrating the implementation process of a control method for an online liquid preparation system provided in this application in a practical application; Figure 4 A comparison chart of control results provided for embodiments of this application; Figure 5 A schematic diagram of the functional modules of a control device for an online liquid preparation system provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] In one exemplary embodiment, such as Figure 1 As shown, a control method for an online liquid preparation system is provided, comprising: Step 101: Obtain the actual index parameter values of the online solution preparation system under the solution preparation control parameters at the current moment.
[0022] The liquid preparation control parameters include: flow rate, valve opening, pipeline delivery pressure, and agitator speed. The index parameters include: pH value, concentration, conductivity, density, and turbidity.
[0023] Step 102: Input the actual index parameter value and the target index parameter value at the current moment into the fuzzy PID controller at the current moment to obtain the control quantity of the liquid preparation control parameter at the current moment.
[0024] Step 103: Adjust the solution control parameters for the next moment according to the control amount of the solution control parameters.
[0025] Among them, see Figure 2 The method for determining the fuzzy PID controller includes: Step 201: Obtain the preparation dataset of the online solution preparation system during the preparation process; the preparation dataset includes: a sequence of solution preparation control parameters and a sequence of index parameters.
[0026] Step 202: Construct a transfer function model of the online solution preparation system based on the prepared dataset, and identify the model parameters in the transfer function model through the system response characteristics to obtain the initial parameter values.
[0027] Step 203: Consider the mean squared error of the transfer function model, the penalty term for changes in control parameters, and the regularization term of the model parameters to construct the objective cost function.
[0028] Step 204: Based on the initial parameter values and the target cost function, an optimization algorithm is used to iteratively optimize the model parameters in the transfer function model to obtain the optimal model parameters of the transfer function model.
[0029] Step 205: Determine the initial PID control parameters based on the optimal model parameters, and determine the fuzzy PID controller at different times based on the initial PID control parameters using the fuzzy control principle.
[0030] In another exemplary embodiment of this application, step 202, constructing the transfer function model of the online solution preparation system, specifically includes: preprocessing the preparation dataset to obtain a preprocessed preparation dataset; the preprocessing includes: linear interpolation and filtering; using the sequence of solution preparation control parameters in the preprocessed preparation dataset as input and the sequence of index parameters in the preprocessed preparation dataset as output, constructing a first-order inertial pure time delay model; and determining the first-order inertial pure time delay model as the transfer function model of the online solution preparation system.
[0031] The time-domain differential expression of the transfer function model is: .
[0032] in, , , These are the model parameters in the transfer function model; Indicates system output, i.e. Indicator parameters at any given time; Indicates system input, i.e. The solution preparation control parameters at any given time; the above expression represents the system output. rate of change and system input After delay The relationship afterward.
[0033] In another exemplary embodiment of this application, in step 203, the expression for the target cost function is: .
[0034] in, This represents the value of the objective cost function; This represents the mean square error of the transfer function model; This indicates the change in the solution preparation control parameters; This represents the model parameter vector in the transfer function model; This indicates a penalty for changes in control parameters; This represents the L1 norm regularization term of the model parameter vector in the transfer function model; This represents the non-negative weighting coefficient corresponding to the mean square error; This represents the non-negative weight coefficient corresponding to the penalty term; This represents the non-negative weight coefficient corresponding to the regularization term; Indicates time.
[0035] In another exemplary embodiment of this application, step 204 specifically includes: (1) For the kth iteration, construct the quadratic programming subproblem of the kth iteration based on the model parameters in the transfer function model of the kth iteration; wherein, in the 1st iteration, construct the quadratic programming subproblem of the 1st iteration based on the initial parameter values.
[0036] The expression for the quadratic programming subproblem in the k-th iteration is: .
[0037] in, Indicates the search direction; This represents the approximation of the Hessian matrix by the k-th iteration; This represents the model parameter vector in the transfer function model of the k-th iteration; This represents the gradient of the objective cost function value in the k-th iteration (i.e., the objective cost function value at...). gradient at (location) T Indicates transpose; This indicates that the minimum value is being sought.
[0038] (2) Solve the quadratic programming subproblem of the kth iteration to obtain the optimal search direction of the kth iteration. A search strategy is used to determine the step size for the k-th iteration. .
[0039] (3) Calculate the model parameters in the transfer function model of the (k+1)th iteration based on the optimal search direction of the kth iteration and the step size of the kth iteration. The calculation expression is: .
[0040] in, This represents the model parameter vector in the transfer function model of the (k+1)th iteration.
[0041] (4) Substitute the model parameters in the transfer function model of the kth iteration and the model parameters in the transfer function model of the (k+1)th iteration into the target cost function.
[0042] (5) Based on the target cost function value of the kth iteration, the target cost function value of the (k+1)th iteration, the model parameters in the transfer function model of the kth iteration, the model parameters in the transfer function model of the (k+1)th iteration, and the gradient norm of the target cost function value of the kth iteration, determine whether the set iteration termination condition has been met in the kth iteration.
[0043] If so, the model parameters in the transfer function model of the (k+1)th iteration are determined as the optimal model parameters of the transfer function model; otherwise, a quadratic programming subproblem for the (k+1)th iteration is constructed based on the model parameters in the transfer function model of the (k+1)th iteration, and the next iteration is carried out.
[0044] The set iteration termination conditions include: a first termination condition, a second termination condition, or a third termination condition.
[0045] The first termination condition is the value of the objective cost function in the (k+1)th iteration. The value of the objective cost function in the k-th iteration The absolute value of the difference is less than the first set threshold. ,Right now: .
[0046] The second termination condition is the model parameters in the transfer function model of the (k+1)th iteration. The model parameters in the transfer function model of the k-th iteration The norm of the difference is less than the second set threshold. ,Right now: .
[0047] The third termination condition is the gradient of the objective cost function value in the k-th iteration. The norm is less than the third set threshold. ,Right now: .
[0048] The first, second, and third threshold values are all constants.
[0049] In another exemplary embodiment of this application, step 205 specifically includes: (1) Obtain the validation dataset of the online liquid preparation system during the preparation process; the validation dataset includes: a sequence of liquid preparation control parameters for validation and a sequence of index parameters for validation.
[0050] (2) The accuracy of the transfer function model with the optimal model parameters is verified using the aforementioned validation dataset. Specifically, the root mean square error and the coefficient of determination can be used as two important model performance evaluation metrics to verify the accuracy of the model.
[0051] (3) If the accuracy of the transfer function model with the optimal model parameters reaches the preset accuracy requirement, then the optimal model parameters are determined as the finally identified model parameters.
[0052] (4) Calculate the initial PID control parameters based on the finally identified model parameters.
[0053] (5) Input the deviation and deviation rate between the actual index parameter value and the target index parameter value at the current moment into the fuzzy PID controller. Based on the fuzzy control rule table, use the fuzzy inference algorithm to calculate the fuzzy quantity of the PID control parameter and convert the fuzzy quantity into the correction value.
[0054] (6) Calculate the corrected PID control parameters at the current time based on the PID control parameters at the previous time and the correction value at the current time; where the current time is the initial time, the PID control parameters at the previous time are the initial PID control parameters.
[0055] (7) Determine the fuzzy PID controller at the current time based on the corrected PID control parameters at the current time.
[0056] like Figure 3 As shown, the control method of the online liquid preparation system in the above embodiment is implemented in the following process in actual application: (1) Obtain the original data of the online liquid preparation system and perform preprocessing; (2) Use optimization algorithm to identify the online liquid preparation system, and then realize the construction and verification of its controlled variable transfer function model; (3) Based on the system identification result, design a fuzzy PID controller and perform debugging and verification.
[0057] In step (2), the specific process of the optimization algorithm identifying the parameters in the liquid preparation control system model is as follows: (2.1) Design the control function of the liquid preparation system and identify the initial parameters through the system response characteristics. (2.2) Construct the objective cost function and use the optimization algorithm for iterative optimization, with the goal of minimizing the function, thereby obtaining the optimal model parameters. (2.3) Validate the optimized transfer function model on an independent validation dataset, and evaluate the model accuracy by calculating indicators such as goodness of fit and root mean square error. If the preset accuracy requirements are met, the optimized transfer function is determined as the final system model.
[0058] In step (3), the design of the fuzzy PID control algorithm includes the following steps: (3.1) Initially tune the controller parameters based on the identified optimal model parameters. (3.2) Design a two-input, three-output fuzzy PID controller structure to control the deviation between the target pH value and the actual pH value. and rate of change of deviation As input variables, the correction values of the three parameters of the PID controller are output variables, namely the proportional coefficient correction values. Integral coefficient correction amount Differential coefficient correction amount (3.3) Define fuzzy subsets (e.g., NB, ZO, PB) and corresponding membership functions (e.g., trigonometric functions) for the input and output variables. (3.4) Based on the system's dynamic characteristics and control experience, to make the pH adjustment process faster and more stable, construct a set of functions based on "IF ( and THEN ( , , (3.5) The fuzzy rule base described in the form of ")" is used to convert the fuzzy quantity output by fuzzy inference into a precise parameter correction value that can be used for real-time control.
[0059] The following section focuses on phosphate-buffered saline (PBS), a key medium in biopharmaceutical chromatography processes, and provides a detailed explanation of the control method for the online solution preparation system. This buffer system is primarily composed of sodium dihydrogen phosphate (NaH₂PO₄), disodium hydrogen phosphate (Na₂HPO₄), and sodium chloride (NaCl) in a specific molar ratio. Data collection and in-depth analysis of key parameters such as flow rate and pH during PBS preparation were conducted, leading to the proposal of a control method for the online solution preparation system. The implementation process of this method includes the following steps: (1) Collect the input acid pump flow rate (liquid preparation control parameter) and output pH value (index parameter value) of the solution preparation system.
[0060] (2) Interpolation is used to ensure the integrity of the time series data, and moving average filtering is used to smooth and denoise the results. The linear interpolation formula is as follows: .
[0061] .
[0062] The formula shows that when two moments are known... and Measured data ( , , , Based on this, estimate at any intermediate moment. The corresponding flow rate and pH value. Let A represent a time series, where A represents the time series at time t. The estimated acid pump flow rate was obtained through linear interpolation. Indicates at time The actual measured acid pump flow rate value. Indicates at time The actual measured acid pump flow rate value at time B, where B represents the flow rate at time [time value missing]. The pH estimate obtained by linear interpolation at that location. Indicates at time The actual measured pH value, Indicates at time The actual measured pH value. The time variable represents the target time of the interpolation estimate, which lies between two known times. and between. Indicates at time The actual measured acid pump flow rate value. Indicates at time The actual measured pH value, , All represent known data points, and A and B are the target quantities to be determined. .
[0063] The filtering process uses the following formula: .
[0064] Where N is the size of the sliding window; For flow rate or pH value at discrete times The output value on The filtered output value (i.e., the first) (filtered flow velocity at each moment) . It is a general expression that represents the j-th data point counting backwards from the current time in a "sliding window". As j changes from 0 to N-1, it traverses all the data within the entire window.
[0065] The output of this step is a regular and smooth sequence. and The input-output data pairs used for system identification are fitted to a first-order inertial pure time-delay model, and the parameters are identified by optimizing the objective function. .
[0066] In practical applications, linear interpolation functions are used to measure the original irregular flow velocity. or pH data Resampling is performed to obtain equally spaced sequences. =A( )or =B( ),in = . Indicates the first A point in time; The start time; The index of the time step, usually an integer; This represents the time interval between two adjacent sampling points. Then... After performing a moving average filter, we get: .
[0067] For interpolation obtained at the specified time points The flow rate value.
[0068] .
[0069] in For the first pH value after filtering at each time point For interpolation obtained at the specified time points pH value.
[0070] (3) The pH dynamic process of the online solution preparation system is systematically identified using optimization algorithms, and its transfer function model is determined and verified. Specifically, this includes the following steps: The first-order inertial pure time delay model is used to describe the liquid dispensing control system, and its transfer function is as follows: .
[0071] in, The transfer function for the object to be identified. For complex frequencies; The system gain coefficient. Represents the time constant. This indicates the pure time delay.
[0072] transfer function The time-domain differential equation is: .
[0073] Initial gain obtained using the step response method Time constant and lag time .
[0074] Construct the target cost function: .
[0075] in, This represents the mean square error between the model output and the actual output (pH value). The change in the control quantity between adjacent sampling points; For the model parameter vector Norm and , , , All are non-negative weighting coefficients.
[0076] The objective cost function in this embodiment is an improvement on the traditional least squares fitting. It not only retains the mean squared error (MSE) between the model output and the actual response as an accuracy indicator, but also introduces a penalty term for changes in the control quantity. To enhance the controllability of the model, parameters were added. Norm regularization term This improves the sparsity and robustness of the model. The multi-objective optimization framework significantly outperforms existing identification methods that rely solely on MSE, ensuring accuracy while also meeting the needs of engineering applications.
[0077] Construct the initial parameter vector As the starting point of the optimization algorithm; in each iteration In the middle, based on the current parameter estimation Construct a quadratic programming (QP) subproblem: .
[0078] in, For the search direction, This is an approximation of the Hessian matrix in the current iteration step. For the objective function in The gradient at that point.
[0079] By solving this quadratic subproblem, the optimal search direction can be obtained. A line search strategy is used to determine the appropriate step size. Update the parameters to ensure the objective function value decreases sufficiently: .
[0080] The iteration process continues until one of the following conditions is met, at which point the iteration terminates: ① The first termination condition is that the change in the objective function value is less than a set threshold: ,and ① Represents a constant; ② The second termination condition is that the parameter update amount is sufficiently small: ,and ③ The third termination condition is that the gradient norm approaches zero: ,and Represents a constant.
[0081] When the algorithm converges, it outputs the final parameter estimates. , which are the optimal model parameters we are looking for.
[0082] The optimized transfer function model is validated on an independent validation dataset (70% of the data in a dataset is used for model parameter identification, and 30% of the data is used for validation). The model accuracy is evaluated by calculating indicators such as good fit and root mean square error. If the preset accuracy requirements are met, the optimized transfer function is determined as the final system model.
[0083] Root mean square error and coefficient of determination are two important metrics for evaluating model performance, expressed as follows: .
[0084] .
[0085] in, These are actual measured values. These are the model's predicted values. The average of the actual values; Indicates the length of the data signal. R is a constant. The smaller the root mean square error, the higher the accuracy of the model's predictions; 2 The closer the value is to 1, the better the model fits the data.
[0086] (4) Based on the system identification results, design a fuzzy PID controller and conduct debugging and verification. Specifically, this includes the following steps: Based on the identified model parameters The Ziegler-Nichols parameter tuning method was used to... , The three parameters are tuned, and the proportional coefficient is calculated. Integral coefficient Differential coefficients The initial values are shown in Table 1.
[0087] Table 1 Ziegler-Nichols parameter tuning
[0088] Wherein, the integration time constant Differential time constant .
[0089] Design a two-input, three-output fuzzy PID controller structure to control the deviation between the target pH value and the actual pH value. and rate of change of deviation As input variables, the correction values of the three parameters of the PID controller are output variables, namely the proportional coefficient correction values. Integral coefficient correction amount Differential coefficient correction amount .
[0090] The universes of discourse for both input and output variables are divided into seven fuzzy subsets: negative large (NB), negative medium (NM), negative small (NS), zero (ZO), positive small (PS), positive medium (PM), and positive large (PB), and their membership functions are defined as triangular functions.
[0091] Based on the system's dynamic characteristics and control experience, to make the pH adjustment process faster and more stable, a system based on "IF ( and THEN ( , , A fuzzy rule base described in the form of ")". For , , The control rules are shown in Table 2.
[0092] Table 2 , , Fuzzy control rule table
[0093] Based on the fuzzy control rule table, the Mamdani fuzzy inference algorithm is used to calculate... , , The fuzzy value is then defuzzified using the area centroid method, converting it into a precise correction value, which is then used to adjust the parameters of the PID controller in real time. The corrected PID parameters are as follows.
[0094] .
[0095] .
[0096] .
[0097] in, , , These are the proportional coefficient, integral coefficient, and derivative coefficient before correction, respectively. During the first adaptive adjustment... , , All are initial values.
[0098] The results are as follows Figure 4 As shown, compared with the traditional PID control method, fuzzy PID control significantly reduces overshoot, has a faster dynamic response, smoother steady-state performance, and effectively suppresses overshoot and oscillation phenomena. Especially... At a certain time, traditional PID control exhibited significant overshoot, while fuzzy PID control maintained good stability. In summary, when facing dynamic changes and nonlinear characteristics of a system, fuzzy PID control demonstrates stronger robustness and higher control accuracy, with overall control performance superior to traditional PID control.
[0099] The control method for the online liquid preparation system described in the above embodiments acquires and preprocesses the raw data of the online liquid preparation system; uses an optimization algorithm to identify and verify the controlled variables of the online liquid preparation system; and finally designs and debugs a fuzzy PID controller. This overcomes the shortcomings of traditional PID controllers, which rely on fixed parameters and experience-based parameter tuning, and significantly improves the system's control accuracy, response speed, and anti-interference ability. It effectively eliminates overshoot and oscillation phenomena, providing a high-precision and robust pH control solution for online liquid preparation systems.
[0100] Based on the same inventive concept, this application also provides a control device for an online liquid preparation system to implement the control method for the online liquid preparation system described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the control device for the online liquid preparation system provided below can be found in the limitations of the control method for the online liquid preparation system described above, and will not be repeated here.
[0101] In one exemplary embodiment, such as Figure 5 As shown, a control device for an online liquid preparation system is provided, comprising: The data acquisition module 501 is used to acquire the actual index parameter values of the online liquid preparation system under the liquid preparation control parameters at the current moment.
[0102] The control quantity determination module 502 is used to input the actual index parameter value and the target index parameter value at the current moment into the fuzzy PID controller at the current moment to obtain the control quantity of the liquid preparation control parameter at the current moment.
[0103] The solution preparation parameter adjustment module 503 is used to adjust the solution preparation control parameters for the next moment according to the control amount of the solution preparation control parameters.
[0104] The method for determining the fuzzy PID controller includes: Obtain the preparation dataset of the online solution preparation system during the preparation process; the preparation dataset includes: a sequence of solution preparation control parameters and a sequence of index parameters.
[0105] Based on the prepared dataset, a transfer function model of the online solution preparation system is constructed, and the model parameters in the transfer function model are identified by the system response characteristics to obtain the initial parameter values.
[0106] Considering the mean squared error of the transfer function model, the penalty term for changes in control parameters, and the regularization term for model parameters, construct the objective cost function.
[0107] Based on the initial parameter values and the target cost function, an optimization algorithm is used to iteratively optimize the model parameters in the transfer function model to obtain the optimal model parameters of the transfer function model.
[0108] The initial PID control parameters are determined based on the optimal model parameters. Based on the initial PID control parameters, the fuzzy PID controller at different times is determined using the fuzzy control principle.
[0109] The control method and apparatus for the online liquid preparation system of this application have the following advantages: (1) By adopting optimization algorithms and improved target cost functions, the controlled variables are accurately identified, and a transfer function model that can accurately characterize the dynamic characteristics of the liquid preparation system is obtained, providing the controller with accurate system dynamic information, thereby fundamentally and significantly improving control accuracy and response accuracy.
[0110] (2) The system identification results are deeply integrated into the design of the fuzzy PID controller. The proportional factor, domain range or fuzzy rules of the fuzzy controller are dynamically adjusted by using the identified model parameters, so that the control strategy can be adaptively adjusted according to the real-time characteristics of the system, effectively cope with the nonlinearity and time-varying nature of the system caused by changes in raw materials and environmental disturbances, and greatly enhance the robustness of the control system.
[0111] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 6As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores control parameters for the liquid preparation system. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a control method for an online liquid preparation system.
[0112] Those skilled in the art will understand that Figure 6 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0113] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0114] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0115] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0116] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0117] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, etc., and are not limited to these.
[0118] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0119] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A control method for an online liquid preparation system, characterized in that, The control method for the online solution preparation system includes: Obtain the actual index parameter values of the online solution preparation system under the solution preparation control parameters at the current moment; Input the actual index parameter value and the target index parameter value at the current moment into the fuzzy PID controller at the current moment to obtain the control quantity of the liquid preparation control parameter at the current moment; The solution preparation control parameters are adjusted for the next moment based on the control amount of the solution preparation control parameters. The method for determining the fuzzy PID controller includes: Obtain the preparation dataset of the online solution preparation system during the preparation process; the preparation dataset includes: a sequence of solution preparation control parameters and a sequence of index parameters; Based on the prepared dataset, a transfer function model of the online solution preparation system is constructed, and the model parameters in the transfer function model are identified by the system response characteristics to obtain the initial parameter values. Considering the mean squared error of the transfer function model, the penalty term for changes in control parameters, and the regularization term for model parameters, construct the objective cost function; Based on the initial parameter values and the target cost function, an optimization algorithm is used to iteratively optimize the model parameters in the transfer function model to obtain the optimal model parameters of the transfer function model. The initial PID control parameters are determined based on the optimal model parameters. Based on the initial PID control parameters, the fuzzy PID controller at different times is determined using the fuzzy control principle.
2. The control method for the online solution preparation system according to claim 1, characterized in that, The expression for the objective cost function is: ; in, This represents the value of the objective cost function; This represents the mean square error of the transfer function model; This indicates the change in the solution preparation control parameters; This represents the model parameter vector in the transfer function model; This indicates a penalty for changes in control parameters; This represents the L1 norm regularization term of the model parameter vector in the transfer function model; This represents the non-negative weighting coefficient corresponding to the mean square error; This represents the non-negative weight coefficient corresponding to the penalty term; This represents the non-negative weight coefficient corresponding to the regularization term; Indicates time.
3. The control method for the online solution preparation system according to claim 1, characterized in that, Based on the initial parameter values and the target cost function, an optimization algorithm is used to iteratively optimize the model parameters in the transfer function model to obtain the optimal model parameters, specifically including: For the k-th iteration, a quadratic programming subproblem for the k-th iteration is constructed based on the model parameters in the transfer function model of the k-th iteration; wherein, in the 1st iteration, a quadratic programming subproblem for the 1st iteration is constructed based on the initial parameter values; Solve the quadratic programming subproblem of the k-th iteration to obtain the optimal search direction for the k-th iteration, and use the search strategy to determine the step size for the k-th iteration; Calculate the model parameters in the transfer function model of the (k+1)th iteration based on the optimal search direction of the kth iteration and the step size of the kth iteration. Substitute the model parameters from the transfer function model of the k-th iteration and the model parameters from the transfer function model of the (k+1)-th iteration into the target cost function, respectively. Based on the target cost function value of the k-th iteration, the target cost function value of the (k+1)-th iteration, the model parameters in the transfer function model of the k-th iteration, the model parameters in the transfer function model of the (k+1)-th iteration, and the gradient norm of the target cost function value of the k-th iteration, determine whether the set iteration termination condition has been met in the k-th iteration. If so, the model parameters in the transfer function model of the (k+1)th iteration are determined as the optimal model parameters of the transfer function model; otherwise, a quadratic programming subproblem for the (k+1)th iteration is constructed based on the model parameters in the transfer function model of the (k+1)th iteration, and the next iteration is carried out.
4. The control method for the online solution preparation system according to claim 1, characterized in that, The initial PID control parameters are determined based on the optimal model parameters. Then, based on these initial PID control parameters, the fuzzy PID controller at different times is determined using the fuzzy control principle, specifically including: Obtain a validation dataset of the online solution preparation system during the preparation process; the validation dataset includes: a sequence of solution preparation control parameters for validation and a sequence of index parameters for validation; The accuracy of the transfer function model for determining the optimal model parameters is verified using the aforementioned validation dataset. If the accuracy of the transfer function model with the optimal model parameters meets the preset accuracy requirement, then the optimal model parameters are determined as the finally identified model parameters. Calculate the initial PID control parameters based on the finally identified model parameters; The deviation and deviation rate between the actual index parameter value and the target index parameter value at the current moment are input into the fuzzy PID controller. Based on the fuzzy control rule table, the fuzzy quantity of the PID control parameter is calculated using the fuzzy inference algorithm, and the fuzzy quantity is converted into a correction value. Calculate the corrected PID control parameters for the current time based on the PID control parameters of the previous time step and the correction value for the current time step; where the current time step is the initial time step, the PID control parameters of the previous time step are the initial PID control parameters. The fuzzy PID controller for the current moment is determined based on the corrected PID control parameters at the current moment.
5. The control method for the online solution preparation system according to claim 3, characterized in that, The expression for the quadratic programming subproblem in the k-th iteration is: ; in, Indicates the search direction; This represents the approximation of the Hessian matrix by the k-th iteration; This represents the model parameter vector in the transfer function model of the k-th iteration; This represents the gradient of the objective cost function value in the k-th iteration; T Indicates transpose; This indicates that the minimum value is being sought.
6. The control method for the online solution preparation system according to claim 3, characterized in that, The set iteration termination condition includes: a first termination condition, a second termination condition, or a third termination condition; The first termination condition is that the absolute value of the difference between the target cost function value of the (k+1)th iteration and the target cost function value of the kth iteration is less than a first set threshold. The second termination condition is that the norm of the difference between the model parameters in the transfer function model of the (k+1)th iteration and the model parameters in the transfer function model of the kth iteration is less than a second set threshold. The third termination condition is that the gradient norm of the objective cost function value in the k-th iteration is less than a third set threshold.
7. The control method for the online solution preparation system according to claim 6, characterized in that, Based on the preparation data, a transfer function model of the online solution preparation system is constructed, specifically including: The configuration dataset is preprocessed to obtain a preprocessed configuration dataset; the preprocessing includes linear interpolation and filtering. Using the sequence of control parameters for liquid preparation in the preprocessed preparation dataset as input and the sequence of index parameters in the preprocessed preparation dataset as output, a first-order inertial pure time delay model is constructed. The first-order inertial pure time delay model is determined as the transfer function model of the online liquid preparation system.
8. A control device for an online liquid preparation system, characterized in that, The control device for the online solution preparation system includes: The data acquisition module is used to acquire the actual index parameter values of the online solution preparation system under the solution preparation control parameters at the current moment; The control quantity determination module is used to input the actual index parameter value and the target index parameter value at the current moment into the fuzzy PID controller at the current moment to obtain the control quantity of the liquid preparation control parameter at the current moment. The solution preparation parameter adjustment module is used to adjust the solution preparation control parameters for the next moment according to the control amount of the solution preparation control parameters. The method for determining the fuzzy PID controller includes: Obtain the preparation dataset of the online solution preparation system during the preparation process; the preparation dataset includes: a sequence of solution preparation control parameters and a sequence of index parameters; Based on the prepared dataset, a transfer function model of the online solution preparation system is constructed, and the model parameters in the transfer function model are identified by the system response characteristics to obtain the initial parameter values. Considering the mean squared error of the transfer function model, the penalty term for changes in control parameters, and the regularization term for model parameters, construct the objective cost function; Based on the initial parameter values and the target cost function, an optimization algorithm is used to iteratively optimize the model parameters in the transfer function model to obtain the optimal model parameters of the transfer function model. The initial PID control parameters are determined based on the optimal model parameters. Based on the initial PID control parameters, the fuzzy PID controller at different times is determined using the fuzzy control principle.
9. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the control method for the online liquid preparation system according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the control method for the online liquid preparation system as described in any one of claims 1-7.